Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,19 @@ describe('Create namespace from install operators', () => {
cy.byTestID('search-catalog').type(operatorName);
cy.url().should('include', 'keyword');
cy.byTestID(operatorSelector).click();
cy.byTestID('catalog-details-modal-cta').click({ force: true });
// Wait for the Install button to be visible and have a valid href before clicking.
// The button is conditionally rendered based on useCtaLink hook, which processes
// the CTA href asynchronously. Clicking before href is set causes navigation to fail.
cy.byTestID('catalog-details-modal-cta').should('be.visible').and('have.attr', 'href');
cy.byTestID('catalog-details-modal-cta').click();

// 3scale 2.11 supports only installation mode 'A specific namespace',
// so it was automatically selected.
// But starting with 2.12 it also supports 'All namespaces'.
// So it is required to select this radio option to specify the namespace.
cy.byTestID('A specific namespace on the cluster-radio-input').click();
// Regression test: Wait for radio button to be visible before clicking to avoid race conditions
// where the form re-renders asynchronously after the channel/version selectors load.
cy.byTestID('A specific namespace on the cluster-radio-input').should('be.visible').click();

// configure operator install ("^=Create_"" will match "Create_Namespace" and "Create_Project")
cy.byTestID('dropdown-selectbox').click().get('[data-test-dropdown-menu^="Create_"]').click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ export const operator = {
cy.log('go to operator overview panel');
cy.byTestID(operatorCardTestID).click();
cy.log('go to the install form');
cy.byTestID('catalog-details-modal-cta').click({ force: true });
// Wait for the Install button to be visible and have a valid href before clicking.
// The button is conditionally rendered based on useCtaLink hook, which processes
// the CTA href asynchronously. Clicking before href is set causes navigation to fail.
cy.byTestID('catalog-details-modal-cta')
.should('be.visible')
.should('have.attr', 'href')
.click();
cy.log('verify the channel selection is displayed');
cy.byTestID('operator-channel-select-toggle').should('exist');
cy.log('verify the version selection is displayed');
Expand All @@ -39,7 +45,8 @@ export const operator = {
*/
if (installToNamespace !== GlobalInstalledNamespace) {
cy.log('configure Operator install for single namespace');
cy.byTestID('A specific namespace on the cluster-radio-input').check();
// Wait for radio button to be visible before checking to avoid race conditions
cy.byTestID('A specific namespace on the cluster-radio-input').should('be.visible').check();
if (useOperatorRecommendedNamespace) {
cy.log('configure Operator install for operator recommended namespace');
cy.byTestID('Operator recommended Namespace:-radio-input').check();
Expand Down