From 4696b6e50589425be9ae091b50ace5ba46eeb167 Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Thu, 16 Jan 2025 11:36:08 +0000 Subject: [PATCH 1/2] Fix gitrepo bundle list and bundle list when there's a gitrepo that does not target any clusters --- cypress/e2e/tests/pages/fleet/gitrepo.spec.ts | 53 +++++++++---------- shell/components/fleet/FleetBundles.vue | 3 +- shell/list/fleet.cattle.io.bundle.vue | 4 +- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/cypress/e2e/tests/pages/fleet/gitrepo.spec.ts b/cypress/e2e/tests/pages/fleet/gitrepo.spec.ts index 0eb09f58a4a..6c5f6bf5700 100644 --- a/cypress/e2e/tests/pages/fleet/gitrepo.spec.ts +++ b/cypress/e2e/tests/pages/fleet/gitrepo.spec.ts @@ -146,41 +146,40 @@ describe('Git Repo', { testIsolation: 'off', tags: ['@fleet', '@adminUser'] }, ( ; }); - // skipped due to https://github.com/rancher/rancher/issues/48714 - // it('check table headers are available in list and details view', { tags: ['@vai', '@adminUser'] }, function() { - // const workspace = 'fleet-default'; + it('check table headers are available in list and details view', { tags: ['@vai', '@adminUser'] }, function() { + const workspace = 'fleet-default'; - // // go to fleet gitrepo - // listPage.goTo(); - // listPage.waitForPage(); - // headerPo.selectWorkspace(workspace); + // go to fleet gitrepo + listPage.goTo(); + listPage.waitForPage(); + headerPo.selectWorkspace(workspace); - // // check table headers - // const expectedHeadersListView = ['State', 'Name', 'Repo', 'Target', 'Clusters Ready', 'Resources', 'Age']; + // check table headers + const expectedHeadersListView = ['State', 'Name', 'Repo', 'Target', 'Clusters Ready', 'Resources', 'Age']; - // listPage.repoList().resourceTable().sortableTable().tableHeaderRow() - // .within('.table-header-container .content') - // .each((el, i) => { - // expect(el.text().trim()).to.eq(expectedHeadersListView[i]); - // }); + listPage.repoList().resourceTable().sortableTable().tableHeaderRow() + .within('.table-header-container .content') + .each((el, i) => { + expect(el.text().trim()).to.eq(expectedHeadersListView[i]); + }); - // // go to fleet gitrepo details - // listPage.repoList().details(this.gitRepo, 2).find('a').click(); + // go to fleet gitrepo details + listPage.repoList().details(this.gitRepo, 2).find('a').click(); - // const gitRepoDetails = new FleetGitRepoDetailsPo(workspace, this.gitRepo); + const gitRepoDetails = new FleetGitRepoDetailsPo(workspace, this.gitRepo); - // gitRepoDetails.waitForPage(null, 'bundles'); + gitRepoDetails.waitForPage(null, 'bundles'); - // // check table headers - // const expectedHeadersDetailsView = ['State', 'Name', 'Deployments', 'Last Updated', 'Date']; + // check table headers + const expectedHeadersDetailsView = ['State', 'Name', 'Deployments', 'Last Updated', 'Date']; - // gitRepoDetails.bundlesTab().list().resourceTable().sortableTable() - // .tableHeaderRow() - // .within('.table-header-container .content') - // .each((el, i) => { - // expect(el.text().trim()).to.eq(expectedHeadersDetailsView[i]); - // }); - // }); + gitRepoDetails.bundlesTab().list().resourceTable().sortableTable() + .tableHeaderRow() + .within('.table-header-container .content') + .each((el, i) => { + expect(el.text().trim()).to.eq(expectedHeadersDetailsView[i]); + }); + }); it('check all tabs are available in the details view', function() { // testing https://github.com/rancher/dashboard/issues/11155 diff --git a/shell/components/fleet/FleetBundles.vue b/shell/components/fleet/FleetBundles.vue index 8a6088166cf..c9004d1b7c4 100644 --- a/shell/components/fleet/FleetBundles.vue +++ b/shell/components/fleet/FleetBundles.vue @@ -127,7 +127,8 @@ export default { class="text-warning" > {{ row.status.summary.ready }}/{{ row.status.summary.desiredReady }} - {{ row.status.summary.desiredReady }} + {{ row.status.summary.desiredReady }} + - diff --git a/shell/list/fleet.cattle.io.bundle.vue b/shell/list/fleet.cattle.io.bundle.vue index 4b5aaed6735..aa53c044209 100644 --- a/shell/list/fleet.cattle.io.bundle.vue +++ b/shell/list/fleet.cattle.io.bundle.vue @@ -115,11 +115,11 @@ export default { > From 82d1bceec634f2d8818e2bfee450f2ff4cca2ff1 Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Thu, 16 Jan 2025 15:51:47 +0000 Subject: [PATCH 2/2] Disable sorry cypress --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2c0fff356f3..117fdfaac23 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "e2e:dev": "START_SERVER_AND_TEST_INSECURE=1 server-test start:dev https-get://localhost:8005 cy:run:sorry", "e2e:build": "mkdir dist && TEST_INSTRUMENT=false ./scripts/build-e2e", "e2e:docker": "yarn docker:local:stop && ./scripts/e2e-docker-start $RANCHER_VERSION_E2E", - "e2e:prod": "BUILD_DASHBOARD=$BUILD_DASHBOARD GREP_TAGS=$GREP_TAGS TEST_USERNAME=$TEST_USERNAME TEST_BASE_URL=https://127.0.0.1/dashboard yarn cy:run:sorry", + "e2e:prod": "BUILD_DASHBOARD=$BUILD_DASHBOARD GREP_TAGS=$GREP_TAGS TEST_USERNAME=$TEST_USERNAME TEST_BASE_URL=https://127.0.0.1/dashboard yarn cy:run", "coverage": "npx nyc merge coverage coverage/coverage.json", "storybook": "cd storybook && yarn install && yarn storybook", "build-storybook": "cd storybook && yarn install --no-lockfile && NODE_OPTIONS=--max_old_space_size=4096 yarn build-storybook --quiet",