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

Un-skip E2E test: idletimeout.spec.ts if needed #16402

Conversation

jpandersen87
Copy link
Collaborator

Fixes #16060

This PR unskips the idletimeout test and adds a new one in order to test time moving forward under/over the timeout. The tests use the page.clock functions in order to artificially move time forward mimicing idle.

Copy link

github-actions bot commented Oct 30, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

// Add/Sub 500 ms to account for variance
const timeoutLow = timeout - 500;
const timeoutHigh = timeout + 500;
const timeout = parseInt(process.env.VITE_IDLE_TIMEOUT ?? "900000");
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: can we make the "900000" an integer?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Negative, the function expects a string so I'm making sure to provide a string fallback for the env var

@@ -37,27 +36,28 @@ const test = baseTest.extend<OrganizationPageFixtures>({
frontendWarningsLogPath,
isFrontendWarningsLog,
});
await page.page.clock.install();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure how time is persisted in these tests, but is it worth cleaning up afterwards like so:

test.afterEach(async ({ page }) => {
    await page.clock.uninstall();
});

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There is no uninstall method for the fake clock

Copy link

github-actions bot commented Nov 5, 2024

Branch deployed to Chromatic 🚀.

  • ⚠️ Detected 0 tests with visual changes.
  • ✅ All tests passed.

View via:

Copy link

sonarcloud bot commented Nov 5, 2024

Copy link

github-actions bot commented Nov 5, 2024

⚠️ Broken Links ⚠️

https://www.cdc.gov/od/foia

Error: Request failed with status code 403


https://www.hhs.gov/vulnerability-disclosure-policy/index.html

Error: Request failed with status code 403


https://www.hl7.org/implement/standards/product_brief.cfm?product_id=185

Error: Request failed with status code 403


https://www.cdc.gov/poxvirus/mpox/lab-personnel/report-results.html

Error: Request failed with status code 404


@jpandersen87 jpandersen87 merged commit 769b68d into master Nov 5, 2024
30 of 32 checks passed
@jpandersen87 jpandersen87 deleted the experience/16060-Un-skip-E2E-test-idletimeoutspects-if-needed branch November 5, 2024 16:21
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.

Un-skip E2E test: idletimeout.spec.ts if needed
3 participants