forked from rancher/dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request rancher#10601 from richard-cox/fix-legacy-project-…
…menu-item Fix Legacy / Project group
- Loading branch information
Showing
10 changed files
with
87 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
|
||
import { FeatureFlagsPagePo } from '@/cypress/e2e/po/pages/global-settings/feature-flags.po'; | ||
import { ConfigMapPagePo } from '@/cypress/e2e/po/pages/explorer/config-map.po'; | ||
import { NamespaceFilterPo } from '@/cypress/e2e/po/components/namespace-filter.po'; | ||
|
||
const featureFlagsPage = new FeatureFlagsPagePo(); | ||
const namespacePicker = new NamespaceFilterPo(); | ||
|
||
let disableLegacyFlag = false; | ||
|
||
describe('Legacy: Projects', { tags: ['@explorer', '@adminUser'], testIsolation: 'off' }, () => { | ||
before(() => { | ||
cy.login(); | ||
|
||
featureFlagsPage.getFeatureFlag('legacy').then((body: any) => { | ||
if (!body.spec.value) { | ||
return featureFlagsPage.setFeatureFlag('legacy', true).then(() => { | ||
disableLegacyFlag = true; | ||
}); | ||
} | ||
}); | ||
}); | ||
|
||
it('Ensure legacy: projects is visible and can nav to child entry', () => { | ||
const configMapPage = new ConfigMapPagePo('local'); | ||
|
||
configMapPage.goTo(); | ||
|
||
namespacePicker.toggle(); | ||
namespacePicker.clickOptionByLabel('All Namespaces'); | ||
namespacePicker.clickOptionByLabel('Project: Default'); | ||
namespacePicker.closeDropdown(); | ||
|
||
configMapPage.navToSideMenuGroupByLabel('Legacy'); | ||
configMapPage.productNav().navToSideMenuGroupByLabelExistence('Project', 'exist'); | ||
configMapPage.navToSideMenuGroupByLabel('Project'); | ||
configMapPage.navToSideMenuEntryByLabel('Config Maps'); | ||
|
||
cy.iFrame().contains('.header h1', 'Config Maps'); | ||
}); | ||
|
||
after(() => { | ||
if (disableLegacyFlag) { | ||
featureFlagsPage.setFeatureFlag('legacy', false); | ||
} | ||
|
||
namespacePicker.toggle(); | ||
namespacePicker.clickOptionByLabel('Only User Namespaces'); // This is the default | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters