Skip to content

Conversation

@alokdangre
Copy link
Contributor

Description

This PR optimizes the Playwright E2E test suite to reduce CI execution time and improve stability, while keeping all critical business flows covered.

Current CI runs took 60+ minutes and suffered intermittent failures due to:

  • Heavy WDS canvas interactions
  • Slow performance/timing-based assertions
  • Repeated UI-detail tests
  • Browser-specific inconsistencies

This PR reduces runtime and improves determinism, giving us a stable, fast CI pipeline with meaningful E2E coverage.


File-by-File Breakdown

1. WDSZoomControls.spec.ts

Removed: Entire file
Why:

  • Extremely flaky canvas/zoom interactions
  • Browser-specific branches
  • Huge timeouts (up to 70s per test)
  • Depended on ReactFlowHelper, WDSPage, custom polling utilities

Coverage still exists in:

  • WDS.spec.ts
  • WDSViewModes.spec.ts

2. ThemeToggle.spec.ts

Kept:

  • Header toggle visibility
  • Theme switching
  • Multiple toggles restoring initial state

Removed:

  • Non-functional surrounding div checks
  • Mobile-only duplicate visibility test

3. Login.spec.ts

Removed: Fullscreen API tests (unstable in CI) and duplicate responsive checks.


4. Navbar.spec.ts

Removed:

  • Performance-duration tests
  • Animation/layout-shift timing checks

Functional navigation tests remain.


5. Dashboard.spec.ts

Removed:

  • Extra viewport responsive tests
  • Theme integration checks

Dashboard main behavior remains covered.


6. LanguageSwitcher.spec.ts

Removed:

  • Multi-step language persistence test (flaky)
  • Tablet viewport test

7. UserManagement.spec.ts

Removed: Tablet & desktop responsive tests.
Kept: Mobile viewport + core flows.


8. UserManagementCRUD.spec.ts

Kept / Re-added:

  • Username empty validation
  • Password empty validation
  • Sequential delete test

High-value user-management guardrail tests.


9. UserManagementFilter.spec.ts

Removed: Timing-based performance tests.
Functional filtering remains verified.


10. UserManagementPermissions.spec.ts

Removed:

  • Redundant permutations
  • Detailed checkbox visual-state tests

Permission logic still validated.


11. BPNavigation.spec.ts

Removed: Timing-based navigation test.


12. SideMenu.spec.ts

Removed: Duplicate viewport responsive tests.
Navigation, visibility, and collapse/expand tests kept.


13. Install.spec.ts

Removed:

  • Low-level UI control interactions
  • Granular platform-selection permutations

Core Install experience remains covered.


14. ITSTableFeature.spec.ts

Removed: Complex state-persistence chain test.
Sorting, pagination, selection remain covered.


15. ProfileSection.spec.ts

Removed: Low-value external-link clickability tests.


16. WDSContextFiltering.spec.ts

Removed: Multi-branch conditional filtering test.
Basic context filtering remains tested.


17. ITS.spec.ts

Removed: Redundant small-viewport responsiveness test.
ITS actions, search, badges, and keyboard shortcuts remain verified.


18. ITSImportCluster.spec.ts

Kept:

  • Quick Connect
  • Kubeconfig textarea & file upload
  • Manual onboarding
  • Validation & success/error flows

No removals here—this is a critical onboarding workflow.


19. ObjectExplorerResourceActions.spec.ts

Removed:

  • Chip/icon CSS-level assertions

Core resource interactions remain intact.


20. ObjectExplorerKindNamespace.spec.ts

Removed:

  • Dropdown filter-by-typing UX test

Selections and resource updates remain covered.


21. WDSViewModes.spec.ts

Removed:

  • Deep state-preservation test across mode switches

Kept strong coverage for:

  • View mode visibility
  • Tiles view
  • List view
  • Resource count consistency
  • Filtering behavior

Related Issue

Fixes #<issue_number>

Changes Made

  • Updated ...
  • Refactored ...
  • Fixed ...
  • Added tests for ...

Checklist

Please ensure the following before submitting your PR:

  • I have reviewed the project's contribution guidelines.
  • I have written unit tests for the changes (if applicable).
  • I have updated the documentation (if applicable).
  • I have tested the changes locally and ensured they work as expected.
  • My code follows the project's coding standards.

Screenshots or Logs (if applicable)

Additional Notes

Copilot AI review requested due to automatic review settings November 19, 2025 07:21
@kubestellar-prow
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Nov 19, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR optimizes the Playwright E2E test suite by removing flaky, slow, and overly detailed tests that were causing CI runs to exceed 60 minutes and suffer intermittent failures. The focus is on eliminating timing-based assertions, browser-specific tests, and UI implementation details while retaining coverage of critical business flows.

Key changes:

  • Removed entire WDSZoomControls test suite (70+ second timeouts, complex browser-specific waits)
  • Eliminated timing-based performance tests across multiple files
  • Removed redundant responsive/viewport tests

Reviewed Changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
WDSZoomControls.spec.ts Completely removed file containing highly flaky canvas zoom tests with browser-specific timing dependencies
WDSViewModes.spec.ts Removed complex state preservation test across mode switches
WDSContextFiltering.spec.ts Removed multi-branch conditional context filtering test
UserManagementPermissions.spec.ts Removed redundant permission creation tests and overly detailed UI state tests
UserManagementFilter.spec.ts Removed flaky timing-based performance tests
UserManagement.spec.ts Removed redundant tablet and desktop viewport tests
ThemeToggle.spec.ts Removed non-functional div check test and duplicate mobile visibility test
SideMenu.spec.ts Removed redundant responsive viewport tests
ProfileSection.spec.ts Removed low-value external link clickability tests
ObjectExplorerResourceActions.spec.ts Removed granular CSS class and icon type assertions
ObjectExplorerKindNamespace.spec.ts Removed detailed dropdown filtering UX test
Navbar.spec.ts Removed flaky load time and layout shift tests
Login.spec.ts Removed unstable fullscreen API test
LanguageSwitcher.spec.ts Removed flaky persistence test with race conditions and redundant tablet test
Install.spec.ts Removed granular UI interaction and platform selection tests
ITSTableFeature.spec.ts Removed complex state persistence test across search actions
ITS.spec.ts Removed redundant mobile responsive test
BPNavigation.spec.ts Removed timing-based page load performance test

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Arpit529Srivastava
Copy link
Member

@alokdangre please look at the failing ci

@alokdangre
Copy link
Contributor Author

/cc @btwshivam should i reduce the time further

@kubestellar-prow kubestellar-prow bot requested a review from btwshivam November 22, 2025 13:30
@kubestellar-prow
Copy link

@alokdangre: GitHub didn't allow me to request PR reviews from the following users: further, should, i, reduce, the, time.

Note that only kubestellar members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

In response to this:

/cc @btwshivam should i reduce the time further

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@alokdangre
Copy link
Contributor Author

alokdangre commented Nov 22, 2025

File 1: Navbar.spec.ts

763 → 295 lines (-468 lines)

Removed Tests (10)

  • Sidebar navigation links are present and clickable

    • Reason: Redundant (covered in SideMenu.spec.ts)
  • Clicking brand name navigates to home

    • Reason: Redundant
  • Theme toggle persists theme preference

    • Reason: Flaky (reload + redirect complexity)
  • Language switcher button is visible

    • Reason: Redundant (covered in LanguageSwitcher.spec.ts)
  • Language switcher opens dropdown

    • Reason: Redundant
  • Selecting different language from dropdown

    • Reason: Redundant
  • Dropdown closes on outside click

    • Reason: Redundant
  • Dropdown closes on ESC

    • Reason: Redundant
  • Keyboard navigation works in dropdown

    • Reason: Redundant
  • Navbar maintains state after page reload

    • Reason: Flaky (complex reload logic)

File 2: UserManagementCRUD.spec.ts

440 → 336 lines (-104 lines)

Removed Tests (7)

  • Reset form when modal is closed and reopened

    • Reason: Trivial / Redundant
  • Cancel edit without making changes

    • Reason: Trivial / Redundant
  • Update user while maintaining other fields

    • Reason: Redundant (already covered)
  • Confirmation modal before deleting

    • Reason: Redundant (only checks visibility)
  • Update user count after deletion

    • Reason: Redundant
  • Deleting multiple users sequentially

    • Reason: Redundant
  • Maintain data integrity after multiple operations

    • Reason: Redundant (covered in integration test)

File 3: SideMenu.spec.ts

417 → 298 lines (-119 lines)

Removed Tests (6)

  • All menu links are clickable

    • Reason: Redundant (navigation tested elsewhere)
  • Menu adapts to tablet viewport

    • Reason: Redundant
  • Menu adapts to large desktop viewport

    • Reason: Redundant
  • Menu transitions smoothly between viewport sizes

    • Reason: Redundant
  • Menu loads quickly on page load

    • Reason: Flaky (timing-based)
  • Menu does not cause layout shifts

    • Reason: Flaky (timing + position checks)

File 4: Dashboard.spec.ts

513 → 339 lines (-174 lines)

Removed Tests (11)

  • Dashboard has proper page structure

    • Reason: Redundant
  • Progress bars display correct MSW values

    • Reason: Redundant
  • Progress bars have tooltips

    • Reason: Redundant
  • Cluster items show capacity info

    • Reason: Redundant
  • Recent activity items are clickable

    • Reason: Flaky (complex fallback logic)
  • Refresh button updates activity data

    • Reason: Redundant
  • Activity items show timestamps

    • Reason: Redundant
  • Dashboard handles API errors gracefully

    • Reason: Flaky (reload + resetHandlers issues)
  • Dashboard color contrast is correct

    • Reason: Redundant (visual QA)
  • Dashboard handles network errors gracefully

    • Reason: Flaky (complex abort logic)

@alokdangre
Copy link
Contributor Author

I made the issue #2263 for further bugs in playwright current ci

@btwshivam
Copy link
Contributor

Ok good but next remove unwanted comment in some PR

).toBeVisible();
}
});
// REMOVED: Overly detailed UI interaction tests - these are too granular for e2e testing
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets keep it

const updatedScriptText = await scriptElement.textContent();
expect(updatedScriptText).toContain('--platform k3d');
});
// REMOVED: Detailed platform selection tests - too granular for e2e, better as unit tests
Copy link
Contributor

Choose a reason for hiding this comment

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

Keep this too

const isNotFullscreen = await loginPage.isFullscreen();
expect(isNotFullscreen).toBe(false);
});
// REMOVED: Flaky fullscreen test - browser API behavior varies across environments
Copy link
Contributor

Choose a reason for hiding this comment

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

keep this

await expect(raiseIssueItem).toBeEnabled();
});
});
// REMOVED: External link tests - these only test that links are clickable, not actual functionality
Copy link
Contributor

Choose a reason for hiding this comment

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

keep this

@github-project-automation github-project-automation bot moved this from In Progress to Changes Required in KubeStellar UI Project Nov 27, 2025
@alokdangre alokdangre requested a review from btwshivam November 28, 2025 07:37
@kubestellar-prow kubestellar-prow bot added the lgtm Indicates that a PR is ready to be merged. label Dec 2, 2025
@github-project-automation github-project-automation bot moved this from Changes Required to Ready to Merge in KubeStellar UI Project Dec 2, 2025
@kubestellar-prow
Copy link

LGTM label has been added.

DetailsGit tree hash: e882462d168514b81cd4ab498212dda73601c1ec

@btwshivam btwshivam merged commit 52ad5e9 into kubestellar:dev Dec 2, 2025
6 of 8 checks passed
@github-project-automation github-project-automation bot moved this from Ready to Merge to Done in KubeStellar UI Project Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants