Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix tests to handle redirect away from your products #1185

Merged
merged 3 commits into from
Nov 6, 2024
Merged
Changes from 1 commit
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
10 changes: 7 additions & 3 deletions e2e/cypress/tests/20-gateways/02-dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ describe('Gateway selector dropdown', () => {

it('Get current total number of gateways', () => {
// Create a new gateway to ensure there is at least one gateway
cy.createGateway();
cy.createGateway().then((response) => {
const namespace = response.gatewayId
cy.log('New namespace created: ' + namespace)
cy.activateGateway(namespace);
});

cy.visit(ad.yourProductsPath);
cy.get('[data-testid="ns-dropdown-btn"]').click();
Expand Down Expand Up @@ -81,8 +85,8 @@ describe('Gateway selector dropdown', () => {
it('Recently used gateways are shown in the dropdown', () => {
cy.visit(ns.listPath)
cy.get(`[data-testid="ns-list-activate-link-${gateways["namespace1"].gatewayId + '-' + customId}"]`).click()
cy.get('[data-testid="ns-dropdown-btn"]').click()
cy.get(`[data-testid="ns-dropdown-item-${gateways["namespace2"].gatewayId + '-' + customId}"]`).click()
cy.visit(ns.listPath)
cy.get(`[data-testid="ns-list-activate-link-${gateways["namespace2"].gatewayId + '-' + customId}"]`).click()
cy.get('[data-testid="ns-dropdown-btn"]').click()
cy.get('[data-testid="ns-dropdown-heading"]').should('contain.text', "Recently viewed")
cy.get(`[data-testid="ns-dropdown-item-${gateways["namespace1"].gatewayId + '-' + customId}"]`).should('exist')
Expand Down
Loading