-
Notifications
You must be signed in to change notification settings - Fork 261
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
Fixing an azuread test where the wrong auth provider is being selected #11201
Conversation
Not aware that any providers have been removed. We should maybe try and select by a data test id that we add, or by something more stable than the index |
ac4ca00
to
56bace6
Compare
@@ -27,6 +27,6 @@ export default class AuthProviderPo extends PagePo { | |||
} | |||
|
|||
selectAzureAd() { | |||
return this.self().find('[data-testid="select-icon-grid-3"]').click(); | |||
return this.self().find('[data-testid="select-icon-grid-AzureAD"]').click(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switched to name so the test is more resilient and not dependent on list order.
gridElementExistance(groupIndex = 0, itemIndex = 0, assertion: string) { | ||
this.self().find(`[data-testid="cluster-manager-create-grid-${ groupIndex }-${ itemIndex }"]`).should(assertion); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was only used in one location and I removed it because this was a little clunky and there was already an existing lookup by name that could be used instead.
It appears that there are 2 less providers being used now. Is this a backend issue?
56bace6
to
3256f2f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Turns out that the order of the providers has changed (changes all the time?) so this broke the reliance on looking up elements based on index.
Technical notes summary
This change makes the relevant tests more robust by relying on names instead of indices.
Areas which could experience regressions
Only our tests
Checklist