From cfb0bee782a2af42da9ff12b54518c921d2d9689 Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Mon, 23 Dec 2024 14:17:00 +0000 Subject: [PATCH 1/2] Temporarily stop failing test - See https://github.com/rancher/dashboard/issues/12936 for details - (requires calico tab in rke create page, which isn't there because 2.9 dockerhub head doesn't serve the related addon chart) --- .../pages/global-settings/settings-p2.spec.ts | 89 ++++++++++--------- 1 file changed, 45 insertions(+), 44 deletions(-) diff --git a/cypress/e2e/tests/pages/global-settings/settings-p2.spec.ts b/cypress/e2e/tests/pages/global-settings/settings-p2.spec.ts index 6a3d414d367..845e15f07b4 100644 --- a/cypress/e2e/tests/pages/global-settings/settings-p2.spec.ts +++ b/cypress/e2e/tests/pages/global-settings/settings-p2.spec.ts @@ -398,50 +398,51 @@ describe('Settings', { testIsolation: 'off' }, () => { settingsPage.settingsValue('hide-local-cluster').contains(settings['hide-local-cluster'].original); }); - it('can update system-default-registry', { tags: ['@globalSettings', '@adminUser'] }, () => { - // Update setting - SettingsPagePo.navTo(); - settingsPage.editSettingsByLabel('system-default-registry'); - - const settingsEdit = settingsPage.editSettings('local', 'system-default-registry'); - - settingsEdit.waitForPage(); - settingsEdit.title().contains('Setting: system-default-registry').should('be.visible'); - settingsEdit.settingsInput().set(settings['system-default-registry'].new); - settingsEdit.saveAndWait('system-default-registry'); - settingsPage.waitForPage(); - settingsPage.settingsValue('system-default-registry').contains(settings['system-default-registry'].new); - - // Check cluster manager > create - const createRKE2ClusterPage = new ClusterManagerCreateRke2CustomPagePo(); - - clusterList.goTo(); - clusterList.checkIsCurrentPage(); - clusterList.createCluster(); - - createRKE2ClusterPage.waitForPage(); - createRKE2ClusterPage.rkeToggle().set('RKE2/K3s'); - - createRKE2ClusterPage.selectCustom(0); - createRKE2ClusterPage.clusterConfigurationTabs().clickTabWithSelector('[data-testid="btn-rke2-calico"]'); - cy.contains(settings['system-default-registry'].new).should('exist'); // Note - this doesn't test anything. docker.io exists in the chart in all worlds, system-default-registry value does not - - const settingsPageBlank = new SettingsPagePo(); - const settingsEditBlank = settingsPageBlank.editSettings(undefined, 'system-default-registry'); - - // Reset - SettingsPagePo.navTo(); - settingsPageBlank.waitForPage(); - settingsPageBlank.editSettingsByLabel('system-default-registry'); - - settingsEditBlank.waitForPage(); - settingsEditBlank.title().contains('Setting: system-default-registry').should('be.visible'); - settingsEditBlank.settingsInput().clear(); - settingsEditBlank.saveAndWait('system-default-registry'); - - settingsPageBlank.waitForPage(); - settingsPageBlank.settingsValue('system-default-registry').contains(settings['system-default-registry'].original); - }); + // Blocked on https://github.com/rancher/dashboard/issues/12936 / https://github.com/rancher/dashboard/pull/12935 + // it('can update system-default-registry', { tags: ['@globalSettings', '@adminUser'] }, () => { + // // Update setting + // SettingsPagePo.navTo(); + // settingsPage.editSettingsByLabel('system-default-registry'); + + // const settingsEdit = settingsPage.editSettings('local', 'system-default-registry'); + + // settingsEdit.waitForPage(); + // settingsEdit.title().contains('Setting: system-default-registry').should('be.visible'); + // settingsEdit.settingsInput().set(settings['system-default-registry'].new); + // settingsEdit.saveAndWait('system-default-registry'); + // settingsPage.waitForPage(); + // settingsPage.settingsValue('system-default-registry').contains(settings['system-default-registry'].new); + + // // Check cluster manager > create + // const createRKE2ClusterPage = new ClusterManagerCreateRke2CustomPagePo(); + + // clusterList.goTo(); + // clusterList.checkIsCurrentPage(); + // clusterList.createCluster(); + + // createRKE2ClusterPage.waitForPage(); + // createRKE2ClusterPage.rkeToggle().set('RKE2/K3s'); + + // createRKE2ClusterPage.selectCustom(0); + // createRKE2ClusterPage.clusterConfigurationTabs().clickTabWithSelector('[data-testid="btn-rke2-calico"]'); + // cy.contains(settings['system-default-registry'].new).should('exist'); // Note - this doesn't test anything. docker.io exists in the chart in all worlds, system-default-registry value does not + + // const settingsPageBlank = new SettingsPagePo(); + // const settingsEditBlank = settingsPageBlank.editSettings(undefined, 'system-default-registry'); + + // // Reset + // SettingsPagePo.navTo(); + // settingsPageBlank.waitForPage(); + // settingsPageBlank.editSettingsByLabel('system-default-registry'); + + // settingsEditBlank.waitForPage(); + // settingsEditBlank.title().contains('Setting: system-default-registry').should('be.visible'); + // settingsEditBlank.settingsInput().clear(); + // settingsEditBlank.saveAndWait('system-default-registry'); + + // settingsPageBlank.waitForPage(); + // settingsPageBlank.settingsValue('system-default-registry').contains(settings['system-default-registry'].original); + // }); it('standard user has only read access to Settings page', { tags: ['@globalSettings', '@standardUser'] }, () => { // verify action buttons are hidden for standard user From cd81f29674a2981d8b3ebbe8e0b3eb300c95c45f Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Mon, 23 Dec 2024 14:27:36 +0000 Subject: [PATCH 2/2] Fix lint --- cypress/e2e/tests/pages/global-settings/settings-p2.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cypress/e2e/tests/pages/global-settings/settings-p2.spec.ts b/cypress/e2e/tests/pages/global-settings/settings-p2.spec.ts index 845e15f07b4..ca208814dfc 100644 --- a/cypress/e2e/tests/pages/global-settings/settings-p2.spec.ts +++ b/cypress/e2e/tests/pages/global-settings/settings-p2.spec.ts @@ -1,9 +1,9 @@ import { SettingsPagePo } from '@/cypress/e2e/po/pages/global-settings/settings.po'; import HomePagePo from '@/cypress/e2e/po/pages/home.po'; import BurgerMenuPo from '@/cypress/e2e/po/side-bars/burger-side-menu.po'; -import ClusterManagerCreateRke2CustomPagePo from '@/cypress/e2e/po/edit/provisioning.cattle.io.cluster/create/cluster-create-rke2-custom.po'; +// import ClusterManagerCreateRke2CustomPagePo from '@/cypress/e2e/po/edit/provisioning.cattle.io.cluster/create/cluster-create-rke2-custom.po'; import AccountPagePo from '@/cypress/e2e/po/pages/account-api-keys.po'; -import ClusterManagerListPagePo from '@/cypress/e2e/po/pages/cluster-manager/cluster-manager-list.po'; +// import ClusterManagerListPagePo from '@/cypress/e2e/po/pages/cluster-manager/cluster-manager-list.po'; import { settings, serverUrlLocalhostCases, urlWithTrailingForwardSlash, httpUrl, nonUrlCases } from '@/cypress/e2e/blueprints/global_settings/settings-data'; @@ -11,7 +11,7 @@ import { const settingsPage = new SettingsPagePo('local'); const homePage = new HomePagePo(); const accountPage = new AccountPagePo(); -const clusterList = new ClusterManagerListPagePo(); +// const clusterList = new ClusterManagerListPagePo(); const burgerMenu = new BurgerMenuPo(); const settingsOrginal = []; let removeServerUrl = false;