[PSA] changes to the e2e and interaction test interfaces

26 views
Skip to first unread message

Alex Rudenko

unread,
Sep 5, 2024, 3:24:17 AM9/5/24
to devtools-dev
Hi folks,

With https://crrev.com/c/5804334, we refactored our helpers in e2e and interaction tests to use a custom mocha interface instead of relying on mocha-extensions imports in test files.

That means that you do not need to import test/shared/mocha-extensions.ts in individual tests anymore and our custom test interface including itScreenshot/skipOnPlatforms/etc is globally available. Other than that, there should be no changes when authoring tests.

Additionally, AsyncScope.abortSignal now can be used in tests to abort operations if the test run is aborted by the test runner. It is already used by some devtools e2e helpers and you can also use it to abort long-running Puppeteer operations. The refactoring also allows us to better control test timeouts and what happens on errors (e.g., capturing screenshots) and it addresses the bug where throwing false in a test would result in a passing test.

If you need to change or extend the test interface, refer to the test/shared/mocha-interface.ts.

Best regards,
Alex  
Reply all
Reply to author
Forward
0 new messages