Skip to content

Commit

Permalink
chore: tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
pengzhanbo committed Dec 13, 2024
1 parent 7289707 commit 784a1fc
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions e2e/tests/content-hooks.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ import { expect, test } from '@playwright/test'
import { IS_DEV } from '../utils/env'
import { readSourceMarkdown, writeSourceMarkdown } from '../utils/source'

let changeCount = 0

const updateMarkdownContent = async (): Promise<void> => {
changeCount++
const content = await readSourceMarkdown('content-hooks/content.md')
await writeSourceMarkdown(
'content-hooks/content.md',
Expand All @@ -14,14 +11,13 @@ const updateMarkdownContent = async (): Promise<void> => {
}

const restoreMarkdownContent = async (): Promise<void> => {
changeCount = 0
await writeSourceMarkdown('content-hooks/content.md', '## title\n\ncontent\n')
}

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

Expand Down Expand Up @@ -52,14 +48,10 @@ test('should call content change hook', async ({ page }) => {
await page.goto('content-hooks/content.html')

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

Check failure on line 51 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:44:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:44: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" 49 | 50 | await updateMarkdownContent() > 51 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 1 : 0}`) // 1 | ^ 52 | 53 | await updateMarkdownContent() 54 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 2 : 0}`) // 2 at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:51:31

Check failure on line 51 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:44:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:44: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" 49 | 50 | await updateMarkdownContent() > 51 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 1 : 0}`) // 1 | ^ 52 | 53 | await updateMarkdownContent() 54 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 2 : 0}`) // 2 at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:51:31

Check failure on line 51 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:44:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:44: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" 49 | 50 | await updateMarkdownContent() > 51 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 1 : 0}`) // 1 | ^ 52 | 53 | await updateMarkdownContent() 54 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 2 : 0}`) // 2 at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:51:31

Check failure on line 51 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:44:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:44: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" 49 | 50 | await updateMarkdownContent() > 51 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 1 : 0}`) // 1 | ^ 52 | 53 | await updateMarkdownContent() 54 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 2 : 0}`) // 2 at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:51:31

Check failure on line 51 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:44:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:44: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" 49 | 50 | await updateMarkdownContent() > 51 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 1 : 0}`) // 1 | ^ 52 | 53 | await updateMarkdownContent() 54 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 2 : 0}`) // 2 at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:51:31

Check failure on line 51 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:44:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:44: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" 49 | 50 | await updateMarkdownContent() > 51 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 1 : 0}`) // 1 | ^ 52 | 53 | await updateMarkdownContent() 54 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 2 : 0}`) // 2 at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:51:31

Check failure on line 51 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:44:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:44: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" 49 | 50 | await updateMarkdownContent() > 51 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 1 : 0}`) // 1 | ^ 52 | 53 | await updateMarkdownContent() 54 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 2 : 0}`) // 2 at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:51:31

Check failure on line 51 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:44:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:44: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" 49 | 50 | await updateMarkdownContent() > 51 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 1 : 0}`) // 1 | ^ 52 | 53 | await updateMarkdownContent() 54 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 2 : 0}`) // 2 at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:51:31

Check failure on line 51 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:44:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:44: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" 49 | 50 | await updateMarkdownContent() > 51 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 1 : 0}`) // 1 | ^ 52 | 53 | await updateMarkdownContent() 54 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 2 : 0}`) // 2 at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:51:31

Check failure on line 51 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:44:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:44: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" 49 | 50 | await updateMarkdownContent() > 51 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 1 : 0}`) // 1 | ^ 52 | 53 | await updateMarkdownContent() 54 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 2 : 0}`) // 2 at /Users/runner/work/core/core/e2e/tests/content-hooks.spec.ts:51:31

Check failure on line 51 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:44:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:44: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" 49 | 50 | await updateMarkdownContent() > 51 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 1 : 0}`) // 1 | ^ 52 | 53 | await updateMarkdownContent() 54 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 2 : 0}`) // 2 at /Users/runner/work/core/core/e2e/tests/content-hooks.spec.ts:51:31

Check failure on line 51 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:44:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:44: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" 49 | 50 | await updateMarkdownContent() > 51 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 1 : 0}`) // 1 | ^ 52 | 53 | await updateMarkdownContent() 54 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 2 : 0}`) // 2 at /Users/runner/work/core/core/e2e/tests/content-hooks.spec.ts:51:31

Check failure on line 51 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:44:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:44: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" 49 | 50 | await updateMarkdownContent() > 51 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 1 : 0}`) // 1 | ^ 52 | 53 | await updateMarkdownContent() 54 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 2 : 0}`) // 2 at /Users/runner/work/core/core/e2e/tests/content-hooks.spec.ts:51:31

Check failure on line 51 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:44:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:44: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" 49 | 50 | await updateMarkdownContent() > 51 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 1 : 0}`) // 1 | ^ 52 | 53 | await updateMarkdownContent() 54 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 2 : 0}`) // 2 at /Users/runner/work/core/core/e2e/tests/content-hooks.spec.ts:51:31

Check failure on line 51 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:44:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:44: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" 49 | 50 | await updateMarkdownContent() > 51 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 1 : 0}`) // 1 | ^ 52 | 53 | await updateMarkdownContent() 54 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 2 : 0}`) // 2 at /Users/runner/work/core/core/e2e/tests/content-hooks.spec.ts:51:31

Check failure on line 51 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:44:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:44: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" 49 | 50 | await updateMarkdownContent() > 51 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 1 : 0}`) // 1 | ^ 52 | 53 | await updateMarkdownContent() 54 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 2 : 0}`) // 2 at /Users/runner/work/core/core/e2e/tests/content-hooks.spec.ts:51:31

Check failure on line 51 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:44:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:44: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" 49 | 50 | await updateMarkdownContent() > 51 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 1 : 0}`) // 1 | ^ 52 | 53 | await updateMarkdownContent() 54 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 2 : 0}`) // 2 at /Users/runner/work/core/core/e2e/tests/content-hooks.spec.ts:51:31

Check failure on line 51 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:44:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:44: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" 49 | 50 | await updateMarkdownContent() > 51 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 1 : 0}`) // 1 | ^ 52 | 53 | await updateMarkdownContent() 54 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 2 : 0}`) // 2 at /Users/runner/work/core/core/e2e/tests/content-hooks.spec.ts:51:31

Check failure on line 51 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:44:1 › should call content change hook

2) [chromium] › content-hooks.spec.ts:44: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" 49 | 50 | await updateMarkdownContent() > 51 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 1 : 0}`) // 1 | ^ 52 | 53 | await updateMarkdownContent() 54 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 2 : 0}`) // 2 at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:51:31

Check failure on line 51 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:44:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:44: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" 49 | 50 | await updateMarkdownContent() > 51 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 1 : 0}`) // 1 | ^ 52 | 53 | await updateMarkdownContent() 54 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 2 : 0}`) // 2 at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:51:31

Check failure on line 51 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:44:1 › should call content change hook

2) [chromium] › content-hooks.spec.ts:44: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" 49 | 50 | await updateMarkdownContent() > 51 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 1 : 0}`) // 1 | ^ 52 | 53 | await updateMarkdownContent() 54 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 2 : 0}`) // 2 at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:51:31

Check failure on line 51 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:44:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:44: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" 49 | 50 | await updateMarkdownContent() > 51 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 1 : 0}`) // 1 | ^ 52 | 53 | await updateMarkdownContent() 54 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 2 : 0}`) // 2 at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:51:31

Check failure on line 51 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:44:1 › should call content change hook

1) [chromium] › content-hooks.spec.ts:44: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" 49 | 50 | await updateMarkdownContent() > 51 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 1 : 0}`) // 1 | ^ 52 | 53 | await updateMarkdownContent() 54 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 2 : 0}`) // 2 at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:51:31

Check failure on line 51 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:44:1 › should call content change hook

2) [chromium] › content-hooks.spec.ts:44: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" 49 | 50 | await updateMarkdownContent() > 51 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 1 : 0}`) // 1 | ^ 52 | 53 | await updateMarkdownContent() 54 | await expect(changeLocator).toHaveText(`changedCount: ${IS_DEV ? 2 : 0}`) // 2 at /home/runner/work/core/core/e2e/tests/content-hooks.spec.ts:51:31

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

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

0 comments on commit 784a1fc

Please sign in to comment.