Skip to content

Commit

Permalink
Stabilize query editor screenshots (#2584)
Browse files Browse the repository at this point in the history
  • Loading branch information
Janpot authored Aug 31, 2023
1 parent da3c37a commit 69fceae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion test/integration/backend-basic/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ test('function editor parameters update', async ({ page, localApp, argosScreensh
await expect(queryEditor.getByLabel('foo', { exact: true })).toBeVisible();
await expect(queryEditor.getByLabel('bar', { exact: true })).not.toBeVisible();

await argosScreenshot('function-editor');
await argosScreenshot('function-editor', {
clip: (await queryEditor.boundingBox()) || undefined,
});

await setPageHidden(page, true); // simulate page hidden

Expand Down
4 changes: 3 additions & 1 deletion test/integration/rest-basic/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ test('rest editor basics', async ({ page, context, localApp, argosScreenshot })
await urlInput.click();
await urlInput.fill('http://foo.bar');

await argosScreenshot('rest-editor');
await argosScreenshot('rest-editor', {
clip: (await newQueryEditor.boundingBox()) || undefined,
});

const envFilePath = path.resolve(localApp.dir, './.env');
await withTemporaryEdits(envFilePath, async () => {
Expand Down

0 comments on commit 69fceae

Please sign in to comment.