Skip to content

Commit

Permalink
unpin chrome version
Browse files Browse the repository at this point in the history
  • Loading branch information
Yonas Berhe authored and Yonas Berhe committed Dec 6, 2024
1 parent 19b9aa0 commit f3f5b12
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 99 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ jobs:

# Installing fixed version of Chrome since latest version does not work (128 didn't work)
# Leaving this here again in case we need to pin to a specific Chrome version in the future
- name: Install Chrome 127
run: |
sudo apt-get install -y wget
cd /tmp
wget -q http://mirror.cs.uchicago.edu/google-chrome/pool/main/g/google-chrome-stable/google-chrome-stable_127.0.6533.72-1_amd64.deb
sudo apt-get install -y --allow-downgrades ./google-chrome-stable_127.0.6533.72-1_amd64.deb
google-chrome --version
# - name: Install Chrome 127
# run: |
# sudo apt-get install -y wget
# cd /tmp
# wget -q http://mirror.cs.uchicago.edu/google-chrome/pool/main/g/google-chrome-stable/google-chrome-stable_127.0.6533.72-1_amd64.deb
# sudo apt-get install -y --allow-downgrades ./google-chrome-stable_127.0.6533.72-1_amd64.deb
# google-chrome --version

- name: Download e2e build
uses: actions/download-artifact@v4
Expand Down
186 changes: 94 additions & 92 deletions cypress/e2e/tests/pages/generic/home.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,98 +27,6 @@ describe('Home Page', () => {
cy.get('@settingsReq.all').should('have.length', 1);
});

describe('Home Page', { testIsolation: 'off' }, () => {
before(() => {
cy.login();
});

it('Can navigate to release notes page for latest Rancher version', { tags: ['@generic', '@adminUser', '@standardUser'] }, () => {
/**
* Verify changelog banner is hidden after clicking link
* 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>) => {
homePage.changelog().self().contains('Learn more about the improvements and new capabilities in this version');
homePage.whatsNewBannerLink().contains(`What's new in ${ CURRENT_RANCHER_VERSION }`);

homePage.whatsNewBannerLink().invoke('attr', 'href').then((releaseNotesUrl) => {
cy.request(releaseNotesUrl).then((res) => {
expect(res.status).equals(200);
});
});

homePage.whatsNewBannerLink().click();
homePage.changelog().self().should('not.exist');
});
});

it('Can navigate to Preferences page', { tags: ['@generic', '@adminUser', '@standardUser'] }, () => {
/**
* Click link and verify user lands on preferences page
*/

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

homePage.prefPageLink().click();
prefPage.waitForPage();
prefPage.checkIsCurrentPage();
prefPage.title();
});

it('Can restore hidden cards', { tags: ['@generic', '@adminUser', '@standardUser'] }, () => {
/**
* Hide home page banners
* Click the restore link
* Verify banners display on home page
*/
HomePagePo.navTo();
homePage.waitForPage();
homePage.restoreAndWait();

homePage.bannerGraphic().graphicBanner().should('be.visible');
homePage.bannerGraphic().graphicBannerCloseButton();
homePage.bannerGraphic().graphicBanner().should('not.exist');

homePage.getLoginPageBanner().checkVisible();
homePage.getLoginPageBanner().closeButton();
homePage.getLoginPageBanner().checkNotExists();

homePage.restoreAndWait();

homePage.bannerGraphic().graphicBanner().should('be.visible');
homePage.getLoginPageBanner().checkVisible();
});

it('Can use the Manage, Import Existing, and Create buttons', { tags: ['@generic', '@adminUser', '@standardUser'] }, () => {
/**
* Click 'Manage' button and verify user lands on the Cluster Management page
* Click on the Import Existing button and verify user lands on the cluster creation page in import mode
* Click on the Create button and verify user lands on the cluster creation page
*/
const clusterManagerPage = new ClusterManagerListPagePo('_');
const genericCreateClusterPage = new ClusterManagerImportGenericPagePo('_');

HomePagePo.navTo();
homePage.manageButton().click();
clusterManagerPage.waitForPage();

HomePagePo.goToAndWaitForGet();
homePage.importExistingButton().click();
genericCreateClusterPage.waitForPage('mode=import');

HomePagePo.goToAndWaitForGet();
homePage.createButton().click();
genericCreateClusterPage.waitForPage();
});
});

describe('List', { testIsolation: 'off' }, () => {
before(() => {
cy.login();
Expand Down Expand Up @@ -284,4 +192,98 @@ describe('Home Page', () => {
cy.url().should('include', '/support');
});
});

describe('Home Page', { testIsolation: 'off' }, () => {
before(() => {
cy.login();
});

it('Can navigate to Preferences page', { tags: ['@generic', '@adminUser', '@standardUser'] }, () => {
/**
* Click link and verify user lands on preferences page
*/

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

homePage.prefPageLink().click();
prefPage.waitForPage();
prefPage.checkIsCurrentPage();
prefPage.title();
});

it('Can restore hidden cards', { tags: ['@generic', '@adminUser', '@standardUser'] }, () => {
/**
* Hide home page banners
* Click the restore link
* Verify banners display on home page
*/
HomePagePo.navTo();
homePage.waitForPage();
homePage.restoreAndWait();

homePage.bannerGraphic().graphicBanner().should('be.visible');
homePage.bannerGraphic().graphicBannerCloseButton();
homePage.bannerGraphic().graphicBanner().should('not.exist');

homePage.getLoginPageBanner().checkVisible();
homePage.getLoginPageBanner().closeButton();
homePage.getLoginPageBanner().checkNotExists();

homePage.restoreAndWait();

homePage.bannerGraphic().graphicBanner().should('be.visible');
homePage.getLoginPageBanner().checkVisible();
});

it('Can use the Manage, Import Existing, and Create buttons', { tags: ['@generic', '@adminUser', '@standardUser'] }, () => {
/**
* Click 'Manage' button and verify user lands on the Cluster Management page
* Click on the Import Existing button and verify user lands on the cluster creation page in import mode
* Click on the Create button and verify user lands on the cluster creation page
*/
const clusterManagerPage = new ClusterManagerListPagePo('_');
const genericCreateClusterPage = new ClusterManagerImportGenericPagePo('_');

HomePagePo.navTo();
homePage.manageButton().click();
clusterManagerPage.waitForPage();

HomePagePo.goToAndWaitForGet();
homePage.importExistingButton().click();
genericCreateClusterPage.waitForPage('mode=import');

HomePagePo.goToAndWaitForGet();
homePage.createButton().click();
genericCreateClusterPage.waitForPage();
});

// Note: This must be the last test to run in this test suite.
// When the test clicks on a link that opens a new tab it causes failures in tests that run after it.
it('Can navigate to release notes page for latest Rancher version', { tags: ['@generic', '@adminUser', '@standardUser'] }, () => {
/**
* Verify changelog banner is hidden after clicking link
* 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>) => {
homePage.changelog().self().contains('Learn more about the improvements and new capabilities in this version');
homePage.whatsNewBannerLink().contains(`What's new in ${ CURRENT_RANCHER_VERSION }`);

homePage.whatsNewBannerLink().invoke('attr', 'href').then((releaseNotesUrl) => {
cy.request(releaseNotesUrl).then((res) => {
expect(res.status).equals(200);
});
});

homePage.whatsNewBannerLink().click();
homePage.changelog().self().should('not.exist');
});
});
});
});

0 comments on commit f3f5b12

Please sign in to comment.