Skip to content

[UI][Auto] User can update their preferences > Can select login landing page - specific cluster #412

Description

@yonasberhe23

Failure Details

Framework: Cypress
Suite: User can update their preferences

Failing Environments

Version Environment User
head community @adminUser

Error Summary

Timed out retrying after 10000ms: expected '[RANCHER_URL]' to include '/explore'

🤖 AI Fix Suggestions

Explanation of Test Failure:

The test failed because the Cypress assertion expected the URL to include /explore after selecting the login landing page for a specific cluster, but the actual URL ([RANCHER_URL]) did not meet this condition within the 10-second timeout. This indicates that the application either did not navigate to the expected page or the navigation took longer than the allowed time.


Likely Root Causes:

  1. Incorrect or Missing Navigation Trigger: The action to navigate to the /explore page may not have been triggered properly after selecting the login landing page.
  2. Delayed Page Load: The /explore page might be taking longer than 10 seconds to load due to backend or frontend performance issues.
  3. Incorrect Test Setup: The test might not be properly setting up the user preferences or cluster selection, leading to navigation to the wrong page.
  4. Broken or Changed Route: The /explore route might have been modified or removed in the application, causing the test to fail.

Suggested Fix:

Increase the reliability of the test by ensuring the navigation is triggered correctly and waiting explicitly for the /explore route to load. Additionally, verify that the application state is correctly set before the test runs.

// Ensure the test waits for the correct navigation and verifies the URL
cy.get('[data-testid="login-landing-page-select"]').click(); // Adjust selector if needed
cy.get('[data-testid="cluster-option"]').contains('Specific Cluster').click(); // Adjust selector or text if needed
cy.get('[data-testid="save-preferences-button"]').click(); // Trigger the save action

// Wait for the navigation to complete and assert the URL includes '/explore'
cy.location('pathname', { timeout: 20000 }).should('include', '/explore');

Explanation of the Fix:

  1. Explicit Clicks: Ensure the test interacts with the correct elements for selecting the cluster and saving preferences.
  2. Increased Timeout: Extend the timeout for cy.location to 20 seconds to account for potential delays in navigation.
  3. Precise Assertion: Use cy.location('pathname') to directly check the URL path instead of relying on less reliable methods.

This approach ensures the test is robust against minor delays and verifies that the application navigates to the expected /explore route.


Auto-generated by CI Failure Inspector

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions