Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move log related commands to .logs namespaces. #3796

Merged
merged 9 commits into from
Aug 16, 2023

Conversation

garg3133
Copy link
Member

@garg3133 garg3133 commented Jul 7, 2023

New logs namespace:

  • .logs.getSessionLog()
  • .logs.getSessionLogType()
  • .logs.isSessionLogAvailable()
  • .logs.captureBrowserConsoleLogs() (also available as .captureBrowserConsoleLogs())
  • .logs.captureBrowserExceptions() (also available as captureBrowserExceptions())

Deprecated commands:

  • .getLog() -- In favour of .logs.getSessionLog()
  • .getLogTypes() -- In favour of .logs.getSessionLogTypes()
  • .isLogAvailable() -- In favour of .logs.isSessionLogAvailable()
  • .sessionLog() -- In favour of .logs.getSessionLog()
  • .sessionLogTypes() -- In favour of .logs.getSessionLogTypes()

TODO:

  • Move commands to respective namespaces.
  • Update tests
  • Update JSDoc
  • Update types

Sorry, something went wrong.

@github-actions
Copy link

github-actions bot commented Jul 7, 2023

Status

  • ✅ Type files updated!

@garg3133 garg3133 force-pushed the logs-namespace branch 2 times, most recently from 37c7e08 to 2103c3b Compare July 10, 2023 13:16
@garg3133 garg3133 changed the title Move some commands to respective namespaces. Move log related commands to .logs namespaces. Jul 10, 2023
@swrdfish
Copy link
Member

These changes are also dependent on #3794 ?
Is that the reason for the test failures?

@garg3133
Copy link
Member Author

@swrdfish Yes. Also, some more tests need to be added here for new namespace, but the existing tests should pass as soon as #3794 is merged.

@garg3133
Copy link
Member Author

This PR is ready now.

/cc: @swrdfish @vaibhavsingh97 @gravityvi

@@ -0,0 +1,54 @@
const ClientCommand = require('../_base-command.js');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking that it would be better to name this and the other session log commands with using "session", as in getSessionLog, getSessionLogTypes, isSessionLogAvailable

@garg3133
Copy link
Member Author

@beatfactor I made the requested changes.

@beatfactor
Copy link
Member

@beatfactor I made the requested changes.

Great, @AutomatedTester does this look ok to you, meaning the session log command names?

@AutomatedTester
Copy link
Member

Yes, this looks good.

@beatfactor beatfactor self-requested a review August 16, 2023 11:40
@AutomatedTester AutomatedTester merged commit 6976c6a into nightwatchjs:main Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants