Skip to content

Commit b26fe35

Browse files
authored
build: reduce implicit timeouts in webdriver test (#28589)
Attempt at deflaking the e2e tests by reducing the implicit timeout.
1 parent 17498f5 commit b26fe35

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/cdk/testing/tests/webdriver.e2e.spec.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ if (process.env['WEB_TEST_METADATA'] === undefined) {
2626
process.exit(1);
2727
}
2828

29-
const webTestMetadata: WebTestMetadata = require(runfiles.resolve(
30-
process.env['WEB_TEST_METADATA'],
31-
));
29+
const webTestMetadata: WebTestMetadata = require(
30+
runfiles.resolve(process.env['WEB_TEST_METADATA']),
31+
);
3232
const port = process.env['TEST_SERVER_PORT'];
3333

3434
// Kagekiri is available globally in the browser. We declare it here so we can use it in the
@@ -60,6 +60,7 @@ describe('WebDriverHarnessEnvironment', () => {
6060
.usingServer(process.env['WEB_TEST_WEBDRIVER_SERVER']!)
6161
.withCapabilities(webTestMetadata.capabilities)
6262
.build();
63+
await wd.manage().timeouts().implicitlyWait(0);
6364
});
6465

6566
afterAll(async () => {
@@ -87,9 +88,8 @@ describe('WebDriverHarnessEnvironment', () => {
8788
let harness: MainComponentHarness;
8889

8990
beforeEach(async () => {
90-
harness = await SeleniumWebDriverHarnessEnvironment.loader(wd).getHarness(
91-
MainComponentHarness,
92-
);
91+
harness =
92+
await SeleniumWebDriverHarnessEnvironment.loader(wd).getHarness(MainComponentHarness);
9393
});
9494

9595
it('can get elements outside of host', async () => {
@@ -113,9 +113,8 @@ describe('WebDriverHarnessEnvironment', () => {
113113

114114
describe('shadow DOM interaction', () => {
115115
it('should not pierce shadow boundary by default', async () => {
116-
const harness = await SeleniumWebDriverHarnessEnvironment.loader(wd).getHarness(
117-
MainComponentHarness,
118-
);
116+
const harness =
117+
await SeleniumWebDriverHarnessEnvironment.loader(wd).getHarness(MainComponentHarness);
119118
expect(await harness.shadows()).toEqual([]);
120119
});
121120

0 commit comments

Comments
 (0)