Skip to content

Commit ab18244

Browse files
authored
Removing popWindow everywhere to test it works (#328)
1 parent 1817c80 commit ab18244

File tree

4 files changed

+1
-72
lines changed

4 files changed

+1
-72
lines changed

tests/cypress/e2e/unit_tests/p0_fleet.spec.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,6 @@ if (!/\/2\.8/.test(Cypress.env('rancher_version'))) {
288288
cy.wait(500); // Needs time for previous command to finish
289289
cy.clickButton('Save')
290290
cy.wait(500); // Needs time for previous command to finish
291-
292-
// TODO: remove once this bug is fixed:
293-
// https://github.com/rancher/dashboard/issues/14295#issuecomment-2862105017
294-
cy.closePopWindow('ConfigMap Creation Warning')
295291

296292
// Verify gitrepo is added using default knownhost
297293
cy.accesMenuSelection('Continuous Delivery', 'Git Repos')

tests/cypress/e2e/unit_tests/p1_2_fleet.spec.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -482,11 +482,6 @@ describe("Test Application deployment based on 'clusterSelector'", { tags: '@p1_
482482
cy.clickNavMenu(['Git Repos']);
483483
cy.wait(500);
484484

485-
486-
// TODO: remove once this bug is fixed:
487-
// https://github.com/rancher/dashboard/issues/14295#issuecomment-2862105017
488-
cy.closePopWindow('Warning')
489-
490485
cy.clickButton('Add Repository');
491486
cy.contains('Git Repo:').should('be.visible');
492487
cy.clickButton('Edit as YAML');
@@ -564,11 +559,6 @@ describe("Test Application deployment based on 'clusterSelector'", { tags: '@p1_
564559
cy.clickNavMenu(['Git Repos']);
565560
cy.wait(500);
566561

567-
568-
// TODO: remove once this bug is fixed:
569-
// https://github.com/rancher/dashboard/issues/14295#issuecomment-2862105017
570-
cy.closePopWindow('Warning')
571-
572562
cy.clickButton('Add Repository');
573563
cy.contains('Git Repo:').should('be.visible');
574564
cy.clickButton('Edit as YAML');
@@ -620,10 +610,6 @@ describe("Test Application deployment based on 'clusterGroupSelector'", { tags:
620610
}
621611
)
622612

623-
// TODO: remove once this bug is fixed:
624-
// https://github.com/rancher/dashboard/issues/14295#issuecomment-2862105017
625-
cy.closePopWindow('Warning')
626-
627613
cy.deleteClusterGroups();
628614
cy.deleteAllFleetRepos();
629615
})
@@ -683,10 +669,6 @@ describe("Test Application deployment based on 'clusterGroupSelector'", { tags:
683669
cy.clickNavMenu(['Git Repos']);
684670
cy.wait(500);
685671

686-
// TODO: remove once this bug is fixed:
687-
// https://github.com/rancher/dashboard/issues/14295#issuecomment-2862105017
688-
cy.closePopWindow('Warning')
689-
690672
cy.clickButton('Add Repository');
691673
cy.contains('Git Repo:').should('be.visible');
692674
cy.clickButton('Edit as YAML');

tests/cypress/e2e/unit_tests/p1_fleet.spec.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -144,21 +144,13 @@ describe('Test Self-Healing of resource modification when correctDrift option us
144144
// Update exising GitRepo by enabling 'correctDrift'
145145
cy.addFleetGitRepo({ repoName, correctDrift: 'yes', editConfig: true });
146146
cy.clickButton('Save');
147-
148-
// TODO: remove once this bug is fixed:
149-
// https://github.com/rancher/dashboard/issues/14295#issuecomment-2862105017
150-
cy.closePopWindow('Warning')
151147

152148
// This test is exception for using 'Force Update'.
153149
// Wait added to mitigate problems before force ipdate on 2.11 onwards
154150
// TODO: remove or rework when possible
155151
cy.wait(2000);
156152
cy.open3dotsMenu(repoName, 'Force Update');
157153

158-
// TODO: remove once this bug is fixed:
159-
// https://github.com/rancher/dashboard/issues/14295#issuecomment-2862105017
160-
cy.closePopWindow('Warning')
161-
162154
cy.checkGitRepoStatus(repoName, '1 / 1', '1 / 1');
163155
cy.checkApplicationStatus(appName);
164156

@@ -495,10 +487,6 @@ if (!/\/2\.7/.test(Cypress.env('rancher_version')) && !/\/2\.8/.test(Cypress.env
495487
cy.filterInSearchBox('nginx-test-polling');
496488
cy.wait(500);
497489

498-
// TODO: remove once this bug is fixed:
499-
// https://github.com/rancher/dashboard/issues/14295#issuecomment-2862105017
500-
cy.closePopWindow('Warning')
501-
502490
cy.log('HERE WE SHOULD SEE 2/2');
503491
cy.contains('tr.main-row', 'nginx-test-polling', { timeout: 20000 }).should('be.visible');
504492
cy.screenshot('Screenshot BEFORE reloading should be 2/2');
@@ -551,18 +539,10 @@ if (!/\/2\.7/.test(Cypress.env('rancher_version')) && !/\/2\.8/.test(Cypress.env
551539
cy.fleetNamespaceToggle('fleet-local');
552540
cy.open3dotsMenu(repoName, 'Pause');
553541

554-
// TODO: remove once this bug is fixed:
555-
// https://github.com/rancher/dashboard/issues/14295#issuecomment-2862105017
556-
cy.closePopWindow('Warning')
557-
558542
cy.verifyTableRow(0, 'Paused');
559543
cy.wait(2000); // Wait to let time for pause to take effect.
560544
cy.open3dotsMenu(repoName, 'Unpause');
561545

562-
// TODO: remove once this bug is fixed:
563-
// https://github.com/rancher/dashboard/issues/14295#issuecomment-2862105017
564-
cy.closePopWindow('Warning')
565-
566546
cy.verifyTableRow(0, 'Active');
567547
// Verify deployment changes to 5?
568548
cy.accesMenuSelection('local', 'Workloads', 'Deployments');

tests/cypress/support/commands.ts

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,6 @@ Cypress.Commands.add('open3dotsMenu', (name, selection, checkNotInMenu=false) =>
267267
.contains(selection).should('not.exist');
268268
}
269269
});
270-
271-
// TODO: remove once this bug is fixed:
272-
// https://github.com/rancher/dashboard/issues/14295#issuecomment-2862105017
273-
cy.closePopWindow('Warning')
274270

275271
// Close 3 dots button menu
276272
cy.get('body').should('exist').click({ force: true });
@@ -347,11 +343,6 @@ Cypress.Commands.add('nameSpaceMenuToggle', (namespaceName) => {
347343
cy.get('div.ns-item').contains(namespaceName).scrollIntoView()
348344
cy.get('div.ns-item').contains(namespaceName).click()
349345
cy.get('div.ns-dropdown.ns-open > i.icon.icon-chevron-up').click({ force: true });
350-
351-
// TODO: remove once this bug is fixed:
352-
// https://github.com/rancher/dashboard/issues/14295#issuecomment-2862105017
353-
cy.closePopWindow('Warning')
354-
355346
})
356347

357348
// Command to filter text in searchbox
@@ -490,10 +481,6 @@ Cypress.Commands.add('modifyDeployedApplication', (appName, clusterName='local')
490481
// TODO: Add logic to increase resource count to given no.
491482
cy.get('.icon-plus').click();
492483
cy.get('#trigger > .icon.icon-chevron-up').click({ force: true });
493-
494-
// TODO: remove once this bug is fixed:
495-
// https://github.com/rancher/dashboard/issues/14295#issuecomment-2862105017
496-
cy.closePopWindow('Warning')
497484
});
498485

499486
// Create Role Template (User & Authentication)
@@ -636,10 +623,6 @@ Cypress.Commands.add('upgradeFleet', () => {
636623
// Add label to the imported cluster(s)
637624
Cypress.Commands.add('assignClusterLabel', (clusterName, key, value) => {
638625

639-
// TODO: remove once this bug is fixed:
640-
// https://github.com/rancher/dashboard/issues/14295#issuecomment-2862105017
641-
cy.closePopWindow('Warning')
642-
643626
cy.filterInSearchBox(clusterName);
644627
cy.open3dotsMenu(clusterName, 'Edit Config');
645628
cy.clickButton('Add Label');
@@ -656,11 +639,6 @@ Cypress.Commands.add('assignClusterLabel', (clusterName, key, value) => {
656639
Cypress.Commands.add('createClusterGroup', (clusterGroupName, key, value, bannerMessageToAssert, assignClusterGroupLabel=false, clusterGroupLabelKey, clusterGroupLabelValue) => {
657640
cy.fleetNamespaceToggle('fleet-default');
658641

659-
660-
// TODO: remove once this bug is fixed:
661-
// https://github.com/rancher/dashboard/issues/14295#issuecomment-2862105017
662-
cy.closePopWindow('Warning')
663-
664642
cy.clickButton('Create');
665643
cy.get('input[placeholder="A unique name"]').type(clusterGroupName);
666644
cy.clickButton('Add Rule');
@@ -707,17 +685,10 @@ Cypress.Commands.add('deleteClusterGroups', () => {
707685

708686
// Remove added labels from the cluster(s)
709687
Cypress.Commands.add('removeClusterLabels', (clusterName, key, value) => {
710-
// TODO: remove once this bug is fixed:
711-
// https://github.com/rancher/dashboard/issues/14295#issuecomment-2862105017
712-
cy.closePopWindow('Warning')
688+
713689
cy.accesMenuSelection('Continuous Delivery', 'Git Repos');
714690
cy.clickNavMenu(['Clusters']);
715691
cy.contains('.title', 'Clusters').should('be.visible');
716-
717-
// TODO: remove once this bug is fixed:
718-
// https://github.com/rancher/dashboard/issues/14295#issuecomment-2862105017
719-
cy.closePopWindow('Warning')
720-
721692
cy.filterInSearchBox(clusterName);
722693
cy.open3dotsMenu(clusterName, 'Edit Config');
723694
cy.contains('.title', 'Cluster:').should('be.visible');

0 commit comments

Comments
 (0)