Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion cypress/e2e/tests/pages/manager/cloud-credential.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ describe('Cloud Credential', { tags: ['@manager', '@adminUser'] }, () => {

beforeEach(() => {
cy.login();
cy.changeRancherTheme();
HomePagePo.goTo(); // this is needed to ensure we have a valid authentication session
});

Expand All @@ -54,14 +55,22 @@ describe('Cloud Credential', { tags: ['@manager', '@adminUser'] }, () => {
cloudCredentialsPage.goTo();
cloudCredentialsPage.waitForPage();
cloudCredentialsPage.create();

// Ignoring the user profile picture
cy.hideElementBySelector('[data-testid="nav_header_showUserMenu"]');
// Ignoring the side navbar counters
cy.hideElementBySelector("[data-testid='type-count']");
// takes percy snapshot.
cy.percySnapshot('List of cloud credentials page');
cloudCredentialsPage.createEditCloudCreds().waitForPage();
cloudCredentialsPage.createEditCloudCreds().cloudServiceOptions().selectSubTypeByIndex(0).click();
cloudCredentialsPage.createEditCloudCreds().waitForPage('type=aws');

cloudCredentialsPage.createEditCloudCreds().accessKey().set(access);
cloudCredentialsPage.createEditCloudCreds().secretKey().set(secret);
cloudCredentialsPage.createEditCloudCreds().nameNsDescription().name().set(name);

// takes percy snapshot.
cy.percySnapshot('Cluster credential creation page');
cloudCredentialsPage.createEditCloudCreds().nameNsDescription().name().value()
.should('eq', name);

Expand Down
11 changes: 11 additions & 0 deletions cypress/e2e/tests/pages/manager/cluster-manager.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ describe('Cluster Manager', { testIsolation: 'off', tags: ['@manager', '@adminUs

before(() => {
cy.login();
cy.changeRancherTheme();
});

// Revert commented out tests as part of https://github.com/rancher/dashboard/issues/15391
Expand Down Expand Up @@ -545,6 +546,16 @@ describe('Cluster Manager', { testIsolation: 'off', tags: ['@manager', '@adminUs
const clusterList = new ClusterManagerListPagePo('_');

clusterList.waitForPage();

// Ignoring the user profile picture
cy.hideElementBySelector('[data-testid="nav_header_showUserMenu"]');
// Ignoring the side navbar counters
cy.hideElementBySelector("[data-testid='type-count']");
// Ignoring machine and age counters
cy.hideElementBySelector("[class='col-machine-summary-graph']");
cy.hideElementBySelector("[class='col-live-date']");
// takes percy snapshot.
cy.percySnapshot('Cluster manager Local cluster');
});

describe('Cluster Details Page and Tabs', () => {
Expand Down
1 change: 1 addition & 0 deletions cypress/globals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ declare global {
setupWebSocket: any;
hideElementBySelector(text:string) :void;
state(state: any): any;
changeRancherTheme(): Chainable<string>;

login(username?: string, password?: string, cacheSession?: boolean, skipNavigation?: boolean, acceptConfirmation?: string): Chainable<Element>;
logout(): Chainable;
Expand Down
Loading