Skip to content

Commit

Permalink
Merge pull request #11377 from aalves08/fix-pipelines
Browse files Browse the repository at this point in the history
update node version on workflows
  • Loading branch information
richard-cox authored Jul 9, 2024
2 parents df60f44 + 2b0dcd6 commit ef3db21
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 59 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/check-plugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: '16.20.2'
- name: Validate Plugin build system
run: ./shell/scripts/test-plugins-build.sh
shell: bash
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/storybook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
storybook:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: '16.20.2'
- name: Install packages
run: yarn install
- name: Build Storybook
Expand Down
100 changes: 51 additions & 49 deletions cypress/e2e/tests/pages/generic/about.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,53 +110,55 @@ describe('About Page', { testIsolation: 'off', tags: ['@generic', '@adminUser',
});
});

describe('CLI Downloads', () => {
// workaround to make the following CLI tests work https://github.com/cypress-io/cypress/issues/8089#issuecomment-1585159023
beforeEach(() => {
aboutPage.goTo();
cy.intercept('GET', 'https://releases.rancher.com/cli2/**').as('download');
});

it('can download macOS CLI', () => {
aboutPage.getLinkDestination('rancher-darwin').then((el) => {
const macOsVersion = el.split('/')[5];

aboutPage.getCliDownloadLinkByLabel('rancher-darwin').then((el: any) => {
el.attr('download', '');
}).click();
cy.wait('@download').then(({ request, response }) => {
expect(response?.statusCode).to.eq(200);
expect(request.url).includes(macOsVersion);
});
});
});

it('can download Linux CLI', () => {
aboutPage.getLinkDestination('rancher-linux').then((el) => {
const linuxVersion = el.split('/')[5];

aboutPage.getCliDownloadLinkByLabel('rancher-linux').then((el: any) => {
el.attr('download', '');
}).click();
cy.wait('@download').then(({ request, response }) => {
expect(response?.statusCode).to.eq(200);
expect(request.url).includes(linuxVersion);
});
});
});

it('can download Windows CLI', () => {
aboutPage.getLinkDestination('rancher-windows').then((el) => {
const windowsVersion = el.split('/')[5];

aboutPage.getCliDownloadLinkByLabel('rancher-windows').then((el: any) => {
el.attr('download', '');
}).click();
cy.wait('@download').then(({ request, response }) => {
expect(response?.statusCode).to.eq(200);
expect(request.url).includes(windowsVersion);
});
});
});
});
// Removed given https://github.com/rancher/rancher/issues/46068
// Re-instate given https://github.com/rancher/dashboard/issues/11387
// describe('CLI Downloads', () => {
// // workaround to make the following CLI tests work https://github.com/cypress-io/cypress/issues/8089#issuecomment-1585159023
// beforeEach(() => {
// aboutPage.goTo();
// cy.intercept('GET', 'https://releases.rancher.com/cli2/**').as('download');
// });

// it('can download macOS CLI', () => {
// aboutPage.getLinkDestination('rancher-darwin').then((el) => {
// const macOsVersion = el.split('/')[5];

// aboutPage.getCliDownloadLinkByLabel('rancher-darwin').then((el: any) => {
// el.attr('download', '');
// }).click();
// cy.wait('@download').then(({ request, response }) => {
// expect(response?.statusCode).to.eq(200);
// expect(request.url).includes(macOsVersion);
// });
// });
// });

// it('can download Linux CLI', () => {
// aboutPage.getLinkDestination('rancher-linux').then((el) => {
// const linuxVersion = el.split('/')[5];

// aboutPage.getCliDownloadLinkByLabel('rancher-linux').then((el: any) => {
// el.attr('download', '');
// }).click();
// cy.wait('@download').then(({ request, response }) => {
// expect(response?.statusCode).to.eq(200);
// expect(request.url).includes(linuxVersion);
// });
// });
// });

// it('can download Windows CLI', () => {
// aboutPage.getLinkDestination('rancher-windows').then((el) => {
// const windowsVersion = el.split('/')[5];

// aboutPage.getCliDownloadLinkByLabel('rancher-windows').then((el: any) => {
// el.attr('download', '');
// }).click();
// cy.wait('@download').then(({ request, response }) => {
// expect(response?.statusCode).to.eq(200);
// expect(request.url).includes(windowsVersion);
// });
// });
// });
// });
});
3 changes: 2 additions & 1 deletion shell/creators/app/app.package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"dependencies": {},
"resolutions": {
"**/webpack": "4",
"@types/node": "^16"
"@types/node": "^16",
"glob": "7.2.3"
}
}
5 changes: 3 additions & 2 deletions shell/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rancher/shell",
"version": "2.0.0",
"version": "2.0.1",
"description": "Rancher Dashboard Shell",
"repository": "https://github.com/rancherlabs/dashboard",
"license": "Apache-2.0",
Expand Down Expand Up @@ -153,7 +153,8 @@
"nth-check": ">=2.0.1",
"follow-redirects": ">=1.14.7",
"merge": ">=2.1.1",
"semver": ">=7.5.2"
"semver": ">=7.5.2",
"glob": "7.2.3"
},
"nyc": {
"extension": [
Expand Down
3 changes: 2 additions & 1 deletion storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"resolutions": {
"polished": "4.2.2",
"playwright": "1.44.0",
"playwright-core": "1.44.0"
"playwright-core": "1.44.0",
"glob": "7.2.3"
}
}

0 comments on commit ef3db21

Please sign in to comment.