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 @@ -42,7 +42,7 @@ describe('Auth test', () => {
nav.sidenav.shouldNotHaveNavSection(['Administration', 'Custom Resource Definitions']);

cy.log('does not show admin nav items in Ecosystem to test user');
nav.sidenav.shouldNotHaveNavSection(['Ecosystem', 'OperatorHub']);
nav.sidenav.shouldNotHaveNavSection(['Ecosystem', 'Software Catalog']);

cy.log('does not show admin nav items in Storage to test user');
nav.sidenav.shouldNotHaveNavSection(['Storage', 'Persistent Volumes']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe(`Interacting with CatalogSource page`, () => {
cy.byTestID('loading-indicator').should('not.exist');
cy.byLegacyTestID('OperatorHub').scrollIntoView().click();

// verfiy operatorHub details page is open
// verfiy OperatorHub details page is open
detailsPage.sectionHeaderShouldExist('OperatorHub details');

// navigate to Catalog Sources list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const TIMEOUT = { timeout: 300000 };
const testOperatorName = 'Kiali Community Operator';
const testOperator = {
name: 'Kiali Operator',
operatorHubCardTestID: 'datagrid-redhat-operators-openshift-marketplace',
};
const deprecatedBadge = 'Deprecated';
const deprecatedPackageMessage =
Expand Down Expand Up @@ -53,7 +52,7 @@ describe('Deprecated operator warnings', () => {
checkErrors();
});

it('verify deprecated operator warning badge on the OperatorHub tile', () => {
it('verify deprecated Operator warning badge on the Operator tile', () => {
cy.visit(
`/k8s/ns/${testDeprecatedCatalogSource.metadata.namespace}/operators.coreos.com~v1alpha1~CatalogSource/test-community-operator-deprecation`,
);
Expand All @@ -74,7 +73,8 @@ describe('Deprecated operator warnings', () => {
cy.log('verify the Deprecated badge on Kiali Community Operator tile');
cy.byTestID('Deprecated-badge').contains(deprecatedBadge).should('exist');
});
it('verify deprecated operator warnings in the OperatorHub details panel', () => {

it('verify deprecated Operator warnings in the Operator details panel', () => {
cy.visit(
`/catalog/ns/${testName}?catalogType=operator&keyword=kia&selectedId=kiali-test-community-operator-deprecation-openshift-marketplace&channel=stable&version=1.83.0`,
);
Expand All @@ -87,7 +87,7 @@ describe('Deprecated operator warnings', () => {
.should('exist');
});

it('verify deprecated channel warnings in the OperatorHub details panel', () => {
it('verify deprecated channel warnings in the Operator details panel', () => {
cy.visit(
`/catalog/ns/${testName}?catalogType=operator&keyword=kia&selectedId=kiali-test-community-operator-deprecation-openshift-marketplace&channel=stable&version=1.83.0`,
);
Expand All @@ -112,7 +112,7 @@ describe('Deprecated operator warnings', () => {
.should('exist');
});

it('verify deprectaed version warnings in the OperatorHub details panel', () => {
it('verify deprecated version warnings in the Operator details panel', () => {
cy.visit(
`/catalog/ns/${testName}?catalogType=operator&keyword=kia&selectedId=kiali-test-community-operator-deprecation-openshift-marketplace&channel=stable&version=1.83.0`,
);
Expand All @@ -138,7 +138,7 @@ describe('Deprecated operator warnings', () => {
.should('exist');
});

it('verify deprecated operator warnings on Install Operator details page', () => {
it('verify deprecated Operator warnings on Install Operator details page', () => {
cy.log('visit the Install Operator details page');
cy.visit(
'/operatorhub/subscribe?pkg=kiali&catalog=test-community-operator-deprecation&catalogNamespace=openshift-marketplace&targetNamespace=undefined&channel=alpha&version=1.68.0',
Expand All @@ -159,7 +159,7 @@ describe('Deprecated operator warnings', () => {
.should('exist');
});

it('verify deprecated operator warning badge on Installed Operators page', () => {
it('verify deprecated Operator warning badge on Installed Operators page', () => {
cy.log(
'install the Kiali Community Operator with the deprecated package, channel and version messages',
);
Expand All @@ -181,14 +181,14 @@ describe('Deprecated operator warnings', () => {
`oc patch installplan $(oc get installplan -n ${testDeprecatedSubscription.metadata.namespace} --no-headers | grep kiali-operator.v1.68.0 | grep Manual | awk '{print $1}') -n ${testDeprecatedSubscription.metadata.namespace} --type merge --patch '{"spec":{"approved":true}}'`,
);

cy.log('visit the Installed Operators details page and verify the deprecated operator badge');
cy.log('visit the Installed Operators details page and verify the deprecated Operator badge');
operator.installedSucceeded(testOperator.name, 'openshift-operators');
cy.byTestID(DEPRECATED_OPERATOR_WARNING_BADGE_ID, TIMEOUT)
.contains(deprecatedBadge)
.should('exist');
});

it('verify deprecated operator warnings on installed operator details page', () => {
it('verify deprecated operator warnings on Installed Operator details page', () => {
cy.log('visit the Installed Operators details page');
cy.visit(
`/k8s/ns/${testDeprecatedSubscription.metadata.namespace}/operators.coreos.com~v1alpha1~ClusterServiceVersion/kiali-operator.v1.68.0`,
Expand All @@ -198,7 +198,7 @@ describe('Deprecated operator warnings', () => {
cy.byTestID(DEPRECATED_OPERATOR_WARNING_BADGE_ID).contains(deprecatedBadge).should('exist');

cy.log(
'verify that the deprecated messages for package, channel, and version are displayed on the installed operator details tab.',
'verify that the deprecated messages for package, channel, and version are displayed on the Installed Operator details tab.',
);
cy.byTestID(DEPRECATED_OPERATOR_WARNING_PACKAGE_ID)
.contains(deprecatedPackageMessage)
Expand All @@ -211,14 +211,14 @@ describe('Deprecated operator warnings', () => {
.should('exist');
});

it('verify deprecated operator warnings on installed operator details subscription tab', () => {
it('verify deprecated operator warnings on Installed Operator details subscription tab', () => {
cy.log('visit the Installed Operators subscription tab');
cy.visit(
`/k8s/ns/${testDeprecatedSubscription.metadata.namespace}/operators.coreos.com~v1alpha1~ClusterServiceVersion/kiali-operator.v1.68.0/subscription`,
);

cy.log(
'verify that the deprecated messages for package, channel, and version are displayed on the installed operator subscription tab.',
'verify that the deprecated messages for package, channel, and version are displayed on the Installed Operator subscription tab.',
);
cy.byTestID(DEPRECATED_OPERATOR_WARNING_PACKAGE_ID)
.contains(deprecatedPackageMessage)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ describe('Create namespace from install operators', () => {
checkErrors();
});

it('disables default catalog sources from operatorHub details page', () => {
cy.log('navigate to operatorHub page');
it('disables default catalog sources from OperatorHub details page', () => {
cy.log('navigate to OperatorHub page');
cy.visit(`/settings/cluster`);
cy.byLegacyTestID('horizontal-link-Configuration').click();
cy.byLegacyTestID('OperatorHub').click();

// verfiy operatorHub details page is open
// verfiy OperatorHub details page is open
detailsPage.sectionHeaderShouldExist('OperatorHub details');

// Toggle default sources modal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { checkErrors, testName } from '../../../integration-tests-cypress/support';

describe('Interacting with OperatorHub', () => {
describe('Interacting with Operators', () => {
before(() => {
cy.login();
cy.createProjectWithCLI(testName);
Expand All @@ -14,7 +14,7 @@ describe('Interacting with OperatorHub', () => {
cy.deleteProjectWithCLI(testName);
});

it('displays OperatorHub catalog items with expected available Operators', () => {
it('displays Operator catalog items with expected available Operators', () => {
cy.log('navigate to Software Catalog');
cy.visit(`/catalog/ns/${testName}`);
cy.byTestID('page-heading').should('contain.text', 'Software Catalog');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { operator, GlobalInstalledNamespace, TestOperandProps } from '../views/o

const testOperator = {
name: 'Data Grid',
operatorHubCardTestID: 'operator-Data Grid',
operatorCardTestID: 'operator-Data Grid',
};
Comment on lines 4 to 7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for remaining operatorHubCardTestID references (deprecated)
echo "=== Checking for remaining 'operatorHubCardTestID' references ==="
rg 'operatorHubCardTestID' --type ts || echo "✓ No deprecated references found"

echo ""
echo "=== Verifying 'operatorCardTestID' usage across test files ==="
rg 'operatorCardTestID' --type ts -l

echo ""
echo "=== Checking operator.install() signature in operator.view ==="
fd 'operator.view.ts' -x head -100 {}

Repository: openshift/console

Length of output: 5856


Parameter name mismatch breaks the test—operator.view.ts signature must be updated.

The refactor is incomplete. While this file correctly renamed the property from operatorHubCardTestID to operatorCardTestID, the operator.install() function in operator.view.ts still expects the old parameter name operatorHubCardTestID. The test will fail when calling operator.install(testOperator.name, testOperator.operatorCardTestID, ...) because the function signature hasn't been updated to match.

Update the operator.install() signature and its usages in operator.view.ts to use operatorCardTestID instead of operatorHubCardTestID. This affects the function parameter declaration and the internal cy.byTestID(operatorCardTestID) call.

🤖 Prompt for AI Agents
In
@frontend/packages/operator-lifecycle-manager/integration-tests-cypress/tests/operator-install-global.cy.ts
around lines 4 - 7, The test fails because operator.install still expects the
old parameter name operatorHubCardTestID; update the operator.install function
signature in operator.view.ts to replace operatorHubCardTestID with
operatorCardTestID, and update any internal references (e.g., the
cy.byTestID(...) call) to use operatorCardTestID so the call
operator.install(testOperator.name, testOperator.operatorCardTestID, ...)
matches the function parameters.


const testOperand: TestOperandProps = {
Expand All @@ -18,7 +18,7 @@ const testOperand: TestOperandProps = {
describe(`Globally installing "${testOperator.name}" operator in ${GlobalInstalledNamespace}`, () => {
before(() => {
cy.login();
operator.install(testOperator.name, testOperator.operatorHubCardTestID);
operator.install(testOperator.name, testOperator.operatorCardTestID);
});

afterEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { GlobalInstalledNamespace, operator, TestOperandProps } from '../views/o

const testOperator = {
name: 'Data Grid',
operatorHubCardTestID: 'operator-Data Grid',
operatorCardTestID: 'operator-Data Grid',
installedNamespace: testName,
};

Expand Down Expand Up @@ -34,7 +34,7 @@ describe(`Installing "${testOperator.name}" operator in test namespace`, () => {
it(`Installs ${testOperator.name} operator in test namespace and creates ${testOperand.name} operand instance`, () => {
operator.install(
testOperator.name,
testOperator.operatorHubCardTestID,
testOperator.operatorCardTestID,
testOperator.installedNamespace,
);
operator.installedSucceeded(testOperator.name, testName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { operator, TestOperandProps } from '../views/operator.view';

const testOperator = {
name: 'Data Grid',
operatorHubCardTestID: 'operator-Data Grid',
operatorCardTestID: 'operator-Data Grid',
installedNamespace: testName,
};

Expand All @@ -27,7 +27,7 @@ describe(`Testing uninstall of ${testOperator.name} Operator`, () => {
cy.createProjectWithCLI(testName);
operator.install(
testOperator.name,
testOperator.operatorHubCardTestID,
testOperator.operatorCardTestID,
testOperator.installedNamespace,
);
operator.installedSucceeded(testOperator.name, testName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const GlobalInstalledNamespace = 'openshift-operators';
export const operator = {
install: (
operatorName: string,
operatorHubCardTestID: string,
operatorCardTestID: string,
installToNamespace: string = GlobalInstalledNamespace,
useOperatorRecommendedNamespace: boolean = false,
) => {
Expand All @@ -20,7 +20,7 @@ export const operator = {
cy.byTestID('tab operator').click();
cy.byTestID('search-catalog').type(operatorName);
cy.log('go to operator overview panel');
cy.byTestID(operatorHubCardTestID).click();
cy.byTestID(operatorCardTestID).click();
cy.log('go to the install form');
cy.byTestID('catalog-details-modal-cta').click({ force: true });
cy.log('verify the channel selection is displayed');
Expand Down