Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions frontend/integration-tests/test-cypress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ if [ -n "${nightly-}" ] && [ -z "${pkg-}" ]; then
# yarn run test-cypress-shipwright-nightly
yarn run test-cypress-pipelines-nightly
yarn run test-cypress-topology-nightly
# yarn run test-cypress-knative-nightly
yarn run test-cypress-knative-nightly
yarn run test-cypress-webterminal-nightly

exit $err;
Expand All @@ -95,7 +95,7 @@ if [ -n "${headless-}" ] && [ -z "${pkg-}" ]; then
yarn run test-cypress-olm-headless
yarn run test-cypress-webterminal-headless
yarn run test-cypress-helm-headless
# yarn run test-cypress-knative-headless
yarn run test-cypress-knative-headless
yarn run test-cypress-topology-headless
yarn run test-cypress-pipelines-headless
# yarn run test-cypress-shipwright-headless
Expand Down
7 changes: 7 additions & 0 deletions frontend/packages/integration-tests-cypress/support/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ Cypress.Commands.add('initAdmin', () => {
cy.log('redirect to home');
cy.visit('/');
cy.byTestID('loading-indicator').should('not.exist');
cy.document().its('readyState').should('eq', 'complete');
// Wait for perspective switcher to be rendered - this requires React to finish
// loading the NavHeader component and the perspective extensions
cy.byLegacyTestID('perspective-switcher-toggle', { timeout: 60000 }).should('be.visible');
cy.log('ensure perspective switcher is set to Administrator');
nav.sidenav.switcher.changePerspectiveTo('Administrator');
nav.sidenav.switcher.shouldHaveText('Administrator');
Expand All @@ -27,6 +31,9 @@ Cypress.Commands.add('initDeveloper', () => {
cy.visit('/add');
cy.byTestID('loading-indicator').should('not.exist');
cy.document().its('readyState').should('eq', 'complete');
// Wait for perspective switcher to be rendered - this requires React to finish
// loading the NavHeader component and the perspective extensions
cy.byLegacyTestID('perspective-switcher-toggle', { timeout: 60000 }).should('be.visible');
cy.log('ensure perspective switcher is set to Developer');
guidedTour.close();
nav.sidenav.switcher.changePerspectiveTo('Developer');
Expand Down
24 changes: 12 additions & 12 deletions frontend/packages/integration-tests-cypress/views/nav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ export const nav = {
.scrollIntoView()
.contains(newPerspective);
} else {
cy.byLegacyTestID('perspective-switcher-toggle')
.click()
.byLegacyTestID('perspective-switcher-menu-option')
cy.byLegacyTestID('perspective-switcher-toggle').click();
cy.byLegacyTestID('perspective-switcher-menu-option', { timeout: 10000 })
.should('be.visible')
.contains(newPerspective)
.click({ force: true });
.click();
}
});
break;
Expand All @@ -60,20 +60,20 @@ export const nav = {
.contains(newPerspective);
} else {
checkDeveloperPerspective();
cy.byLegacyTestID('perspective-switcher-toggle')
.click()
.byLegacyTestID('perspective-switcher-menu-option')
cy.byLegacyTestID('perspective-switcher-toggle').click();
cy.byLegacyTestID('perspective-switcher-menu-option', { timeout: 10000 })
.should('be.visible')
.contains(newPerspective)
.click({ force: true });
.click();
}
});
break;
default:
cy.byLegacyTestID('perspective-switcher-toggle')
.click()
.byLegacyTestID('perspective-switcher-menu-option')
cy.byLegacyTestID('perspective-switcher-toggle').click();
cy.byLegacyTestID('perspective-switcher-menu-option', { timeout: 10000 })
.should('be.visible')
.contains(newPerspective)
.click({ force: true });
.click();
}
},
},
Expand Down
5 changes: 2 additions & 3 deletions test-prow-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ elif [ "$SCENARIO" == "pipelines" ]; then
./integration-tests/test-cypress.sh -p pipelines -h true
# elif [ "$SCENARIO" == "gitops" ]; then
# ./integration-tests/test-cypress.sh -p gitops -h true
# Disabled: knative-ci.feature failing in CI (OCPBUGS-99226)
# elif [ "$SCENARIO" == "knative" ]; then
# ./integration-tests/test-cypress.sh -p knative -h true
elif [ "$SCENARIO" == "knative" ]; then
./integration-tests/test-cypress.sh -p knative -h true
fi

env NO_SANDBOX=true yarn test-puppeteer-csp
Expand Down