Skip to content

Commit

Permalink
Merge pull request #10921 from yonasberhe23/page_action_dropdown_fix
Browse files Browse the repository at this point in the history
fix home page test
  • Loading branch information
yonasberhe23 authored May 3, 2024
2 parents be9cb77 + 98d54e9 commit 40f7405
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions cypress/e2e/tests/pages/generic/home.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ describe('Home Page', () => {
describe('Home Page', { testIsolation: 'off' }, () => {
before(() => {
cy.login();
HomePagePo.goTo();
});

it('Can navigate to release notes page for latest Rancher version', { tags: ['@generic', '@adminUser', '@standardUser'] }, () => {
Expand All @@ -40,7 +39,8 @@ describe('Home Page', () => {
* Verify release notes link is valid github page
* Verify correct Rancher version is displayed
*/

HomePagePo.navTo();
homePage.waitForPage();
homePage.restoreAndWait();

cy.getRancherResource('v1', 'management.cattle.io.settings', 'server-version').then((resp: Cypress.Response<any>) => {
Expand All @@ -64,6 +64,9 @@ describe('Home Page', () => {
/**
* Click link and verify user lands on preferences page
*/

HomePagePo.navTo();
homePage.waitForPage();
const prefPage = new PreferencesPagePo();

homePage.prefPageLink().click();
Expand All @@ -79,6 +82,7 @@ describe('Home Page', () => {
* Verify banners display on home page
*/
HomePagePo.navTo();
homePage.waitForPage();
homePage.restoreAndWait();

homePage.bannerGraphic().graphicBanner().should('be.visible');
Expand All @@ -103,6 +107,9 @@ describe('Home Page', () => {

const clusterDetails: string[] = [];

HomePagePo.navTo();
homePage.waitForPage();

homeClusterList.state('local').invoke('text').then((el) => {
clusterDetails.push(el.trim());
});
Expand Down Expand Up @@ -171,6 +178,8 @@ describe('Home Page', () => {
* Filter rows in the cluster list
*/
HomePagePo.navTo();
homePage.waitForPage();

homeClusterList.resourceTable().sortableTable().filter('random text');
homeClusterList.resourceTable().sortableTable().rowElements().should((el) => {
expect(el).to.contain.text('There are no rows which match your search query.');
Expand Down Expand Up @@ -199,6 +208,8 @@ describe('Home Page', () => {
}).as('provClusters');

homePage.goTo();
homePage.waitForPage();

const desc = homeClusterList.resourceTable().sortableTable().rowWithName('local').column(1)
.get('.cluster-description');

Expand Down

0 comments on commit 40f7405

Please sign in to comment.