Skip to content

Commit

Permalink
Tweak extension code when it is rancher head
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Adamek <julien.adamek@suse.com>
  • Loading branch information
juadk committed Feb 13, 2024
1 parent e46feeb commit 58af93e
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,19 +175,24 @@ export function deleteUser(username) {
* Enable the extension support
* @remarks : Disable the Rancher Repo if you provide your own repo
* @param withRancherRepo : Add the Rancher Extension Repository - boolean
* @param isRancherHead : Tell if the test run on rancher head - boolean
*/
export function enableExtensionSupport(withRancherRepo) {
export function enableExtensionSupport(withRancherRepo, isRancherHead) {
cy.contains('Extensions')
.click();
// Make sure we are on the Extensions page
cy.contains('.message-icon', 'Extension support is not enabled');
cy.clickButton('Enable');
cy.contains('Enable Extension Support?')
if (!withRancherRepo) {
cy.contains('Add Official Rancher Extensions Repository')
.click();
cy.contains('Add Partners Extensions Repository')
.click();
if (isRancherHead) {
cy.contains('Add Partners Extensions Repository')
.click();
} else {
cy.contains('Add Official Rancher Extensions Repository')
.click();
cy.contains('Add Partners Extensions Repository')
.click();
}
cy.clickButton('OK');
cy.get('.tabs', {timeout: 40000})
Expand Down

0 comments on commit 58af93e

Please sign in to comment.