Skip to content

Commit

Permalink
Merge pull request rancher#11201 from codyrancher/azure-ad-test
Browse files Browse the repository at this point in the history
Fixing an azuread test where the wrong auth provider is being selected
  • Loading branch information
codyrancher authored Jun 10, 2024
2 parents 75ffa34 + 3256f2f commit bc74f41
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ export default class ClusterManagerCreatePagePo extends ClusterManagerCreateImpo
this.self().find('.toggle-container').should(assertion);
}

gridElementExistance(groupIndex = 0, itemIndex = 0, assertion: string) {
this.self().find(`[data-testid="cluster-manager-create-grid-${ groupIndex }-${ itemIndex }"]`).should(assertion);
}

gridElementExistanceByName(name: string, assertion: string) {
return this.self().contains('.grid .name', name, { timeout: 10000 }).should(assertion);
}
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/po/pages/users-and-auth/authProvider.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
2 changes: 1 addition & 1 deletion cypress/e2e/tests/pages/manager/cluster-manager.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe('Cluster Manager', { testIsolation: 'off', tags: ['@manager', '@adminUs

// seems like the waitForPage does await for full DOM render, so let's wait for a simple assertion
// like "gridElementExists" to make sure we aren't creating a fake assertion with the toggle
clusterCreate.gridElementExistance(0, 0, 'exist');
clusterCreate.gridElementExistanceByName('Linode', 'exist');
clusterCreate.rkeToggleExistance('not.exist');

const sideNav = new ProductNavPo();
Expand Down
2 changes: 1 addition & 1 deletion shell/components/SelectIconGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default {
:target="get(r, targetField)"
:rel="rel"
class="item"
:data-testid="componentTestid + '-' + idx"
:data-testid="componentTestid + '-' + get(r, nameField)"
:class="{
'has-description': !!get(r, descriptionField),
'has-side-label': !!get(r, sideLabelField), [colorFor(r, idx)]: true, disabled: get(r, disabledField) === true
Expand Down
2 changes: 1 addition & 1 deletion shell/edit/provisioning.cattle.io.cluster/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ export default {
name-field="label"
side-label-field="tag"
:color-for="colorFor"
:component-testid="'cluster-manager-create-grid-' + i"
component-testid="cluster-manager-create-grid"
@clicked="clickedType"
/>
</div>
Expand Down

0 comments on commit bc74f41

Please sign in to comment.