WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Avoid overly-cautious type guards in favor of more performant type discriminators #4386

Avoid overly-cautious type guards in favor of more performant type discriminators

Avoid overly-cautious type guards in favor of more performant type discriminators #4386

Triggered via pull request December 5, 2025 04:06
Status Success
Total duration 5m 16s
Artifacts 1

ci.yml

on: pull_request
Matrix: ci
Fit to window
Zoom out
Zoom in

Annotations

5 errors and 1 notice
[mobile] › playwright/integration/examples/shadow-dom.test.ts:16:7 › shadow-dom example › renders slate editor inside nested shadow and edits content: playwright/integration/examples/shadow-dom.test.ts#L34
3) [mobile] › playwright/integration/examples/shadow-dom.test.ts:16:7 › shadow-dom example › renders slate editor inside nested shadow and edits content Error: Timed out 8000ms waiting for expect(locator).toHaveText(expected) Locator: locator('[data-cy="outer-shadow-root"]').locator('> div').getByRole('textbox') Expected string: "Hello, Playwright!" Received string: "Hello, layright!" Call log: - expect.toHaveText with timeout 8000ms - waiting for locator('[data-cy="outer-shadow-root"]').locator('> div').getByRole('textbox') 12 × locator resolved to <div zindex="-1" role="textbox" translate="no" aria-multiline="true" contenteditable="true" data-slate-node="value" data-slate-editor="true">…</div> - unexpected value "Hello, layright!" 32 | 33 | // Assert that the textbox contains the correct text > 34 | await expect(textbox).toHaveText('Hello, Playwright!') | ^ 35 | }) 36 | 37 | test('user can type add a new line in editor inside shadow DOM', async ({ at /home/runner/work/slate/slate/playwright/integration/examples/shadow-dom.test.ts:34:27
[mobile] › playwright/integration/examples/code-highlighting.test.ts:13:9 › code highlighting › code highlighting jsx: playwright/integration/examples/code-highlighting.test.ts#L36
2) [mobile] › playwright/integration/examples/code-highlighting.test.ts:13:9 › code highlighting › code highlighting jsx Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.selectOption: Error: strict mode violation: getByTestId('language-select') resolved to 3 elements: 1) <select class="css-rc8lf3" contenteditable="false" data-test-id="language-select">…</select> aka getByTestId('language-select').first() 2) <select class="css-rc8lf3" contenteditable="false" data-test-id="language-select">…</select> aka getByTestId('language-select').nth(1) 3) <select class="css-rc8lf3" contenteditable="false" data-test-id="language-select">…</select> aka getByTestId('language-select').nth(2) Call log: - waiting for getByTestId('language-select') 34 | await page.keyboard.press('Backspace') // clear editor 35 | await page.getByTestId('code-block-button').click() // convert first and the only one paragraph to code block > 36 | await page.getByTestId('language-select').selectOption({ value: language }) // select the language option | ^ 37 | 38 | await page.keyboard.type(text) // type text 39 | } at setText (/home/runner/work/slate/slate/playwright/integration/examples/code-highlighting.test.ts:36:45) at /home/runner/work/slate/slate/playwright/integration/examples/code-highlighting.test.ts:14:7
[mobile] › playwright/integration/examples/code-highlighting.test.ts:13:9 › code highlighting › code highlighting jsx: playwright/integration/examples/code-highlighting.test.ts#L36
2) [mobile] › playwright/integration/examples/code-highlighting.test.ts:13:9 › code highlighting › code highlighting jsx Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.selectOption: Error: strict mode violation: getByTestId('language-select') resolved to 3 elements: 1) <select class="css-rc8lf3" contenteditable="false" data-test-id="language-select">…</select> aka getByTestId('language-select').first() 2) <select class="css-rc8lf3" contenteditable="false" data-test-id="language-select">…</select> aka getByTestId('language-select').nth(1) 3) <select class="css-rc8lf3" contenteditable="false" data-test-id="language-select">…</select> aka getByTestId('language-select').nth(2) Call log: - waiting for getByTestId('language-select') 34 | await page.keyboard.press('Backspace') // clear editor 35 | await page.getByTestId('code-block-button').click() // convert first and the only one paragraph to code block > 36 | await page.getByTestId('language-select').selectOption({ value: language }) // select the language option | ^ 37 | 38 | await page.keyboard.type(text) // type text 39 | } at setText (/home/runner/work/slate/slate/playwright/integration/examples/code-highlighting.test.ts:36:45) at /home/runner/work/slate/slate/playwright/integration/examples/code-highlighting.test.ts:14:7
[mobile] › playwright/integration/examples/code-highlighting.test.ts:13:9 › code highlighting › code highlighting jsx: playwright/integration/examples/code-highlighting.test.ts#L36
2) [mobile] › playwright/integration/examples/code-highlighting.test.ts:13:9 › code highlighting › code highlighting jsx Error: locator.selectOption: Error: strict mode violation: getByTestId('language-select') resolved to 3 elements: 1) <select class="css-rc8lf3" contenteditable="false" data-test-id="language-select">…</select> aka getByTestId('language-select').first() 2) <select class="css-rc8lf3" contenteditable="false" data-test-id="language-select">…</select> aka getByTestId('language-select').nth(1) 3) <select class="css-rc8lf3" contenteditable="false" data-test-id="language-select">…</select> aka getByTestId('language-select').nth(2) Call log: - waiting for getByTestId('language-select') 34 | await page.keyboard.press('Backspace') // clear editor 35 | await page.getByTestId('code-block-button').click() // convert first and the only one paragraph to code block > 36 | await page.getByTestId('language-select').selectOption({ value: language }) // select the language option | ^ 37 | 38 | await page.keyboard.type(text) // type text 39 | } at setText (/home/runner/work/slate/slate/playwright/integration/examples/code-highlighting.test.ts:36:45) at /home/runner/work/slate/slate/playwright/integration/examples/code-highlighting.test.ts:14:7
[mobile] › playwright/integration/examples/code-highlighting.test.ts:13:9 › code highlighting › code highlighting html: playwright/integration/examples/code-highlighting.test.ts#L36
1) [mobile] › playwright/integration/examples/code-highlighting.test.ts:13:9 › code highlighting › code highlighting html Error: locator.selectOption: Error: strict mode violation: getByTestId('language-select') resolved to 3 elements: 1) <select class="css-rc8lf3" contenteditable="false" data-test-id="language-select">…</select> aka getByTestId('language-select').first() 2) <select class="css-rc8lf3" contenteditable="false" data-test-id="language-select">…</select> aka getByTestId('language-select').nth(1) 3) <select class="css-rc8lf3" contenteditable="false" data-test-id="language-select">…</select> aka getByTestId('language-select').nth(2) Call log: - waiting for getByTestId('language-select') 34 | await page.keyboard.press('Backspace') // clear editor 35 | await page.getByTestId('code-block-button').click() // convert first and the only one paragraph to code block > 36 | await page.getByTestId('language-select').selectOption({ value: language }) // select the language option | ^ 37 | 38 | await page.keyboard.type(text) // type text 39 | } at setText (/home/runner/work/slate/slate/playwright/integration/examples/code-highlighting.test.ts:36:45) at /home/runner/work/slate/slate/playwright/integration/examples/code-highlighting.test.ts:14:7
🎭 Playwright Run Summary
3 flaky [mobile] › playwright/integration/examples/code-highlighting.test.ts:13:9 › code highlighting › code highlighting html [mobile] › playwright/integration/examples/code-highlighting.test.ts:13:9 › code highlighting › code highlighting jsx [mobile] › playwright/integration/examples/shadow-dom.test.ts:16:7 › shadow-dom example › renders slate editor inside nested shadow and edits content 3 skipped 117 passed (2.8m)

Artifacts

Produced during runtime
Name Size Digest
test-results
1.49 MB
sha256:370679928862f13da649a9b9d7f8713629bfe78cf1e1cf73bffbfe7c586919a7