Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E2E Tests: Reduce default timeout #10863

Merged
merged 28 commits into from
Jun 12, 2024
Merged

E2E Tests: Reduce default timeout #10863

merged 28 commits into from
Jun 12, 2024

Conversation

nwmac
Copy link
Member

@nwmac nwmac commented Apr 23, 2024

Fixes #8956

This PR reduces the default cypress timeout used in e2e tests from 60s to 10s.

There are a few tests that need updating to specifically used a longer timeout - a set of timeouts has been created in a utility file and used in the appropriate places.

When a test fails, the test is retried 3 times - so before this PR, a test failure would add 3 minutes to the test run - with this PR it adds 30 seconds.

We can look to reduce the timeout further, but more tests will need to be checked and updated.

This PR also updates a couple of tests to make them more resilient:

  • Istio - also attempts to uninstall the charts that are installed
  • Chart Repositories - added a wait for page
  • Rancher backup - extra resilience for the storage options checkbox
  • Extensions - wait for the tabs to show to help with timing issues
  • Fleet - wait for the secrets call to finish

Also added tag for ember and applied to relevant tests.

@nwmac nwmac self-assigned this Apr 23, 2024
@nwmac nwmac added this to the v2.9.0 milestone Apr 23, 2024
@nwmac nwmac marked this pull request as ready for review April 23, 2024 11:39
@rancher-ui-project-bot rancher-ui-project-bot bot modified the milestones: v2.9.0, v2.9.x Apr 23, 2024
Copy link
Member

@richard-cox richard-cox left a comment

Choose a reason for hiding this comment

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

one comment, otherwise looks good

cypress/e2e/po/pages/extensions.po.ts Outdated Show resolved Hide resolved
@richard-cox richard-cox modified the milestones: v2.9.x, v2.9.0 Apr 23, 2024
@nwmac nwmac requested a review from richard-cox April 26, 2024 13:13
@nwmac nwmac force-pushed the e2e-timeout branch 2 times, most recently from 018f175 to 9f3762a Compare June 11, 2024 08:09
@nwmac
Copy link
Member Author

nwmac commented Jun 11, 2024

@richard-cox @aalves08 This one finally passed the gates - would be good to get this in

Copy link
Member

@richard-cox richard-cox left a comment

Choose a reason for hiding this comment

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

Two minor comments only worth changing if there's further updates

@@ -9,6 +9,9 @@ import { ChartsPage } from '@/cypress/e2e/po/pages/explorer/charts/charts.po';
import { InstallChartPage } from '@/cypress/e2e/po/pages/explorer/charts/install-charts.po';
import { PrometheusTab } from '@/cypress/e2e/po/pages/explorer/charts/tabs/prometheus-tab.po';
import { GrafanaTab } from '@/cypress/e2e/po/pages/explorer/charts/tabs/grafana-tab.po';
import { AlertingTab } from '@/cypress/e2e/po/pages/explorer/charts/tabs/alerting-tab.po';
import { IstioTab } from '@/cypress/e2e/po/pages/explorer/charts/tabs/istio-tab.po';
import { LONG_TIMEOUT_OPT } from '~/cypress/support/utils/timeouts';
Copy link
Member

Choose a reason for hiding this comment

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

if there's another pr change, this could be updated to @/

@@ -44,11 +44,20 @@ describe('Charts', { tags: ['@charts', '@adminUser'] }, () => {

installPage.waitForPage('repo-type=cluster&repo=rancher-charts&chart=rancher-backup');

// Scroll into view - scroll to bottom of view
cy.get('.main-layout > .outlet > .outer-container').scrollTo('bottom');
Copy link
Member

Choose a reason for hiding this comment

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

Optional, should this go on the PagePo as a helper?

@nwmac nwmac merged commit 4e0c15f into rancher:master Jun 12, 2024
26 checks passed
@nwmac nwmac deleted the e2e-timeout branch June 12, 2024 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reduce defaultCommandTimeout configuration for E2E tests
2 participants