Skip to content

[FEATURE]: Implement Page Object Model for ITS Page #2175

@Arpit529Srivastava

Description

@Arpit529Srivastava

Problem or Use Case

The ITS (Infrastructure Testing Suite) page has the most complex interactions in our e2e tests. Currently, there are 5 separate test files testing the ITS page:

  • ITS.spec.ts
  • ITSClusterActions.spec.ts
  • ITSImportCluster.spec.ts
  • ITSLabelsAndFilters.spec.ts
  • ITSTableFeature.spec.ts

All these tests duplicate selectors and interaction logic, making maintenance difficult. When UI elements change, we need to update multiple files.

Proposed Solution

Implement a comprehensive ITSPage class following the same POM pattern established in the Login page implementation.

Navigation & Setup

  • goto() - Navigate to ITS page
  • waitForTable() - Wait for cluster table to load
  • applyMSWScenario(scenarioName) - Apply MSW scenario

Import Cluster

  • clickImportCluster() - Open import dialog
  • selectImportTab(tabName) - Switch between Quick Connect/Kubeconfig/Manual tabs
  • fillQuickConnectForm(clusterName) - Fill quick connect form
  • uploadKubeconfig(kubeconfig) - Upload kubeconfig file
  • fillManualForm(clusterName) - Fill manual onboarding form
  • submitImport() - Submit import form
  • closeImportDialog() - Close import dialog

Cluster Actions

  • getClusterRow(clusterName) - Get specific cluster row
  • clickClusterActions(clusterName) - Open actions menu for cluster
  • editLabels(clusterName, labels) - Edit cluster labels
  • viewDetails(clusterName) - View cluster details
  • detachCluster(clusterName, confirm) - Detach cluster with confirmation

Labels & Filters

  • clickLabelChip(labelText) - Click label chip to filter
  • clearFilters() - Clear all active filters
  • getActiveFilters() - Get list of active filters
  • bulkManageLabels(clusterNames, labels) - Apply labels to multiple clusters

Table Features

  • searchClusters(query) - Search/filter clusters
  • sortByColumn(columnName) - Sort table by column
  • selectClusters(clusterNames) - Select multiple clusters
  • getClusterCount() - Get total cluster count
  • getTableRows() - Get all table rows
  • isTableEmpty() - Check if table is empty

Bulk Operations

  • selectAllClusters() - Select all clusters
  • clickBulkActions() - Open bulk actions menu
  • bulkEditLabels(labels) - Bulk edit labels

Are you willing to contribute?

  • Yes, I'd like to help implement this feature.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions