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

Fix: .registerBasicAuth() not working in Edge browser #3848 #3857

Merged
merged 4 commits into from Aug 9, 2023

Conversation

DenysLins
Copy link
Contributor

Thanks in advance for your contribution. Please follow the below steps in submitting a pull request, as it will help us with reviewing it quicker.

  • Create a new branch from master (e.g. features/my-new-feature or issue/123-my-bugfix);
  • If you're fixing a bug also create an issue if one doesn't exist yet;
  • If it's a new feature explain why do you think it's necessary. Please check with the maintainers beforehand to make sure it is something that we will accept. Usually we only accept new features if we feel that they will benefit the entire community;
  • Please avoid sending PRs which contain drastic or low level changes. If you are certain that the changes are needed, please discuss them beforehand and indicate what the impact will be;
  • If your change is based on existing functionality please consider refactoring first. Pull requests that duplicate code will most likely be ignored;
  • Do not include changes that are not related to the issue at hand;
  • Follow the same coding style with regards to spaces, semicolons, variable naming etc.;
  • Always add unit tests - PRs without tests are most of the times ignored.

@CLAassistant
Copy link

CLAassistant commented Aug 3, 2023

CLA assistant check
All committers have signed the CLA.

@DenysLins
Copy link
Contributor Author

Resolves #3848

Copy link

@ChristophMuth ChristophMuth left a comment

Choose a reason for hiding this comment

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

I tested your changes against my bug and can confirm that it resolves the issue.

@github-actions
Copy link

github-actions bot commented Aug 7, 2023

Status

  • ❌ No modified files found in the types directory.
    Please make sure to include types for any changes you have made. Thank you!.

Copy link
Member

@vaibhavsingh97 vaibhavsingh97 left a comment

Choose a reason for hiding this comment

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

The changes look good to me. Could you kindly include tests for the same? For reference, you may refer to the file test/src/index/transport/testEdgeOptions.js

Copy link
Member

@garg3133 garg3133 left a comment

Choose a reason for hiding this comment

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

While the changes in this PR are correct, I feel that instead of calling this.__isBrowserName() twice, we should consider making the alternateName parameter of __isBrowserName() function accept an array as well, so that we only need to do:

isEdge() {
  return this.__isBrowserName(Browser.EDGE, ['edge', 'msedge']);
}

The above can be achieved by the following small change here:

if (alternateName) {
  alternateName = Array.isArray(alternateName) ? alternateName : [alternateName];

  return [browser, ...alternateName].some(name => browserNames.includes(name));
}

@DenysLins
Copy link
Contributor Author

Done @garg3133 and @vaibhavsingh97

Copy link
Member

@garg3133 garg3133 left a comment

Choose a reason for hiding this comment

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

Superb @DenysLins! LGTM!
Thanks a lot for your contribution.

test/src/index/transport/testEdgeOptions.js Outdated Show resolved Hide resolved
Copy link
Member

@gravityvi gravityvi left a comment

Choose a reason for hiding this comment

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

Thanks @DenysLins for fixing this issue 🎉

@gravityvi gravityvi merged commit e33361c into nightwatchjs:main Aug 9, 2023
17 checks passed
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

6 participants