mirror of https://github.com/rancher/dashboard.git
Vue 3: Fixed cancelling adding members returns to the wrong page (#11906)
This commit is contained in:
parent
ab2f0a6295
commit
2659c459d9
|
|
@ -32,6 +32,10 @@ export default class ClusterProjectMembersPo extends PagePo {
|
|||
return new AsyncButtonPo('[data-testid="form-save"]', this.self());
|
||||
}
|
||||
|
||||
cancelCreateForm(): AsyncButtonPo {
|
||||
return new AsyncButtonPo('[data-testid="form-cancel"]', this.self());
|
||||
}
|
||||
|
||||
resourcesList() {
|
||||
return new BaseResourceList(this.self());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import UsersPo from '@/cypress/e2e/po/pages/users-and-auth/users.po';
|
||||
import ClusterProjectMembersPo from '@/cypress/e2e/po/pages/explorer/cluster-project-members.po';
|
||||
import HomePagePo from '@/cypress/e2e/po/pages/home.po';
|
||||
|
||||
const runTimestamp = +new Date();
|
||||
const runPrefix = `e2e-test-${ runTimestamp }`;
|
||||
|
|
@ -7,14 +8,14 @@ const runPrefix = `e2e-test-${ runTimestamp }`;
|
|||
const username = `${ runPrefix }-cluster-proj-member`;
|
||||
const standardPassword = 'standard-password';
|
||||
|
||||
describe.skip('[Vue3 Skip]: Cluster Project and Members', { tags: ['@explorer2', '@adminUser'] }, () => {
|
||||
describe('Cluster Project and Members', { tags: ['@explorer2', '@adminUser'] }, () => {
|
||||
beforeEach(() => {
|
||||
cy.login();
|
||||
});
|
||||
it('Members added to both Cluster Membership should not show "Loading..." next to their names', () => {
|
||||
const usersAdmin = new UsersPo('_');
|
||||
const userCreate = usersAdmin.createEdit();
|
||||
|
||||
// this will login as admin
|
||||
cy.login();
|
||||
|
||||
// create a standard user
|
||||
usersAdmin.goTo();
|
||||
usersAdmin.list().create();
|
||||
|
|
@ -54,4 +55,16 @@ describe.skip('[Vue3 Skip]: Cluster Project and Members', { tags: ['@explorer2',
|
|||
});
|
||||
});
|
||||
});
|
||||
it('Clicking cancel should return to Cluster and Project members ', () => {
|
||||
HomePagePo.goTo();
|
||||
const clusterMembership = new ClusterProjectMembersPo('local', 'cluster-membership');
|
||||
|
||||
clusterMembership.navToClusterMenuEntry('local');
|
||||
// if we do not wait for the cluster page to load, then we get the old side nav from Users & Authentication
|
||||
clusterMembership.waitForPageWithSpecificUrl('/c/local/explorer');
|
||||
clusterMembership.navToSideMenuEntryByLabel('Cluster and Project Members');
|
||||
clusterMembership.triggerAddClusterOrProjectMemberAction();
|
||||
clusterMembership.cancelCreateForm().click();
|
||||
clusterMembership.waitForPageWithExactUrl();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ export default {
|
|||
CruResource,
|
||||
Loading,
|
||||
},
|
||||
inheritAttrs: false,
|
||||
|
||||
mixins: [CreateEditView],
|
||||
async fetch() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue