diff --git a/frontend/e2e/pages/helm-details-page.ts b/frontend/e2e/pages/helm-details-page.ts new file mode 100644 index 00000000000..43f09bbda4f --- /dev/null +++ b/frontend/e2e/pages/helm-details-page.ts @@ -0,0 +1,86 @@ +import type { Locator } from '@playwright/test'; + +import BasePage from './base-page'; + +export class HelmDetailsPage extends BasePage { + private readonly sectionHeading = this.page.getByTestId('details-page-section-heading'); + private readonly resourcesTab = this.page.getByTestId('horizontal-link-Resources'); + private readonly revisionHistoryTab = this.page.getByTestId( + 'horizontal-link-Revision history', + ); + private readonly releaseNotesTab = this.page.getByTestId('horizontal-link-Release notes'); + private readonly actionsMenuButton = this.page.getByTestId('actions-menu-button'); + private readonly actionItems = this.page.getByTestId('action-items'); + private readonly pageHeading = this.page.getByTestId('page-heading').locator('h1'); + private readonly statusIcon = this.page.getByTestId('success-icon'); + private readonly statusText = this.page.getByTestId('status-text'); + private readonly statusDetails = this.page.getByTestId('helm-release-status-details'); + private readonly deleteModalTitle = this.page.getByTestId('modal-title'); + private readonly resourceNameText = this.page.getByTestId('resource-name'); + private readonly releaseNameInput = this.page.locator('#form-input-resourceName-field'); + private readonly confirmActionButton = this.page.getByTestId('confirm-action'); + + getSectionHeading(): Locator { + return this.sectionHeading; + } + + getResourcesTab(): Locator { + return this.resourcesTab; + } + + getRevisionHistoryTab(): Locator { + return this.revisionHistoryTab; + } + + getReleaseNotesTab(): Locator { + return this.releaseNotesTab; + } + + getActionsMenuButton(): Locator { + return this.actionsMenuButton; + } + + getPageHeading(): Locator { + return this.pageHeading; + } + + getStatusIcon(): Locator { + return this.statusIcon; + } + + getStatusText(): Locator { + return this.statusText; + } + + getStatusDetails(): Locator { + return this.statusDetails; + } + + async clickActionsMenu(): Promise { + await this.robustClick(this.actionsMenuButton); + } + + getActionMenuItem(actionName: string): Locator { + return this.actionItems.locator('li', { hasText: actionName }); + } + + async clickRevisionHistoryTab(): Promise { + await this.robustClick(this.revisionHistoryTab); + } + + async enterReleaseNameInDeletePopup(releaseName: string): Promise { + await this.releaseNameInput.fill(releaseName); + } + + async confirmDelete(): Promise { + await this.robustClick(this.confirmActionButton); + } + + getDeleteModalTitle(): Locator { + return this.deleteModalTitle; + } + + getResourceNameText(): Locator { + return this.resourceNameText; + } +} diff --git a/frontend/e2e/pages/helm-page.ts b/frontend/e2e/pages/helm-page.ts new file mode 100644 index 00000000000..aad5509a067 --- /dev/null +++ b/frontend/e2e/pages/helm-page.ts @@ -0,0 +1,456 @@ +import type { Locator } from '@playwright/test'; + +import { expect } from '../fixtures'; + +import BasePage from './base-page'; + +export class HelmPage extends BasePage { + private readonly filtersContainer = this.page.locator( + '[data-ouia-component-id="DataViewFilters"]', + ); + private readonly filterDropdownButton = this.page.locator( + '[data-ouia-component-id="DataViewCheckboxFilter"]', + ); + private readonly filterToolbar = this.page.locator( + '[data-ouia-component-id="DataViewToolbar"]', + ); + private readonly nameFilterInput = this.page.locator('[aria-label="Filter by name"]'); + private readonly formRadioForm = this.page.locator('#form-radiobutton-editorType-form-field'); + private readonly formRadioYaml = this.page.locator('#form-radiobutton-editorType-yaml-field'); + private readonly yamlEditorLines = this.page.locator('div.view-lines'); + private readonly catalogSearch = this.page.locator('input[placeholder="Filter by keyword..."]'); + private readonly catalogSidePane = this.page.locator('[role="dialog"]'); + private readonly catalogSidePaneButton = this.page.getByTestId('catalog-details-modal-cta'); + + // Helm release list locators + private readonly emptyMessage = this.page.getByText('No Helm Releases found'); + private readonly installCatalogLink = this.page.getByRole('link', { + name: /browse the catalog/i, + }); + private readonly dataViewTable = this.page.locator('[role="grid"]'); + private readonly statusIcon = this.page.getByTestId('success-icon'); + private readonly statusText = this.page.getByTestId('status-text'); + private readonly formSection = this.page.locator('#root_field-group'); + private readonly chartVersionDropdown = this.page.locator('#form-dropdown-chartVersion-field'); + private readonly cancelButton = this.page.getByTestId('reset-button'); + + // Helm tabbed page locators + private readonly helmReleasesTab = this.page.locator( + '[data-test-id="horizontal-link-Helm Releases"]', + ); + private readonly repositoriesTab = this.page.locator( + '[data-test-id="horizontal-link-Repositories"]', + ); + private readonly createDropdownToggle = this.page.getByTestId('tab-list-page-create'); + private readonly catalogLink = this.page.getByRole('link', { + name: 'Browse the catalog to discover available Helm Charts', + }); + private readonly pageHeading = this.page.getByTestId('page-heading'); + + // Helm Chart Repository form locators + private readonly formTitle = this.page.getByTestId('form-title'); + private readonly releaseNameInput = this.page.locator('#form-input-releaseName-field'); + private readonly repoNameInput = this.page.locator('#form-input-formData-repoName-field'); + private readonly repoDisplayNameInput = this.page.locator( + '#form-input-formData-repoDisplayName-field', + ); + private readonly repoDescriptionInput = this.page.locator( + '#form-input-formData-repoDescription-field', + ); + private readonly repoUrlInput = this.page.locator('#form-input-formData-repoUrl-field'); + private readonly clusterScopedRadio = this.page.getByTestId('HelmChartRepository-view-input'); + private readonly submitButton = this.page.locator('[data-test-id="submit-button"]'); + + // Details/list page locators + private readonly detailsPageHeading = this.page.getByTestId('page-heading').locator('h1'); + private readonly itemFilter = this.page.getByTestId('item-filter'); + private readonly resourceRowLocator = this.page.locator('[data-test-rows="resource-row"]'); + private readonly kebabButton = this.page.locator('[data-test-id="kebab-button"]'); + + async navigateToHelmReleases(namespace: string): Promise { + await this.goTo(`/helm-releases/ns/${namespace}`); + } + + async navigateToCatalogHelmCharts(namespace: string): Promise { + await this.goTo(`/catalog/ns/${namespace}?catalogType=HelmChart`); + } + + async searchAndSelectHelmChart(chartName: string): Promise { + await this.catalogSearch.fill(chartName); + await this.page.getByTestId(`HelmChart-${chartName}`).first().click(); + await expect(this.catalogSidePane).toBeVisible(); + await this.robustClick(this.catalogSidePaneButton); + } + + getYamlEditorLines(): Locator { + return this.yamlEditorLines; + } + + async selectYamlView(): Promise { + await this.formRadioYaml.click(); + } + + async clickCreate(): Promise { + await this.robustClick(this.submitButton); + } + + async openStatusFilterDropdown(): Promise { + // Select "Status" from the filter type toggle + const filterToggle = this.filtersContainer.locator('.pf-v6-c-menu-toggle').first(); + await this.robustClick(filterToggle); + await this.robustClick(this.page.locator('.pf-v6-c-menu__list-item').filter({ hasText: 'Status' })); + // Open the checkbox filter dropdown + await this.robustClick(this.filterDropdownButton); + } + + async selectStatusFilter(status: string): Promise { + const checkbox = this.page.locator( + `[data-ouia-component-id="DataViewCheckboxFilter-filter-item-${status}"] input`, + ); + await checkbox.check(); + } + + async verifyStatusFilterChecked(status: string): Promise { + const checkbox = this.page.locator( + `[data-ouia-component-id="DataViewCheckboxFilter-filter-item-${status}"] input`, + ); + await expect(checkbox).toBeChecked(); + } + + async selectAllStatusFilters(): Promise { + await this.selectStatusFilter('deployed'); + await this.selectStatusFilter('failed'); + await this.selectStatusFilter('other'); + } + + async verifyAllStatusFiltersChecked(): Promise { + await this.verifyStatusFilterChecked('deployed'); + await this.verifyStatusFilterChecked('failed'); + await this.verifyStatusFilterChecked('other'); + } + + async verifyAllStatusFiltersUnchecked(): Promise { + for (const status of ['deployed', 'failed', 'other']) { + const checkbox = this.page.locator( + `[data-ouia-component-id="DataViewCheckboxFilter-filter-item-${status}"] input`, + ); + await expect(checkbox).not.toBeChecked(); + } + } + + async clearAllFilters(): Promise { + const clearButton = this.filterToolbar.getByRole('button', { name: 'Clear all filters' }); + if ((await clearButton.count()) > 0) { + await this.robustClick(clearButton); + } + } + + async searchByName(name: string): Promise { + // Select "Name" from the filter type toggle + const filterToggle = this.filtersContainer.locator('.pf-v6-c-menu-toggle').first(); + await this.robustClick(filterToggle); + await this.robustClick(this.page.locator('.pf-v6-c-menu__list-item').filter({ hasText: 'Name' })); + await this.nameFilterInput.fill(name); + } + + getReleaseCellByName(name: string): Locator { + return this.page.getByTestId('data-view-cell-helm-release-name').filter({ hasText: name }); + } + + // --- Helm Tabbed Page methods --- + + async navigateToHelmPage(namespace: string): Promise { + await this.goTo(`/helm/ns/${namespace}`); + } + + async navigateToHelmRepositories(namespace: string): Promise { + await this.goTo(`/helm/ns/${namespace}/repositories`); + } + + getHelmReleasesTab(): Locator { + return this.helmReleasesTab; + } + + getRepositoriesTab(): Locator { + return this.repositoriesTab; + } + + getCatalogLink(): Locator { + return this.catalogLink; + } + + getCreateDropdownToggle(): Locator { + return this.createDropdownToggle; + } + + getPageHeading(): Locator { + return this.pageHeading; + } + + getFormTitle(): Locator { + return this.formTitle; + } + + async clickHelmReleasesTab(): Promise { + await this.robustClick(this.helmReleasesTab); + await this.waitForLoadingComplete(); + } + + async clickRepositoriesTab(): Promise { + await this.robustClick(this.repositoriesTab); + await this.waitForLoadingComplete(); + } + + async openCreateDropdown(): Promise { + await this.robustClick(this.createDropdownToggle); + } + + async verifyCreateDropdownItems(): Promise { + const menuItems = this.page.locator('[data-test-dropdown-menu]'); + await expect(menuItems.filter({ hasText: 'Repository' })).toBeVisible(); + await expect(menuItems.filter({ hasText: 'Helm Release' })).toBeVisible(); + } + + async clickCreateMenuItem(itemText: string): Promise { + await this.openCreateDropdown(); + const menuItem = this.page.locator('[data-test-dropdown-menu]', { hasText: itemText }); + await this.robustClick(menuItem); + } + + async clickCreateHelmRelease(): Promise { + await this.clickCreateMenuItem('Helm Release'); + } + + async clickCreateRepository(): Promise { + await this.clickCreateMenuItem('Repository'); + } + + // --- Repository form methods --- + + async fillRepoName(name: string): Promise { + await this.repoNameInput.fill(name); + } + + async fillRepoDisplayName(displayName: string): Promise { + await this.repoDisplayNameInput.scrollIntoViewIfNeeded(); + await this.repoDisplayNameInput.fill(displayName); + } + + async fillRepoDescription(description: string): Promise { + await this.repoDescriptionInput.scrollIntoViewIfNeeded(); + await this.repoDescriptionInput.fill(description); + } + + async fillRepoUrl(url: string): Promise { + await this.repoUrlInput.scrollIntoViewIfNeeded(); + await this.repoUrlInput.fill(url); + } + + async selectClusterScope(): Promise { + await this.robustClick(this.clusterScopedRadio); + } + + async clickSubmit(): Promise { + await this.robustClick(this.submitButton); + } + + async fillReleaseName(name: string): Promise { + await this.releaseNameInput.fill(name); + } + + // --- Details page methods --- + + getDetailsPageHeading(): Locator { + return this.detailsPageHeading; + } + + getKindTitle(kind: string): Locator { + return this.page.locator(`[title="${kind}"]`); + } + + getBreadcrumb(index: number): Locator { + return this.page.getByTestId(`breadcrumb-link-${index}`); + } + + async clickBreadcrumb(index: number): Promise { + await this.robustClick(this.getBreadcrumb(index)); + } + + // --- Repository list page methods --- + + async filterRepoByName(name: string): Promise { + await this.itemFilter.clear(); + await this.itemFilter.fill(name); + } + + async editRepository(name: string, type: string): Promise { + await this.filterRepoByName(name); + await expect(this.kebabButton.first()).toBeVisible({ timeout: 30_000 }); + await this.robustClick(this.kebabButton.first()); + const editAction = this.page.getByTestId(`Edit ${type}`); + await this.robustClick(editAction); + } + + async deleteRepositoryFromKebab(name: string, type: string): Promise { + await this.robustClick(this.kebabButton.first()); + const deleteAction = this.page.getByTestId(`Delete ${type}`); + await this.robustClick(deleteAction); + const confirmButton = this.page.getByTestId('confirm-action'); + await this.robustClick(confirmButton); + } + + getResourceRows(): Locator { + return this.resourceRowLocator; + } + + async isRepositoryTabActive(): Promise { + const parent = this.repositoriesTab.locator('xpath=ancestor::li'); + const classAttr = await parent.getAttribute('class'); + return classAttr?.includes('pf-m-current') ?? false; + } + + async clickRepository(repoName: string): Promise { + const repoLink = this.page.locator(`[data-test-id="${repoName}"]`); + await this.robustClick(repoLink); + } + + // --- Helm release list getters --- + + getEmptyMessage(): Locator { + return this.emptyMessage; + } + + getInstallLink(): Locator { + return this.installCatalogLink; + } + + getTable(): Locator { + return this.dataViewTable; + } + + getStatusIcon(): Locator { + return this.statusIcon; + } + + getStatusText(): Locator { + return this.statusText; + } + + getFormViewRadio(): Locator { + return this.formRadioForm; + } + + getYamlViewRadio(): Locator { + return this.formRadioYaml; + } + + getReleaseNameInput(): Locator { + return this.releaseNameInput; + } + + getCancelButton(): Locator { + return this.cancelButton; + } + + getFormSections(): Locator { + return this.formSection; + } + + getFilterDropdownItem(status: string): Locator { + return this.page.locator( + `[data-ouia-component-id="DataViewCheckboxFilter-filter-item-${status.toLowerCase()}"]`, + ); + } + + // --- Helm release list actions --- + + async clickReleaseName(name: string): Promise { + await this.robustClick(this.page.locator(`a[title="${name}"]`)); + } + + async clickKebabMenu(): Promise { + const kebabButton = this.page.getByTestId('kebab-button').first(); + await this.robustClick(kebabButton); + // eslint-disable-next-line no-restricted-syntax + await this.page + .locator('[data-test-action]') + .first() + .waitFor({ state: 'visible', timeout: 10_000 }); + } + + async selectAction(actionName: string): Promise { + await this.robustClick(this.page.locator(`[data-test-action="${actionName}"]`)); + } + + async filterByStatus(status: string): Promise { + const filterToggle = this.filtersContainer.locator('.pf-v6-c-menu-toggle').first(); + await this.robustClick(filterToggle); + await this.robustClick(this.page.locator('.pf-v6-c-menu__list-item').filter({ hasText: 'Status' })); + await this.robustClick(this.filterDropdownButton); + const filterItem = this.page.locator( + `[data-ouia-component-id="DataViewCheckboxFilter-filter-item-${status.toLowerCase()}"]`, + ); + await this.robustClick(filterItem); + await this.robustClick(this.filterDropdownButton); + } + + // --- Catalog navigation --- + + async navigateToCatalog(namespace: string): Promise { + await this.goTo(`/catalog/ns/${namespace}`); + } + + async selectHelmChartsType(): Promise { + await this.robustClick(this.page.getByTestId('tab HelmChart')); + } + + async searchAndSelectChart(chartName: string): Promise { + await this.catalogSearch.fill(chartName); + await this.robustClick(this.page.getByTestId(`HelmChart-${chartName}`).first()); + } + + async clickCreateOnSidePane(): Promise { + await this.robustClick(this.catalogSidePaneButton, { force: true }); + } + + async enterReleaseName(name: string): Promise { + await this.releaseNameInput.clear(); + await this.releaseNameInput.fill(name); + } + + async clickInstallButton(): Promise { + await this.robustClick(this.submitButton); + await this.waitForLoadingComplete(40_000); + } + + // --- Upgrade/Rollback actions --- + + async upgradeChartVersion(): Promise { + await this.chartVersionDropdown.click(); + const items = this.page.getByTestId('console-select-item'); + await expect(items.first()).toBeVisible({ timeout: 10_000 }); + await items.first().click(); + const confirmButton = this.page.getByRole('button', { name: 'Proceed' }); + try { + // eslint-disable-next-line no-restricted-syntax + await confirmButton.waitFor({ state: 'visible', timeout: 2_000 }); + await this.robustClick(confirmButton); + } catch { + // Confirmation not required for this chart version + } + } + + async clickUpgradeButton(): Promise { + await this.robustClick(this.submitButton); + await this.waitForLoadingComplete(60_000); + } + + async selectRevision(): Promise { + await this.page.locator('[id^=form-radiobutton-revision]').last().check(); + } + + async clickRollbackButton(): Promise { + await this.robustClick(this.submitButton); + await this.waitForLoadingComplete(60_000); + } +} diff --git a/frontend/e2e/pages/helm-url-chart-page.ts b/frontend/e2e/pages/helm-url-chart-page.ts new file mode 100644 index 00000000000..e2993330d77 --- /dev/null +++ b/frontend/e2e/pages/helm-url-chart-page.ts @@ -0,0 +1,65 @@ +import type { Locator } from '@playwright/test'; + +import BasePage from './base-page'; + +/** + * Page object for the Helm URL chart install wizard. + * + * Step 1 (ChartDetails): user provides chart URL, release name, and chart version. + * Step 2 (ConfigureInstall): user reviews chart details and clicks Install. + */ +export class HelmUrlChartPage extends BasePage { + // Step 1 — Chart details form + private readonly chartUrlInput = this.page.locator('[data-test="oci-chart-url"] input'); + private readonly releaseNameInput = this.page.locator('[data-test="oci-release-name"] input'); + private readonly chartVersionInput = this.page.locator('[data-test="oci-chart-version"] input'); + + // Footer buttons (shared between steps — same data-test-id) + private readonly submitButton = this.page.locator('[data-test-id="submit-button"]'); + private readonly resetButton = this.page.locator('[data-test-id="reset-button"]'); + + // Validation error indicators + private readonly validationErrors = this.page.locator('.pf-m-error'); + + async navigateToUrlChart(namespace: string): Promise { + await this.goTo(`/helm/ns/${namespace}/url-chart`); + } + + // --- Locator getters for assertions in specs --- + + getChartUrlInput(): Locator { + return this.chartUrlInput; + } + + getValidationErrors(): Locator { + return this.validationErrors; + } + + // --- Step 1 actions --- + + async enterChartUrl(url: string): Promise { + await this.chartUrlInput.fill(url); + } + + async enterReleaseName(name: string): Promise { + await this.releaseNameInput.fill(name); + } + + async enterChartVersion(version: string): Promise { + await this.chartVersionInput.fill(version); + } + + async clickNext(): Promise { + await this.robustClick(this.submitButton); + } + + // --- Step 2 actions --- + + async clickInstall(): Promise { + await this.robustClick(this.submitButton); + } + + async clickBack(): Promise { + await this.robustClick(this.resetButton); + } +} diff --git a/frontend/e2e/pages/topology-page.ts b/frontend/e2e/pages/topology-page.ts index 8addf7f779d..62f7c03a59b 100644 --- a/frontend/e2e/pages/topology-page.ts +++ b/frontend/e2e/pages/topology-page.ts @@ -211,6 +211,15 @@ export class TopologyPage extends BasePage { } } + async clickOnHelmGroup(groupName: string): Promise { + await this.ensureGraphView(); + await this.search(groupName); + const helmGroup = this.page.locator('[data-type="helm-release"] .is-filtered'); + await expect(helmGroup.first()).toBeAttached({ timeout: 30_000 }); + const label = this.page.locator('.odc-helm-release .odc-base-node__label').filter({ hasText: groupName }); + await this.robustClick(label.first()); + } + // Catalog/quick search methods async clickBuilderImageItem(imageName: string): Promise { await this.page.getByTestId(`item-name-${imageName}`).first().click(); diff --git a/frontend/e2e/pages/topology-sidebar-page.ts b/frontend/e2e/pages/topology-sidebar-page.ts index f244150e632..788b4b7e17c 100644 --- a/frontend/e2e/pages/topology-sidebar-page.ts +++ b/frontend/e2e/pages/topology-sidebar-page.ts @@ -1,3 +1,5 @@ +import type { Locator } from '@playwright/test'; + import { expect } from '../fixtures'; import BasePage from './base-page'; @@ -20,4 +22,19 @@ export class TopologySidebarPage extends BasePage { const actionItem = this.page.getByRole('menuitem', { name: action }); await this.robustClick(actionItem); } + + getTab(tabName: string): Locator { + return this.dialog.getByRole('tab', { name: tabName }); + } + + async selectTab(tabName: string): Promise { + const tab = this.getTab(tabName); + await this.robustClick(tab); + await this.waitForLoadingComplete(); + } + + async clickResourceLink(href: string): Promise { + const link = this.dialog.locator(`a[href="${href}"]`); + await this.robustClick(link); + } } diff --git a/frontend/e2e/tests/helm/helm-compatibility.spec.ts b/frontend/e2e/tests/helm/helm-compatibility.spec.ts new file mode 100644 index 00000000000..1927ff5815a --- /dev/null +++ b/frontend/e2e/tests/helm/helm-compatibility.spec.ts @@ -0,0 +1,38 @@ +import { test, expect } from '../../fixtures'; +import { HelmPage } from '../../pages/helm-page'; + +test.describe('Helm Chart Compatibility', { tag: ['@helm'] }, () => { + test('compatible helm charts are displayed in catalog: HR-02-TC01', async ({ + page, + k8sClient, + cleanup, + }) => { + const ns = `aut-helm-compat-${Date.now()}`; + await k8sClient.createNamespace(ns); + cleanup.trackNamespace(ns); + + const helmPage = new HelmPage(page); + + await test.step('Navigate to catalog and select Helm Charts type', async () => { + await helmPage.navigateToCatalog(ns); + await helmPage.selectHelmChartsType(); + }); + + await test.step('Verify Helm chart cards are displayed', async () => { + const catalogCards = page.locator('[data-test^="HelmChart-"]'); + await expect(catalogCards.first()).toBeVisible({ timeout: 60_000 }); + const count = await catalogCards.count(); + expect(count).toBeGreaterThan(0); + }); + }); + + // eslint-disable-next-line playwright/expect-expect + test('Check meta data for importing helm charts from index.yaml: HR-02-TC02', async () => { + test.skip(true, 'Manual test - requires inspecting Network tab'); + }); + + // eslint-disable-next-line playwright/expect-expect + test('Check chart versions compatible with cluster: HR-02-TC03', async () => { + test.skip(true, 'Manual test - requires verifying kubeversion compatibility'); + }); +}); diff --git a/frontend/e2e/tests/helm/helm-installation-view.spec.ts b/frontend/e2e/tests/helm/helm-installation-view.spec.ts new file mode 100644 index 00000000000..c5e180ca0d8 --- /dev/null +++ b/frontend/e2e/tests/helm/helm-installation-view.spec.ts @@ -0,0 +1,49 @@ +import { test, expect } from '../../fixtures'; +import { HelmPage } from '../../pages/helm-page'; + +test.describe('Helm Chart Installation View', { tag: ['@helm'] }, () => { + test('non-configurable Helm release shows info message: HR-04-TC04', async ({ + page, + k8sClient, + cleanup, + }) => { + const ns = `aut-helm-noconfig-${Date.now()}`; + await k8sClient.createNamespace(ns); + cleanup.trackNamespace(ns); + + const helmPage = new HelmPage(page); + + await test.step('Navigate to catalog and select a non-configurable chart', async () => { + await helmPage.navigateToCatalog(ns); + await helmPage.selectHelmChartsType(); + await helmPage.searchAndSelectChart('Httpd Imagestreams'); + }); + + await test.step('Open Create Helm Release form', async () => { + await helmPage.clickCreateOnSidePane(); + }); + + await test.step('Verify non-configurable message is displayed', async () => { + const alertMessage = page.locator('h4[class$="alert__title"]'); + await expect(alertMessage).toContainText( + "Helm release is not configurable since the Helm Chart doesn't define any values.", + { timeout: 30_000 }, + ); + }); + }); + + // eslint-disable-next-line playwright/expect-expect + test('Grouping of Helm multiple chart versions: HR-04-TC01', async () => { + test.skip(true, 'Known broken - only one version of Nodejs chart available'); + }); + + // eslint-disable-next-line playwright/expect-expect + test('Switch from YAML to Form view: HR-04-TC02', async () => { + test.skip(true, 'Manual test'); + }); + + // eslint-disable-next-line playwright/expect-expect + test('Data does not change while switching Form to YAML view: HR-04-TC03', async () => { + test.skip(true, 'Known broken - replica count field no longer exists in the form'); + }); +}); diff --git a/frontend/e2e/tests/helm/helm-navigation.spec.ts b/frontend/e2e/tests/helm/helm-navigation.spec.ts new file mode 100644 index 00000000000..c207a604c89 --- /dev/null +++ b/frontend/e2e/tests/helm/helm-navigation.spec.ts @@ -0,0 +1,139 @@ +import { test, expect } from '../../fixtures'; +import { warmupSPA } from '../../pages/base-page'; +import { HelmPage } from '../../pages/helm-page'; +import { TopologyPage } from '../../pages/topology-page'; + +test.describe('Helm Chart Navigation', { tag: ['@helm'] }, () => { + test('HR-05-TC03: YAML view editor for Install Helm Chart page', async ({ + page, + cleanup, + k8sClient, + }) => { + const ns = `aut-helm-tc03-${Date.now()}`; + await k8sClient.createNamespace(ns); + cleanup.trackNamespace(ns); + + const helmPage = new HelmPage(page); + + await test.step('Navigate to Helm Chart catalog and open Nodejs chart', async () => { + await warmupSPA(page); + await helmPage.switchPerspective('Developer'); + await helmPage.navigateToCatalogHelmCharts(ns); + await helmPage.searchAndSelectHelmChart('Nodejs'); + }); + + await test.step('Switch to YAML view and verify editor is visible', async () => { + await helmPage.selectYamlView(); + await expect(helmPage.getYamlEditorLines()).toBeVisible(); + }); + }); + + // eslint-disable-next-line playwright/expect-expect + test('HR-05-TC04: Install Helm Chart', async ({ page, cleanup, k8sClient }) => { + const ns = `aut-helm-tc04-${Date.now()}`; + await k8sClient.createNamespace(ns); + cleanup.trackNamespace(ns); + + const helmPage = new HelmPage(page); + const topologyPage = new TopologyPage(page); + + await test.step('Navigate to Helm Chart catalog and open Nodejs chart', async () => { + await warmupSPA(page); + await helmPage.switchPerspective('Developer'); + await helmPage.navigateToCatalogHelmCharts(ns); + await helmPage.searchAndSelectHelmChart('Nodejs'); + }); + + await test.step('Install the Helm Chart with default release name', async () => { + await helmPage.clickCreate(); + }); + + await test.step('Verify Helm Chart workload appears in Topology', async () => { + await topologyPage.verifyWorkloadVisible('nodejs', 60_000); + }); + }); + + // eslint-disable-next-line playwright/expect-expect + test('HR-05-TC09: Select all filters', async ({ page, cleanup, k8sClient }) => { + const ns = `aut-helm-tc09-${Date.now()}`; + await k8sClient.createNamespace(ns); + cleanup.trackNamespace(ns); + + const helmPage = new HelmPage(page); + + await test.step('Navigate to Helm releases page', async () => { + await warmupSPA(page); + await helmPage.switchPerspective('Developer'); + await helmPage.navigateToHelmReleases(ns); + }); + + await test.step('Open status filter and select all checkboxes', async () => { + await helmPage.openStatusFilterDropdown(); + await helmPage.selectAllStatusFilters(); + }); + + await test.step('Verify all filter checkboxes are checked', async () => { + await helmPage.verifyAllStatusFiltersChecked(); + }); + }); + + // eslint-disable-next-line playwright/expect-expect + test('HR-05-TC10: Clear all filters', async ({ page, cleanup, k8sClient }) => { + const ns = `aut-helm-tc10-${Date.now()}`; + await k8sClient.createNamespace(ns); + cleanup.trackNamespace(ns); + + const helmPage = new HelmPage(page); + + await test.step('Navigate to Helm releases page', async () => { + await warmupSPA(page); + await helmPage.switchPerspective('Developer'); + await helmPage.navigateToHelmReleases(ns); + }); + + await test.step('Select all status filters', async () => { + await helmPage.openStatusFilterDropdown(); + await helmPage.selectAllStatusFilters(); + }); + + await test.step('Clear all filters and verify they are removed', async () => { + await helmPage.clearAllFilters(); + await helmPage.openStatusFilterDropdown(); + await helmPage.verifyAllStatusFiltersUnchecked(); + }); + }); + + test('HR-05-TC11: Search for the Helm Chart', async ({ page, cleanup, k8sClient }) => { + const ns = `aut-helm-tc11-${Date.now()}`; + await k8sClient.createNamespace(ns); + cleanup.trackNamespace(ns); + + const helmPage = new HelmPage(page); + + await test.step('Install a Helm Chart to have searchable data', async () => { + await warmupSPA(page); + await helmPage.switchPerspective('Developer'); + await helmPage.navigateToCatalogHelmCharts(ns); + await helmPage.searchAndSelectHelmChart('Nodejs'); + await helmPage.clickCreate(); + // Wait for redirect to topology to confirm installation completed + await expect(page).toHaveURL(/topology/, { timeout: 60_000 }); + }); + + await test.step('Navigate to Helm releases and search for the chart', async () => { + await helmPage.navigateToHelmReleases(ns); + await helmPage.searchByName('nodejs'); + await expect(helmPage.getReleaseCellByName('nodejs')).toBeVisible(); + }); + }); + + // eslint-disable-next-line playwright/expect-expect + test('HR-05-TC07: Filter out failed Helm Charts', async () => { + test.skip(true, 'Manual test - requires a Helm release in Failed state'); + }); + + // eslint-disable-next-line playwright/expect-expect + test('HR-05-TC08: Filter out other Helm Charts', async () => { + test.skip(true, 'Manual test - requires a Helm release in Other state'); + }); +}); diff --git a/frontend/e2e/tests/helm/helm-page-tabs.spec.ts b/frontend/e2e/tests/helm/helm-page-tabs.spec.ts new file mode 100644 index 00000000000..55003f15178 --- /dev/null +++ b/frontend/e2e/tests/helm/helm-page-tabs.spec.ts @@ -0,0 +1,340 @@ +import { test, expect } from '../../fixtures'; +import { warmupSPA } from '../../pages/base-page'; +import { HelmPage } from '../../pages/helm-page'; +import { TopologyPage } from '../../pages/topology-page'; + +test.describe('Helm page tabs', { tag: ['@helm'] }, () => { + test( + 'HR-09-TC01: Helm page displays Releases and Repositories tabs with empty state', + async ({ page, k8sClient, cleanup }) => { + const ns = `aut-helm-tabs-${Date.now()}`; + const helmPage = new HelmPage(page); + + await test.step('Set up namespace and navigate to Helm page', async () => { + await k8sClient.createNamespace(ns); + cleanup.trackNamespace(ns); + await warmupSPA(page); + await helmPage.switchPerspective('Developer'); + await helmPage.navigateToHelmPage(ns); + }); + + await test.step('Verify Helm Releases and Repositories tabs are visible', async () => { + await expect(helmPage.getHelmReleasesTab()).toBeVisible(); + await expect(helmPage.getRepositoriesTab()).toBeVisible(); + }); + + await test.step('Verify empty state message and catalog link', async () => { + await expect(page.locator('h3')).toContainText('No Helm Releases found'); + await expect(helmPage.getCatalogLink()).toBeVisible(); + }); + + await test.step('Verify Create dropdown with Helm Release and Repository options', async () => { + await expect(helmPage.getCreateDropdownToggle()).toBeVisible(); + await helmPage.openCreateDropdown(); + await helmPage.verifyCreateDropdownItems(); + // Close dropdown by pressing Escape + await page.keyboard.press('Escape'); + }); + }, + ); + + test( + 'HR-09-TC02: Repositories tab navigation and breadcrumbs', + async ({ page, k8sClient, cleanup }) => { + const ns = `aut-helm-repo-nav-${Date.now()}`; + const helmPage = new HelmPage(page); + + await test.step('Set up namespace and navigate to Helm page', async () => { + await k8sClient.createNamespace(ns); + cleanup.trackNamespace(ns); + await warmupSPA(page); + await helmPage.switchPerspective('Developer'); + await helmPage.navigateToHelmPage(ns); + }); + + await test.step('Click Repositories tab and verify', async () => { + await helmPage.clickRepositoriesTab(); + await expect(helmPage.getPageHeading()).toContainText('Helm'); + }); + + await test.step('Click openshift-helm-charts repository and verify breadcrumbs', async () => { + await helmPage.clickRepository('openshift-helm-charts'); + await expect(helmPage.getBreadcrumb(0)).toContainText('Repositories'); + }); + + await test.step('Click Repositories breadcrumb and verify redirection', async () => { + await helmPage.clickBreadcrumb(0); + await expect(helmPage.getPageHeading()).toContainText('Helm'); + const isActive = await helmPage.isRepositoryTabActive(); + expect(isActive).toBe(true); + }); + }, + ); + + test( + 'HR-09-TC03: Create Helm Release from Helm page', + async ({ page, k8sClient, cleanup }) => { + const ns = `aut-helm-create-${Date.now()}`; + const releaseName = 'nodejs-release-2'; + const helmPage = new HelmPage(page); + const topologyPage = new TopologyPage(page); + + await test.step('Set up namespace and navigate to Helm page', async () => { + await k8sClient.createNamespace(ns); + cleanup.trackNamespace(ns); + await warmupSPA(page); + await helmPage.switchPerspective('Developer'); + await helmPage.navigateToHelmPage(ns); + }); + + await test.step('Click Helm Release in Create dropdown', async () => { + await helmPage.clickCreateHelmRelease(); + await expect(page).toHaveURL(/catalogType=HelmChart/); + }); + + await test.step('Search and select Nodejs chart from catalog', async () => { + await helmPage.searchAndSelectHelmChart('Nodejs'); + }); + + await test.step('Fill release name and create', async () => { + await expect(helmPage.getFormTitle()).toContainText('Create Helm Release', { + timeout: 30_000, + }); + await helmPage.fillReleaseName(releaseName); + await helmPage.clickCreate(); + }); + + await test.step('Verify workload in Topology', async () => { + await topologyPage.verifyWorkloadVisible(releaseName, 120_000); + }); + }, + ); + + test( + 'HR-09-TC04: Create Project Helm Chart Repository', + async ({ page, k8sClient, cleanup }) => { + const ns = `aut-helm-phcr-${Date.now()}`; + const repoName = 'helm-test1'; + const helmPage = new HelmPage(page); + + await test.step('Set up namespace and navigate to Helm page', async () => { + await k8sClient.createNamespace(ns); + cleanup.trackNamespace(ns); + await warmupSPA(page); + await helmPage.switchPerspective('Developer'); + await helmPage.navigateToHelmPage(ns); + }); + + await test.step('Click Repository in Create dropdown and verify form', async () => { + await helmPage.clickCreateRepository(); + await expect(helmPage.getFormTitle()).toContainText('Create Helm Chart Repository'); + }); + + await test.step('Fill in the repository form', async () => { + await helmPage.fillRepoName(repoName); + await helmPage.fillRepoDescription('test'); + await helmPage.fillRepoUrl( + 'https://raw.githubusercontent.com/IBM/charts/master/repo/community/index.yaml', + ); + }); + + await test.step('Create and verify details page', async () => { + await helmPage.clickSubmit(); + await expect(helmPage.getKindTitle('ProjectHelmChartRepository')).toBeVisible({ + timeout: 30_000, + }); + await expect(helmPage.getDetailsPageHeading()).toContainText(repoName); + }); + + await test.step('Clean up: delete the repository', async () => { + cleanup.trackCustomResource( + repoName, + ns, + 'helm.openshift.io', + 'v1beta1', + 'projecthelmchartrepositories', + 'ProjectHelmChartRepository', + ); + }); + }, + ); + + test( + 'HR-09-TC05: Edit Project Helm Chart Repository', + async ({ page, k8sClient, cleanup }) => { + const ns = `aut-helm-edit-phcr-${Date.now()}`; + const repoName = 'helm-test1'; + const helmPage = new HelmPage(page); + + await test.step('Set up namespace and create ProjectHelmChartRepository', async () => { + await k8sClient.createNamespace(ns); + cleanup.trackNamespace(ns); + await k8sClient.createCustomResource( + 'helm.openshift.io', + 'v1beta1', + ns, + 'projecthelmchartrepositories', + { + apiVersion: 'helm.openshift.io/v1beta1', + kind: 'ProjectHelmChartRepository', + metadata: { name: repoName, namespace: ns }, + spec: { + name: repoName, + connectionConfig: { + url: 'https://raw.githubusercontent.com/IBM/charts/master/repo/community/index.yaml', + }, + description: 'test', + }, + }, + ); + cleanup.trackCustomResource( + repoName, + ns, + 'helm.openshift.io', + 'v1beta1', + 'projecthelmchartrepositories', + 'ProjectHelmChartRepository', + ); + }); + + await test.step('Navigate to Helm Repositories tab', async () => { + await warmupSPA(page); + await helmPage.switchPerspective('Developer'); + await helmPage.navigateToHelmRepositories(ns); + }); + + await test.step('Edit the repository', async () => { + await helmPage.editRepository(repoName, 'ProjectHelmChartRepository'); + await expect(helmPage.getFormTitle()).toContainText('Edit ProjectHelmChartRepository'); + }); + + await test.step('Update display name and save', async () => { + await helmPage.fillRepoDisplayName('My charts'); + await helmPage.clickSubmit(); + await expect(helmPage.getKindTitle('ProjectHelmChartRepository')).toBeVisible({ + timeout: 30_000, + }); + await expect(helmPage.getDetailsPageHeading()).toContainText(repoName); + }); + + await test.step('Navigate back and verify update in list', async () => { + await helmPage.navigateToHelmRepositories(ns); + await helmPage.filterRepoByName(repoName); + await expect(helmPage.getResourceRows().first()).toContainText('My charts'); + }); + }, + ); + + test( + 'HR-09-TC06: Create cluster-scoped Helm Chart Repository', + async ({ page, k8sClient, cleanup }) => { + const ns = `aut-helm-hcr-${Date.now()}`; + const repoName = 'helm-test2'; + const helmPage = new HelmPage(page); + + await test.step('Set up namespace and navigate to Helm page', async () => { + await k8sClient.createNamespace(ns); + cleanup.trackNamespace(ns); + await warmupSPA(page); + await helmPage.switchPerspective('Developer'); + await helmPage.navigateToHelmPage(ns); + }); + + await test.step('Click Repository in Create dropdown and verify form', async () => { + await helmPage.clickCreateRepository(); + await expect(helmPage.getFormTitle()).toContainText('Create Helm Chart Repository'); + }); + + await test.step('Select cluster scope and fill form', async () => { + await helmPage.selectClusterScope(); + await helmPage.fillRepoName(repoName); + await helmPage.fillRepoUrl( + 'https://raw.githubusercontent.com/Azure-Samples/helm-charts/master', + ); + }); + + await test.step('Create and verify details page', async () => { + await helmPage.clickSubmit(); + await expect(helmPage.getKindTitle('HelmChartRepository')).toBeVisible({ + timeout: 30_000, + }); + await expect(helmPage.getDetailsPageHeading()).toContainText(repoName); + }); + + await test.step('Track cluster resource for cleanup', async () => { + cleanup.trackClusterCustomResource( + repoName, + 'helm.openshift.io', + 'v1beta1', + 'helmchartrepositories', + 'HelmChartRepository', + ); + }); + }, + ); + + test( + 'HR-09-TC07: Edit cluster-scoped Helm Chart Repository', + async ({ page, k8sClient, cleanup }) => { + const ns = `aut-helm-edit-hcr-${Date.now()}`; + const repoName = 'helm-test2'; + const updatedUrl = + 'https://raw.githubusercontent.com/Azure-Samples/helm-charts/master/docs/index.yaml'; + const helmPage = new HelmPage(page); + + await test.step('Set up namespace and create HelmChartRepository', async () => { + await k8sClient.createNamespace(ns); + cleanup.trackNamespace(ns); + await k8sClient.createClusterCustomResource( + 'helm.openshift.io', + 'v1beta1', + 'helmchartrepositories', + { + apiVersion: 'helm.openshift.io/v1beta1', + kind: 'HelmChartRepository', + metadata: { name: repoName }, + spec: { + name: repoName, + connectionConfig: { + url: 'https://raw.githubusercontent.com/Azure-Samples/helm-charts/master', + }, + }, + }, + ); + cleanup.trackClusterCustomResource( + repoName, + 'helm.openshift.io', + 'v1beta1', + 'helmchartrepositories', + 'HelmChartRepository', + ); + }); + + await test.step('Navigate to Helm Repositories tab', async () => { + await warmupSPA(page); + await helmPage.switchPerspective('Developer'); + await helmPage.navigateToHelmRepositories(ns); + }); + + await test.step('Edit the repository', async () => { + await helmPage.editRepository(repoName, 'HelmChartRepository'); + await expect(helmPage.getFormTitle()).toContainText('Edit HelmChartRepository'); + }); + + await test.step('Update URL and save', async () => { + await helmPage.fillRepoUrl(updatedUrl); + await helmPage.clickSubmit(); + await expect(helmPage.getKindTitle('HelmChartRepository')).toBeVisible({ + timeout: 30_000, + }); + await expect(helmPage.getDetailsPageHeading()).toContainText(repoName); + }); + + await test.step('Navigate back and verify update in list', async () => { + await helmPage.navigateToHelmRepositories(ns); + await helmPage.filterRepoByName(repoName); + await expect(helmPage.getResourceRows().first()).toContainText(updatedUrl); + }); + }, + ); +}); diff --git a/frontend/e2e/tests/helm/helm-release.spec.ts b/frontend/e2e/tests/helm/helm-release.spec.ts new file mode 100644 index 00000000000..d1f8e04cd15 --- /dev/null +++ b/frontend/e2e/tests/helm/helm-release.spec.ts @@ -0,0 +1,190 @@ +import { test, expect } from '../../fixtures'; +import { HelmDetailsPage } from '../../pages/helm-details-page'; +import { HelmPage } from '../../pages/helm-page'; + +const HELM_CHART_NAME = 'Nodejs'; + +test.describe('Helm Release', { tag: ['@helm', '@smoke'] }, () => { + test('shows empty state when no helm releases exist (HR-05-TC01)', async ({ + page, + k8sClient, + cleanup, + }) => { + const ns = `aut-helm-empty-${Date.now()}`; + await k8sClient.createNamespace(ns); + cleanup.trackNamespace(ns); + + const helmPage = new HelmPage(page); + await helmPage.navigateToHelmReleases(ns); + + await expect(helmPage.getEmptyMessage()).toContainText('No Helm Releases found', { + timeout: 60_000, + }); + await expect(helmPage.getInstallLink()).toBeVisible(); + }); + + test('displays Create Helm Release page details (HR-05-TC02)', async ({ + page, + k8sClient, + cleanup, + }) => { + const ns = `aut-helm-form-${Date.now()}`; + await k8sClient.createNamespace(ns); + cleanup.trackNamespace(ns); + + const helmPage = new HelmPage(page); + + await test.step('Navigate to Software Catalog and select Helm Charts', async () => { + await helmPage.navigateToCatalog(ns); + await helmPage.selectHelmChartsType(); + }); + + await test.step('Search and select Nodejs chart', async () => { + await helmPage.searchAndSelectChart(HELM_CHART_NAME); + }); + + await test.step('Click Create on side pane', async () => { + await helmPage.clickCreateOnSidePane(); + }); + + await test.step('Verify Create Helm Release page', async () => { + await expect(helmPage.getFormTitle()).toHaveText('Create Helm Release'); + await expect(helmPage.getReleaseNameInput()).toHaveValue('nodejs'); + await expect(helmPage.getFormViewRadio()).toBeChecked(); + await expect(helmPage.getYamlViewRadio()).not.toBeChecked(); + await expect(helmPage.getFormSections().first()).toBeVisible(); + }); + + await test.step('Cancel creation', async () => { + await helmPage.getCancelButton().click(); + }); + }); + + test('installs Helm Chart, verifies status and details, filters, and manages lifecycle', async ({ + page, + k8sClient, + cleanup, + }) => { + const ns = `aut-helm-lifecycle-${Date.now()}`; + const releaseName = 'nodejs-release'; + await k8sClient.createNamespace(ns); + cleanup.trackNamespace(ns); + + const helmPage = new HelmPage(page); + const helmDetailsPage = new HelmDetailsPage(page); + + await test.step('Install Helm Chart from catalog (HR-06-TC04)', async () => { + await helmPage.navigateToCatalog(ns); + await helmPage.selectHelmChartsType(); + await helmPage.searchAndSelectChart(HELM_CHART_NAME); + await helmPage.clickCreateOnSidePane(); + await helmPage.enterReleaseName(releaseName); + await helmPage.clickInstallButton(); + }); + + await test.step('Verify helm release is listed (HR-05-TC05)', async () => { + await helmPage.navigateToHelmReleases(ns); + await helmPage.searchByName(releaseName); + await expect(helmPage.getTable()).toBeVisible({ timeout: 30_000 }); + }); + + await test.step('Verify status icons (HR-01-TC04)', async () => { + await expect(helmPage.getStatusIcon().first()).toBeVisible({ timeout: 60_000 }); + await expect(helmPage.getStatusText().first()).toBeVisible(); + }); + + await test.step('Filter by Deployed status (HR-05-TC06)', async () => { + await helmPage.filterByStatus('Deployed'); + await expect(helmPage.getFilterDropdownItem('deployed').locator('input')).toBeChecked(); + await expect( + helmPage + .getTable() + .getByTestId('data-view-cell-helm-release-name') + .first(), + ).toBeVisible(); + }); + + await test.step('Verify details page tabs and actions (HR-05-TC13)', async () => { + await helmPage.navigateToHelmReleases(ns); + await helmPage.searchByName(releaseName); + await helmPage.clickReleaseName(releaseName); + + await expect(helmDetailsPage.getSectionHeading()).toBeVisible({ timeout: 30_000 }); + await expect(helmDetailsPage.getResourcesTab()).toBeVisible(); + await expect(helmDetailsPage.getRevisionHistoryTab()).toBeVisible(); + await expect(helmDetailsPage.getReleaseNotesTab()).toBeVisible(); + + await helmDetailsPage.clickActionsMenu(); + await expect(helmDetailsPage.getActionMenuItem('Upgrade')).toBeVisible(); + await expect(helmDetailsPage.getActionMenuItem('Delete Helm Release')).toBeVisible(); + await page.keyboard.press('Escape'); + }); + + await test.step('Verify status on details page (HR-01-TC04)', async () => { + await expect(helmDetailsPage.getPageHeading()).toContainText(releaseName); + await expect(helmDetailsPage.getStatusIcon().first()).toBeVisible(); + await expect( + helmDetailsPage.getStatusDetails().getByTestId('status-text'), + ).toBeVisible(); + }); + + await test.step('Verify revision history status (HR-01-TC04)', async () => { + await helmDetailsPage.clickRevisionHistoryTab(); + await expect(helmDetailsPage.getStatusIcon().first()).toBeVisible(); + }); + + await test.step('Upgrade helm release via kebab menu (HR-08-TC04)', async () => { + await helmPage.navigateToHelmReleases(ns); + await helmPage.searchByName(releaseName); + await helmPage.clickKebabMenu(); + await helmPage.selectAction('Upgrade'); + + await helmPage.upgradeChartVersion(); + await helmPage.clickUpgradeButton(); + await helmPage.navigateToHelmReleases(ns); + await helmPage.searchByName(releaseName); + await expect(helmPage.getTable()).toBeVisible({ timeout: 30_000 }); + await expect(helmPage.getStatusText().first()).toContainText('Deployed', { timeout: 60_000 }); + }); + + await test.step('Verify kebab menu actions after upgrade (HR-08-TC01)', async () => { + await expect(helmPage.getStatusText().first()).toContainText('Deployed', { timeout: 60_000 }); + await helmPage.clickKebabMenu(); + const upgradeAction = helmDetailsPage.getActionMenuItem('Upgrade'); + await expect(upgradeAction).toBeVisible({ timeout: 15_000 }); + await expect(helmDetailsPage.getActionMenuItem('Rollback')).toBeVisible(); + await expect(helmDetailsPage.getActionMenuItem('Delete Helm Release')).toBeVisible(); + await page.keyboard.press('Escape'); + }); + + await test.step('Upgrade helm release again (HR-08-TC02)', async () => { + await helmPage.clickKebabMenu(); + await helmPage.selectAction('Upgrade'); + await helmPage.upgradeChartVersion(); + await helmPage.clickUpgradeButton(); + await expect(page).toHaveURL(/\/helm\//, { timeout: 30_000 }); + }); + + await test.step('Rollback helm release (HR-08-TC03)', async () => { + await helmPage.navigateToHelmReleases(ns); + await helmPage.searchByName(releaseName); + await helmPage.clickReleaseName(releaseName); + await helmDetailsPage.clickActionsMenu(); + await expect(helmDetailsPage.getActionMenuItem('Rollback')).toBeVisible(); + await helmDetailsPage.getActionMenuItem('Rollback').click(); + await helmPage.selectRevision(); + await helmPage.clickRollbackButton(); + await expect(helmDetailsPage.getSectionHeading()).toBeVisible({ timeout: 30_000 }); + }); + + await test.step('Delete helm release (HR-01-TC03)', async () => { + await helmPage.navigateToHelmReleases(ns); + await helmPage.searchByName(releaseName); + await helmPage.clickKebabMenu(); + await helmPage.selectAction('Delete Helm Release'); + await helmDetailsPage.enterReleaseNameInDeletePopup(releaseName); + await helmDetailsPage.confirmDelete(); + await expect(page).toHaveURL(/\/helm\//, { timeout: 30_000 }); + }); + }); +}); diff --git a/frontend/e2e/tests/helm/install-helm-chart.spec.ts b/frontend/e2e/tests/helm/install-helm-chart.spec.ts new file mode 100644 index 00000000000..f3fd0b2469a --- /dev/null +++ b/frontend/e2e/tests/helm/install-helm-chart.spec.ts @@ -0,0 +1,148 @@ +import { test, expect } from '../../fixtures'; +import { HelmPage } from '../../pages/helm-page'; + +test.describe('Install the Helm Release', { tag: ['@helm'] }, () => { + test('Helm Chart option is visible on the +Add Page: HR-06-TC01', async ({ + page, + k8sClient, + cleanup, + }) => { + const ns = `aut-helm-add-${Date.now()}`; + await k8sClient.createNamespace(ns); + cleanup.trackNamespace(ns); + + const helmPage = new HelmPage(page); + + await test.step('Navigate to Add page', async () => { + await helmPage.switchPerspective('Developer'); + await page.goto(`/add/ns/${ns}`); + }); + + await test.step('Verify Helm Chart card is visible', async () => { + const helmChartCard = page.getByTestId('item Helm Chart'); + await expect(helmChartCard).toBeVisible({ timeout: 30_000 }); + }); + }); + + test('Chart versions dropdown shows available versions: HR-06-TC05', async ({ + page, + k8sClient, + cleanup, + }) => { + const ns = `aut-helm-versions-${Date.now()}`; + await k8sClient.createNamespace(ns); + cleanup.trackNamespace(ns); + + const helmPage = new HelmPage(page); + + await test.step('Navigate to catalog and select Quarkus chart', async () => { + await helmPage.navigateToCatalog(ns); + await helmPage.selectHelmChartsType(); + await helmPage.searchAndSelectChart('Quarkus'); + }); + + await test.step('Open Create Helm Release form', async () => { + await helmPage.clickCreateOnSidePane(); + }); + + await test.step('Click chart versions dropdown and verify versions listed', async () => { + const chartVersionDropdown = page.locator('#form-dropdown-chartVersion-field'); + // eslint-disable-next-line no-restricted-syntax + await chartVersionDropdown.waitFor({ state: 'visible', timeout: 30_000 }); + await chartVersionDropdown.click(); + const items = page.getByTestId('console-select-item'); + await expect(items.first()).toBeVisible({ timeout: 10_000 }); + const count = await items.count(); + expect(count).toBeGreaterThanOrEqual(1); + }); + + await test.step('Cancel creation', async () => { + await helmPage.getCancelButton().click(); + }); + }); + + test('Namespace-scoped Helm Chart Repositories in the dev catalog: HR-06-TC12', async ({ + page, + k8sClient, + cleanup, + }) => { + const ns = `aut-helm-ns-repo-${Date.now()}`; + const ns2 = `aut-helm-ns-repo2-${Date.now()}`; + await k8sClient.createNamespace(ns); + await k8sClient.createNamespace(ns2); + cleanup.trackNamespace(ns); + cleanup.trackNamespace(ns2); + + const helmPage = new HelmPage(page); + + await test.step('Create a namespace-scoped helm chart repository', async () => { + await k8sClient.createCustomResource( + 'helm.openshift.io', + 'v1beta1', + ns, + 'projecthelmchartrepositories', + { + apiVersion: 'helm.openshift.io/v1beta1', + kind: 'ProjectHelmChartRepository', + metadata: { + name: 'ibm-repo', + namespace: ns, + }, + spec: { + connectionConfig: { + url: 'https://raw.githubusercontent.com/IBM/charts/master/repo/community/index.yaml', + }, + name: 'Ibm Repo', + }, + }, + ); + }); + + await test.step('Verify repo is visible in the original namespace catalog', async () => { + await helmPage.navigateToCatalogHelmCharts(ns); + const chartRepoFilter = page.getByTestId('chartRepositoryTitle-Ibm Repo'); + await expect(chartRepoFilter).toBeVisible({ timeout: 60_000 }); + }); + + await test.step('Verify repo is NOT visible in a different namespace', async () => { + await helmPage.navigateToCatalogHelmCharts(ns2); + const chartRepoFilter = page.getByTestId('chartRepositoryTitle-Ibm Repo'); + await expect(chartRepoFilter).not.toBeAttached({ timeout: 30_000 }); + }); + }); + + // eslint-disable-next-line playwright/expect-expect + test('Software Catalog Page when Helm Charts checkbox is selected: HR-06-TC02', async () => { + test.skip(true, 'Manual test - requires multiple helm chart repositories pre-configured'); + }); + + // eslint-disable-next-line playwright/expect-expect + test('Install Helm Chart from Software Catalog Page using YAML View: HR-06-TC03', async () => { + test.skip(true, 'Known broken test - form submit does not work correctly'); + }); + + // eslint-disable-next-line playwright/expect-expect + test('Certification filter in Helm Catalog Page: HR-06-TC08', async () => { + test.skip(true, 'Requires providerType annotations in index.yaml - not yet implemented'); + }); + + // eslint-disable-next-line playwright/expect-expect + test('Applying Redhat Certification filter: HR-06-TC09', async () => { + test.skip(true, 'Requires providerType annotations in index.yaml - not yet implemented'); + }); + + // eslint-disable-next-line playwright/expect-expect + test('Certified badge in Helm Catalog Page: HR-06-TC10', async () => { + test.skip(true, 'Manual test - requires providerType annotations in repos'); + }); + + // eslint-disable-next-line playwright/expect-expect + test('Certified badge in Helm install side panel: HR-06-TC11', async () => { + test.skip(true, 'Manual test - requires providerType annotations in repos'); + }); + + // eslint-disable-next-line playwright/expect-expect + test('Creating projecthelmchartrepository by non-admin user: HR-06-TC13', async () => { + test.skip(true, 'Manual test - requires consoledeveloper login'); + }); +}); diff --git a/frontend/e2e/tests/helm/install-url-chart.spec.ts b/frontend/e2e/tests/helm/install-url-chart.spec.ts new file mode 100644 index 00000000000..662076f813d --- /dev/null +++ b/frontend/e2e/tests/helm/install-url-chart.spec.ts @@ -0,0 +1,182 @@ +import { test, expect } from '../../fixtures'; +import { HelmUrlChartPage } from '../../pages/helm-url-chart-page'; +import { ListPage } from '../../pages/list-page'; + +const NS_PREFIX = 'aut-helm-url'; + +test.describe('Install Helm Chart from URL', { tag: ['@helm'] }, () => { + test('Navigate to URL chart install page from Helm tab: HR-URL-TC01', async ({ + page, + k8sClient, + cleanup, + }) => { + const ns = `${NS_PREFIX}-tc01-${Date.now()}`; + await k8sClient.createNamespace(ns); + cleanup.trackNamespace(ns); + + const listPage = new ListPage(page); + const helmUrlChart = new HelmUrlChartPage(page); + + await test.step('Navigate to Helm page and click Create > Helm chart URL', async () => { + await listPage.navigateToListPage(`/helm/ns/${ns}`); + await listPage.clickCreateDropdownItem('Helm chart URL'); + }); + + await test.step('Verify redirected to URL chart install page', async () => { + await expect(page).toHaveURL(/\/url-chart/); + await expect(helmUrlChart.getChartUrlInput()).toBeVisible(); + }); + }); + + test('Validate required fields on URL chart form: HR-URL-TC02', async ({ + page, + k8sClient, + cleanup, + }) => { + const ns = `${NS_PREFIX}-tc02-${Date.now()}`; + await k8sClient.createNamespace(ns); + cleanup.trackNamespace(ns); + + const helmUrlChart = new HelmUrlChartPage(page); + + await test.step('Navigate to URL chart install page', async () => { + await helmUrlChart.navigateToUrlChart(ns); + }); + + await test.step('Click Next without filling fields and verify validation errors', async () => { + await helmUrlChart.clickNext(); + await expect(helmUrlChart.getValidationErrors().first()).toBeAttached(); + }); + }); + + test('Validate invalid chart URL format: HR-URL-TC03', async ({ + page, + k8sClient, + cleanup, + }) => { + const ns = `${NS_PREFIX}-tc03-${Date.now()}`; + await k8sClient.createNamespace(ns); + cleanup.trackNamespace(ns); + + const helmUrlChart = new HelmUrlChartPage(page); + + await test.step('Navigate to URL chart install page', async () => { + await helmUrlChart.navigateToUrlChart(ns); + }); + + await test.step('Enter invalid URL and fill other fields', async () => { + await helmUrlChart.enterChartUrl('not-a-valid-url'); + await helmUrlChart.enterReleaseName('test-release'); + await helmUrlChart.enterChartVersion('1.0.0'); + }); + + await test.step('Click Next and verify validation error for invalid URL format', async () => { + await helmUrlChart.clickNext(); + await expect(helmUrlChart.getValidationErrors().first()).toBeAttached(); + }); + }); + + test('Install Helm Chart from HTTP URL: HR-URL-TC04', async ({ + page, + k8sClient, + cleanup, + }) => { + const ns = `${NS_PREFIX}-tc04-${Date.now()}`; + await k8sClient.createNamespace(ns); + cleanup.trackNamespace(ns); + + const helmUrlChart = new HelmUrlChartPage(page); + + await test.step('Navigate to URL chart install page', async () => { + await helmUrlChart.navigateToUrlChart(ns); + }); + + await test.step('Fill in HTTP chart URL, release name, and version', async () => { + await helmUrlChart.enterChartUrl( + 'https://redhat-developer.github.io/redhat-helm-charts/charts/dotnet-0.0.1.tgz', + ); + await helmUrlChart.enterReleaseName('dotnet-url-test'); + await helmUrlChart.enterChartVersion('0.0.1'); + }); + + await test.step('Click Next to proceed to install step', async () => { + await helmUrlChart.clickNext(); + }); + + await test.step('Click Install and verify redirect to Topology', async () => { + await helmUrlChart.clickInstall(); + await expect(page).toHaveURL(/\/topology\/ns\//, { timeout: 60_000 }); + }); + }); + + test('Install Helm Chart from OCI registry: HR-URL-TC05', async ({ + page, + k8sClient, + cleanup, + }) => { + const ns = `${NS_PREFIX}-tc05-${Date.now()}`; + await k8sClient.createNamespace(ns); + cleanup.trackNamespace(ns); + + const helmUrlChart = new HelmUrlChartPage(page); + + await test.step('Navigate to URL chart install page', async () => { + await helmUrlChart.navigateToUrlChart(ns); + }); + + await test.step('Fill in OCI chart URL, release name, and version', async () => { + await helmUrlChart.enterChartUrl('oci://ghcr.io/stefanprodan/charts/podinfo'); + await helmUrlChart.enterReleaseName('podinfo-oci-test'); + await helmUrlChart.enterChartVersion('6.7.1'); + }); + + await test.step('Click Next to proceed to install step', async () => { + await helmUrlChart.clickNext(); + }); + + await test.step('Click Install and verify redirect to Topology', async () => { + await helmUrlChart.clickInstall(); + await expect(page).toHaveURL(/\/topology\/ns\//, { timeout: 60_000 }); + }); + }); + + test('Upgrade a URL-installed Helm release: HR-URL-TC06', async ({ + page, + k8sClient, + cleanup, + }) => { + const ns = `${NS_PREFIX}-tc06-${Date.now()}`; + await k8sClient.createNamespace(ns); + cleanup.trackNamespace(ns); + + const helmUrlChart = new HelmUrlChartPage(page); + const listPage = new ListPage(page); + + await test.step('Install a Helm chart via URL first', async () => { + await helmUrlChart.navigateToUrlChart(ns); + await helmUrlChart.enterChartUrl( + 'https://redhat-developer.github.io/redhat-helm-charts/charts/dotnet-0.0.1.tgz', + ); + await helmUrlChart.enterReleaseName('dotnet-url-test'); + await helmUrlChart.enterChartVersion('0.0.1'); + await helmUrlChart.clickNext(); + await helmUrlChart.clickInstall(); + await expect(page).toHaveURL(/\/topology\/ns\//, { timeout: 60_000 }); + }); + + await test.step('Navigate to Helm releases and find the release', async () => { + await listPage.navigateToListPage(`/helm/ns/${ns}`); + await listPage.waitForRows(); + }); + + await test.step('Open kebab menu and select Upgrade', async () => { + await listPage.clickKebabAction('dotnet-url-test', 'Upgrade'); + }); + + await test.step('Click Install on the upgrade page and verify redirect', async () => { + const submitButton = page.locator('[data-test-id="submit-button"]'); + await submitButton.click({ timeout: 30_000 }); + await expect(page).toHaveURL(/\/topology\/ns\//, { timeout: 60_000 }); + }); + }); +}); diff --git a/frontend/e2e/tests/helm/topology-helm-release.spec.ts b/frontend/e2e/tests/helm/topology-helm-release.spec.ts new file mode 100644 index 00000000000..207356051c8 --- /dev/null +++ b/frontend/e2e/tests/helm/topology-helm-release.spec.ts @@ -0,0 +1,128 @@ +import { test, expect } from '../../fixtures'; +import { TopologyPage } from '../../pages/topology-page'; +import { TopologySidebarPage } from '../../pages/topology-sidebar-page'; + +const NS = `aut-helm-topo-${Date.now()}`; +const HELM_RELEASE_NAME = 'nodejs-release'; +const HELM_CHART_NAME = 'Nodejs'; + +/** + * Installs a Helm chart via the Developer Console UI. + * + * Navigates to the Developer catalog, finds the specified Helm chart, + * and installs it with the given release name in the current namespace. + */ +async function installHelmChart( + page: import('@playwright/test').Page, + namespace: string, + releaseName: string, + chartName: string, +): Promise { + const topology = new TopologyPage(page); + await topology.switchPerspective('Developer'); + + // Navigate to the Helm chart catalog for this namespace + await page.goto(`/catalog/ns/${namespace}?catalogType=HelmChart`, { timeout: 90_000 }); + await expect(page.getByPlaceholder('Filter by keyword')).toBeVisible({ timeout: 60_000 }); + + // Search for the chart + await page.getByPlaceholder('Filter by keyword').fill(chartName); + + // Click the chart card + const chartCard = page.locator(`[data-test^="HelmChart-"][data-test*="${chartName}"]`).first(); + await chartCard.click({ timeout: 30_000 }); + + // In the side panel, click "Install Helm Chart" / "Create" button + const installButton = page.getByRole('link', { name: /Install Helm Chart|Create/ }).first(); + await installButton.click({ timeout: 30_000 }); + + // On the install form, update the release name + const releaseNameInput = page.getByTestId('helm-form-input-release-name'); + await expect(releaseNameInput).toBeVisible({ timeout: 30_000 }); + await releaseNameInput.clear(); + await releaseNameInput.fill(releaseName); + + // Click Install/Create + const submitButton = page.getByTestId('submit-button'); + await submitButton.click({ timeout: 30_000 }); + + // Wait for redirect to topology + await expect(page).toHaveURL(new RegExp(`/topology/ns/${namespace}`), { timeout: 120_000 }); +} + +test.describe( + 'Actions on Helm release in topology page', + { tag: ['@helm', '@topology'] }, + () => { + test.beforeAll(async ({ k8sClient }) => { + await k8sClient.createNamespace(NS); + await k8sClient.waitForNamespaceReady(NS); + }); + + test.afterAll(async ({ k8sClient }) => { + await k8sClient.deleteNamespace(NS); + }); + + test('sidebar shows Details, Resources, and Release notes tabs: HR-07-TC01', async ({ + page, + }) => { + const topology = new TopologyPage(page); + const sidebar = new TopologySidebarPage(page); + + await test.step('Install Helm chart', async () => { + await installHelmChart(page, NS, HELM_RELEASE_NAME, HELM_CHART_NAME); + }); + + await test.step('Open sidebar for the Helm release', async () => { + await topology.navigateToTopologyGraph(NS); + await topology.clickOnHelmGroup(HELM_RELEASE_NAME); + await sidebar.verify(); + }); + + await test.step('Verify sidebar tabs', async () => { + await expect(sidebar.getTab('Details')).toBeVisible(); + await expect(sidebar.getTab('Resources')).toBeVisible(); + await expect(sidebar.getTab('Release notes')).toBeVisible(); + }); + }); + + test('resource links in sidebar navigate to correct details pages: HR-07-TC02 through HR-07-TC06', async ({ + page, + }) => { + const RELEASE_NAME_2 = 'nodejs-release-links'; + const topology = new TopologyPage(page); + const sidebar = new TopologySidebarPage(page); + + await test.step('Install Helm chart', async () => { + await installHelmChart(page, NS, RELEASE_NAME_2, HELM_CHART_NAME); + }); + + const resourceTests = [ + { label: 'Deployments', resourceKind: 'Deployment', plural: 'deployments', id: 'HR-07-TC02' }, + { label: 'Build Configs', resourceKind: 'BuildConfig', plural: 'buildconfigs', id: 'HR-07-TC03' }, + { label: 'Services', resourceKind: 'Service', plural: 'services', id: 'HR-07-TC04' }, + { label: 'Image Streams', resourceKind: 'ImageStream', plural: 'imagestreams', id: 'HR-07-TC05' }, + { label: 'Routes', resourceKind: 'Route', plural: 'routes', id: 'HR-07-TC06' }, + ]; + + for (const { label, resourceKind, plural, id } of resourceTests) { + await test.step(`${label} link navigates to ${resourceKind} details page: ${id}`, async () => { + await topology.navigateToTopologyGraph(NS); + await topology.clickOnHelmGroup(RELEASE_NAME_2); + await sidebar.verify(); + await sidebar.selectTab('Resources'); + + const href = `/k8s/ns/${NS}/${plural}/${RELEASE_NAME_2}`; + await sidebar.clickResourceLink(href); + + // Verify we landed on the resource details page + const sectionHeading = page.locator( + `[data-test-section-heading="${resourceKind} details"]`, + ); + await expect(sectionHeading).toBeVisible({ timeout: 30_000 }); + await expect(sectionHeading).toContainText(`${resourceKind} details`); + }); + } + }); + }, +); diff --git a/frontend/package.json b/frontend/package.json index 484814a2a77..d042feef452 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -34,6 +34,9 @@ "test-cypress-helm": "cd packages/helm-plugin/integration-tests && yarn run test-cypress", "test-cypress-helm-headless": "cd packages/helm-plugin/integration-tests && yarn run test-cypress-headless", "test-cypress-helm-nightly": "cd packages/helm-plugin/integration-tests && yarn run test-cypress-headless-all", + "test-cypress-knative": "cd packages/knative-plugin/integration-tests && yarn run test-cypress", + "test-cypress-knative-headless": "cd packages/knative-plugin/integration-tests && yarn run test-cypress-headless", + "test-cypress-knative-nightly": "cd packages/knative-plugin/integration-tests && yarn run test-cypress-headless-all", "test-playwright": "playwright test", "test-playwright-headed": "playwright test --headed", "test-playwright-debug": "playwright test --debug", diff --git a/frontend/packages/helm-plugin/integration-tests/README.md b/frontend/packages/helm-plugin/integration-tests/README.md deleted file mode 100644 index 197d460ddb2..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# Getting Started - -- Guidelines related to Setup, Standards, Review process are present in [README.md](frontend/packages/dev-console/integration-tests/README.md) -(The above link is now deprecated) - - -## Directory Structure - -Folder structure of cypress cucumber framework for Helm-plugin - -``` -frontend/packages/helm-plugin/integration-tests/ -├── features -| ├── helm <--- helm gherkin scenarios -| | └──actions-on-helm-release.feature -| | └──helm-compatibility.feature -| | └──helm-feature-flag.feature -| | └──helm-installation-view.feature -| | └──helm-navigation.feature -| | └──install-helm-chart.feature -| | └──topology-helm-release.feature -| ├── BestPractices.md <--- Gherkin script standards -├── plugins <--- Plugins provide a way to support and extend the behavior of cypress -| | └── index.ts -├── support <--- cypress cucumber support configurations -| ├── commands <--- add commands to Cypress 'cy.' global, other support configurations -| | └── index.ts -| | └── app.ts <--- hooks are added in this file -| ├── constants -| | | └──static-text -| | | └── helm-text.ts <--- enums required for helm scripts -| ├── pages <--- page functions -│ | ├── helm <--- helm related page functions -| | | └──helm-details-page.ts -| | | └──helm-page.ts -| | | └──rollBack-helm-release-page.ts -| | | └──upgrade-helm-release-page.ts -| | | └──index.ts <-- It consists of relative paths of the files -| ├── step-definitions <--- cucumber step implementations -│ | ├── helm <--- helm step definitions -| | | └──actions-on-helm-release-after-upgrade.ts -| | | └──helm-compatibility.ts -| | | └──helm-installation-view.ts -| | | └──helm-navigation.ts -| | | └──helm-release.ts -| | | └──helm.ts -| | | └──install-url-chart.ts -│ | ├── common <--- Re-usable step definitions -| | └──common.ts -├── cypress.json <--- cypress configuration file -├── tsconfig.json <--- typescript configuration file -├── reporter-config.json <--- reporter configuration file -``` - -### Execution process - -Feature file - "regression" suite - execution from Cypress Dashboard - -1. Update the TAGS under env section in config file [Cypress.json file](frontend/packages/helm-plugin/integration-tests/cypress.config.js) as - "env": { "TAGS": "@regression and not @manual and not @to-do" } -2. In command prompt, navigate to frontend folder -3. Execute command `yarn run test-cypress-helm` and select that particular file or run all files in cypress dashboard - -Feature file - "regression" suite - execution from command line - -1. Open the [frontend/package.json](../../../package.json) and update `test-cypress-helm-headless` as per requirement -2. In command line, navigate to frontend folder and execute the command `yarn run test-cypress-helm-headless` -3. All the regression scenarios get executed as per the configuration. diff --git a/frontend/packages/helm-plugin/integration-tests/cypress.config.js b/frontend/packages/helm-plugin/integration-tests/cypress.config.js deleted file mode 100644 index 79954e4b500..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/cypress.config.js +++ /dev/null @@ -1,14 +0,0 @@ -const { defineConfig } = require('@console/cypress-integration-tests/cypress-common-config'); - -module.exports = defineConfig({ - fixturesFolder: 'testData', - env: { - TAGS: - '@helm and (@pre-condition or @smoke or @regression) and not (@manual or @to-do or @broken-test)', - NAMESPACE: 'aut-helm', - }, - e2e: { - specPattern: 'features/**/*.{feature,features}', - supportFile: 'support/commands/index.ts', - }, -}); diff --git a/frontend/packages/helm-plugin/integration-tests/features/BestPractices.md b/frontend/packages/helm-plugin/integration-tests/features/BestPractices.md deleted file mode 100644 index 123d3a36f81..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/features/BestPractices.md +++ /dev/null @@ -1,3 +0,0 @@ -# Gherkin Scenarios designing Best Practices - -Follow the rules present in [BestPractices.md](frontend/packages/dev-console/integration-tests/features/BestPractices.md) diff --git a/frontend/packages/helm-plugin/integration-tests/features/helm-release.feature b/frontend/packages/helm-plugin/integration-tests/features/helm-release.feature deleted file mode 100644 index e0e88b8d6ce..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/features/helm-release.feature +++ /dev/null @@ -1,122 +0,0 @@ -@helm @smoke -Feature: Helm Release - As a user, I want to perform actions on the helm release - - - @pre-condition - Scenario: Create or Select the project namespace - Given user is at the Helm Release tab in admin perspective - And user has created or selected namespace "aut-ci-helm" - - - Scenario: Open the Helm tab on the navigation bar when helm charts are absent: HR-05-TC01 - Given user is at administrator perspective - When user clicks on the Helm Release tab in admin perspective - Then user is able to see the message "No Helm Releases found" - And user will get the link to install helm charts from software catalog - - - Scenario: Create Helm Release page details: HR-05-TC02 - Given user is at Software Catalog page - When user selects Helm Charts type from Software Catalog page - And user searches and selects "Nodejs" card from catalog page - And user clicks on the Create button on side bar - Then Create Helm Release page is displayed - And release name displays as "nodejs" - And form view radio button is selected by default - And yaml view radio button is enabled - And form sections are displayed in form view - - - Scenario: Install Helm Chart from +Add Page using Form View: HR-06-TC04 - Given user is at Software Catalog page - When user selects Helm Charts type from Software Catalog page - And user searches and selects "Nodejs" card from catalog page - And user clicks on the Create button on side bar - And user enters Release Name as "nodejs-release" - And user clicks on the Create button - Then user will be redirected to Topology page - And Topology page have the helm chart workload "nodejs-release" - - - Scenario: Helm release status verification: HR-01-TC04 - Given user is at the Helm Release tab in admin perspective - And user is able to see "nodejs-release" in helm page in admin view - And user is able to see the status and status icon of "nodejs-release" under helm releases tab - And user is able to see the "PendingInstall", "PendingUpgrade" and "PendingRollback" options under filter bar - When user clicks on the helm release name "nodejs-release" - Then user is able to see the status and status icon in title after "nodejs-release" - And user is able to see the status and status icon under helm release details - And user switch to Revision history tab - And user is able to see the status and status icon of Revision history page - - Scenario: Context menu options of helm release: HR-01-TC01 - Given user is at the Topology page - When user right clicks on the helm release "nodejs-release" to open the context menu - Then user is able to see the context menu with actions Upgrade and Delete Helm Release - - - Scenario: Open the Helm tab on the navigation bar when helm charts are present: HR-05-TC05 - Given user is at the Helm Release tab in admin perspective - Then user will see the helm charts listed - - - Scenario: Filter out deployed Helm Charts: HR-05-TC06 - Given user is at the Helm Release tab in admin perspective - When user clicks on the filter drop down - And user selects checkbox for the "Deployed" Helm charts - Then the checkbox for the "Deployed" Helm chart is checked - And helm charts with status "Deployed" are listed - - - Scenario: Helm release details page: HR-05-TC13 - Given user is at the Helm Release tab in admin perspective - When user clicks on the helm release name "nodejs-release" - Then user will see the Details page opened - And user will see the Resources tab - And user will see the Revision History tab - And user will see the Release Notes tab - And user will see the Actions drop down menu with options Upgrade, Rollback, and Delete Helm Release - - - Scenario: Perform Upgrade action on Helm Release through Context Menu: HR-08-TC04 - Given user is at the Topology page - When user right clicks on the helm release "nodejs-release" to open the context menu - And user clicks on the "Upgrade" action - And user upgrades the chart Version - And user clicks on the upgrade button - Then user will be redirected to Topology page - - - Scenario: Actions menu on Helm page after helm chart upgrade: HR-08-TC01 - Given user is on the Helm page with helm release "nodejs-release" - When user clicks on the Kebab menu - Then user is able to see kebab menu with actions Upgrade, Rollback and Delete Helm Release - - - Scenario: Perform the helm chart upgrade for already upgraded helm chart : HR-08-TC02 - Given user is on the Helm page with helm release "nodejs-release" - When user clicks on the Kebab menu - And user clicks on the "Upgrade" action - And user upgrades the chart Version - And user clicks on the upgrade button - Then user will be redirected to Helm Releases page under Helm tab - - - Scenario: Perform Rollback action on Helm Release through Context Menu: HR-08-TC03 - Given user is at the Topology page - And user is on the topology sidebar of the helm release "nodejs-release" - When user clicks on the Actions drop down menu - And user clicks on the "Rollback" action - And user selects the version to Rollback - And user clicks on the rollback button - Then user will be redirected to Topology page - - - Scenario: Delete Helm Release through Context Menu: HR-01-TC03 - Given user is at the Topology page - When user right clicks on the helm release "nodejs-release" to open the context menu - And user clicks on the "Delete Helm Release" action - And user enters the release name "nodejs-release" - And user clicks on the Delete button - Then user will be redirected to Topology page diff --git a/frontend/packages/helm-plugin/integration-tests/features/helm/actions-on-helm-release-after-upgrade.feature b/frontend/packages/helm-plugin/integration-tests/features/helm/actions-on-helm-release-after-upgrade.feature deleted file mode 100644 index eb6b73ae7ce..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/features/helm/actions-on-helm-release-after-upgrade.feature +++ /dev/null @@ -1,40 +0,0 @@ -@helm @smoke -Feature: Verify the Actions on Helm Release after upgrade - As a user, I want to perform the actions on the helm releases in topology page - - Background: - Given user has created or selected namespace "aut-helm" - - - @pre-condition - Scenario: Perform Upgrade action on Helm Release through Context Menu: HR-08-TC04 - Given user has installed helm chart "Nodejs" with helm release name "nodejs-release-1" - And user is at the Topology page - When user right clicks on the helm release "nodejs-release-1" to open the context menu - And user clicks on the "Upgrade" action - And user clicks on the upgrade button - Then user will be redirected to Topology page - - - Scenario: Actions menu on Helm page after helm chart upgrade: HR-08-TC01 - Given user is on the Helm page with helm release "nodejs-release-1" - When user clicks on the Kebab menu - Then user is able to see kebab menu with actions Upgrade, Rollback and Delete Helm Release - - - Scenario: Perform the helm chart upgrade for already upgraded helm chart : HR-08-TC02 - Given user is on the Helm page with helm release "nodejs-release-1" - When user clicks on the Kebab menu - And user clicks on the "Upgrade" action - And user clicks on the upgrade button - Then user will be redirected to Helm Releases page - - - Scenario: Perform Rollback action on Helm Release through Context Menu: HR-08-TC03 - Given user is at the Topology page - And user is on the topology sidebar of the helm release "nodejs-release-1" - When user clicks on the Actions drop down menu - And user clicks on the "Rollback" action - And user selects the version to Rollback - And user clicks on the rollback button - Then user will be redirected to Topology page diff --git a/frontend/packages/helm-plugin/integration-tests/features/helm/actions-on-helm-release.feature b/frontend/packages/helm-plugin/integration-tests/features/helm/actions-on-helm-release.feature deleted file mode 100644 index 517465d6826..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/features/helm/actions-on-helm-release.feature +++ /dev/null @@ -1,50 +0,0 @@ -@helm @smoke -Feature: Perform Actions on Helm Releases - As a user, I want to perform the actions on the helm releases in topology page - - Background: - Given user has created or selected namespace "aut-helm" - - - @pre-condition - Scenario: Install Helm Chart from +Add Page using Form View: HR-06-TC04 - Given user is at Add page - When user selects "Helm Chart" card from add page - And user searches and selects "Nodejs" card from catalog page - And user clicks on the Create button on side bar - And user enters Release Name as "nodejs-release-2" - And user clicks on the Create button - Then user will be redirected to Topology page - And Topology page have the helm chart workload "nodejs-release-2" - - @regression @broken-test - Scenario: Context menu options of helm release: HR-01-TC01 - Given user is at the Topology page - When user right clicks on the helm release "nodejs-release-2" to open the context menu - Then user is able to see the context menu with actions Upgrade and Delete Helm Release - - - Scenario: Actions menu on Helm page: HR-01-TC02 - Given user is on the Helm page with helm release "nodejs-release-2" - When user clicks on the Kebab menu - Then user is able to see kebab menu with actions Upgrade, Rollback and Delete Helm Release - - - Scenario: Delete Helm Release through Context Menu: HR-01-TC03 - Given user is at the Topology page - When user right clicks on the helm release "nodejs-release-2" to open the context menu - And user clicks on the "Delete Helm Release" action - And user enters the release name "nodejs-release-2" - And user clicks on the Delete button - Then user will be redirected to Topology page - - Scenario: Helm release status verification: HR-01-TC04 - Given user has installed helm chart "Nodejs" with helm release name "nodejs-release" - And user is able to see "nodejs-release" in helm page - And user is able to see the status and status icon of "nodejs-release" under helm releases tab - And user is able to see the "PendingInstall", "PendingUpgrade" and "PendingRollback" options under filter bar - When user clicks on the helm release name "nodejs-release" - Then user is able to see the status and status icon in title after "nodejs-release" - And user is able to see the status and status icon under helm release details - And user switch to Revision history tab - And user is able to see the status and status icon of Revision history page diff --git a/frontend/packages/helm-plugin/integration-tests/features/helm/helm-compatibility.feature b/frontend/packages/helm-plugin/integration-tests/features/helm/helm-compatibility.feature deleted file mode 100644 index dd5e5991604..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/features/helm/helm-compatibility.feature +++ /dev/null @@ -1,31 +0,0 @@ -@helm -Feature: Helm Chart - User will be able to update the chart versions or values config of a helm release - - - Background: - Given user has created or selected namespace "aut-helm" - - - @smoke - Scenario: Compatible helm charts: HR-02-TC01 - Given user is at Add page - When user clicks on the Helm Chart card on the Add page - Then user redirects to Helm Charts page - And user is able to see helm charts - - - @regression @manual - Scenario: Check the meta data for the importing helm charts from index.yaml: HR-02-TC02 - Given user is at Add page - When user opens the Network tab - And user clicks on the Helm Chart card on the Add page - And user clicks on the index.yaml on the Network tab - Then user sees that the kubeversion of each chart is either equal to or less than the kubeversion of cluster - - - @regression @manual - Scenario: Check the chart versions in the chart version dropdown if they are compatible with the cluster: HR-02-TC03 - Given user is at the Create Helm Release page - When user clicks on the Chart Version dropdown menu - Then user will see the chart versions which are compatible with the kubeversion of the cluster diff --git a/frontend/packages/helm-plugin/integration-tests/features/helm/helm-feature-flag.feature b/frontend/packages/helm-plugin/integration-tests/features/helm/helm-feature-flag.feature deleted file mode 100644 index bc1dada398b..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/features/helm/helm-feature-flag.feature +++ /dev/null @@ -1,33 +0,0 @@ -@helm -Feature: Feature flag for Helm - As a user, I want to disable helm specific navigation items from console if there are no helm repositories configured in the console. - - - Background: - Given user has created or selected namespace "aut-helm" - - - @regression @manual - Scenario: Disable helm features in console: HR-03-TC01 - Given user is at Helm Chart Repositories page - And user can see only the default "redhat-helm-repo" CR is available - When user opens "redhat-helm-repo" CR - And user goes to YAML tab - And user adds "disabled: true" flag under "spec" - And user clicks on Save - Then user is not able to see the Helm tab in the navigation menu - And user can not see Helm Chart card in Add page - And user can not see Helm Charts filter in the Software Catalog page - - - @regression @manual - Scenario: Enable the disabled helm features in console: HR-03-TC02 - Given user has disabled helm features - And the default "redhat-helm-repo" Helm Chart Repositories CR is available - When user opens "redhat-helm-repo" CR - And user goes to YAML tab - And user removes "disabled: true" flag under "spec" - And user clicks on Save - Then user is able to see the Helm tab in the navigation menu - And user can see Helm Chart card in Add page - And user can see Helm Charts filter in the Software Catalog page diff --git a/frontend/packages/helm-plugin/integration-tests/features/helm/helm-installation-view.feature b/frontend/packages/helm-plugin/integration-tests/features/helm/helm-installation-view.feature deleted file mode 100644 index 4c06477b7e9..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/features/helm/helm-installation-view.feature +++ /dev/null @@ -1,49 +0,0 @@ -@helm -Feature: Helm Chart Installation View - As a user, I should be able switch between YAML and Form view to install Helm Chart - - - Background: - Given user has created or selected namespace "aut-helm" - - - # This test is broken because now there is only on version of nodejs chart. - @regression - Scenario: Grouping of Helm multiple chart versions together in software catalog: HR-04-TC01 - Given user is at Add page - When user selects "Helm Chart" card from add page - And user clicks on "open-shift-helm-charts" chart repository - And user searches and selects "Nodejs" card from catalog page - And user clicks on the Create button on side bar - And user clicks on the chart versions dropdown menu - Then user will see the information of all the chart versions - - @manual - Scenario: Switch from YAML to Form view: HR-04-TC02 - Given user is at the Create Helm Release page - When user selects the YAML view - And user does some changes in the yaml for helm chart - And user selects the Form view - And user comes back to YAML view - Then user will see that the data hasn't lost - - # This test is broken because now there's no replica count field in the form. - @smoke @broken-test - Scenario: Data doesn't change while switching Form to YAML view: HR-04-TC03 - Given user is at Add page - When user selects "Helm Chart" card from add page - And user searches and selects "Nodejs" card from catalog page - And user clicks on the Create button on side bar - And user enters Release Name as "nodejs-release-3" - And user enters Replica count as "3" - And user selects the YAML view - And user comes back to Form view - Then user will see Release Name, Replica count as "nodejs-release-3", "3" respectively - - @regression - Scenario: When Helm Release is not configurable: HR-04-TC04 - Given user is at Add page - When user selects "Helm Chart" card from add page - And user searches and selects "Httpd Imagestreams" card from catalog page - And user clicks on the Create button on side bar - Then user should see message "Helm release is not configurable since the Helm Chart doesn't define any values." diff --git a/frontend/packages/helm-plugin/integration-tests/features/helm/helm-navigation.feature b/frontend/packages/helm-plugin/integration-tests/features/helm/helm-navigation.feature deleted file mode 100644 index 53a2cdaf511..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/features/helm/helm-navigation.feature +++ /dev/null @@ -1,116 +0,0 @@ -@helm -Feature: Navigations on Helm Chart - As a user, I want to navigate to different pages related to Helm Charts - - Background: - Given user has created or selected namespace "aut-helm" - - # This test is wrong and fails because namespace is not cleaned up after every feature scernario is run. - # The test expects that there are no helm releases but there is from the previous feature run. - @broken-test - Scenario: Open the Helm tab on the navigation bar when helm charts are absent: HR-05-TC01 - When user clicks on the Helm tab in dev perspective - Then user will be redirected to Helm releases page - And user is able to see the message "No Helm Releases found" - And user will get the link to install helm charts from software catalog - - - @smoke - Scenario: Create Helm Release page details: HR-05-TC02 - Given user is at Add page - When user selects "Helm Chart" card from add page - And user searches and selects "Nodejs" card from catalog page - And user clicks on the Create button on side bar - Then Create Helm Release page is displayed - And release name displays as "nodejs" - And form view radio button is selected by default - And yaml view radio button is enabled - And form sections are displayed in form view - - - @smoke - Scenario: Yaml view editor for Install Helm Chart page: HR-05-TC03 - Given user is at Create Helm Release page - When user selects YAML view - Then user is able to see YAML editor - - - @smoke - Scenario: Install Helm Chart: HR-05-TC04 - Given user is at Add page - When user selects "Helm Chart" card from add page - And user searches and selects "Nodejs" card from catalog page - And user clicks on the Create button on side bar - And user clicks on the Create button - Then user will be redirected to Topology page - And Topology page have the helm chart workload "nodejs" - - - @smoke - Scenario: Open the Helm tab on the navigation bar when helm charts are present: HR-05-TC05 - Given user is at the Helm page - When user clicks on the Helm tab in dev perspective - Then user will be redirected to Helm releases page - And user will see the helm charts listed - - - @regression - Scenario: Filter out deployed Helm Charts: HR-05-TC06 - Given user is at the Helm page - When user clicks on the filter drop down - And user selects checkbox for the "Deployed" Helm charts - Then the checkbox for the "Deployed" Helm chart is checked - And helm charts with status "Deployed" are listed - - - @regression @manual - Scenario: Filter out failed Helm Charts: HR-05-TC07 - Given user is at the Helm page - When user clicks on the filter drop down - And user selects checkbox for the "Failed" Helm charts - Then the checkbox for the "Failed" Helm chart is checked - And helm charts with status "Failed" are listed - - - @regression @manual - Scenario: Filter out other Helm charts: HR-05-TC08 - Given user is at the Helm page - When user clicks on the filter drop down - And user selects checkbox for the "Other" Helm charts - Then the checkbox for the "Other" Helm chart is checked - And helm charts with status "Other" are listed - - - @regression - Scenario: Select all filters: HR-05-TC09 - Given user is at the Helm page - When user clicks on the filter drop down - And user selects checkbox for the "All" Helm charts - Then the checkbox for the "All" Helm chart is checked - - - @regression - Scenario: Clear all filters: HR-05-TC10 - Given user is at the Helm page - When user clicks on the filter drop down - And user selects checkbox for the "All" Helm charts - And user clicks on the clear all filters button - Then "All" filters selected will get removed - - - @regression - Scenario: Search for the Helm Chart: HR-05-TC11 - Given user is at the Helm page - When user searches for a helm chart "nodejs" - Then the helm chart "nodejs" will be shown - - - @smoke - Scenario: Helm release details page: HR-05-TC13 - Given user is at the Helm page - When user clicks on the helm release name "nodejs" - Then user will see the Details page opened - And user will see the Resources tab - And user will see the Revision History tab - And user will see the Release Notes tab - And user will see the Actions drop down menu with options Upgrade, Rollback, and Delete Helm Release diff --git a/frontend/packages/helm-plugin/integration-tests/features/helm/helm-page-tabs.feature b/frontend/packages/helm-plugin/integration-tests/features/helm/helm-page-tabs.feature deleted file mode 100644 index 81babda9d9f..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/features/helm/helm-page-tabs.feature +++ /dev/null @@ -1,85 +0,0 @@ -@helm @ODC-6685 -Feature: Add repositories tab in Helm navigation item - As a user, I want to navigate to different tabs related to Helm in the Helm page - - Background: - Given user has logged in as admin user - And user is at developer perspective - And user has created or selected namespace "aut-helm" - - - @regression - Scenario: Helm Page on developer perspective: HR-09-TC01 - Given user is at developer perspective - When user clicks on the Helm tab in dev perspective - Then user is able to see Helm Releases and Repositories Tabs - And user is able to see the message "No Helm Releases found" - And user is able to see the link "Browse the catalog to discover available Helm Charts" - And user is able to see the Create drop down menu with Helm Release and Repository options - - - @regression - Scenario: Repositories Tab on Helm Page: HR-09-TC02 - Given user is at the Helm page - When user clicks on Repositories tab - And user clicks on "openshift-helm-charts" repository - Then Repositories breadcrumbs is visible - And user clicks on Repositories link - And user is redirected to Repositories tab - - - @regression - Scenario: Click on Create Helm Release: HR-09-TC03 - Given user is at the Helm page - When user clicks on Helm release in create action menu - And user searches and selects "Nodejs" card from catalog page - And user clicks on the Create button on side bar - And user enters Release Name as "nodejs-release-2" - And user clicks on the Create button - Then user will be redirected to Topology page - And Topology page have the helm chart workload "nodejs-release-2" - - - @regression - Scenario: Create Project Helm Chart Repository: HR-09-TC04 - Given user is at the Helm page - When user clicks on Repository in create action menu to see the "Create Helm Chart Repository" form - And user enters Chart repository name as "helm-test1" - And user enters Description as "test" - And user enters URL as "https://raw.githubusercontent.com/IBM/charts/master/repo/community/index.yaml" - And user clicks on Create button - Then user can see "ProjectHelmChartRepository" "helm-test1" details page - - - @regression - Scenario: Edit Project Helm Chart Repository: HR-09-TC05 - Given user is at the Helm page - When user clicks on Repositories tab - And user edits "helm-test1" "ProjectHelmChartRepository" - And user enters Display name as "My charts" - And user clicks on Save button to see the "ProjectHelmChartRepository" "helm-test1" details page - And user navigates to Helm page - And user clicks on Repositories tab - Then user can see "ProjectHelmChartRepository" "helm-test1" updated with "My charts" in the list page - - @regression - Scenario: Create Helm Chart Repository: HR-09-TC06 - Given user is at the Helm page - When user clicks on Repository in create action menu to see the "Create Helm Chart Repository" form - And user selects cluster-scoped scope type - And user enters Chart repository name as "helm-test2" - And user enters URL as "https://raw.githubusercontent.com/Azure-Samples/helm-charts/master" - And user clicks on Create button - Then user can see "HelmChartRepository" "helm-test2" details page - - - @regression - Scenario: Edit Helm Chart Repository: HR-09-TC07 - Given user is at the Helm page - When user clicks on Repositories tab - And user edits "helm-test2" "HelmChartRepository" - And user enters URL as "https://raw.githubusercontent.com/Azure-Samples/helm-charts/master/docs/index.yaml" - And user clicks on Save button to see the "HelmChartRepository" "helm-test2" details page - And user navigates to Helm page - And user clicks on Repositories tab - Then user can see "HelmChartRepository" "helm-test2" updated with "https://raw.githubusercontent.com/Azure-Samples/helm-charts/master/docs/index.yaml" in the list page diff --git a/frontend/packages/helm-plugin/integration-tests/features/helm/install-helm-chart.feature b/frontend/packages/helm-plugin/integration-tests/features/helm/install-helm-chart.feature deleted file mode 100644 index a44c46b1477..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/features/helm/install-helm-chart.feature +++ /dev/null @@ -1,138 +0,0 @@ -@helm -Feature: Install the Helm Release - As a user, I want to install the helm release - - - Background: - Given user has created or selected namespace "aut-helm" - - - - @smoke - Scenario: The Helm Chart option on the +Add Page: HR-06-TC01 - Given user is at Add page - Then user can see "Helm Chart" card on the Add page - - - @smoke @manual - Scenario: Software Catalog Page when Helm Charts checkbox is selected: HR-06-TC02 - Given user is at Add page - And user has added multiple helm charts repositories - When user selects "Helm Chart" card from add page - Then user will get redirected to Helm Charts page - And user will see the list of Chart Repositories - And user will see the cards of Helm Charts - And user will see Filter by Keyword field - And user will see A-Z, Z-A sort by dropdown - - # This test is broken because the code to submit the modal in form doesn't work correctly. - @regression @broken-test - Scenario: Install Helm Chart from Software Catalog Page using YAML View: HR-06-TC03 - Given user is at Add page - When user selects "Helm Chart" card from add page - And user searches and selects "Quarkus" card from catalog page - And user clicks on the Create button on side bar - And user selects YAML view - # And user selects the Chart Version "0.0.2 (Provided by Red Hat Helm Charts)" - When user clicks on the Create button - Then user will be redirected to Topology page - And Topology page have the helm chart workload "quarkus" - - - @regression - Scenario: Chart versions drop down menu: HR-06-TC05 - Given user is at Add page - When user selects "Helm Chart" card from add page - And user searches and selects "Quarkus" card from catalog page - And user clicks on the Create button on side bar - And user clicks on the chart versions dropdown menu - Then user will see the information of all the chart versions - - - @regression @to-do - Scenario: Certification filter in Helm Catalog Page: HR-06-TC08 - Given user is at Add page - And user has added multiple helm charts repositories with providerType annotations in index.yaml - When user selects "Helm Chart" card from Add page - Then user will see Sources the helm chart is coming - And user will see Partner, Community and Redhat option in Sources section - - # Add a new helm chart repo that contains providerType annotations in index.yaml: - # Need to update the example repo when default is available with appropriate annotation - # apiVersion: helm.openshift.io/v1beta1 - # kind: HelmChartRepository - # metadata: - # name: redhat-certified - # spec: - # connectionConfig: - # url: >- - # https://raw.githubusercontent.com/rohitkrai03/redhat-helm-charts/certification - # name: Red Hat Certification Charts - - - @regression @to-do - Scenario: Applying Redhat Certification filter in Helm Catalog Page: HR-06-TC09 - Given user is at Add page - And user has added multiple helm charts repositories with providerType annotations in index.yaml - When user selects "Helm Chart" card from Add page - And user clicks on Partner Source filter - Then user will see Certified helm repositories present in the Helm Catalog Page - - # Add a new helm chart repo that contains providerType annotations in index.yaml: - # Need to update the example repo when default is available with appropriate annotation - # apiVersion: helm.openshift.io/v1beta1 - # kind: HelmChartRepository - # metadata: - # name: redhat-certified - # spec: - # connectionConfig: - # url: >- - # https://raw.githubusercontent.com/rohitkrai03/redhat-helm-charts/certification - # name: Red Hat Certification Charts - - - @regression @manual - Scenario: Certified badge in Helm Catalog Page: HR-06-TC10 - Given user is at Add page - And user has added multiple helm charts repositories with providerType annotations in index.yaml - And user has disabled the default Red Hat helm chart repo - # Scenario can be found in /helm-plugin/integration-tests/features/helm/helm-feature-flag.feature - When user selects "Helm Chart" card from Add page - Then user will see Blue certified badge associated with charts that are from certified partners - - - @regression @manual - Scenario: Certified badge in Helm install side panel: HR-06-TC11 - Given user is at Add page - And user has added multiple helm charts repositories with providerType annotations in index.yaml - And user has disabled the default Red Hat helm chart repo - When user selects "Helm Chart" card from Add page - And user clicks on helm chart with blue tick - Then user will see Blue certified badge associated with heading of the helm chart - - - @regression @ODC-5713 - Scenario Outline: Namespace-scoped Helm Chart Repositories in the dev catalog: HR-06-TC12 - Given user is at Add page - # Uncomment below for cluster not having projecthelmchartrepositories CRD - # And user has applied namespaced CRD yaml "" - And user has created namespaced helm chart repo with yaml "" in namespace "aut-helm" - When user selects Helm Chart card from Add page - Then user will see "Ibm Repo" under Chart repositories filter - And user will not see "Ibm Repo" under Chart repositories filter in a new namespace "test-helm1" - - Examples: - | cr_yaml | - | test-data/namespaced-helm-chart-repository.yaml | - - - @regression @manual @ODC-5713 - Scenario: Creating projecthelmchartrepository by non-admin user: HR-06-TC13 - Given user is at Add page - # Uncomment below for cluster not having projecthelmchartrepositories CRD - # And user has applied namespaced CRD yaml "namespaced-helm-chart-repository.yaml" - And user has logged in as consoledeveloper - When user adds projecthelmchartrepository CR with yaml "namespaced-helm-crd" - And user selects Helm Chart card from Add page - Then user will see "Ibm Repo" under Chart repositories filter - And user will not see "Ibm Repo" under Chart repositories filter in a new namespace "test-helm2" diff --git a/frontend/packages/helm-plugin/integration-tests/features/helm/install-url-chart.feature b/frontend/packages/helm-plugin/integration-tests/features/helm/install-url-chart.feature deleted file mode 100644 index 9bda9bf0c25..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/features/helm/install-url-chart.feature +++ /dev/null @@ -1,62 +0,0 @@ -@helm -Feature: Install Helm Chart from URL - As a user, I want to install a Helm chart from an OCI or HTTP URL - - - Background: - Given user has created or selected namespace "aut-helm-url" - - - @smoke - Scenario: Navigate to URL chart install page from Helm tab: HR-URL-TC01 - Given user is at the Helm page - When user clicks on Create menu and selects "Install a Helm Chart from a URL" - Then user is redirected to the URL chart install page - - - @smoke - Scenario: Validate required fields on URL chart form: HR-URL-TC02 - Given user is at the URL chart install page - When user clicks on the Next button without filling any fields - Then user will see validation errors for Chart URL, Release name, and Chart version - - - @regression - Scenario: Validate invalid chart URL format: HR-URL-TC03 - Given user is at the URL chart install page - When user enters "not-a-valid-url" as Chart URL - And user enters Release Name as "test-release" - And user enters Chart Version as "1.0.0" - And user clicks on the Next button - Then user will see a validation error for invalid Chart URL format - - - @smoke - Scenario: Install Helm Chart from HTTP URL: HR-URL-TC04 - Given user is at the URL chart install page - When user enters "https://redhat-developer.github.io/redhat-helm-charts/charts/dotnet-0.0.1.tgz" as Chart URL - And user enters Release Name as "dotnet-url-test" - And user enters Chart Version as "0.0.1" - And user clicks on the Next button - And user clicks on the Install button - Then user will be redirected to Topology page - - - @smoke - Scenario: Install Helm Chart from OCI registry: HR-URL-TC05 - Given user is at the URL chart install page - When user enters "oci://ghcr.io/stefanprodan/charts/podinfo" as Chart URL - And user enters Release Name as "podinfo-oci-test" - And user enters Chart Version as "6.7.1" - And user clicks on the Next button - And user clicks on the Install button - Then user will be redirected to Topology page - - - @regression - Scenario: Upgrade a URL-installed Helm release: HR-URL-TC06 - Given user is on the Helm page with helm release "dotnet-url-test" - When user clicks on the Kebab menu - And user clicks on the "Upgrade" action - And user clicks on the Install button - Then user will be redirected to Topology page diff --git a/frontend/packages/helm-plugin/integration-tests/features/helm/topology-helm-release.feature b/frontend/packages/helm-plugin/integration-tests/features/helm/topology-helm-release.feature deleted file mode 100644 index 047a13e20c7..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/features/helm/topology-helm-release.feature +++ /dev/null @@ -1,58 +0,0 @@ -@helm -Feature: Actions on Helm release in topology page - User will be able to open the context menu and side bar for the helm releases - - Background: - Given user has created or selected namespace "aut-helm" - - - @smoke - Scenario: Open Side Bar for the Helm release: HR-07-TC01 - Given helm release "nodejs-release" is present in topology page - Then user will see the sidebar for the helm release - And user will see the Details, Resources, Release notes tabs - - - @regression - Scenario: Deployment link on the sidebar for the Helm Release: HR-07-TC02 - Given user is at the Topology page - And user is on the topology sidebar of the helm release "nodejs-release" - When user switches to the "Resources" tab - And user clicks on the link for the "Deployments" of helm release - Then user is redirected to the "Deployment" Details page for the helm release - - - @regression - Scenario: Build Configs link on the sidebar for the Helm Release: HR-07-TC03 - Given user is at the Topology page - And user is on the topology sidebar of the helm release "nodejs-release" - When user switches to the "Resources" tab - And user clicks on the link for the "Build Configs" of helm release - Then user is redirected to the "BuildConfig" Details page for the helm release - - - @regression - Scenario: Services link on the sidebar for the Helm Release: HR-07-TC04 - Given user is at the Topology page - And user is on the topology sidebar of the helm release "nodejs-release" - When user switches to the "Resources" tab - And user clicks on the link for the "Services" of helm release - Then user is redirected to the "Service" Details page for the helm release - - - @regression - Scenario: Image Streams link on the sidebar for the Helm Release: HR-07-TC05 - Given user is at the Topology page - And user is on the topology sidebar of the helm release "nodejs-release" - When user switches to the "Resources" tab - And user clicks on the link for the "Image Streams" of helm release - Then user is redirected to the "ImageStream" Details page for the helm release - - - @regression - Scenario: Routes link on the sidebar for the Helm Release: HR-07-TC06 - Given user is at the Topology page - And user is on the topology sidebar of the helm release "nodejs-release" - When user switches to the "Resources" tab - And user clicks on the link for the "Routes" of helm release - Then user is redirected to the "Route" Details page for the helm release diff --git a/frontend/packages/helm-plugin/integration-tests/package.json b/frontend/packages/helm-plugin/integration-tests/package.json deleted file mode 100644 index 5e87a8c9c72..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "@helm-plugin/integration-tests", - "version": "0.0.1", - "description": "Helm Cypress tests", - "private": true, - "cypress-cucumber-preprocessor": { - "step_definitions": "support/step-definitions/*/" - }, - "scripts": { - "test-cypress": "../../../node_modules/.bin/cypress open --env openshift=true", - "test-cypress-headless": "node --max-old-space-size=4096 ../../../node_modules/.bin/cypress run ${CYPRESS_RECORD_KEY:+--record} --env openshift=true --browser ${BRIDGE_E2E_BROWSER_NAME:-electron} --headless --spec \"features/helm-release.feature\"", - "test-cypress-headless-all": "node --max-old-space-size=4096 ../../../node_modules/.bin/cypress run --env openshift=true --browser ${BRIDGE_E2E_BROWSER_NAME:-electron} --headless" - } -} diff --git a/frontend/packages/helm-plugin/integration-tests/reporter-config.json b/frontend/packages/helm-plugin/integration-tests/reporter-config.json deleted file mode 100644 index c51b55f11bd..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/reporter-config.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "reporterEnabled": "mocha-junit-reporter, mochawesome", - "mochaJunitReporterReporterOptions": { - "mochaFile": "../../../gui_test_screenshots/junit_cypress-[hash].xml", - "toConsole": false - }, - "mochawesomeReporterOptions": { - "reportDir": "../../../gui_test_screenshots/", - "reportFilename": "cypress_report_helm", - "overwrite": false, - "html": false, - "json": true - } -} diff --git a/frontend/packages/helm-plugin/integration-tests/support/commands/hooks.ts b/frontend/packages/helm-plugin/integration-tests/support/commands/hooks.ts deleted file mode 100644 index 057173e500d..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/support/commands/hooks.ts +++ /dev/null @@ -1,13 +0,0 @@ -before(() => { - cy.login(); - cy.document().its('readyState').should('eq', 'complete'); - cy.window().then((win: any) => { - win.SERVER_FLAGS.userSettingsLocation = 'localstorage'; - }); - // Default helm repo has been changed to a new repo, so executing below line to fix that issue - cy.exec('oc apply -f test-data/red-hat-helm-charts.yaml'); -}); - -after(() => { - cy.exec(`oc delete namespace ${Cypress.expose('NAMESPACE')}`, { failOnNonZeroExit: false }); -}); diff --git a/frontend/packages/helm-plugin/integration-tests/support/commands/index.ts b/frontend/packages/helm-plugin/integration-tests/support/commands/index.ts deleted file mode 100644 index bb6f3f936e4..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/support/commands/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -// Include the cypress customized commands related files -import '../../../../integration-tests/support/selectors'; -import '../../../../integration-tests/support/a11y'; -import '../../../../integration-tests/support/login'; -import '../../../../integration-tests/support/project'; -import '../../../../integration-tests/support/index'; -import '../../../../dev-console/integration-tests/support/commands/app'; -import '../../../../dev-console/integration-tests/support/pageObjects/helm-po'; -import './hooks'; diff --git a/frontend/packages/helm-plugin/integration-tests/support/constants/index.ts b/frontend/packages/helm-plugin/integration-tests/support/constants/index.ts deleted file mode 100644 index f9e3dbeacaa..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/support/constants/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -/* eslint-disable no-barrel-files/no-barrel-files */ -export * from './navigation'; -export * from './static-text/helm-text'; diff --git a/frontend/packages/helm-plugin/integration-tests/support/constants/navigation.ts b/frontend/packages/helm-plugin/integration-tests/support/constants/navigation.ts deleted file mode 100644 index 42af94c3faa..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/support/constants/navigation.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Navigation paths for cy.clickNavLink() - * Format: [parent menu, submenu] - */ -export const navPaths = { - helm: ['Ecosystem', 'Helm'], - topology: ['Workloads', 'Topology'], - softwareCatalog: ['Ecosystem', 'Software Catalog'], -}; diff --git a/frontend/packages/helm-plugin/integration-tests/support/constants/static-text/helm-text.ts b/frontend/packages/helm-plugin/integration-tests/support/constants/static-text/helm-text.ts deleted file mode 100644 index 44ea5e5c110..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/support/constants/static-text/helm-text.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const messages = { - noHelmReleasesFound: 'No Helm Releases found', -}; diff --git a/frontend/packages/helm-plugin/integration-tests/support/pages/helm/helm-details-page.ts b/frontend/packages/helm-plugin/integration-tests/support/pages/helm/helm-details-page.ts deleted file mode 100644 index ba1555a3848..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/support/pages/helm/helm-details-page.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { modal } from '@console/cypress-integration-tests/views/modal'; -import { helmActions } from '@console/dev-console/integration-tests/support/constants'; -import { helmPO } from '@console/dev-console/integration-tests/support/pageObjects'; - -const actions = [helmActions.upgrade, helmActions.rollback, helmActions.deleteHelmRelease]; - -export const helmDetailsPage = { - verifyTitle: () => cy.byTestSectionHeading('Helm Release details').should('be.visible'), - verifyHelmReleaseStatus: () => cy.get('[data-test="status-text"]').should('be.visible'), - verifyResourcesTab: () => cy.get(helmPO.resourcesTab).should('be.visible'), - verifyReleaseNotesTab: () => cy.get(helmPO.revisionHistoryTab).should('be.visible'), - verifyActionsDropdown: () => cy.byLegacyTestID('actions-menu-button').should('be.visible'), - verifyRevisionHistoryTab: () => cy.get(helmPO.revisionHistoryTab).should('be.visible'), - clickActionMenu: () => cy.byLegacyTestID('actions-menu-button').click(), - verifyActionsInActionMenu: () => { - cy.byLegacyTestID('action-items') - .find('li') - .each(($ele) => { - expect(actions).toContain($ele.text()); - }); - }, - verifyFieldValue: (fieldName: string, fieldValue: string) => { - cy.get('dl dt').contains(fieldName).next('dd').should('contain.text', fieldValue); - }, - uninstallHelmRelease: () => { - cy.byLegacyTestID('modal-title').should('contain.text', 'Delete Helm Release?'); - cy.byTestID('confirm-action').click({ force: true }); - modal.shouldBeClosed(); - }, - enterReleaseNameInUninstallPopup: (releaseName: string = 'nodejs-release') => { - modal.modalTitleShouldContain('Delete Helm Release?'); - cy.byTestID('resource-name').should('have.text', releaseName); - cy.get(helmPO.uninstallHelmRelease.releaseName).type(releaseName); - }, - checkHelmTab: (name: string) => { - cy.byLegacyTestID(`horizontal-link-${name}`).should('exist'); - }, - selectHelmTab: (name: string) => { - cy.byLegacyTestID(`horizontal-link-${name}`).should('exist').click(); - }, - selectedHelmTab: (name: string) => { - cy.byLegacyTestID(`horizontal-link-${name}`) - .should('exist') - .parent('.pf-v6-c-tabs__item') - .should('have.class', 'pf-m-current'); - }, - verifyHelmActionsDropdown: () => cy.byTestID('console-select-menu-toggle').should('be.visible'), - clickHelmActionButton: () => cy.byTestID('console-select-menu-toggle').click(), - verifyActionsInCreateMenu: () => { - cy.byTestID('console-select-item').contains('Repository').should('exist'); - cy.byTestID('console-select-item').contains('Helm Release').should('exist'); - }, - clickCreateMenu: (createMenuOption: string) => { - cy.byTestID('console-select-menu-toggle').click(); - cy.byTestID('console-select-item').contains(createMenuOption).click(); - }, - clickHelmChartRepository: (repoName: string) => cy.byLegacyTestID(repoName).click(), - selectHelmChartRepository: (repoName: string) => - cy.byTestID(`chartRepositoryTitle-${repoName}`).click(), - clickCreateHelmRelease: () => { - cy.byTestID('console-select-menu-toggle').click(); - cy.byTestID('console-select-item').contains('Helm Release').click(); - }, - clickCreateRepository: () => { - cy.byTestID('console-select-menu-toggle').click(); - cy.byTestID('console-select-item').contains('Repository').click(); - }, - clickRevisionHistoryTab: () => cy.get(helmPO.revisionHistoryTab).click(), -}; diff --git a/frontend/packages/helm-plugin/integration-tests/support/pages/helm/helm-page.ts b/frontend/packages/helm-plugin/integration-tests/support/pages/helm/helm-page.ts deleted file mode 100644 index 7d940ef8066..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/support/pages/helm/helm-page.ts +++ /dev/null @@ -1,183 +0,0 @@ -import { helmActions } from '@console/dev-console/integration-tests/support/constants'; -import { helmPO } from '@console/dev-console/integration-tests/support/pageObjects'; - -export const helmPage = { - verifyMessage: (noHelmReleasesFound: string) => - cy.get(helmPO.noHelmReleasesMessage).should('contain.text', noHelmReleasesFound), - verifyInstallHelmLink: () => - cy - .get('a') - .contains('Browse the catalog to discover available Helm Charts') - .should('be.visible'), - search: (name: string) => { - cy.get(helmPO.filters).within(() => cy.get('.pf-v6-c-menu-toggle').first().click()); - cy.get('.pf-v6-c-menu__list-item').contains('Name').click(); - cy.get('[aria-label="Filter by name"]').clear().type(name); - }, - verifyHelmReleasesDisplayed: () => cy.get(helmPO.table).should('be.visible'), - clickHelmReleaseName: (name: string) => cy.get(`a[title="${name}"]`).click(), - selectAllHelmFilter: () => { - cy.get(helmPO.deployedCheckbox).check(); - cy.get(helmPO.failedCheckbox).check(); - cy.get(helmPO.otherCheckbox).check(); - }, - selectHelmFilter: (filterName: string) => { - switch (filterName) { - case 'Deployed': { - cy.get(helmPO.deployedCheckbox).check(); - break; - } - case 'Failed': { - cy.get(helmPO.failedCheckbox).check(); - break; - } - case 'Other': { - cy.get(helmPO.otherCheckbox).check(); - break; - } - case 'All': { - helmPage.selectAllHelmFilter(); - break; - } - default: { - throw new Error(`${filterName} filter is not available in filter drop down`); - } - } - helmPage.selectHelmFilterDropDown(); - }, - verifyStatusInHelmReleasesTable: (helmReleaseName: string = 'Nodejs') => { - cy.get(helmPO.table).should('exist'); - cy.get('tr td:nth-child(1)').each(($el, index) => { - const text = $el.text(); - if (text.includes(helmReleaseName)) { - cy.get('tbody tr').eq(index).find('td:nth-child(4) button').click(); - } - }); - }, - selectKebabMenu: () => { - cy.get(helmPO.table).should('exist'); - cy.byLegacyTestID('kebab-button').first().click(); - }, - verifyHelmChartsListed: () => { - cy.get(helmPO.noHelmSearchMessage) - .get(helmPO.table) - .get('table') - .its('length') - .should('be.greaterThan', 0); - }, - verifyHelmChartStatus: () => { - cy.byTestID('success-icon').should('be.visible'); - cy.byTestID('status-text').should('exist'); - }, - verifySearchMessage: (message: string) => - cy.get(helmPO.noHelmSearchMessage).should('contain.text', message), - selectHelmFilterDropDown: () => { - cy.get(helmPO.filters).within(() => cy.get('.pf-v6-c-menu-toggle').first().click()); - cy.get('.pf-v6-c-menu__list-item').contains('Status').click(); - }, - selectHelmFilterOption: (filterName: string) => { - cy.get(helmPO.filterDropdown).click(); - cy.get(`[data-ouia-component-id="DataViewCheckboxFilter-filter-item-${filterName}"]`).click(); - cy.url().should('include', `=${filterName}`); - cy.get(helmPO.filterDropdown).click(); - }, - getItemFromReleaseTable: (header: string) => { - cy.get(helmPO.table) - .find('[data-test="data-view-cell-helm-release-name"]') - .first() - .should('be.visible') - .parent() - .find('[data-test="status-text"]') - .should('contain.text', header); - }, - verifyHelmFilterUnSelected: (filterName: string) => { - helmPage.selectHelmFilterDropDown(); - cy.get(helmPO.filterDropdown).click(); - switch (filterName) { - case 'Deployed': { - cy.get(helmPO.deployedCheckbox).uncheck().should('not.be.checked'); - break; - } - case 'Failed': { - cy.get(helmPO.failedCheckbox).uncheck().should('not.be.checked'); - break; - } - case 'Other': { - cy.get(helmPO.failedCheckbox).uncheck().should('not.be.checked'); - break; - } - case 'All': { - cy.get(helmPO.deployedCheckbox).uncheck().should('not.be.checked'); - cy.get(helmPO.failedCheckbox).uncheck().should('not.be.checked'); - cy.get(helmPO.otherCheckbox).uncheck().should('not.be.checked'); - break; - } - default: { - throw new Error(`${filterName} filter is not available in filter drop down`); - } - } - }, - verifyHelmFilterSelected: (filterName: string) => { - helmPage.selectHelmFilterDropDown(); - cy.get(helmPO.filterDropdown).click(); - switch (filterName) { - case 'Deployed': { - cy.get(helmPO.deployedCheckbox).should('be.checked'); - break; - } - case 'Failed': { - cy.get(helmPO.failedCheckbox).should('be.checked'); - break; - } - case 'Other': { - cy.get(helmPO.otherCheckbox).should('be.checked'); - break; - } - case 'All': { - cy.get(helmPO.deployedCheckbox).should('be.checked'); - cy.get(helmPO.failedCheckbox).should('be.checked'); - cy.get(helmPO.otherCheckbox).should('be.checked'); - break; - } - default: { - throw new Error(`${filterName} filter is not available in filter drop down`); - } - } - helmPage.selectHelmFilterDropDown(); - }, - clearAllFilter: () => { - // eslint-disable-next-line promise/catch-or-return - cy.get(helmPO.filterToolBar).then((body) => { - if (body.find(`button`).text().includes('Clear all filters')) { - cy.get('[data-test="filter-toolbar"] button').contains('Clear all filters').click(); - } - }); - }, - selectHelmActionFromMenu: (actionName: helmActions | string) => { - switch (actionName) { - case 'Upgrade': - case helmActions.upgrade: - cy.get(helmPO.helmActions.upgrade).click(); - break; - case 'Rollback': - case helmActions.rollback: - cy.get(helmPO.helmActions.rollBack).click(); - break; - case 'Delete Helm Release': - case helmActions.deleteHelmRelease: - cy.get(helmPO.helmActions.deleteHelmRelease).click(); - break; - default: - cy.log(`${actionName} is not available in dropdown menu`); - break; - } - }, - verifyInstallHelmChartLink: (installLink: string) => - cy.get('a').contains(installLink).should('be.visible'), - verifyDropdownItem: (item1: string, item2: string, item3: string) => { - cy.get(helmPO.filterDropdown).click(); - cy.get(helmPO.filter.pendingInstall).should('contain.text', item1); - cy.get(helmPO.filter.pendingUpgrade).should('contain.text', item2); - cy.get(helmPO.filter.pendingRollback).should('contain.text', item3); - }, -}; diff --git a/frontend/packages/helm-plugin/integration-tests/support/pages/helm/index.ts b/frontend/packages/helm-plugin/integration-tests/support/pages/helm/index.ts deleted file mode 100644 index f9bd87191c3..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/support/pages/helm/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* eslint-disable no-barrel-files/no-barrel-files */ -export * from './helm-details-page'; -export * from './helm-page'; -export * from './rollBack-helm-release-page'; -export * from './upgrade-helm-release-page'; -export * from './url-chart-install-page'; diff --git a/frontend/packages/helm-plugin/integration-tests/support/pages/helm/rollBack-helm-release-page.ts b/frontend/packages/helm-plugin/integration-tests/support/pages/helm/rollBack-helm-release-page.ts deleted file mode 100644 index ea6558e6f31..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/support/pages/helm/rollBack-helm-release-page.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { helmPO } from '@console/dev-console/integration-tests/support/pageObjects'; - -export const rollBackHelmRelease = { - selectRevision: () => { - cy.get('[id^=form-radiobutton-revision]').last().check(); - }, - clickOnRollBack: () => cy.get(helmPO.rollBackHelmRelease.rollBack).click(), -}; diff --git a/frontend/packages/helm-plugin/integration-tests/support/pages/helm/upgrade-helm-release-page.ts b/frontend/packages/helm-plugin/integration-tests/support/pages/helm/upgrade-helm-release-page.ts deleted file mode 100644 index 161c89791b5..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/support/pages/helm/upgrade-helm-release-page.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { warningModal } from '@console/cypress-integration-tests/views/warning-modal'; -import { helmPO } from '@console/dev-console/integration-tests/support/pageObjects/helm-po'; - -export const upgradeHelmRelease = { - verifyTitle: () => cy.get('h1').contains('Upgrade Helm Release').should('be.visible'), - updateReplicaCount: (replicaCount: string = '2') => - cy.get(helmPO.upgradeHelmRelease.replicaCount).clear().type(replicaCount), - upgradeChartVersion: () => { - // Wait for the dropdown to be enabled (starts disabled while loading chart versions) - cy.get(helmPO.upgradeHelmRelease.chartVersion).should('not.be.disabled'); - cy.get(helmPO.upgradeHelmRelease.chartVersion).click(); - const count = Cypress.$('[data-test="console-select"]').length; - const randNum = Math.floor(Math.random() * count); - cy.byTestID('console-select-item').eq(randNum).click(); - warningModal.confirm('HelmChangeChartVersionConfirmation'); - }, - clickOnUpgrade: () => { - cy.get(helmPO.upgradeHelmRelease.upgrade).click(); - cy.get('.pf-v6-c-button__progress').should('not.exist'); - }, -}; diff --git a/frontend/packages/helm-plugin/integration-tests/support/pages/helm/url-chart-install-page.ts b/frontend/packages/helm-plugin/integration-tests/support/pages/helm/url-chart-install-page.ts deleted file mode 100644 index 91b849c4815..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/support/pages/helm/url-chart-install-page.ts +++ /dev/null @@ -1,30 +0,0 @@ -export const urlChartPO = { - chartURL: '[data-test="oci-chart-url"] input', - releaseName: '[data-test="oci-release-name"] input', - chartVersion: '[data-test="oci-chart-version"] input', - nextButton: '[data-test-id="submit-button"]', - cancelButton: '[data-test-id="reset-button"]', - installButton: '[data-test-id="submit-button"]', - backButton: '[data-test-id="reset-button"]', -}; - -export const urlChartInstallPage = { - enterChartURL: (url: string) => { - cy.get(urlChartPO.chartURL).clear().type(url); - }, - enterReleaseName: (name: string) => { - cy.get(urlChartPO.releaseName).clear().type(name); - }, - enterChartVersion: (version: string) => { - cy.get(urlChartPO.chartVersion).clear().type(version); - }, - clickNext: () => { - cy.get(urlChartPO.nextButton).click(); - }, - clickInstall: () => { - cy.get(urlChartPO.installButton).click(); - }, - verifyValidationErrors: () => { - cy.get('.pf-m-error').should('have.length.at.least', 1); - }, -}; diff --git a/frontend/packages/helm-plugin/integration-tests/support/pages/index.ts b/frontend/packages/helm-plugin/integration-tests/support/pages/index.ts deleted file mode 100644 index c6265dada6a..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/support/pages/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable no-barrel-files/no-barrel-files */ -export * from './helm/index'; diff --git a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/common/common.ts b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/common/common.ts deleted file mode 100644 index cc33120124d..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/common/common.ts +++ /dev/null @@ -1,118 +0,0 @@ -import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps'; -import { modal } from '@console/cypress-integration-tests/views/modal'; -import { nav } from '@console/cypress-integration-tests/views/nav'; -import { - devNavigationMenu, - switchPerspective, - catalogCards, - catalogTypes, -} from '@console/dev-console/integration-tests/support/constants'; -import { - navigateTo, - perspective, - projectNameSpace, - topologyPage, - topologySidePane, - gitPage, - catalogPage, - addPage, - app, -} from '@console/dev-console/integration-tests/support/pages'; -import { checkDeveloperPerspective } from '@console/dev-console/integration-tests/support/pages/functions/checkDeveloperPerspective'; -import { navPaths } from '../../constants'; - -Given('user is at developer perspective', () => { - checkDeveloperPerspective(); -}); - -Given('user is at administrator perspective', () => { - perspective.switchTo(switchPerspective.Administrator); -}); - -Given('user has created or selected namespace {string}', (projectName: string) => { - Cypress.expose('NAMESPACE', projectName); - projectNameSpace.selectOrCreateProject(`${projectName}`); -}); - -Given('user is at the Topology page', () => { - cy.clickNavLink(navPaths.topology); - app.waitForLoad(); - topologyPage.verifyTopologyPage(); -}); - -When('user enters Git Repo url as {string}', (gitUrl: string) => { - gitPage.enterGitUrl(gitUrl); - gitPage.verifyValidatedMessage(gitUrl); -}); - -When('user creates the application with the selected builder image', () => { - catalogPage.selectCatalogType(catalogTypes.BuilderImage); - catalogPage.selectCardInCatalog(catalogCards.nodeJs); - catalogPage.clickButtonOnCatalogPageSidePane(); -}); - -When('user enters name as {string} in General section', (name: string) => { - gitPage.enterComponentName(name); -}); - -When('user selects resource type as {string}', (resourceType: string) => { - gitPage.selectResource(resourceType); -}); - -When('user clicks Create button on Add page', () => { - gitPage.clickCreate(); -}); - -Then('user will be redirected to Topology page', () => { - topologyPage.verifyTopologyPage(); -}); - -Then('user is able to see workload {string} in topology page', (workloadName: string) => { - topologyPage.verifyWorkloadInTopologyPage(workloadName); -}); - -When('user clicks node {string} to open the side bar', (name: string) => { - topologyPage.componentNode(name).click({ force: true }); -}); - -Then('modal with {string} appears', (header: string) => { - modal.modalTitleShouldContain(header); -}); - -When('user clicks on workload {string}', (workloadName: string) => { - topologyPage.componentNode(workloadName).click({ force: true }); -}); - -When('user selects {string} card from add page', (cardName: string) => { - addPage.selectCardFromOptions(cardName); -}); - -Given('user is at Software Catalog page', () => { - cy.clickNavLink(navPaths.softwareCatalog); - catalogPage.verifyTitle(); -}); - -When('user selects Helm Charts type from Software Catalog page', () => { - catalogPage.selectCatalogType(catalogTypes.HelmCharts); - // Wait for catalog cards to be filtered and displayed - catalogPage.isCardsDisplayed(); -}); - -When('user switches to the {string} tab', (tab: string) => { - topologySidePane.selectTab(tab); -}); - -When('user clicks on the link for the {string} of helm release', (resource: string) => { - topologySidePane.selectResource(resource, Cypress.expose('NAMESPACE'), 'nodejs-release'); -}); - -Given('user is at Add page', () => { - checkDeveloperPerspective(); - navigateTo(devNavigationMenu.Add); -}); - -Given('user has logged in as admin user', () => { - cy.login(); - perspective.switchTo(switchPerspective.Administrator); - nav.sidenav.switcher.shouldHaveText(switchPerspective.Administrator); -}); diff --git a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/actions-on-helm-release-after-upgrade.ts b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/actions-on-helm-release-after-upgrade.ts deleted file mode 100644 index 336f25edbcb..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/actions-on-helm-release-after-upgrade.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Given } from 'cypress-cucumber-preprocessor/steps'; -import { catalogPage } from '../../../../../dev-console/integration-tests/support/pages'; - -Given( - 'user has installed helm chart {string} with helm release name {string}', - (chartName: string, releaseName: string) => { - catalogPage.createHelmChart(releaseName, chartName); - }, -); diff --git a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-compatibility.ts b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-compatibility.ts deleted file mode 100644 index cd4f0bca2ae..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-compatibility.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps'; -import { detailsPage } from '@console/cypress-integration-tests/views/details-page'; -import { addOptions } from '@console/dev-console/integration-tests/support/constants/add'; -import { pageTitle } from '@console/dev-console/integration-tests/support/constants/pageTitle'; -import { catalogPO } from '@console/dev-console/integration-tests/support/pageObjects'; -import { addPage } from '@console/dev-console/integration-tests/support/pages/add-flow/add-page'; - -Given('user is at the Create Helm Release page', () => { - addPage.selectCardFromOptions(addOptions.HelmChart); -}); - -When('user clicks on the Helm Chart card on the Add page', () => { - addPage.selectCardFromOptions(addOptions.HelmChart); -}); - -When('user redirects to Helm Charts page', () => { - detailsPage.titleShouldContain(pageTitle.HelmCharts); -}); - -Then('user is able to see helm charts', () => { - cy.get(catalogPO.cardType).should('be.visible'); -}); diff --git a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-installation-view.ts b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-installation-view.ts deleted file mode 100644 index 4b4460cd206..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-installation-view.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { When, Then } from 'cypress-cucumber-preprocessor/steps'; -import { catalogPO, helmPO } from '@console/dev-console/integration-tests/support/pageObjects'; -import { catalogPage } from '@console/dev-console/integration-tests/support/pages'; - -When('user searches and selects {string} helm chart from catalog page', (helmChartName: string) => { - catalogPage.search(helmChartName); - catalogPage.selectHelmChartCard(helmChartName); -}); - -Then('user will see the information of all the chart versions', () => { - cy.byTestID('console-select-item').should('have.length.gte', 1); - cy.byLegacyTestID('reset-button').click(); -}); - -When('user clicks on the Create button on side bar', () => { - catalogPage.clickButtonOnCatalogPageSidePane(); -}); - -When('user clicks on the chart versions dropdown menu', () => { - // Wait for the dropdown to be enabled (starts disabled while loading chart versions) - cy.get(helmPO.upgradeHelmRelease.chartVersion).should('not.be.disabled'); - cy.get(helmPO.upgradeHelmRelease.chartVersion).click(); -}); - -When('user selects the YAML view', () => { - cy.get(catalogPO.installHelmChart.yamlView).click(); - cy.get('.osc-yaml-editor').should('be.visible'); -}); - -When('user enters Replica count as {string}', (replicaCount: string) => { - cy.get(catalogPO.installHelmChart.replicaCount).clear().type(replicaCount); -}); - -When('user selects the Form View', () => { - cy.get(catalogPO.installHelmChart.formView).click(); -}); - -When('user comes back to Form view', () => { - cy.get(catalogPO.installHelmChart.formView).click(); - cy.get('.co-dynamic-form').should('be.visible'); -}); - -Then( - 'user will see Release Name, Replica count as {string}, {string} respectively', - (releaseName: string, replicaCount: string) => { - cy.get(catalogPO.installHelmChart.replicaCount).should('contain.value', replicaCount); - cy.get(catalogPO.installHelmChart.releaseName).should('contain.value', releaseName); - cy.byLegacyTestID('reset-button').click(); - }, -); - -Then('user should see message {string}', (message: string) => { - cy.get('h4[class$="alert__title"]').should('contain.text', message).should('exist'); -}); diff --git a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-navigation.ts b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-navigation.ts deleted file mode 100644 index 591ea417b7b..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-navigation.ts +++ /dev/null @@ -1,370 +0,0 @@ -import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps'; -import { detailsPage } from '@console/cypress-integration-tests/views/details-page'; -import type { catalogTypes } from '@console/dev-console/integration-tests/support/constants'; -import { - devNavigationMenu, - addOptions, - pageTitle, -} from '@console/dev-console/integration-tests/support/constants'; -import { helmPO } from '@console/dev-console/integration-tests/support/pageObjects'; -import { - catalogPO, - helmChartRepositoriesPO, -} from '@console/dev-console/integration-tests/support/pageObjects/add-flow-po'; -import { - navigateTo, - addPage, - catalogPage, - createForm, -} from '@console/dev-console/integration-tests/support/pages'; -import { checkDeveloperPerspective } from '@console/dev-console/integration-tests/support/pages/functions/checkDeveloperPerspective'; -import { topologyPage } from '@console/topology/integration-tests/support/pages/topology/topology-page'; -import { navPaths } from '../../constants'; -import { helmPage, helmDetailsPage } from '../../pages'; - -const deleteChartRepositoryFromDetailsPage = (name: string, type: string) => { - cy.log(`Deleting ${name}`); - cy.byLegacyTestID('kebab-button').click(); - cy.byTestActionID(`Delete ${type}`).click(); - createForm.clickConfirm(); - cy.get('[class~="loading-box"] h4').contains('No repositories found'); // should('have.value', 'No repositories found'); -}; - -Given('user is at developer perspective', () => { - checkDeveloperPerspective(); -}); - -When('user clicks on the Helm tab in dev perspective', () => { - cy.get('[data-quickstart-id="qs-admin-nav-helm"]').should('be.visible').click({ force: true }); - cy.clickNavLink(navPaths.helm); -}); - -Then('user will be redirected to Helm releases page', () => { - detailsPage.titleShouldContain('Helm'); -}); - -Then('user will be redirected to Helm releases page under Helm tab', () => { - detailsPage.titleShouldContain(pageTitle.HelmReleases); -}); - -Then('user is able to see the message {string}', (noHelmReleasesFound: string) => { - helmPage.verifyMessage(noHelmReleasesFound); -}); - -Then('user will get the link to install helm charts from software catalog', () => { - helmPage.verifyInstallHelmLink(); -}); - -Then('user is able to see the link {string}', (installLink: string) => { - helmPage.verifyInstallHelmChartLink(installLink); -}); - -When('user searches and selects {string} card from catalog page', (cardName: string) => { - catalogPage.search(cardName); - catalogPage.selectHelmChartCard(cardName); -}); - -Then('Create Helm Release page is displayed', () => { - cy.get('[data-test="form-title"]').should('have.text', pageTitle.CreateHelmRelease); -}); - -Then('release name displays as {string}', (name: string) => { - cy.get(catalogPO.installHelmChart.releaseName).should('have.value', name); -}); - -Given('user is at Create Helm Release page', () => { - navigateTo(devNavigationMenu.Add); - addPage.selectCardFromOptions(addOptions.HelmChart); - catalogPage.search('Nodejs'); - catalogPage.selectHelmChartCard('Nodejs'); - catalogPage.clickButtonOnCatalogPageSidePane(); -}); - -Then('user is able to see YAML editor', () => { - cy.get('div.view-lines').should('be.visible'); - cy.get(catalogPO.installHelmChart.cancel).click(); -}); - -Then('Topology page have the helm chart workload {string}', (nodeName: string) => { - topologyPage.verifyWorkloadInTopologyPage(nodeName); -}); - -Given('user has installed helm chart', () => { - cy.clickNavLink(navPaths.topology); - topologyPage.verifyTopologyPage(); - topologyPage.verifyWorkloadInTopologyPage('nodejs-release'); -}); - -Given('user is at the Helm page', () => { - cy.clickNavLink(navPaths.helm); -}); - -Given('user is at the Helm Release tab in admin perspective', () => { - cy.clickNavLink(navPaths.helm); - cy.byLegacyTestID('horizontal-link-Helm Releases').should('exist').click({ force: true }); -}); - -When('user selects checkbox for the Deployed Helm charts', (workloadName: string) => { - topologyPage.verifyWorkloadInTopologyPage(workloadName); -}); - -When('user searches for a helm chart {string}', (helmChartName: string) => { - helmPage.search(helmChartName); -}); - -Then('the helm chart {string} will be shown', (helmChartName: string) => { - cy.log(helmChartName); -}); - -When('user clicks on the helm release name {string}', (helmChartName: string) => { - helmPage.search(helmChartName); - helmPage.clickHelmReleaseName(helmChartName); -}); - -Then('user will see the Details page opened', () => { - helmDetailsPage.verifyTitle(); -}); - -Then('user will see the Resources tab', () => { - helmDetailsPage.verifyResourcesTab(); -}); - -Then('user will see the Revision History tab', () => { - helmDetailsPage.verifyRevisionHistoryTab(); -}); - -Then('user will see the Release Notes tab', () => { - helmDetailsPage.verifyReleaseNotesTab(); -}); - -Then( - 'user will see the Actions drop down menu with options Upgrade, Rollback, and Delete Helm Release', - () => { - helmDetailsPage.verifyActionsDropdown(); - helmDetailsPage.clickActionMenu(); - helmDetailsPage.verifyActionsInActionMenu(); - }, -); - -When('user clicks Actions menu in Helm Details page', () => { - helmDetailsPage.clickActionMenu(); -}); - -When('user clicks on the filter drop down', () => { - helmPage.selectHelmFilterDropDown(); - cy.get(helmPO.filterDropdown).click(); -}); - -When('user selects checkbox for the {string} Helm charts', (status: string) => { - helmPage.selectHelmFilter(status); -}); - -When('the checkbox for the {string} Helm chart is checked', (status: string) => { - helmPage.verifyHelmFilterSelected(status); -}); - -When('helm charts with status {string} are listed', (status: string) => { - helmPage.getItemFromReleaseTable(status); -}); - -When('user clicks on the clear all filters button', () => { - helmPage.clearAllFilter(); -}); - -Then(`{string} filters selected will get removed`, (status: string) => { - helmPage.verifyHelmFilterUnSelected(status); -}); - -Then('user is able to see message on the Helm page as {string}', (message: string) => { - helmPage.verifySearchMessage(message); -}); - -Then('user will see the helm charts listed', () => { - helmPage.verifyHelmChartsListed(); -}); - -When('user selects {string} option from Type section', (catalogType: string) => { - catalogPage.selectCatalogType(catalogType as catalogTypes); -}); - -Then('user can see {string} card on the Add page', (cardName: string) => { - addPage.verifyCard(cardName); -}); - -Then('form view radio button is selected by default', () => { - cy.get('#form-radiobutton-editorType-form-field').should('be.checked'); -}); - -Then('yaml view radio button is enabled', () => { - cy.get('#form-radiobutton-editorType-yaml-field').should('not.be.checked'); -}); - -Then('form sections are displayed in form view', () => { - // cy.get('#root_ingress_field-group').should('be.visible'); - // cy.get('#root_service_accordion-toggle').should('be.visible'); - // cy.get('#root_image_field-group').should('be.visible'); - // Only field group IDs are available with new chart. - cy.get('#root_field-group').should('be.visible'); - cy.get(catalogPO.installHelmChart.cancel).click(); -}); - -Then('user is redirected to Repositories tab', () => { - detailsPage.titleShouldContain('Helm'); - helmDetailsPage.selectedHelmTab('Repositories'); -}); - -Then('user is able to see Helm Releases and Repositories Tabs', () => { - helmDetailsPage.checkHelmTab('Helm Releases'); - helmDetailsPage.checkHelmTab('Repositories'); -}); - -When('user clicks on Repositories tab', () => { - helmDetailsPage.selectHelmTab('Repositories'); -}); - -Then( - 'user is able to see the Create drop down menu with Helm Release and Repository options', - () => { - helmDetailsPage.verifyHelmActionsDropdown(); - helmDetailsPage.clickHelmActionButton(); - helmDetailsPage.verifyActionsInCreateMenu(); - }, -); - -Then('user clicks on {string} repository', (repoName: string) => { - helmDetailsPage.clickHelmChartRepository(repoName); -}); - -Then('user clicks on {string} chart repository', (repoName: string) => { - helmDetailsPage.selectHelmChartRepository(repoName); -}); - -Then('Repositories breadcrumbs is visible', () => { - detailsPage.breadcrumb(0).contains('Repositories'); -}); - -Then('user clicks on Repositories link', () => { - detailsPage.breadcrumb(0).click(); - detailsPage.titleShouldContain('Helm'); -}); - -When('user clicks on Repository in create action menu to see the {string} form', (formName) => { - helmDetailsPage.clickCreateRepository(); - cy.byTestID('form-title').contains(formName); -}); - -When('user clicks on Helm release in create action menu', () => { - helmDetailsPage.clickCreateHelmRelease(); -}); - -When('user enters Chart repository name as {string}', (name: string) => { - cy.get(helmChartRepositoriesPO.name).should('be.visible').clear().type(name); -}); - -When('user enters Description as {string}', (description: string) => { - cy.get(helmChartRepositoriesPO.description) - .scrollIntoView() - .should('be.visible') - .clear() - .type(description); -}); - -When('user enters URL as {string}', (url: string) => { - cy.get(helmChartRepositoriesPO.url).scrollIntoView().should('be.visible').clear().type(url); -}); - -When('user clicks on Create button', () => { - createForm.clickCreate(); -}); - -When( - 'user clicks on Save button to see the {string} {string} details page', - (type: string, name: string) => { - createForm.clickSave(); - cy.get(`[title=${type}`).should('be.visible'); - cy.get('[data-test="page-heading"] h1').contains(name); - }, -); - -When('user enters Display name as {string}', (displayName: string) => { - cy.get(helmChartRepositoriesPO.displayName) - .scrollIntoView() - .should('be.visible') - .clear() - .type(displayName); -}); - -Then( - 'user can see {string} {string} updated with {string} in the list page', - (type: string, repoName: string, updatedValue: string) => { - cy.byLegacyTestID('item-filter').should('be.visible').type(repoName); - cy.wait(3000); - cy.get('[data-test-rows="resource-row"]').contains(updatedValue); - deleteChartRepositoryFromDetailsPage(repoName, type); - }, -); - -When('user edits {string} {string}', (name: string, type: string) => { - cy.byLegacyTestID('item-filter').should('be.visible').clear().type(name); - cy.wait(3000); - cy.byLegacyTestID('kebab-button').click(); - cy.byTestActionID(`Edit ${type}`).click(); - cy.byTestID('form-title').contains(`Edit ${type}`); -}); - -When('user selects cluster-scoped scope type', () => { - cy.get(`[data-test="HelmChartRepository-view-input"]`).should('be.visible').click(); -}); - -When('user navigates to Helm page', () => { - cy.clickNavLink(navPaths.helm); -}); - -When('user can see {string} {string} details page', (type: string, name: string) => { - cy.get(`[title=${type}`).should('be.visible'); - cy.get('[data-test="page-heading"] h1').contains(name); -}); - -Given( - 'user has installed helm chart {string} with helm release name {string}', - (chartName: string, releaseName: string) => { - catalogPage.createHelmChart(releaseName, chartName); - }, -); - -Given('user is able to see {string} in helm page', (helmRelease: string) => { - cy.clickNavLink(navPaths.helm); - helmPage.search(helmRelease); -}); - -Given('user is able to see the status and status icon of {string} under helm releases tab', () => { - helmPage.verifyHelmChartStatus(); -}); - -Given( - 'user is able to see the {string}, {string} and {string} options under filter bar', - (item1: string, item2: string, item3: string) => { - helmPage.selectHelmFilterDropDown(); - helmPage.verifyDropdownItem(item1, item2, item3); - }, -); - -Then('user is able to see the status and status icon in title after {string}', () => { - cy.get('[data-test="page-heading"] h1').within(() => { - helmPage.verifyHelmChartStatus(); - }); -}); - -Then('user is able to see the status and status icon under helm release details', () => { - cy.byTestID('helm-release-status-details').within(() => { - helmPage.verifyHelmChartStatus(); - }); -}); - -Then('user is able to see the status and status icon of Revision history page', () => { - helmPage.verifyHelmChartStatus(); -}); - -Then('user switch to Revision history tab', () => { - helmDetailsPage.clickRevisionHistoryTab(); -}); diff --git a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-release.ts b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-release.ts deleted file mode 100644 index b191e750f06..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-release.ts +++ /dev/null @@ -1,159 +0,0 @@ -import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps'; -import { helmActions } from '@console/dev-console/integration-tests/support/constants'; -import { helmPO } from '@console/dev-console/integration-tests/support/pageObjects'; -import { - topologyPage, - topologySidePane, - createHelmChartFromAddPage, -} from '@console/dev-console/integration-tests/support/pages'; -import { navPaths } from '../../constants'; -import { upgradeHelmRelease, helmDetailsPage, rollBackHelmRelease, helmPage } from '../../pages'; - -Given('helm release {string} is present in topology page', (workloadName: string) => { - createHelmChartFromAddPage(workloadName); -}); - -Given('user has installed helm release {string}', (helmReleaseName: string) => { - createHelmChartFromAddPage(helmReleaseName); -}); - -When( - 'user right clicks on the helm release {string} to open the context menu', - (helmReleaseName: string) => { - topologyPage.verifyWorkloadInTopologyPage(helmReleaseName); - topologyPage.rightClickOnHelmWorkload(helmReleaseName); - }, -); - -Then( - 'user is able to see the context menu with actions Upgrade, Rollback and Uninstall Helm Release', - () => { - cy.get('ul[role="menu"]').should('be.visible'); - cy.get(helmPO.helmActions.upgrade).should('be.visible'); - cy.get(helmPO.helmActions.rollBack).should('be.visible'); - cy.get(helmPO.helmActions.deleteHelmRelease).should('be.visible'); - }, -); - -Then('user is able to see the context menu with actions Upgrade and Delete Helm Release', () => { - cy.get('div.odc-topology-context-menu').should('be.visible'); - cy.byTestActionID('Upgrade').should('be.visible'); - cy.byTestActionID('Delete Helm Release').should('be.visible'); -}); - -Given('user is on the topology sidebar of the helm release {string}', (helmReleaseName: string) => { - topologyPage.clickOnHelmGroup(helmReleaseName); - topologySidePane.verify(); -}); - -When('user clicks on the Actions drop down menu', () => { - topologySidePane.clickActionsDropDown(); -}); - -Then( - 'user is able to see the actions dropdown menu with actions Upgrade, Rollback and Uninstall Helm Release', - () => { - topologySidePane.verifyActions( - helmActions.upgrade, - helmActions.rollback, - helmActions.deleteHelmRelease, - ); - }, -); - -Then( - 'user is able to see the actions dropdown menu with actions Upgrade and Uninstall Helm Release', - () => { - const actions = ['Upgrade', 'Uninstall Helm Release']; - cy.byLegacyTestID('action-items') - .children() - .each(($ele) => { - expect(actions).toContain($ele.text()); - }); - }, -); - -Given('user is on the Helm page with helm release {string}', (helmRelease: string) => { - cy.clickNavLink(navPaths.helm); - helmPage.search(helmRelease); -}); - -Given('user is able to see {string} in helm page in admin view', (helmRelease: string) => { - helmPage.search(helmRelease); -}); - -When('user clicks on the Helm Release tab in admin perspective', () => { - cy.clickNavLink(navPaths.helm); - cy.byLegacyTestID('horizontal-link-Helm Releases').should('exist').click({ force: true }); -}); - -Then('user will be redirected to Helm Releases page under Helm tab', () => { - cy.get('[data-test-id="helm-nav"]').should('be.visible'); -}); - -When('user clicks on the Kebab menu', () => { - helmPage.selectKebabMenu(); -}); - -Then( - 'user is able to see kebab menu with actions Upgrade, Rollback and Delete Helm Release', - () => { - topologySidePane.verifyActions( - helmActions.upgrade, - helmActions.rollback, - helmActions.deleteHelmRelease, - ); - }, -); - -When('user clicks on the {string} action', (actionName: string) => { - helmPage.selectHelmActionFromMenu(actionName); -}); - -When('user upgrades the chart Version', () => { - upgradeHelmRelease.upgradeChartVersion(); -}); - -When('user clicks on the upgrade button', () => { - upgradeHelmRelease.clickOnUpgrade(); -}); - -When('user selects the version to Rollback', () => { - rollBackHelmRelease.selectRevision(); -}); - -When('user clicks on the rollback button', () => { - rollBackHelmRelease.clickOnRollBack(); - cy.get('.co-m-loader', { timeout: 40000 }).should('not.exist'); -}); - -When('user enters the release name {string}', (releaseName: string) => { - helmDetailsPage.enterReleaseNameInUninstallPopup(releaseName); -}); - -When('user clicks on the Delete button', () => { - helmDetailsPage.uninstallHelmRelease(); -}); - -When('user clicks on the helm release {string}', (helmReleaseName: string) => { - topologyPage.clickOnGroup(helmReleaseName); -}); - -Then('user will see the sidebar for the helm release', () => { - topologySidePane.verify(); -}); - -Then('user will see the Details, Resources, Release notes tabs', () => { - topologyPage.verifyHelmReleaseSidePaneTabs(); -}); - -Then('user will see the {string} action item', (actionItem: string) => { - cy.byTestActionID(actionItem).should('be.visible'); -}); - -Then('user is redirected to the {string} Details page for the helm release', (resource: string) => { - cy.get(`[data-test-section-heading="${resource} details"] span`).should( - 'contain.text', - `${resource} details`, - ); -}); diff --git a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm.ts b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm.ts deleted file mode 100644 index 095ae827385..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm.ts +++ /dev/null @@ -1,124 +0,0 @@ -import { When, Then, Given } from 'cypress-cucumber-preprocessor/steps'; -import { detailsPage } from '@console/cypress-integration-tests/views/details-page'; -import { - pageTitle, - devNavigationMenu, - addOptions, -} from '@console/dev-console/integration-tests/support/constants'; -import { - catalogPO, - quickStartSidebarPO, -} from '@console/dev-console/integration-tests/support/pageObjects'; -import { - catalogPage, - catalogInstallPageObj, - topologyHelper, - createHelmReleaseWithName, - navigateTo, - addPage, - projectNameSpace, - app, -} from '@console/dev-console/integration-tests/support/pages'; -import { checkDeveloperPerspective } from '@console/dev-console/integration-tests/support/pages/functions/checkDeveloperPerspective'; - -When('user selects YAML view', () => { - cy.document().its('readyState').should('eq', 'complete'); - cy.get(catalogPO.installHelmChart.yamlView).click(); - cy.testA11y('Pipeline Builder page - YAML view'); -}); - -When('user selects the Chart Version {string}', (chartVersion: string) => { - catalogInstallPageObj.selectHelmChartVersion(chartVersion); -}); - -When( - 'user selects {string} button from Change Chart version confirmation dialog', - (option: string) => { - catalogInstallPageObj.selectChangeOfChartVersionDialog(option); - }, -); - -When('user clicks on the Create button', () => { - catalogPage.clickOnInstallButton(); -}); - -Then('Topology page have the helm chart workload {string}', (nodeName: string) => { - topologyHelper.verifyWorkloadInTopologyPage(nodeName); -}); - -When('user enters Release Name as {string}', (releaseName: string) => { - catalogPage.enterReleaseName(releaseName); -}); - -Then('user will see the chart version dropdown', () => { - catalogInstallPageObj.verifyChartVersionDropdownAvailable(); -}); - -Then('user has added multiple helm charts repositories', () => { - createHelmReleaseWithName('Nodejs', 'nodejs-release'); - createHelmReleaseWithName('Quarkus', 'quarkus'); - navigateTo(devNavigationMenu.Add); -}); - -Then('user will get redirected to Helm Charts page', () => { - detailsPage.titleShouldContain(pageTitle.HelmCharts); -}); - -Then('user will see the list of Chart Repositories', () => { - catalogPage.verifyChartListAvailable(); -}); - -Then('user will see the cards of Helm Charts', () => { - catalogPage.verifyHelmChartCardsAvailable(); -}); - -Then('user will see Filter by Keyword field', () => { - catalogPage.verifyFilterByKeywordField(); -}); - -Then('user will see A-Z, Z-A sort by dropdown', () => { - catalogPage.verifySortDropdown(); -}); - -Given('user is at Add page', () => { - checkDeveloperPerspective(); - navigateTo(devNavigationMenu.Add); -}); - -Given('user has applied namespaced CRD yaml {string}', (yamlFile: string) => { - cy.exec(`oc apply -f ${yamlFile}`, { failOnNonZeroExit: false }); -}); - -Given( - 'user has created namespaced helm chart repo with yaml {string} in namespace {string}', - (yamlFile: string, namespace: string) => { - cy.exec(`oc apply -f ${yamlFile} -n ${namespace}`, { failOnNonZeroExit: false }); - }, -); - -When('user selects Helm Chart card from Add page', () => { - addPage.selectCardFromOptions(addOptions.HelmChart); -}); - -Then('user will see {string} under Chart repositories filter', (chartRepo: string) => { - catalogPage.verifyChartRepoAvailable(chartRepo); -}); - -Then( - 'user will not see {string} under Chart repositories filter in a new namespace {string}', - (chartRepo: string, namespace: string) => { - projectNameSpace.selectOrCreateProject(namespace); - catalogPage.verifyChartRepoNotAvailable(chartRepo); - }, -); - -When('user clicks on quick start link in helm catalog description', () => { - cy.get('[data-test="help-text"]>a').should('be.visible').click(); -}); - -Then('user will see {string} quick start', (quickStartName: string) => { - app.waitForDocumentLoad(); - cy.get(quickStartSidebarPO.quickStartSidebar) - .should('be.visible') - .should('contain', quickStartName); -}); diff --git a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/install-url-chart.ts b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/install-url-chart.ts deleted file mode 100644 index 7db027e83f7..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/install-url-chart.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps'; -import { navPaths } from '../../constants'; -import { urlChartInstallPage } from '../../pages'; - -Given('user is at the URL chart install page', () => { - cy.clickNavLink(navPaths.helm); - cy.byLegacyTestID('item-create').click(); - cy.get('[data-test-dropdown-menu]').contains('Helm Chart URL').click(); -}); - -When('user clicks on Create menu and selects "Install a Helm Chart from a URL"', () => { - cy.byLegacyTestID('item-create').click(); - cy.get('[data-test-dropdown-menu]').contains('Helm Chart URL').click(); -}); - -Then('user is redirected to the URL chart install page', () => { - cy.url().should('include', '/url-chart'); - cy.get('[data-test="oci-chart-url"]').should('be.visible'); -}); - -When('user clicks on the Next button without filling any fields', () => { - urlChartInstallPage.clickNext(); -}); - -Then('user will see validation errors for Chart URL, Release name, and Chart version', () => { - urlChartInstallPage.verifyValidationErrors(); -}); - -When('user enters {string} as Chart URL', (url: string) => { - urlChartInstallPage.enterChartURL(url); -}); - -When('user enters Release Name as {string}', (name: string) => { - urlChartInstallPage.enterReleaseName(name); -}); - -When('user enters Chart Version as {string}', (version: string) => { - urlChartInstallPage.enterChartVersion(version); -}); - -When('user clicks on the Next button', () => { - urlChartInstallPage.clickNext(); -}); - -When('user clicks on the Install button', () => { - urlChartInstallPage.clickInstall(); -}); - -Then('user will see a validation error for invalid Chart URL format', () => { - cy.get('.pf-m-error').should('exist'); -}); diff --git a/frontend/packages/helm-plugin/integration-tests/test-data/namespaced-helm-chart-repository.yaml b/frontend/packages/helm-plugin/integration-tests/test-data/namespaced-helm-chart-repository.yaml deleted file mode 100644 index 3ff49f83b7a..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/test-data/namespaced-helm-chart-repository.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: helm.openshift.io/v1beta1 -kind: ProjectHelmChartRepository -metadata: - name: ibm-repo - namespace: aut-helm -spec: - connectionConfig: - url: https://raw.githubusercontent.com/IBM/charts/master/repo/community/index.yaml diff --git a/frontend/packages/helm-plugin/integration-tests/test-data/namespaced-helm-crd.yaml b/frontend/packages/helm-plugin/integration-tests/test-data/namespaced-helm-crd.yaml deleted file mode 100644 index d039edaa651..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/test-data/namespaced-helm-crd.yaml +++ /dev/null @@ -1,130 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/1084 - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - name: projecthelmchartrepositories.helm.openshift.io -spec: - group: helm.openshift.io - names: - kind: ProjectHelmChartRepository - listKind: ProjectHelmChartRepositoryList - plural: projecthelmchartrepositories - singular: projecthelmchartrepository - scope: Namespaced - versions: - - name: v1beta1 - served: true - storage: true - subresources: - status: {} - schema: - openAPIV3Schema: - description: "ProjectHelmChartRepository holds namespace-wide configuration for proxied Helm chart repository \n Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer)." - type: object - required: - - spec - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: spec holds user settable values for configuration - type: object - properties: - connectionConfig: - description: Required configuration for connecting to the chart repo - type: object - properties: - ca: - description: ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. It is used as a trust anchor to validate the TLS certificate presented by the remote server. The key "ca-bundle.crt" is used to locate the data. If empty, the default system roots are used. The namespace for this config map is openshift-config. - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced config map - type: string - tlsClientConfig: - description: tlsClientConfig is an optional reference to a secret by name that contains the PEM-encoded TLS client certificate and private key to present when connecting to the server. The key "tls.crt" is used to locate the client certificate. The key "tls.key" is used to locate the private key. The namespace for this secret is openshift-config. - type: object - required: - - name - properties: - name: - description: name is the metadata.name of the referenced secret - type: string - url: - description: Chart repository URL - type: string - maxLength: 2048 - pattern: ^https?:\/\/ - description: - description: Optional human readable repository description, it can be used by UI for displaying purposes - type: string - maxLength: 2048 - minLength: 1 - disabled: - description: If set to true, disable the repo usage in the cluster/namespace - type: boolean - name: - description: Optional associated human readable repository name, it can be used by UI for displaying purposes - type: string - maxLength: 100 - minLength: 1 - status: - description: Observed status of the repository within the namespace.. - type: object - properties: - conditions: - description: conditions is a list of conditions and their statuses - type: array - items: - description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" - type: object - required: - - lastTransitionTime - - message - - reason - - status - - type - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - type: string - format: date-time - message: - description: message is a human readable message indicating details about the transition. This may be an empty string. - type: string - maxLength: 32768 - observedGeneration: - description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. - type: integer - format: int64 - minimum: 0 - reason: - description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. - type: string - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - status: - description: status of the condition, one of True, False, Unknown. - type: string - enum: - - "True" - - "False" - - Unknown - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - type: string - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ diff --git a/frontend/packages/helm-plugin/integration-tests/test-data/red-hat-helm-charts.yaml b/frontend/packages/helm-plugin/integration-tests/test-data/red-hat-helm-charts.yaml deleted file mode 100644 index d6aa4fce2b5..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/test-data/red-hat-helm-charts.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: helm.openshift.io/v1beta1 -kind: HelmChartRepository -metadata: - name: redhat-helm-charts -spec: - connectionConfig: - url: >- - https://redhat-developer.github.io/redhat-helm-charts - name: Red Hat Helm Charts diff --git a/frontend/packages/helm-plugin/integration-tests/tsconfig.json b/frontend/packages/helm-plugin/integration-tests/tsconfig.json deleted file mode 100644 index 51c7f1c3d4a..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "strict": true, - "esModuleInterop": true, - "types": ["cypress"], - "lib": ["es6", "dom", "es2017"] - }, - "include": ["**/*.ts", "./support/commands/index.ts"] -} diff --git a/frontend/yarn.lock b/frontend/yarn.lock index 1b05851fc86..528db46c51b 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -2178,12 +2178,6 @@ __metadata: languageName: node linkType: hard -"@helm-plugin/integration-tests@workspace:packages/helm-plugin/integration-tests": - version: 0.0.0-use.local - resolution: "@helm-plugin/integration-tests@workspace:packages/helm-plugin/integration-tests" - languageName: unknown - linkType: soft - "@humanfs/core@npm:^0.19.2": version: 0.19.2 resolution: "@humanfs/core@npm:0.19.2"