Skip to content

Commit

Permalink
checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
hitesh-1997 committed Dec 20, 2024
1 parent 7089193 commit b4a4af8
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
6 changes: 3 additions & 3 deletions vscode/test/e2e/auto-edits.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ const autoeditsTestHelper = async ({
await page.keyboard.press('Enter')

await executeCommandInPalette(page, 'Cody: Autoedits Manual Trigger')
await expect(page).toHaveScreenshot()
// TODO(Hitesh): Configure parameter to reduce flakiness
await expect(page).toHaveScreenshot({ maxDiffPixelRatio: 0.1 })

Check failure on line 54 in vscode/test/e2e/auto-edits.test.ts

View workflow job for this annotation

GitHub Actions / test-e2e (ubuntu, 1/5)

auto-edits.test.ts:58:1 › autoedits-multi-line-diff-view

1) auto-edits.test.ts:58:1 › autoedits-multi-line-diff-view ────────────────────────────────────── Error: Screenshot comparison failed: Expected an image 2048px by 1536px, received 1024px by 741px. 2382266 pixels (ratio 0.76 of all image pixels) are different. Expected: /home/runner/work/cody/cody/vscode/test/e2e/__snapshots__/auto-edits.test.ts/autoedits-multi-line-diff-view-1.png Received: /home/runner/work/cody/cody/vscode/test-results/auto-edits-autoedits-multi-line-diff-view/autoedits-multi-line-diff-view-1-actual.png Diff: /home/runner/work/cody/cody/vscode/test-results/auto-edits-autoedits-multi-line-diff-view/autoedits-multi-line-diff-view-1-diff.png Call log: - expect.toHaveScreenshot with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - Expected an image 2048px by 1536px, received 1024px by 741px. 2382168 pixels (ratio 0.76 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - Expected an image 2048px by 1536px, received 1024px by 741px. 2382266 pixels (ratio 0.76 of all image pixels) are different. 52 | await executeCommandInPalette(page, 'Cody: Autoedits Manual Trigger') 53 | // TODO(Hitesh): Configure parameter to reduce flakiness > 54 | await expect(page).toHaveScreenshot({ maxDiffPixelRatio: 0.1 }) | ^ 55 | } 56 | } 57 | at autoeditsTestHelper (/home/runner/work/cody/cody/vscode/test/e2e/auto-edits.test.ts:54:28) at /home/runner/work/cody/cody/vscode/test/e2e/auto-edits.test.ts:61:5

Check failure on line 54 in vscode/test/e2e/auto-edits.test.ts

View workflow job for this annotation

GitHub Actions / test-e2e (ubuntu, 1/5)

auto-edits.test.ts:58:1 › autoedits-multi-line-diff-view

1) auto-edits.test.ts:58:1 › autoedits-multi-line-diff-view ────────────────────────────────────── Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Screenshot comparison failed: Expected an image 2048px by 1536px, received 1024px by 741px. 2382266 pixels (ratio 0.76 of all image pixels) are different. Expected: /home/runner/work/cody/cody/vscode/test/e2e/__snapshots__/auto-edits.test.ts/autoedits-multi-line-diff-view-1.png Received: /home/runner/work/cody/cody/vscode/test-results/auto-edits-autoedits-multi-line-diff-view-retry1/autoedits-multi-line-diff-view-1-actual.png Diff: /home/runner/work/cody/cody/vscode/test-results/auto-edits-autoedits-multi-line-diff-view-retry1/autoedits-multi-line-diff-view-1-diff.png Call log: - expect.toHaveScreenshot with timeout 5000ms - verifying given screenshot expectation - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - Expected an image 2048px by 1536px, received 1024px by 741px. 2382168 pixels (ratio 0.76 of all image pixels) are different. - waiting 100ms before taking screenshot - taking page screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - captured a stable screenshot - Expected an image 2048px by 1536px, received 1024px by 741px. 2382266 pixels (ratio 0.76 of all image pixels) are different. 52 | await executeCommandInPalette(page, 'Cody: Autoedits Manual Trigger') 53 | // TODO(Hitesh): Configure parameter to reduce flakiness > 54 | await expect(page).toHaveScreenshot({ maxDiffPixelRatio: 0.1 }) | ^ 55 | } 56 | } 57 | at autoeditsTestHelper (/home/runner/work/cody/cody/vscode/test/e2e/auto-edits.test.ts:54:28) at /home/runner/work/cody/cody/vscode/test/e2e/auto-edits.test.ts:61:5
}
}

test('autoedits-multi-line-diff-view', async ({ page, sidebar }) => {
const lineNumbers: number[] = [70]
// const lineNumbers: number[] = [70, 76]

await autoeditsTestHelper({ page, sidebar, fileName: 'autoedit.py', lineNumbers })
await autoeditsTestHelper({ page, sidebar, fileName: 'diff-view-example-1.py', lineNumbers })
})

0 comments on commit b4a4af8

Please sign in to comment.