Skip to content

Commit

Permalink
Merge pull request #11908 from jerolimov/bz2112862
Browse files Browse the repository at this point in the history
Bug 2112862: Fix broken Namespace CRUD e2e test
  • Loading branch information
openshift-merge-robot committed Aug 1, 2022
2 parents 4b44e42 + 0377b92 commit 55b6709
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Expand Up @@ -65,7 +65,7 @@ describe('Namespace', () => {
'List page to details page should change Project from "All Projects" to resource specific project',
);
listPage.filter.byName('kubernetes');
listPage.rows.countShouldBe(1);
listPage.rows.countShouldBeWithin(1, 3);
listPage.rows.clickRowByName('kubernetes');
detailsPage.isLoaded();
projectDropdown.shouldContain(defaultProjectName);
Expand All @@ -74,7 +74,7 @@ describe('Namespace', () => {
projectDropdown.shouldContain(allProjectsDropdownLabel);
cy.log('Details page to list page via breadcrumb should change Project back to "All Projects"');
listPage.filter.byName('kubernetes');
listPage.rows.countShouldBe(1);
listPage.rows.countShouldBeWithin(1, 3);
listPage.rows.clickRowByName('kubernetes');
detailsPage.isLoaded();
projectDropdown.shouldContain(defaultProjectName);
Expand Down
Expand Up @@ -74,6 +74,9 @@ export const listPage = {
countShouldBe: (count: number) => {
cy.get(`[data-test-rows="resource-row"`).should('have.length', count);
},
countShouldBeWithin: (min: number, max: number) => {
cy.get(`[data-test-rows="resource-row"`).should('have.length.within', min, max);
},
clickFirstLinkInFirstRow: () => {
cy.get(`[data-test-rows="resource-row"]`)
.first()
Expand Down

0 comments on commit 55b6709

Please sign in to comment.