Skip to content

Commit

Permalink
Temporarily stop failing test
Browse files Browse the repository at this point in the history
- See #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)
  • Loading branch information
richard-cox committed Dec 23, 2024
1 parent 0a69edb commit cfb0bee
Showing 1 changed file with 45 additions and 44 deletions.
89 changes: 45 additions & 44 deletions cypress/e2e/tests/pages/global-settings/settings-p2.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cfb0bee

Please sign in to comment.