Skip to content
Merged
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
4 changes: 4 additions & 0 deletions cypress/e2e/po/pages/explorer/charts/chart.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ export class ChartPage extends PagePo {
return new BannersPo('[data-testid="deprecation-and-experimental-banner"]', this.self());
}

versions() {
return this.self().find('.chart-content__right-bar__section--cVersion a');
}

selectVersion(version: string) {
return this.self().find('.chart-content__right-bar__section--cVersion').contains(version).click();
}
Expand Down
8 changes: 6 additions & 2 deletions cypress/e2e/tests/pages/explorer/apps/charts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,13 @@ describe('Apps/Charts', { tags: ['@explorer', '@adminUser'] }, () => {
// Set up intercept for the network request triggered by $fetch
cy.intercept('GET', '**/v1/catalog.cattle.io.clusterrepos/**').as('fetchChartDataAfterSelect');

chartPage.selectVersion('105.1.0+up4.10.0');
chartPage.versions()
.first()
.then((firstVersion) => {
chartPage.selectVersion(firstVersion.text());

cy.wait('@fetchChartDataAfterSelect').its('response.statusCode').should('eq', 200);
cy.wait('@fetchChartDataAfterSelect').its('response.statusCode').should('eq', 200);
});
});

it('should not call fetch when navigating back to charts page', () => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"install:ci": "yarn install --frozen-lockfile",
"dev": "bash -c 'source ./scripts/version && NODE_ENV=dev ./node_modules/.bin/vue-cli-service serve'",
"mem-dev": "bash -c 'source ./scripts/version && NODE_ENV=dev node --max-old-space-size=8192 ./node_modules/.bin/vue-cli-service serve'",
"docker:local:start": "docker run -d --restart=unless-stopped -p 80:80 -p 443:443 -e CATTLE_BOOTSTRAP_PASSWORD=password -e CATTLE_PASSWORD_MIN_LENGTH=3 --name cypress --privileged rancher/rancher:v2.11-head",
"docker:local:start": "docker run -d --restart=unless-stopped -p 80:80 -p 443:443 -e CATTLE_BOOTSTRAP_PASSWORD=password -e CATTLE_PASSWORD_MIN_LENGTH=3 --name cypress --privileged stgregistry.suse.com/rancher/rancher:v2.11-head",
"docker:local:stop": "docker kill cypress || true && docker rm cypress || true",
"build": "NODE_OPTIONS=--max_old_space_size=4096 ./node_modules/.bin/vue-cli-service build",
"build:lib": "cd pkg/rancher-components && yarn build:lib",
Expand Down
2 changes: 1 addition & 1 deletion scripts/e2e-docker-start
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ docker run -d --restart=unless-stopped -p 80:80 -p 443:443 ${VOLUME_ARGS} \
-e CATTLE_PASSWORD_MIN_LENGTH=3 \
--name cypress \
--privileged \
rancher/rancher:${RANCHER_IMG_VERSION}
stgregistry.suse.com/rancher/rancher:${RANCHER_IMG_VERSION}

docker ps

Expand Down