Skip to content

Commit

Permalink
test: update e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
pengzhanbo committed Dec 13, 2024
1 parent 14f8b46 commit 7289707
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions e2e/tests/content-hooks.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ const restoreMarkdownContent = async (): Promise<void> => {
await writeSourceMarkdown('content-hooks/content.md', '## title\n\ncontent\n')
}

if (IS_DEV) {
test.beforeEach(async () => {
await restoreMarkdownContent()
})
test.afterEach(async () => {
await restoreMarkdownContent()
})
}
test.beforeEach(async () => {
await restoreMarkdownContent()
})
test.afterAll(async () => {
await restoreMarkdownContent()
})

test('should call content mounted hook', async ({ page }) => {
const mountedLocator = page.locator(
Expand All @@ -44,17 +42,24 @@ test('should call content mounted hook', async ({ page }) => {
)
})

/**
* onContentChange hook should only called in development
*/
test('should call content change hook', async ({ page }) => {
const changeLocator = page.locator(
'.markdown-content-hooks .markdown-content-change',
)
await page.goto('content-hooks/content.html')

await updateMarkdownContent()
await expect(changeLocator).toHaveText(`changedCount: ${changeCount}`) // 1
await expect(changeLocator).toHaveText(

Check failure on line 55 in e2e/tests/content-hooks.spec.ts

View workflow job for this annotation

GitHub Actions / e2e (ubuntu-latest, 22, vite)

[chromium] › content-hooks.spec.ts:48:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:48:1 › should call content change hook ───────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveText(expected) Locator: locator('.markdown-content-hooks .markdown-content-change') Expected string: "changedCount: 1" Received string: "changedCount: 0" Call log: - expect.toHaveText with timeout 5000ms - waiting for locator('.markdown-content-hooks .markdown-content-change') 7 × locator resolved to <p class="markdown-content-change">changedCount: 0</p> - unexpected value "changedCount: 0" 53 | 54 | await updateMarkdownContent() > 55 | await expect(changeLocator).toHaveText( | ^ 56 | `changedCount: ${IS_DEV ? changeCount : 0}`, 57 | ) // 1 58 | at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:55:31

Check failure on line 55 in e2e/tests/content-hooks.spec.ts

View workflow job for this annotation

GitHub Actions / e2e (ubuntu-latest, 22, vite)

[chromium] › content-hooks.spec.ts:48:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:48:1 › should call content change hook ───────────────────── Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveText(expected) Locator: locator('.markdown-content-hooks .markdown-content-change') Expected string: "changedCount: 1" Received string: "changedCount: 0" Call log: - expect.toHaveText with timeout 5000ms - waiting for locator('.markdown-content-hooks .markdown-content-change') 9 × locator resolved to <p class="markdown-content-change">changedCount: 0</p> - unexpected value "changedCount: 0" 53 | 54 | await updateMarkdownContent() > 55 | await expect(changeLocator).toHaveText( | ^ 56 | `changedCount: ${IS_DEV ? changeCount : 0}`, 57 | ) // 1 58 | at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:55:31

Check failure on line 55 in e2e/tests/content-hooks.spec.ts

View workflow job for this annotation

GitHub Actions / e2e (ubuntu-latest, 22, vite)

[chromium] › content-hooks.spec.ts:48:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:48:1 › should call content change hook ───────────────────── Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveText(expected) Locator: locator('.markdown-content-hooks .markdown-content-change') Expected string: "changedCount: 1" Received string: "changedCount: 0" Call log: - expect.toHaveText with timeout 5000ms - waiting for locator('.markdown-content-hooks .markdown-content-change') 9 × locator resolved to <p class="markdown-content-change">changedCount: 0</p> - unexpected value "changedCount: 0" 53 | 54 | await updateMarkdownContent() > 55 | await expect(changeLocator).toHaveText( | ^ 56 | `changedCount: ${IS_DEV ? changeCount : 0}`, 57 | ) // 1 58 | at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:55:31

Check failure on line 55 in e2e/tests/content-hooks.spec.ts

View workflow job for this annotation

GitHub Actions / e2e (macos-latest, 18, vite)

[chromium] › content-hooks.spec.ts:48:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:48:1 › should call content change hook ───────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveText(expected) Locator: locator('.markdown-content-hooks .markdown-content-change') Expected string: "changedCount: 1" Received string: "changedCount: 0" Call log: - expect.toHaveText with timeout 5000ms - waiting for locator('.markdown-content-hooks .markdown-content-change') 7 × locator resolved to <p class="markdown-content-change">changedCount: 0</p> - unexpected value "changedCount: 0" 53 | 54 | await updateMarkdownContent() > 55 | await expect(changeLocator).toHaveText( | ^ 56 | `changedCount: ${IS_DEV ? changeCount : 0}`, 57 | ) // 1 58 | at /Users/runner/work/core/core/e2e/tests/content-hooks.spec.ts:55:31

Check failure on line 55 in e2e/tests/content-hooks.spec.ts

View workflow job for this annotation

GitHub Actions / e2e (macos-latest, 18, vite)

[chromium] › content-hooks.spec.ts:48:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:48:1 › should call content change hook ───────────────────── Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveText(expected) Locator: locator('.markdown-content-hooks .markdown-content-change') Expected string: "changedCount: 1" Received string: "changedCount: 0" Call log: - expect.toHaveText with timeout 5000ms - waiting for locator('.markdown-content-hooks .markdown-content-change') 9 × locator resolved to <p class="markdown-content-change">changedCount: 0</p> - unexpected value "changedCount: 0" 53 | 54 | await updateMarkdownContent() > 55 | await expect(changeLocator).toHaveText( | ^ 56 | `changedCount: ${IS_DEV ? changeCount : 0}`, 57 | ) // 1 58 | at /Users/runner/work/core/core/e2e/tests/content-hooks.spec.ts:55:31

Check failure on line 55 in e2e/tests/content-hooks.spec.ts

View workflow job for this annotation

GitHub Actions / e2e (macos-latest, 18, vite)

[chromium] › content-hooks.spec.ts:48:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:48:1 › should call content change hook ───────────────────── Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveText(expected) Locator: locator('.markdown-content-hooks .markdown-content-change') Expected string: "changedCount: 1" Received string: "changedCount: 0" Call log: - expect.toHaveText with timeout 5000ms - waiting for locator('.markdown-content-hooks .markdown-content-change') 9 × locator resolved to <p class="markdown-content-change">changedCount: 0</p> - unexpected value "changedCount: 0" 53 | 54 | await updateMarkdownContent() > 55 | await expect(changeLocator).toHaveText( | ^ 56 | `changedCount: ${IS_DEV ? changeCount : 0}`, 57 | ) // 1 58 | at /Users/runner/work/core/core/e2e/tests/content-hooks.spec.ts:55:31

Check failure on line 55 in e2e/tests/content-hooks.spec.ts

View workflow job for this annotation

GitHub Actions / e2e (ubuntu-latest, 20, vite)

[chromium] › content-hooks.spec.ts:48:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:48:1 › should call content change hook ───────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveText(expected) Locator: locator('.markdown-content-hooks .markdown-content-change') Expected string: "changedCount: 1" Received string: "changedCount: 0" Call log: - expect.toHaveText with timeout 5000ms - waiting for locator('.markdown-content-hooks .markdown-content-change') 7 × locator resolved to <p class="markdown-content-change">changedCount: 0</p> - unexpected value "changedCount: 0" 53 | 54 | await updateMarkdownContent() > 55 | await expect(changeLocator).toHaveText( | ^ 56 | `changedCount: ${IS_DEV ? changeCount : 0}`, 57 | ) // 1 58 | at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:55:31

Check failure on line 55 in e2e/tests/content-hooks.spec.ts

View workflow job for this annotation

GitHub Actions / e2e (ubuntu-latest, 20, vite)

[chromium] › content-hooks.spec.ts:48:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:48:1 › should call content change hook ───────────────────── Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveText(expected) Locator: locator('.markdown-content-hooks .markdown-content-change') Expected string: "changedCount: 1" Received string: "changedCount: 0" Call log: - expect.toHaveText with timeout 5000ms - waiting for locator('.markdown-content-hooks .markdown-content-change') 9 × locator resolved to <p class="markdown-content-change">changedCount: 0</p> - unexpected value "changedCount: 0" 53 | 54 | await updateMarkdownContent() > 55 | await expect(changeLocator).toHaveText( | ^ 56 | `changedCount: ${IS_DEV ? changeCount : 0}`, 57 | ) // 1 58 | at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:55:31

Check failure on line 55 in e2e/tests/content-hooks.spec.ts

View workflow job for this annotation

GitHub Actions / e2e (ubuntu-latest, 20, vite)

[chromium] › content-hooks.spec.ts:48:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:48:1 › should call content change hook ───────────────────── Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveText(expected) Locator: locator('.markdown-content-hooks .markdown-content-change') Expected string: "changedCount: 1" Received string: "changedCount: 0" Call log: - expect.toHaveText with timeout 5000ms - waiting for locator('.markdown-content-hooks .markdown-content-change') 9 × locator resolved to <p class="markdown-content-change">changedCount: 0</p> - unexpected value "changedCount: 0" 53 | 54 | await updateMarkdownContent() > 55 | await expect(changeLocator).toHaveText( | ^ 56 | `changedCount: ${IS_DEV ? changeCount : 0}`, 57 | ) // 1 58 | at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:55:31

Check failure on line 55 in e2e/tests/content-hooks.spec.ts

View workflow job for this annotation

GitHub Actions / e2e (ubuntu-latest, 18, vite)

[chromium] › content-hooks.spec.ts:48:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:48:1 › should call content change hook ───────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveText(expected) Locator: locator('.markdown-content-hooks .markdown-content-change') Expected string: "changedCount: 1" Received string: "changedCount: 0" Call log: - expect.toHaveText with timeout 5000ms - waiting for locator('.markdown-content-hooks .markdown-content-change') 7 × locator resolved to <p class="markdown-content-change">changedCount: 0</p> - unexpected value "changedCount: 0" 53 | 54 | await updateMarkdownContent() > 55 | await expect(changeLocator).toHaveText( | ^ 56 | `changedCount: ${IS_DEV ? changeCount : 0}`, 57 | ) // 1 58 | at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:55:31

Check failure on line 55 in e2e/tests/content-hooks.spec.ts

View workflow job for this annotation

GitHub Actions / e2e (ubuntu-latest, 18, vite)

[chromium] › content-hooks.spec.ts:48:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:48:1 › should call content change hook ───────────────────── Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveText(expected) Locator: locator('.markdown-content-hooks .markdown-content-change') Expected string: "changedCount: 1" Received string: "changedCount: 0" Call log: - expect.toHaveText with timeout 5000ms - waiting for locator('.markdown-content-hooks .markdown-content-change') 9 × locator resolved to <p class="markdown-content-change">changedCount: 0</p> - unexpected value "changedCount: 0" 53 | 54 | await updateMarkdownContent() > 55 | await expect(changeLocator).toHaveText( | ^ 56 | `changedCount: ${IS_DEV ? changeCount : 0}`, 57 | ) // 1 58 | at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:55:31

Check failure on line 55 in e2e/tests/content-hooks.spec.ts

View workflow job for this annotation

GitHub Actions / e2e (ubuntu-latest, 18, vite)

[chromium] › content-hooks.spec.ts:48:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:48:1 › should call content change hook ───────────────────── Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveText(expected) Locator: locator('.markdown-content-hooks .markdown-content-change') Expected string: "changedCount: 1" Received string: "changedCount: 0" Call log: - expect.toHaveText with timeout 5000ms - waiting for locator('.markdown-content-hooks .markdown-content-change') 9 × locator resolved to <p class="markdown-content-change">changedCount: 0</p> - unexpected value "changedCount: 0" 53 | 54 | await updateMarkdownContent() > 55 | await expect(changeLocator).toHaveText( | ^ 56 | `changedCount: ${IS_DEV ? changeCount : 0}`, 57 | ) // 1 58 | at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:55:31

Check failure on line 55 in e2e/tests/content-hooks.spec.ts

View workflow job for this annotation

GitHub Actions / e2e (macos-latest, 20, vite)

[chromium] › content-hooks.spec.ts:48:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:48:1 › should call content change hook ───────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveText(expected) Locator: locator('.markdown-content-hooks .markdown-content-change') Expected string: "changedCount: 1" Received string: "changedCount: 0" Call log: - expect.toHaveText with timeout 5000ms - waiting for locator('.markdown-content-hooks .markdown-content-change') 7 × locator resolved to <p class="markdown-content-change">changedCount: 0</p> - unexpected value "changedCount: 0" 53 | 54 | await updateMarkdownContent() > 55 | await expect(changeLocator).toHaveText( | ^ 56 | `changedCount: ${IS_DEV ? changeCount : 0}`, 57 | ) // 1 58 | at /Users/runner/work/core/core/e2e/tests/content-hooks.spec.ts:55:31

Check failure on line 55 in e2e/tests/content-hooks.spec.ts

View workflow job for this annotation

GitHub Actions / e2e (macos-latest, 20, vite)

[chromium] › content-hooks.spec.ts:48:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:48:1 › should call content change hook ───────────────────── Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveText(expected) Locator: locator('.markdown-content-hooks .markdown-content-change') Expected string: "changedCount: 1" Received string: "changedCount: 0" Call log: - expect.toHaveText with timeout 5000ms - waiting for locator('.markdown-content-hooks .markdown-content-change') 9 × locator resolved to <p class="markdown-content-change">changedCount: 0</p> - unexpected value "changedCount: 0" 53 | 54 | await updateMarkdownContent() > 55 | await expect(changeLocator).toHaveText( | ^ 56 | `changedCount: ${IS_DEV ? changeCount : 0}`, 57 | ) // 1 58 | at /Users/runner/work/core/core/e2e/tests/content-hooks.spec.ts:55:31

Check failure on line 55 in e2e/tests/content-hooks.spec.ts

View workflow job for this annotation

GitHub Actions / e2e (macos-latest, 20, vite)

[chromium] › content-hooks.spec.ts:48:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:48:1 › should call content change hook ───────────────────── Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveText(expected) Locator: locator('.markdown-content-hooks .markdown-content-change') Expected string: "changedCount: 1" Received string: "changedCount: 0" Call log: - expect.toHaveText with timeout 5000ms - waiting for locator('.markdown-content-hooks .markdown-content-change') 9 × locator resolved to <p class="markdown-content-change">changedCount: 0</p> - unexpected value "changedCount: 0" 53 | 54 | await updateMarkdownContent() > 55 | await expect(changeLocator).toHaveText( | ^ 56 | `changedCount: ${IS_DEV ? changeCount : 0}`, 57 | ) // 1 58 | at /Users/runner/work/core/core/e2e/tests/content-hooks.spec.ts:55:31

Check failure on line 55 in e2e/tests/content-hooks.spec.ts

View workflow job for this annotation

GitHub Actions / e2e (macos-latest, 22, vite)

[chromium] › content-hooks.spec.ts:48:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:48:1 › should call content change hook ───────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveText(expected) Locator: locator('.markdown-content-hooks .markdown-content-change') Expected string: "changedCount: 1" Received string: "changedCount: 0" Call log: - expect.toHaveText with timeout 5000ms - waiting for locator('.markdown-content-hooks .markdown-content-change') 7 × locator resolved to <p class="markdown-content-change">changedCount: 0</p> - unexpected value "changedCount: 0" 53 | 54 | await updateMarkdownContent() > 55 | await expect(changeLocator).toHaveText( | ^ 56 | `changedCount: ${IS_DEV ? changeCount : 0}`, 57 | ) // 1 58 | at /Users/runner/work/core/core/e2e/tests/content-hooks.spec.ts:55:31

Check failure on line 55 in e2e/tests/content-hooks.spec.ts

View workflow job for this annotation

GitHub Actions / e2e (macos-latest, 22, vite)

[chromium] › content-hooks.spec.ts:48:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:48:1 › should call content change hook ───────────────────── Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveText(expected) Locator: locator('.markdown-content-hooks .markdown-content-change') Expected string: "changedCount: 1" Received string: "changedCount: 0" Call log: - expect.toHaveText with timeout 5000ms - waiting for locator('.markdown-content-hooks .markdown-content-change') 9 × locator resolved to <p class="markdown-content-change">changedCount: 0</p> - unexpected value "changedCount: 0" 53 | 54 | await updateMarkdownContent() > 55 | await expect(changeLocator).toHaveText( | ^ 56 | `changedCount: ${IS_DEV ? changeCount : 0}`, 57 | ) // 1 58 | at /Users/runner/work/core/core/e2e/tests/content-hooks.spec.ts:55:31

Check failure on line 55 in e2e/tests/content-hooks.spec.ts

View workflow job for this annotation

GitHub Actions / e2e (macos-latest, 22, vite)

[chromium] › content-hooks.spec.ts:48:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:48:1 › should call content change hook ───────────────────── Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveText(expected) Locator: locator('.markdown-content-hooks .markdown-content-change') Expected string: "changedCount: 1" Received string: "changedCount: 0" Call log: - expect.toHaveText with timeout 5000ms - waiting for locator('.markdown-content-hooks .markdown-content-change') 9 × locator resolved to <p class="markdown-content-change">changedCount: 0</p> - unexpected value "changedCount: 0" 53 | 54 | await updateMarkdownContent() > 55 | await expect(changeLocator).toHaveText( | ^ 56 | `changedCount: ${IS_DEV ? changeCount : 0}`, 57 | ) // 1 58 | at /Users/runner/work/core/core/e2e/tests/content-hooks.spec.ts:55:31

Check failure on line 55 in e2e/tests/content-hooks.spec.ts

View workflow job for this annotation

GitHub Actions / e2e (ubuntu-latest, 22, webpack)

[chromium] › content-hooks.spec.ts:48:1 › should call content change hook

2) [chromium] › content-hooks.spec.ts:48:1 › should call content change hook ───────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveText(expected) Locator: locator('.markdown-content-hooks .markdown-content-change') Expected string: "changedCount: 1" Received string: "changedCount: 0" Call log: - expect.toHaveText with timeout 5000ms - waiting for locator('.markdown-content-hooks .markdown-content-change') 9 × locator resolved to <p class="markdown-content-change">changedCount: 0</p> - unexpected value "changedCount: 0" 53 | 54 | await updateMarkdownContent() > 55 | await expect(changeLocator).toHaveText( | ^ 56 | `changedCount: ${IS_DEV ? changeCount : 0}`, 57 | ) // 1 58 | at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:55:31

Check failure on line 55 in e2e/tests/content-hooks.spec.ts

View workflow job for this annotation

GitHub Actions / e2e (ubuntu-latest, 22, webpack)

[chromium] › content-hooks.spec.ts:48:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:48:1 › should call content change hook ───────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveText(expected) Locator: locator('.markdown-content-hooks .markdown-content-change') Expected string: "changedCount: 1" Received string: "changedCount: 0" Call log: - expect.toHaveText with timeout 5000ms - waiting for locator('.markdown-content-hooks .markdown-content-change') 9 × locator resolved to <p class="markdown-content-change">changedCount: 0</p> - unexpected value "changedCount: 0" 53 | 54 | await updateMarkdownContent() > 55 | await expect(changeLocator).toHaveText( | ^ 56 | `changedCount: ${IS_DEV ? changeCount : 0}`, 57 | ) // 1 58 | at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:55:31

Check failure on line 55 in e2e/tests/content-hooks.spec.ts

View workflow job for this annotation

GitHub Actions / e2e (ubuntu-latest, 20, webpack)

[chromium] › content-hooks.spec.ts:48:1 › should call content change hook

2) [chromium] › content-hooks.spec.ts:48:1 › should call content change hook ───────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveText(expected) Locator: locator('.markdown-content-hooks .markdown-content-change') Expected string: "changedCount: 1" Received string: "changedCount: 0" Call log: - expect.toHaveText with timeout 5000ms - waiting for locator('.markdown-content-hooks .markdown-content-change') 9 × locator resolved to <p class="markdown-content-change">changedCount: 0</p> - unexpected value "changedCount: 0" 53 | 54 | await updateMarkdownContent() > 55 | await expect(changeLocator).toHaveText( | ^ 56 | `changedCount: ${IS_DEV ? changeCount : 0}`, 57 | ) // 1 58 | at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:55:31

Check failure on line 55 in e2e/tests/content-hooks.spec.ts

View workflow job for this annotation

GitHub Actions / e2e (ubuntu-latest, 20, webpack)

[chromium] › content-hooks.spec.ts:48:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:48:1 › should call content change hook ───────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveText(expected) Locator: locator('.markdown-content-hooks .markdown-content-change') Expected string: "changedCount: 1" Received string: "changedCount: 0" Call log: - expect.toHaveText with timeout 5000ms - waiting for locator('.markdown-content-hooks .markdown-content-change') 9 × locator resolved to <p class="markdown-content-change">changedCount: 0</p> - unexpected value "changedCount: 0" 53 | 54 | await updateMarkdownContent() > 55 | await expect(changeLocator).toHaveText( | ^ 56 | `changedCount: ${IS_DEV ? changeCount : 0}`, 57 | ) // 1 58 | at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:55:31

Check failure on line 55 in e2e/tests/content-hooks.spec.ts

View workflow job for this annotation

GitHub Actions / e2e (ubuntu-latest, 18, webpack)

[chromium] › content-hooks.spec.ts:48:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:48:1 › should call content change hook ───────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveText(expected) Locator: locator('.markdown-content-hooks .markdown-content-change') Expected string: "changedCount: 1" Received string: "changedCount: 0" Call log: - expect.toHaveText with timeout 5000ms - waiting for locator('.markdown-content-hooks .markdown-content-change') 9 × locator resolved to <p class="markdown-content-change">changedCount: 0</p> - unexpected value "changedCount: 0" 53 | 54 | await updateMarkdownContent() > 55 | await expect(changeLocator).toHaveText( | ^ 56 | `changedCount: ${IS_DEV ? changeCount : 0}`, 57 | ) // 1 58 | at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:55:31

Check failure on line 55 in e2e/tests/content-hooks.spec.ts

View workflow job for this annotation

GitHub Actions / e2e (ubuntu-latest, 18, webpack)

[chromium] › content-hooks.spec.ts:48:1 › should call content change hook

2) [chromium] › content-hooks.spec.ts:48:1 › should call content change hook ───────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveText(expected) Locator: locator('.markdown-content-hooks .markdown-content-change') Expected string: "changedCount: 1" Received string: "changedCount: 0" Call log: - expect.toHaveText with timeout 5000ms - waiting for locator('.markdown-content-hooks .markdown-content-change') 9 × locator resolved to <p class="markdown-content-change">changedCount: 0</p> - unexpected value "changedCount: 0" 53 | 54 | await updateMarkdownContent() > 55 | await expect(changeLocator).toHaveText( | ^ 56 | `changedCount: ${IS_DEV ? changeCount : 0}`, 57 | ) // 1 58 | at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:55:31
`changedCount: ${IS_DEV ? changeCount : 0}`,
) // 1

await updateMarkdownContent()
await expect(changeLocator).toHaveText(`changedCount: ${changeCount}`) // 2
await expect(changeLocator).toHaveText(
`changedCount: ${IS_DEV ? changeCount : 0}`,
) // 2
})

test('should call content before unmount hook', async ({ page }) => {
Expand Down

0 comments on commit 7289707

Please sign in to comment.