diff --git a/frontend/e2e/pages/delete-helm-release-modal.ts b/frontend/e2e/pages/delete-helm-release-modal.ts new file mode 100644 index 00000000000..3c931a7a45f --- /dev/null +++ b/frontend/e2e/pages/delete-helm-release-modal.ts @@ -0,0 +1,35 @@ +import { expect, type Locator, type Page } from '@playwright/test'; +import BasePage from './base-page'; + +export class DeleteHelmReleaseModal extends BasePage { + private readonly modal: Locator; + private readonly modalTitle: Locator; + private readonly resourceNameDisplay: Locator; + private readonly releaseNameInput: Locator; + private readonly deleteButton: Locator; + + constructor(page: Page) { + super(page); + this.modal = this.page.locator('[role="dialog"]'); + this.modalTitle = this.page.locator('[data-test-id="modal-title"]'); + this.resourceNameDisplay = this.page.getByTestId('resource-name'); + this.releaseNameInput = this.page.locator('#form-input-resourceName-field'); + this.deleteButton = this.page.getByTestId('confirm-action'); + } + + async verifyModalOpen(releaseName: string): Promise { + await expect(this.modalTitle).toContainText('Delete Helm Release?'); + await expect(this.resourceNameDisplay).toHaveText(releaseName); + } + + async enterReleaseName(releaseName: string): Promise { + await this.releaseNameInput.fill(releaseName); + } + + async clickDelete(): Promise { + await this.robustClick(this.deleteButton, { force: true }); + + // Wait for modal to close + await expect(this.modal).not.toBeAttached({ timeout: 10_000 }); + } +} diff --git a/frontend/e2e/pages/helm-details-page.ts b/frontend/e2e/pages/helm-details-page.ts new file mode 100644 index 00000000000..1a696e01a33 --- /dev/null +++ b/frontend/e2e/pages/helm-details-page.ts @@ -0,0 +1,81 @@ +import { expect, type Locator, type Page } from '@playwright/test'; +import BasePage from './base-page'; + +export class HelmDetailsPage extends BasePage { + private readonly title: Locator; + private readonly statusText: Locator; + private readonly detailsTab: Locator; + private readonly resourcesTab: Locator; + private readonly revisionHistoryTab: Locator; + private readonly releaseNotesTab: Locator; + private readonly actionsMenuButton: Locator; + + constructor(page: Page) { + super(page); + this.title = this.page.locator('[data-test-section-heading="Helm Release details"]'); + this.statusText = this.page.getByTestId('helm-release-status-details').getByTestId('status-text'); + this.detailsTab = this.page.locator('[data-test-id="horizontal-link-Details"]'); + this.resourcesTab = this.page.locator('[data-test-id="horizontal-link-Resources"]'); + this.revisionHistoryTab = this.page.getByTestId('horizontal-link-Revision history'); + this.releaseNotesTab = this.page.getByTestId('horizontal-link-Release notes'); + this.actionsMenuButton = this.page.locator('[data-test-id="actions-menu-button"]'); + } + + async verifyTitle(): Promise { + await expect(this.title).toBeVisible(); + } + + async verifyHelmReleaseStatus(): Promise { + await expect(this.statusText).toBeVisible(); + } + + async verifyAllTabs(): Promise { + await expect(this.detailsTab).toBeVisible(); + await expect(this.resourcesTab).toBeVisible(); + await expect(this.revisionHistoryTab).toBeVisible(); + await expect(this.releaseNotesTab).toBeVisible(); + } + + async verifyActionsDropdown(): Promise { + await expect(this.actionsMenuButton).toBeVisible(); + } + + async clickActionsMenu(): Promise { + await this.robustClick(this.actionsMenuButton); + } + + async verifyActionsInActionMenu(): Promise { + const actions = ['Upgrade', 'Rollback', 'Delete Helm Release']; + const actionItems = this.page.locator('[data-test-id="action-items"] li'); + const count = await actionItems.count(); + + for (let i = 0; i < count; i++) { + const text = await actionItems.nth(i).textContent(); + expect(actions).toContain(text?.trim()); + } + } + + async selectAction(action: 'Upgrade' | 'Rollback' | 'Delete Helm Release'): Promise { + const actionLocator = this.page + .locator('[data-test-id="action-items"] li') + .filter({ hasText: action }); + await this.robustClick(actionLocator); + } + + async clickRevisionHistoryTab(): Promise { + await this.robustClick(this.revisionHistoryTab); + } + + async verifyRevisionHistoryStatus(): Promise { + await this.clickRevisionHistoryTab(); + await expect(this.page.locator('[data-test="helm-revision-list"] [data-test="success-icon"]')).toBeVisible(); + } + + async verifyFieldValue(fieldName: string, fieldValue: string): Promise { + const field = this.page + .locator('dl dt') + .filter({ hasText: fieldName }) + .locator('xpath=following-sibling::dd[1]'); + await expect(field).toContainText(fieldValue); + } +} diff --git a/frontend/e2e/pages/helm-install-page.ts b/frontend/e2e/pages/helm-install-page.ts new file mode 100644 index 00000000000..62d04d51129 --- /dev/null +++ b/frontend/e2e/pages/helm-install-page.ts @@ -0,0 +1,99 @@ +import { expect, type Locator, type Page } from '@playwright/test'; +import BasePage from './base-page'; + +export class HelmInstallPage extends BasePage { + private readonly pageTitle: Locator; + private readonly releaseNameInput: Locator; + private readonly formViewRadio: Locator; + private readonly yamlViewRadio: Locator; + private readonly createButton: Locator; + private readonly formSections: Locator; + + constructor(page: Page) { + super(page); + this.pageTitle = this.page.getByRole('heading', { name: /Create Helm Release/i }); + this.releaseNameInput = this.page.locator('[data-test="release-name"]'); + this.formViewRadio = this.page.getByRole('radio', { name: 'Form view' }); + this.yamlViewRadio = this.page.getByRole('radio', { name: 'YAML view' }); + this.createButton = this.page.getByTestId('save-changes'); + this.formSections = this.page.locator('.form-group'); + } + + async verifyPageDisplayed(): Promise { + await expect(this.pageTitle).toBeVisible(); + } + + async verifyDefaultReleaseName(expectedName: string): Promise { + await expect(this.releaseNameInput).toHaveValue(expectedName); + } + + async verifyFormViewSelected(): Promise { + await expect(this.formViewRadio).toBeChecked(); + } + + async verifyYamlViewEnabled(): Promise { + await expect(this.yamlViewRadio).toBeEnabled(); + } + + async verifyFormSectionsDisplayed(): Promise { + const count = await this.formSections.count(); + expect(count).toBeGreaterThan(0); + } + + async enterReleaseName(name: string): Promise { + await this.releaseNameInput.clear(); + await this.releaseNameInput.fill(name); + } + + async clickCreate(): Promise { + await this.robustClick(this.createButton); + // Wait for navigation after creating Helm chart + await this.waitForLoadingComplete(120_000); + } + + async selectYamlView(): Promise { + await this.robustClick(this.yamlViewRadio); + } + + /** + * Complete workflow: Install Helm chart from Software Catalog + */ + async installHelmChartFromCatalog( + chartName: string, + releaseName: string, + namespace: string, + ): Promise { + // Navigate to catalog + await this.goTo(`/catalog/ns/${namespace}`); + await this.waitForLoadingComplete(); + + // Select Helm Charts type + const helmChartsLink = this.page.getByRole('link', { name: /Helm Charts/ }); + await this.robustClick(helmChartsLink); + await this.waitForLoadingComplete(60_000); + + // Search and select chart + const searchInput = this.page.getByPlaceholder(/Filter by keyword/i); + await searchInput.fill(chartName); + await this.waitForLoadingComplete(60_000); + + const chartCard = this.page + .locator('.odc-catalog-tile') + .filter({ hasText: chartName }) + .first(); + await this.robustClick(chartCard); + + // Click Create on sidebar + const createOnSidebar = this.page + .locator('[role="dialog"]') + .getByRole('button', { name: /Create/i }); + await this.robustClick(createOnSidebar); + await this.waitForLoadingComplete(); + + // Enter release name + await this.enterReleaseName(releaseName); + + // Click Create + await this.clickCreate(); + } +} diff --git a/frontend/e2e/pages/helm-releases-page.ts b/frontend/e2e/pages/helm-releases-page.ts new file mode 100644 index 00000000000..3460bd48f89 --- /dev/null +++ b/frontend/e2e/pages/helm-releases-page.ts @@ -0,0 +1,172 @@ +import { expect, type Locator, type Page } from '@playwright/test'; +import BasePage from './base-page'; + +export class HelmReleasesPage extends BasePage { + private readonly emptyStateMessage: Locator; + private readonly catalogLink: Locator; + private readonly helmTable: Locator; + private readonly filterToolbar: Locator; + private readonly filterDropdown: Locator; + private readonly deployedCheckbox: Locator; + private readonly nameFilterInput: Locator; + private readonly statusIcon: Locator; + private readonly statusText: Locator; + private readonly firstKebabButton: Locator; + + constructor(page: Page) { + super(page); + this.emptyStateMessage = this.page.getByRole('heading', { + name: 'No Helm Releases found', + level: 3, + }); + this.catalogLink = this.page.getByRole('link', { + name: /Browse the catalog to discover available Helm Charts/i, + }); + this.helmTable = this.page.locator('table').filter({ hasText: /Name.*Status/ }); + this.filterToolbar = this.page.locator('[data-ouia-component-id="DataViewFilters"]'); + this.filterDropdown = this.filterToolbar.locator('.pf-v6-c-menu-toggle').first(); + this.deployedCheckbox = this.page.locator( + '[data-ouia-component-id="DataViewCheckboxFilter-filter-item-deployed"] input', + ); + this.nameFilterInput = this.page.locator('[aria-label="Filter by name"]'); + this.statusIcon = this.page.getByTestId('success-icon'); + this.statusText = this.page.getByTestId('status-text'); + this.firstKebabButton = this.page.locator('[data-test-id="kebab-button"]').first(); + } + + async navigateToHelmTab(namespace?: string): Promise { + if (namespace) { + // Navigate directly to namespace-specific Helm page + await this.goTo(`/helm/ns/${namespace}`); + await this.waitForLoadingComplete(); + } else { + // First go to console home + await this.goTo('/'); + await this.waitForLoadingComplete(); + + // Navigate via sidebar: Ecosystem > Helm + const ecosystemMenu = this.page.getByRole('button', { name: /Ecosystem/ }); + await this.robustClick(ecosystemMenu); + + const helmLink = this.page.getByRole('link', { name: /^Helm$/ }); + await this.robustClick(helmLink); + await this.waitForLoadingComplete(); + } + } + + async clickHelmReleasesTab(): Promise { + const helmReleasesTab = this.page.locator( + '[data-test-id="horizontal-link-Helm Releases"]', + ); + await this.robustClick(helmReleasesTab, { force: true }); + } + + async verifyEmptyState(): Promise { + await expect(this.emptyStateMessage).toContainText('No Helm Releases found'); + await expect(this.catalogLink).toBeVisible(); + } + + async searchByName(name: string): Promise { + // Open filter dropdown and select Name filter + await this.robustClick(this.filterDropdown); + const nameFilterOption = this.page + .locator('.pf-v6-c-menu__list-item') + .filter({ hasText: 'Name' }); + await this.robustClick(nameFilterOption); + + // Enter search term + await this.nameFilterInput.clear(); + await this.nameFilterInput.fill(name); + } + + async verifyHelmReleasesDisplayed(): Promise { + await expect(this.helmTable).toBeVisible(); + } + + async clickHelmReleaseName(name: string): Promise { + // Scope to the visible table to avoid strict mode violations when multiple namespaces have releases with the same name + const releaseLink = this.helmTable.getByRole('link', { name, exact: true }).first(); + await this.robustClick(releaseLink); + } + + async selectDeployedFilter(): Promise { + // Open status filter dropdown + await this.robustClick(this.filterDropdown); + const statusFilterOption = this.page + .locator('.pf-v6-c-menu__list-item') + .filter({ hasText: 'Status' }); + await this.robustClick(statusFilterOption); + + await this.robustClick(this.page.locator('[data-ouia-component-id="DataViewCheckboxFilter"]')); + + // Check Deployed checkbox + await this.deployedCheckbox.check(); + await expect(this.deployedCheckbox).toBeChecked(); + + // Verify URL contains filter + await expect(this.page).toHaveURL(/status=deployed/); + } + + async verifyDeployedFilterChecked(): Promise { + await expect(this.deployedCheckbox).toBeChecked(); + } + + async verifyHelmChartsListed(): Promise { + await expect(this.helmTable).toBeVisible(); + const rowCount = await this.helmTable.locator('tbody tr').count(); + expect(rowCount).toBeGreaterThan(0); + } + + async verifyHelmChartStatus(): Promise { + await expect(this.statusIcon).toBeVisible(); + await expect(this.statusText).toBeAttached(); + } + + async verifyStatusInHelmReleasesTable(helmReleaseName: string): Promise { + await expect(this.helmTable).toBeAttached(); + const row = this.helmTable + .locator('tr') + .filter({ hasText: helmReleaseName }) + .first(); + const statusButton = row.locator('td:nth-child(4) button'); + await this.robustClick(statusButton); + } + + async openKebabMenu(): Promise { + await expect(this.helmTable).toBeAttached(); + await this.robustClick(this.firstKebabButton); + } + + async selectKebabAction(action: 'Upgrade' | 'Rollback' | 'Delete Helm Release'): Promise { + const actionLocatorMap = { + Upgrade: '[data-test-action="Upgrade"]', + Rollback: '[data-test-action="Rollback"]', + 'Delete Helm Release': '[data-test-action="Delete Helm Release"]', + }; + const actionLocator = this.page.locator(actionLocatorMap[action]); + await this.robustClick(actionLocator); + } + + async verifyFilterDropdownItems( + item1: string, + item2: string, + item3: string, + ): Promise { + await this.robustClick(this.filterDropdown); + await this.robustClick(this.page.locator('.pf-v6-c-menu__list-item').filter({ hasText: 'Status' })); + await this.robustClick(this.page.locator('[data-ouia-component-id="DataViewCheckboxFilter"]')); + const pendingInstall = this.page.locator( + '[data-ouia-component-id="DataViewCheckboxFilter-filter-item-pending-install"]', + ); + const pendingUpgrade = this.page.locator( + '[data-ouia-component-id="DataViewCheckboxFilter-filter-item-pending-upgrade"]', + ); + const pendingRollback = this.page.locator( + '[data-ouia-component-id="DataViewCheckboxFilter-filter-item-pending-rollback"]', + ); + + await expect(pendingInstall).toContainText(item1); + await expect(pendingUpgrade).toContainText(item2); + await expect(pendingRollback).toContainText(item3); + } +} diff --git a/frontend/e2e/pages/helm-rollback-page.ts b/frontend/e2e/pages/helm-rollback-page.ts new file mode 100644 index 00000000000..c259ba3c0be --- /dev/null +++ b/frontend/e2e/pages/helm-rollback-page.ts @@ -0,0 +1,30 @@ +import { expect, type Locator, type Page } from '@playwright/test'; +import BasePage from './base-page'; + +export class HelmRollbackPage extends BasePage { + private readonly pageTitle: Locator; + private readonly revisionRadioButtons: Locator; + private readonly rollbackButton: Locator; + + constructor(page: Page) { + super(page); + this.pageTitle = this.page.getByRole('heading', { name: /Rollback Helm Release/i }); + this.revisionRadioButtons = this.page.locator('[id^="form-radiobutton-revision"]'); + this.rollbackButton = this.page.getByRole('button', { name: 'Rollback' }); + } + + async verifyTitle(): Promise { + await expect(this.pageTitle).toBeVisible(); + } + + async selectPreviousRevision(): Promise { + const count = await this.revisionRadioButtons.count(); + // Select the last revision (previous version) + await this.revisionRadioButtons.nth(count - 1).check(); + } + + async clickRollback(): Promise { + await this.robustClick(this.rollbackButton); + await this.waitForLoadingComplete(40_000); + } +} diff --git a/frontend/e2e/pages/helm-upgrade-page.ts b/frontend/e2e/pages/helm-upgrade-page.ts new file mode 100644 index 00000000000..0293a888975 --- /dev/null +++ b/frontend/e2e/pages/helm-upgrade-page.ts @@ -0,0 +1,61 @@ +import { expect, type Locator, type Page } from '@playwright/test'; +import BasePage from './base-page'; + +export class HelmUpgradePage extends BasePage { + private readonly pageTitle: Locator; + private readonly chartVersionDropdown: Locator; + private readonly chartVersionOptions: Locator; + private readonly upgradeButton: Locator; + private readonly replicaCountInput: Locator; + + constructor(page: Page) { + super(page); + this.pageTitle = this.page.getByRole('heading', { name: /Upgrade Helm Release/i }); + this.chartVersionDropdown = this.page.locator('#form-dropdown-chartVersion-field'); + this.chartVersionOptions = this.page.getByTestId('console-select-item'); + this.upgradeButton = this.page.getByTestId('save-changes'); + this.replicaCountInput = this.page.locator('[data-test="replica-count-field"]'); + } + + async verifyTitle(): Promise { + await expect(this.pageTitle).toBeVisible(); + } + + async updateReplicaCount(count: string): Promise { + await this.replicaCountInput.clear(); + await this.replicaCountInput.fill(count); + } + + async selectDifferentChartVersion(): Promise { + // Wait for dropdown to be enabled + await expect(this.chartVersionDropdown).toBeEnabled({ timeout: 10_000 }); + + // Click to open dropdown + await this.robustClick(this.chartVersionDropdown); + + // Get count of available versions + // const count = await this.chartVersionOptions.count(); + + // Select a random version (but not the first one which might be current) + // const randomIndex = Math.floor(Math.random() * (count - 1)) + 1; + await this.robustClick(this.chartVersionOptions.nth(0)); + } + + async confirmChartVersionChange(): Promise { + // Handle the warning modal + const modalTitle = this.page.locator('[role="dialog"] h1.pf-v6-c-modal-box__title'); + await expect(modalTitle).toContainText('Change chart version?'); + + const confirmButton = this.page + .locator('[role="dialog"] [data-ouia-component-id="HelmChangeChartVersionConfirmation-confirm-button"]'); + await this.robustClick(confirmButton); + } + + async clickUpgrade(): Promise { + await this.robustClick(this.upgradeButton); + + // Wait for progress indicator to disappear + const progressIndicator = this.page.locator('.pf-v6-c-button__progress'); + await expect(progressIndicator).not.toBeAttached({ timeout: 120_000 }); + } +} diff --git a/frontend/e2e/pages/software-catalog-page.ts b/frontend/e2e/pages/software-catalog-page.ts new file mode 100644 index 00000000000..3341a0d0d5c --- /dev/null +++ b/frontend/e2e/pages/software-catalog-page.ts @@ -0,0 +1,60 @@ +import { expect, type Locator, type Page } from '@playwright/test'; +import BasePage from './base-page'; + +export class SoftwareCatalogPage extends BasePage { + private readonly catalogTitle: Locator; + private readonly helmChartsTypeButton: Locator; + private readonly searchInput: Locator; + private readonly catalogCards: Locator; + + constructor(page: Page) { + super(page); + this.catalogTitle = this.page.getByRole('heading', { name: /Software Catalog/i }); + this.helmChartsTypeButton = this.page.getByRole('link', { name: /Helm Charts/ }); + this.searchInput = this.page.getByPlaceholder(/Filter by keyword/i); + this.catalogCards = this.page.locator('.odc-catalog-tile'); + } + + async navigateToCatalog(namespace?: string): Promise { + if (namespace) { + await this.goTo(`/catalog/ns/${namespace}`); + } else { + await this.goTo('/catalog/all-namespaces'); + } + await this.waitForLoadingComplete(); + } + + async verifyTitle(): Promise { + await expect(this.catalogTitle).toBeVisible(); + } + + async selectHelmChartsType(): Promise { + await this.robustClick(this.helmChartsTypeButton); + await this.waitForLoadingComplete(60_000); + } + + async isCardsDisplayed(): Promise { + await expect(this.catalogCards.first()).toBeVisible({ timeout: 60_000 }); + } + + async searchAndSelectChart(chartName: string): Promise { + await this.searchInput.fill(chartName); + await this.waitForLoadingComplete(); + + const chartCard = this.catalogCards.filter({ hasText: chartName }).first(); + await this.robustClick(chartCard); + } + + async clickButtonOnCatalogPageSidePane(): Promise { + const createButton = this.page + .locator('[role="dialog"]') + .getByRole('button', { name: /Create/i }); + await this.robustClick(createButton); + } + + async clickCreateButton(): Promise { + const createButton = this.page.getByRole('button', { name: 'Create' }); + await this.robustClick(createButton); + await this.waitForLoadingComplete(); + } +} diff --git a/frontend/e2e/pages/topology-page.ts b/frontend/e2e/pages/topology-page.ts new file mode 100644 index 00000000000..de060befb2d --- /dev/null +++ b/frontend/e2e/pages/topology-page.ts @@ -0,0 +1,111 @@ +import { expect, type Locator, type Page } from '@playwright/test'; +import BasePage from './base-page'; + +export class TopologyPage extends BasePage { + private readonly topologyView: Locator; + private readonly emptyState: Locator; + private readonly topology: Locator; + private readonly searchInput: Locator; + private readonly graphViewSwitcher: Locator; + private readonly resetView: Locator; + private readonly fitToScreen: Locator; + private readonly highlightedNode: Locator; + + constructor(page: Page) { + super(page); + this.topologyView = this.page.locator('[data-test-id="topology"]'); + this.emptyState = this.page.locator('[data-test="topology-empty-state"]'); + this.topology = this.page.locator('[data-id="odc-topology-graph"]'); + this.searchInput = this.page.locator('[data-test-id="item-filter"]'); + this.graphViewSwitcher = this.page.locator( + '[data-test-id="topology-switcher-view"][aria-label="Graph view"]', + ); + this.resetView = this.page.locator('#reset-view'); + this.fitToScreen = this.page.locator('#fit-to-screen'); + this.highlightedNode = this.page.locator('.is-filtered').first(); + } + + async navigateToTopology(namespace?: string): Promise { + const url = namespace ? `/topology/ns/${namespace}` : '/topology'; + await this.goTo(url); + await this.waitForLoadingComplete(10_000); + } + + async verifyTopologyPage(): Promise { + await expect(this.topologyView.or(this.emptyState)).toBeVisible({ timeout: 30_000 }); + } + + /** Migrated from topologyHelper.verifyWorkloadInTopologyPage (Cypress). */ + private async verifyTopologyPageNotEmpty(timeout = 60_000): Promise { + await expect(this.topology).toBeVisible({ timeout }); + await expect(this.topology.getByTestId('no-resources-found')).not.toBeAttached(); + } + + private async searchTopology(name: string): Promise { + await this.searchInput.clear(); + await this.searchInput.fill(name); + } + + private async ensureGraphView(): Promise { + if ((await this.graphViewSwitcher.count()) > 0) { + await this.robustClick(this.graphViewSwitcher); + } + } + + async verifyWorkloadInTopologyPage( + workloadName: string, + options?: { timeout?: number }, + ): Promise { + const timeout = options?.timeout ?? 60_000; + await this.verifyTopologyPageNotEmpty(timeout); + await this.searchTopology(workloadName); + await this.ensureGraphView(); + await this.robustClick(this.resetView); + await this.robustClick(this.fitToScreen); + await expect(this.highlightedNode).toBeVisible({ timeout }); + await this.waitForLoadingComplete(); + } + + async clickWorkload(workloadName: string): Promise { + await this.waitForLoadingComplete(); + const workloadNode = this.page.locator('.odc-base-node__label', { hasText: workloadName }); + await workloadNode.scrollIntoViewIfNeeded(); + await this.robustClick(workloadNode); + } + + async rightClickWorkload(workloadName: string): Promise { + // const workloadNode = this.page + await this.waitForLoadingComplete(); + await this.searchTopology(workloadName); + await this.ensureGraphView(); + await this.robustClick(this.resetView); + await this.robustClick(this.fitToScreen); + const workloadNode = this.page.locator('.is-filtered').nth(1).locator('.pf-topology__node__action-icon__icon > .pf-v6-svg > .pf-v6-icon-rh-ui').first(); + await workloadNode.scrollIntoViewIfNeeded(); + await this.robustClick(workloadNode); + } + + async verifyContextMenu(): Promise { + const contextMenu = this.page.locator('.odc-topology-context-menu'); + await expect(contextMenu).toBeVisible(); + } + + async verifyContextMenuActions(actions: string[]): Promise { + for (const action of actions) { + const actionLocator = this.page.locator(`[data-test-action="${action}"]`); + await expect(actionLocator).toBeVisible(); + } + } + + async selectContextMenuAction(action: string): Promise { + const actionLocator = this.page.locator(`[data-test-action="${action}"]`); + await this.robustClick(actionLocator); + } + + async clickOnGroup(groupName: string): Promise { + const group = this.page + .locator('[data-type="group"]') + .filter({ hasText: groupName }); + await this.robustClick(group); + } +} diff --git a/frontend/e2e/pages/topology-sidebar-page.ts b/frontend/e2e/pages/topology-sidebar-page.ts new file mode 100644 index 00000000000..e2b9e44bfa4 --- /dev/null +++ b/frontend/e2e/pages/topology-sidebar-page.ts @@ -0,0 +1,75 @@ +import { expect, type Locator, type Page } from '@playwright/test'; +import BasePage from './base-page'; + +export class TopologySidebarPage extends BasePage { + private readonly sidebar: Locator; + private readonly actionsDropdown: Locator; + private readonly detailsTab: Locator; + private readonly resourcesTab: Locator; + private readonly releaseNotesTab: Locator; + + constructor(page: Page) { + super(page); + this.sidebar = this.page.getByTestId('topology-sidepane'); + this.actionsDropdown = this.page.getByTestId('actions-menu-button'); + this.detailsTab = this.page.getByTestId('horizontal-link-Details'); + this.resourcesTab = this.page.getByTestId('horizontal-link-Resources'); + this.releaseNotesTab = this.page.getByTestId('horizontal-link-Release notes'); + } + + async verifySidebarOpen(): Promise { + await expect(this.sidebar).toBeVisible(); + } + + async verifyTabs(): Promise { + await expect(this.detailsTab).toBeVisible(); + await expect(this.resourcesTab).toBeVisible(); + await expect(this.releaseNotesTab).toBeVisible(); + } + + async clickActionsDropdown(): Promise { + await this.robustClick(this.actionsDropdown); + // Wait for the dropdown menu to open + await this.page.locator('[data-test-id="action-items"]').waitFor({ state: 'visible', timeout: 10_000 }); + } + + async verifyActions(...actions: string[]): Promise { + const actionItems = this.page.locator('[data-test-id="action-items"] li'); + + for (const action of actions) { + const actionItem = actionItems.filter({ hasText: action }); + await expect(actionItem).toBeVisible({ timeout: 30_000 }); + } + } + + async selectAction(action: string): Promise { + const actionLocator = this.page.locator(`[data-test-action="${action}"]`); + // Wait for the action to be visible in the dropdown menu + await actionLocator.waitFor({ state: 'visible', timeout: 30_000 }); + await this.robustClick(actionLocator); + } + + async selectTab(tabName: string): Promise { + const tab = this.page.locator(`[data-test="horizontal-link-${tabName}"]`); + await this.robustClick(tab); + } + + async selectResource(resource: string, helmRelease: string): Promise { + const resourceLink = this.page.locator(`[data-test="${helmRelease}-${resource}"]`); + await this.robustClick(resourceLink); + } + + async verifyResourceDetailsPage( + resource: string, + namespace: string, + helmRelease: string, + options: { urlPattern: RegExp; sectionHeading: string }, + ): Promise { + await this.selectTab('Resources'); + await this.selectResource(resource, helmRelease); + await expect(this.page).toHaveURL(options.urlPattern); + await expect( + this.page.locator(`[data-test-section-heading="${options.sectionHeading}"]`), + ).toBeVisible({ timeout: 30_000 }); + } +} 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..e7d60bd46f2 --- /dev/null +++ b/frontend/e2e/tests/helm/helm-release.spec.ts @@ -0,0 +1,554 @@ +import { test, expect } from '../../fixtures'; +import { HelmReleasesPage } from '../../pages/helm-releases-page'; +import { HelmDetailsPage } from '../../pages/helm-details-page'; +import { SoftwareCatalogPage } from '../../pages/software-catalog-page'; +import { HelmInstallPage } from '../../pages/helm-install-page'; +import { TopologyPage } from '../../pages/topology-page'; +import { TopologySidebarPage } from '../../pages/topology-sidebar-page'; +import { HelmUpgradePage } from '../../pages/helm-upgrade-page'; +import { HelmRollbackPage } from '../../pages/helm-rollback-page'; +import { DeleteHelmReleaseModal } from '../../pages/delete-helm-release-modal'; +// KubernetesClient is available via k8sClient fixture + +/* eslint-disable playwright/expect-expect */ +// Note: Assertions are in page object methods (verifyEmptyState, verifyTitle, etc.) +test.describe('Helm Release', { tag: ['@helm', '@smoke'] }, () => { + test('Open the Helm tab when helm charts are absent: HR-05-TC01', async ({ + page, + cleanup, + k8sClient, + }) => { + const namespace = `aut-helm-${Date.now()}`; + + await test.step('Create empty namespace', async () => { + await k8sClient.createNamespace(namespace); + cleanup.trackNamespace(namespace); + }); + + await test.step('Navigate to Helm Release tab in new namespace', async () => { + const helmPage = new HelmReleasesPage(page); + await helmPage.navigateToHelmTab(namespace); + }); + + await test.step('Verify empty state message and catalog link', async () => { + const helmPage = new HelmReleasesPage(page); + await helmPage.verifyEmptyState(); + }); + }); + + test('Create Helm Release page details: HR-05-TC02', async ({ page, cleanup, k8sClient }) => { + const namespace = `aut-helm-${Date.now()}`; + + await test.step('Create namespace', async () => { + await k8sClient.createNamespace(namespace); + cleanup.trackNamespace(namespace); + }); + + await test.step('Navigate to Software Catalog', async () => { + const catalogPage = new SoftwareCatalogPage(page); + await catalogPage.navigateToCatalog(namespace); + await catalogPage.verifyTitle(); + }); + + await test.step('Select Helm Charts type', async () => { + const catalogPage = new SoftwareCatalogPage(page); + await catalogPage.selectHelmChartsType(); + await catalogPage.isCardsDisplayed(); + }); + + await test.step('Search and select Nodejs chart', async () => { + const catalogPage = new SoftwareCatalogPage(page); + await catalogPage.searchAndSelectChart('Nodejs'); + }); + + await test.step('Click Create button on sidebar', async () => { + const catalogPage = new SoftwareCatalogPage(page); + await catalogPage.clickButtonOnCatalogPageSidePane(); + }); + + await test.step('Verify Create Helm Release page details', async () => { + const installPage = new HelmInstallPage(page); + await installPage.verifyPageDisplayed(); + await installPage.verifyDefaultReleaseName('nodejs'); + await installPage.verifyFormViewSelected(); + await installPage.verifyYamlViewEnabled(); + }); + }); + + test('Install Helm Chart from Software Catalog using Form View: HR-06-TC04', async ({ + page, + cleanup, + k8sClient, + }) => { + const namespace = `aut-helm-${Date.now()}`; + const releaseName = 'nodejs-release'; + + await test.step('Create namespace', async () => { + await k8sClient.createNamespace(namespace); + cleanup.trackNamespace(namespace); + }); + + await test.step('Install Nodejs Helm chart', async () => { + const installPage = new HelmInstallPage(page); + await installPage.installHelmChartFromCatalog('Nodejs', releaseName, namespace); + }); + + await test.step('Verify redirected to Topology page', async () => { + const topologyPage = new TopologyPage(page); + await topologyPage.verifyTopologyPage(); + }); + + await test.step('Verify helm chart workload in Topology', async () => { + const topologyPage = new TopologyPage(page); + await topologyPage.verifyWorkloadInTopologyPage(releaseName); + }); + }); + + test('Helm release status verification: HR-01-TC04', async ({ page, cleanup, k8sClient }) => { + const namespace = `aut-helm-${Date.now()}`; + const releaseName = 'nodejs-release'; + + await test.step('Create namespace and install Helm chart', async () => { + await k8sClient.createNamespace(namespace); + cleanup.trackNamespace(namespace); + + const installPage = new HelmInstallPage(page); + await installPage.installHelmChartFromCatalog('Nodejs', releaseName, namespace); + }); + + await test.step('Navigate to Helm Release tab', async () => { + const helmPage = new HelmReleasesPage(page); + await helmPage.navigateToHelmTab(); + await helmPage.clickHelmReleasesTab(); + }); + + await test.step('Verify helm release is visible in list', async () => { + const helmPage = new HelmReleasesPage(page); + await helmPage.searchByName(releaseName); + await helmPage.verifyHelmReleasesDisplayed(); + }); + + await test.step('Verify status icon in helm releases table', async () => { + const helmPage = new HelmReleasesPage(page); + await helmPage.verifyHelmChartStatus(); + }); + + await test.step('Verify filter bar options', async () => { + const helmPage = new HelmReleasesPage(page); + await helmPage.verifyFilterDropdownItems( + 'PendingInstall', + 'PendingUpgrade', + 'PendingRollback', + ); + }); + + await test.step('Click helm release name', async () => { + const helmPage = new HelmReleasesPage(page); + await helmPage.clickHelmReleaseName(releaseName); + }); + + await test.step('Verify status in details page title and details tab', async () => { + const detailsPage = new HelmDetailsPage(page); + await detailsPage.verifyTitle(); + await detailsPage.verifyHelmReleaseStatus(); + }); + + await test.step('Verify status in Revision history tab', async () => { + const detailsPage = new HelmDetailsPage(page); + await detailsPage.verifyRevisionHistoryStatus(); + }); + }); + + test('Context menu options of helm release: HR-01-TC01', async ({ page, cleanup, k8sClient }) => { + const namespace = `aut-helm-${Date.now()}`; + const releaseName = 'nodejs-release'; + + await test.step('Create namespace and install Helm chart', async () => { + await k8sClient.createNamespace(namespace); + cleanup.trackNamespace(namespace); + + const installPage = new HelmInstallPage(page); + await installPage.installHelmChartFromCatalog('Nodejs', releaseName, namespace); + }); + + await test.step('Navigate to Topology page', async () => { + const topologyPage = new TopologyPage(page); + await topologyPage.navigateToTopology(namespace); + }); + + await test.step('Right-click helm release to open context menu', async () => { + const topologyPage = new TopologyPage(page); + await topologyPage.rightClickWorkload(releaseName); + }); + + await test.step('Verify context menu actions', async () => { + const topologyPage = new TopologyPage(page); + await topologyPage.verifyContextMenu(); + await topologyPage.verifyContextMenuActions(['Upgrade', 'Delete Helm Release']); + }); + }); + + test('Open the Helm tab when helm charts are present: HR-05-TC05', async ({ + page, + cleanup, + k8sClient, + }) => { + const namespace = `aut-helm-${Date.now()}`; + const releaseName = 'nodejs-release'; + + await test.step('Create namespace and install Helm chart', async () => { + await k8sClient.createNamespace(namespace); + cleanup.trackNamespace(namespace); + + const installPage = new HelmInstallPage(page); + await installPage.installHelmChartFromCatalog('Nodejs', releaseName, namespace); + }); + + await test.step('Navigate to Helm Release tab', async () => { + const helmPage = new HelmReleasesPage(page); + await helmPage.navigateToHelmTab(); + await helmPage.clickHelmReleasesTab(); + }); + + await test.step('Verify helm charts are listed', async () => { + const helmPage = new HelmReleasesPage(page); + await helmPage.verifyHelmChartsListed(); + }); + }); + + test('Filter out deployed Helm Charts: HR-05-TC06', async ({ page, cleanup, k8sClient }) => { + const namespace = `aut-helm-${Date.now()}`; + const releaseName = 'nodejs-release'; + + await test.step('Create namespace and install Helm chart', async () => { + await k8sClient.createNamespace(namespace); + cleanup.trackNamespace(namespace); + + const installPage = new HelmInstallPage(page); + await installPage.installHelmChartFromCatalog('Nodejs', releaseName, namespace); + }); + + await test.step('Navigate to Helm Release tab', async () => { + const helmPage = new HelmReleasesPage(page); + await helmPage.navigateToHelmTab(); + await helmPage.clickHelmReleasesTab(); + }); + + await test.step('Select Deployed filter', async () => { + const helmPage = new HelmReleasesPage(page); + await helmPage.selectDeployedFilter(); + }); + + await test.step('Verify Deployed checkbox is checked', async () => { + const helmPage = new HelmReleasesPage(page); + await helmPage.verifyDeployedFilterChecked(); + }); + + await test.step('Verify only Deployed helm charts are listed', async () => { + const helmPage = new HelmReleasesPage(page); + await helmPage.verifyHelmChartsListed(); + }); + }); + + test('Helm release details page: HR-05-TC13', async ({ page, cleanup, k8sClient }) => { + const namespace = `aut-helm-${Date.now()}`; + const releaseName = 'nodejs-release'; + + await test.step('Create namespace and install Helm chart', async () => { + await k8sClient.createNamespace(namespace); + cleanup.trackNamespace(namespace); + + const installPage = new HelmInstallPage(page); + await installPage.installHelmChartFromCatalog('Nodejs', releaseName, namespace); + }); + + await test.step('Navigate to Helm Release tab and click release name', async () => { + const helmPage = new HelmReleasesPage(page); + await helmPage.navigateToHelmTab(); + await helmPage.clickHelmReleasesTab(); + await helmPage.clickHelmReleaseName(releaseName); + }); + + await test.step('Verify Details page opened', async () => { + const detailsPage = new HelmDetailsPage(page); + await detailsPage.verifyTitle(); + }); + + await test.step('Verify all tabs are visible', async () => { + const detailsPage = new HelmDetailsPage(page); + await detailsPage.verifyAllTabs(); + }); + + await test.step('Verify Actions dropdown menu', async () => { + const detailsPage = new HelmDetailsPage(page); + await detailsPage.verifyActionsDropdown(); + }); + + await test.step('Verify Actions menu options', async () => { + const detailsPage = new HelmDetailsPage(page); + await detailsPage.clickActionsMenu(); + await detailsPage.verifyActionsInActionMenu(); + }); + }); + + test('Perform Upgrade action on Helm Release through Context Menu: HR-08-TC04', async ({ + page, + cleanup, + k8sClient, + }) => { + const namespace = `aut-helm-${Date.now()}`; + const releaseName = 'nodejs-release'; + + await test.step('Create namespace and install Helm chart', async () => { + await k8sClient.createNamespace(namespace); + cleanup.trackNamespace(namespace); + + const installPage = new HelmInstallPage(page); + await installPage.installHelmChartFromCatalog('Nodejs', releaseName, namespace); + }); + + await test.step('Navigate to Topology and right-click helm release', async () => { + const topologyPage = new TopologyPage(page); + await topologyPage.navigateToTopology(namespace); + await topologyPage.rightClickWorkload(releaseName); + }); + + await test.step('Select Upgrade action from context menu', async () => { + const topologyPage = new TopologyPage(page); + await topologyPage.selectContextMenuAction('Upgrade'); + }); + + await test.step('Upgrade chart version', async () => { + const upgradePage = new HelmUpgradePage(page); + await upgradePage.selectDifferentChartVersion(); + await upgradePage.confirmChartVersionChange(); + }); + + await test.step('Click Upgrade button', async () => { + const upgradePage = new HelmUpgradePage(page); + await upgradePage.clickUpgrade(); + }); + + await test.step('Verify redirected to Topology page', async () => { + const topologyPage = new TopologyPage(page); + await topologyPage.verifyTopologyPage(); + }); + }); + + test('Actions menu on Helm page after helm chart upgrade: HR-08-TC01', async ({ + page, + cleanup, + k8sClient, + }) => { + const namespace = `aut-helm-${Date.now()}`; + const releaseName = 'nodejs-release'; + + await test.step('Create namespace and install Helm chart', async () => { + await k8sClient.createNamespace(namespace); + cleanup.trackNamespace(namespace); + + const installPage = new HelmInstallPage(page); + await installPage.installHelmChartFromCatalog('Nodejs', releaseName, namespace); + }); + + await test.step('Upgrade helm chart', async () => { + const topologyPage = new TopologyPage(page); + await topologyPage.navigateToTopology(namespace); + await topologyPage.rightClickWorkload(releaseName); + await topologyPage.selectContextMenuAction('Upgrade'); + + const upgradePage = new HelmUpgradePage(page); + await upgradePage.selectDifferentChartVersion(); + await upgradePage.confirmChartVersionChange(); + await upgradePage.clickUpgrade(); + }); + + await test.step('Navigate to Helm page', async () => { + const helmPage = new HelmReleasesPage(page); + await helmPage.navigateToHelmTab(); + await helmPage.searchByName(releaseName); + }); + + await test.step('Click Kebab menu', async () => { + const helmPage = new HelmReleasesPage(page); + await helmPage.openKebabMenu(); + }); + + await test.step('Verify Actions menu options', async () => { + const sidebar = new TopologySidebarPage(page); + await sidebar.verifyActions('Upgrade', 'Rollback', 'Delete Helm Release'); + }); + }); + + test('Perform the helm chart upgrade for already upgraded helm chart: HR-08-TC02', async ({ + page, + cleanup, + k8sClient, + }) => { + const namespace = `aut-helm-${Date.now()}`; + const releaseName = 'nodejs-release'; + + await test.step('Create namespace and install Helm chart', async () => { + await k8sClient.createNamespace(namespace); + cleanup.trackNamespace(namespace); + + const installPage = new HelmInstallPage(page); + await installPage.installHelmChartFromCatalog('Nodejs', releaseName, namespace); + }); + + await test.step('Upgrade helm chart (first time)', async () => { + const topologyPage = new TopologyPage(page); + await topologyPage.navigateToTopology(namespace); + await topologyPage.rightClickWorkload(releaseName); + await topologyPage.selectContextMenuAction('Upgrade'); + + const upgradePage = new HelmUpgradePage(page); + await upgradePage.selectDifferentChartVersion(); + await upgradePage.confirmChartVersionChange(); + await upgradePage.clickUpgrade(); + }); + + await test.step('Navigate to Helm page and open Kebab menu', async () => { + const helmPage = new HelmReleasesPage(page); + await helmPage.navigateToHelmTab(); + await helmPage.searchByName(releaseName); + await helmPage.openKebabMenu(); + }); + + await test.step('Click Upgrade action', async () => { + const helmPage = new HelmReleasesPage(page); + await helmPage.selectKebabAction('Upgrade'); + }); + + await test.step('Upgrade chart version (second time)', async () => { + const upgradePage = new HelmUpgradePage(page); + await upgradePage.selectDifferentChartVersion(); + await upgradePage.confirmChartVersionChange(); + }); + + await test.step('Click Upgrade button', async () => { + const upgradePage = new HelmUpgradePage(page); + await upgradePage.clickUpgrade(); + }); + + await test.step('Verify redirected to Helm Releases page', async () => { + await expect(page.locator('[data-test-id="helm-nav"]')).toBeVisible(); + }); + }); + + test('Perform Rollback action on Helm Release through Context Menu: HR-08-TC03', async ({ + page, + cleanup, + k8sClient, + }) => { + // SKIP REASON: Rollback action not appearing in sidebar Actions dropdown after helm upgrade. + // The selector [data-test-action="Rollback"] is correct (verified against Cypress PO), + // but the action doesn't become available even after 30s timeout. This appears to be a + // functional/timing issue where Rollback may require additional conditions or state changes + // after an upgrade before it becomes available in the UI. + const namespace = `aut-helm-${Date.now()}`; + const releaseName = 'nodejs-release'; + + await test.step('Create namespace and install Helm chart', async () => { + await k8sClient.createNamespace(namespace); + cleanup.trackNamespace(namespace); + + const installPage = new HelmInstallPage(page); + await installPage.installHelmChartFromCatalog('Nodejs', releaseName, namespace); + }); + + await test.step('Upgrade helm chart to create a revision', async () => { + const topologyPage = new TopologyPage(page); + await topologyPage.navigateToTopology(namespace); + await topologyPage.rightClickWorkload(releaseName); + await topologyPage.selectContextMenuAction('Upgrade'); + + const upgradePage = new HelmUpgradePage(page); + await upgradePage.selectDifferentChartVersion(); + await upgradePage.confirmChartVersionChange(); + await upgradePage.clickUpgrade(); + }); + + await test.step('Navigate to Topology and open sidebar', async () => { + const topologyPage = new TopologyPage(page); + await topologyPage.navigateToTopology(namespace); + // Wait for the workload to be visible after upgrade + await topologyPage.verifyWorkloadInTopologyPage(releaseName); + await topologyPage.page.getByTestId('success-icon').waitFor({ state: 'visible', timeout: 20_000 }); + await topologyPage.clickWorkload(releaseName); + }); + + await test.step('Verify sidebar and click Actions dropdown', async () => { + const sidebar = new TopologySidebarPage(page); + await sidebar.verifySidebarOpen(); + await sidebar.clickActionsDropdown(); + }); + + await test.step('Select Rollback action', async () => { + const sidebar = new TopologySidebarPage(page); + await sidebar.selectAction('Rollback'); + }); + + await test.step('Select previous revision', async () => { + const rollbackPage = new HelmRollbackPage(page); + await rollbackPage.selectPreviousRevision(); + }); + + await test.step('Click Rollback button', async () => { + const rollbackPage = new HelmRollbackPage(page); + await rollbackPage.clickRollback(); + }); + + await test.step('Verify redirected to Topology page', async () => { + const topologyPage = new TopologyPage(page); + await topologyPage.verifyTopologyPage(); + }); + }); + + test('Delete Helm Release through Context Menu: HR-01-TC03', async ({ page, cleanup, k8sClient }) => { + const namespace = `aut-helm-${Date.now()}`; + const releaseName = 'nodejs-release'; + + await test.step('Create namespace and install Helm chart', async () => { + await k8sClient.createNamespace(namespace); + cleanup.trackNamespace(namespace); + + const installPage = new HelmInstallPage(page); + await installPage.installHelmChartFromCatalog('Nodejs', releaseName, namespace); + }); + + await test.step('Navigate to Topology and right-click helm release', async () => { + const topologyPage = new TopologyPage(page); + await topologyPage.navigateToTopology(namespace); + await topologyPage.rightClickWorkload(releaseName); + }); + + await test.step('Select Delete Helm Release action', async () => { + const topologyPage = new TopologyPage(page); + await topologyPage.selectContextMenuAction('Delete Helm Release'); + }); + + await test.step('Enter release name in confirmation modal', async () => { + const deleteModal = new DeleteHelmReleaseModal(page); + await deleteModal.verifyModalOpen(releaseName); + await deleteModal.enterReleaseName(releaseName); + }); + + await test.step('Click Delete button', async () => { + const deleteModal = new DeleteHelmReleaseModal(page); + await deleteModal.clickDelete(); + }); + + await test.step('Verify redirected to Topology page', async () => { + const topologyPage = new TopologyPage(page); + await topologyPage.verifyTopologyPage(); + }); + + await test.step('Verify helm release is removed from Topology', async () => { + const workloadLocator = page + .locator('[data-test="topology-node"]') + .filter({ hasText: releaseName }); + await expect(workloadLocator).not.toBeAttached({ timeout: 30_000 }); + }); + }); +}); diff --git a/frontend/e2e/tests/helm/topology-helm-sidebar.spec.ts b/frontend/e2e/tests/helm/topology-helm-sidebar.spec.ts new file mode 100644 index 00000000000..440b08115b5 --- /dev/null +++ b/frontend/e2e/tests/helm/topology-helm-sidebar.spec.ts @@ -0,0 +1,73 @@ +import { test } from '../../fixtures'; +import { TopologyPage } from '../../pages/topology-page'; +import { TopologySidebarPage } from '../../pages/topology-sidebar-page'; +import { HelmInstallPage } from '../../pages/helm-install-page'; + +const RELEASE_NAME = 'nodejs-release'; + +const HELM_SIDEBAR_RESOURCE_LINKS = [ + { + resource: 'Deployment', + urlSegment: 'deployments', + sectionHeading: 'Deployment details', + }, + { + resource: 'BuildConfig', + urlSegment: 'buildconfigs', + sectionHeading: 'BuildConfig details', + }, + { + resource: 'Service', + urlSegment: 'services', + sectionHeading: 'Service details', + }, + { + resource: 'ImageStream', + urlSegment: 'imagestreams', + sectionHeading: 'ImageStream details', + }, + { + resource: 'Route', + urlSegment: 'routes', + sectionHeading: 'Route details', + }, +] as const; + +test.describe('Actions on Helm release in topology page', { tag: ['@helm'] }, () => { + /* eslint-disable playwright/expect-expect -- assertions live in TopologySidebarPage */ + test( + 'Helm release sidebar and Resources tab links: HR-07-TC01–TC06', + { tag: ['@smoke', '@regression'] }, + async ({ page, cleanup, k8sClient }) => { + const namespace = `aut-helm-${Date.now()}`; + const topologyPage = new TopologyPage(page); + const sidebar = new TopologySidebarPage(page); + + await test.step('Create namespace and install Helm chart', async () => { + await k8sClient.createNamespace(namespace); + cleanup.trackNamespace(namespace); + + const installPage = new HelmInstallPage(page); + await installPage.installHelmChartFromCatalog('Nodejs', RELEASE_NAME, namespace); + }); + + await test.step('Open topology sidebar for Helm release (HR-07-TC01)', async () => { + await topologyPage.navigateToTopology(namespace); + await topologyPage.clickWorkload(RELEASE_NAME); + await sidebar.verifySidebarOpen(); + await sidebar.verifyTabs(); + }); + + for (const { resource, urlSegment, sectionHeading } of HELM_SIDEBAR_RESOURCE_LINKS) { + await test.step(`Verify ${resource} link redirects to details page`, async () => { + await topologyPage.navigateToTopology(namespace); + await topologyPage.clickWorkload(RELEASE_NAME); + await sidebar.verifyResourceDetailsPage(resource, namespace, RELEASE_NAME, { + urlPattern: new RegExp(`/k8s/ns/${namespace}/${urlSegment}/`), + sectionHeading, + }); + }); + } + }, + ); +}); diff --git a/frontend/integration-tests/test-cypress.sh b/frontend/integration-tests/test-cypress.sh index 75942a23e1f..550d3ea8dbb 100755 --- a/frontend/integration-tests/test-cypress.sh +++ b/frontend/integration-tests/test-cypress.sh @@ -76,7 +76,6 @@ if [ -n "${nightly-}" ] && [ -z "${pkg-}" ]; then trap 'err=1' ERR yarn run test-cypress-dev-console-nightly - yarn run test-cypress-helm-nightly # yarn run test-cypress-shipwright-nightly yarn run test-cypress-topology-nightly yarn run test-cypress-knative-nightly @@ -87,7 +86,6 @@ if [ -n "${headless-}" ] && [ -z "${pkg-}" ]; then yarn run test-cypress-console-headless yarn run test-cypress-dev-console-headless yarn run test-cypress-olm-headless - yarn run test-cypress-helm-headless yarn run test-cypress-knative-headless yarn run test-cypress-topology-headless # yarn run test-cypress-shipwright-headless diff --git a/frontend/package.json b/frontend/package.json index ad799aa5594..ad5a0978c4f 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -40,9 +40,6 @@ "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-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-topology": "cd packages/topology/integration-tests && yarn run test-cypress", "test-cypress-topology-headless": "cd packages/topology/integration-tests && yarn run test-cypress-headless", "test-cypress-topology-nightly": "cd packages/topology/integration-tests && yarn run test-cypress-headless-all", diff --git a/frontend/packages/helm-plugin/integration-tests/.eslintrc b/frontend/packages/helm-plugin/integration-tests/.eslintrc deleted file mode 100644 index 92c0aa87f70..00000000000 --- a/frontend/packages/helm-plugin/integration-tests/.eslintrc +++ /dev/null @@ -1,26 +0,0 @@ -{ - "env": { - "cypress/globals": true, - "node": true - }, - "extends": ["../../.eslintrc", "plugin:cypress/recommended", "plugin:prettier/recommended"], - "plugins": ["cypress"], - "rules": { - "no-console": "off", - "no-namespace": "off", - "no-redeclare": "off", - "promise/catch-or-return": "off", - "promise/no-nesting": "off", - "@typescript-eslint/ban-ts-comment": "off", - "cypress/no-unnecessary-waiting": "off", - "cypress/unsafe-to-chain-command": "off" - }, - "settings": { - "import/resolver": { - "node": { - "extensions": [".js", ".jsx", ".ts", ".tsx"], - "moduleDirectory": ["node_modules", "integration-tests/"] - } - } - } -} 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 c3f4768b2fc..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.ts -| | | └──helm-compatibility.ts -| | | └──helm-feature-flag.ts -| | | └──helm-installation-view.ts -| | | └──helm-navigation.ts -| | | └──install-helm-chart.ts -| | | └──topology-helm-release.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/packages/topology/src/components/side-bar/TopologyGroupResourceItem.tsx b/frontend/packages/topology/src/components/side-bar/TopologyGroupResourceItem.tsx index 361bfaa77cc..7b65077c373 100644 --- a/frontend/packages/topology/src/components/side-bar/TopologyGroupResourceItem.tsx +++ b/frontend/packages/topology/src/components/side-bar/TopologyGroupResourceItem.tsx @@ -24,7 +24,12 @@ const TopologyGroupResourceItem: FC = ({ const link = linkForResource ? ( linkForResource(item) ) : ( - + ); return ( diff --git a/frontend/yarn.lock b/frontend/yarn.lock index d64f87cd650..a9f104eb01e 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -2631,12 +2631,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 - "@humanwhocodes/config-array@npm:^0.13.0": version: 0.13.0 resolution: "@humanwhocodes/config-array@npm:0.13.0"