Skip to content

Commit

Permalink
fix delay test
Browse files Browse the repository at this point in the history
  • Loading branch information
tevanoff committed Jan 25, 2024
1 parent 283026a commit 53710c7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 25 deletions.
2 changes: 1 addition & 1 deletion packages/cypress/tests/cypress/e2e/options.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
it('Options / delay', { env: { delay: 1200 } }, () => {
it('Options / delay', { env: { delay: 5000 } }, () => {
cy.visit('/options/delay');
});

Expand Down
2 changes: 1 addition & 1 deletion packages/playwright/tests/options.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { test } from '../src';

test.describe(() => {
test.use({ delay: 1200 });
test.use({ delay: 5000 });

test('Options / delay', async ({ page }) => {
await page.goto('/options/delay');
Expand Down
Binary file added test-server/fixtures/assets/images/animated.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 2 additions & 23 deletions test-server/fixtures/options/delay.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,7 @@
<!doctype html>
<html>
<head>
<style>
/* don't show the image at the beginning */
img {
visibility: hidden;
animation-name: make-shown;
animation-duration: 2ms;
animation-delay: 1000ms;
animation-fill-mode: forwards;
}

@keyframes make-shown {
0% {
visibility: hidden;
}
100% {
visibility: visible;
}
}
</style>
</head>
<body>
<img src="/img?url=fixtures/blue.png"/>
<h4>The image should be snapshotted since we're waiting until the delayed-revealed image is visible.</h4>
<img src="/images/animated.gif"/>
<h4>The image should be snapshotted as purple since we're waiting until the delayed-revealed image is visible.</h4>
</body>
</html>

0 comments on commit 53710c7

Please sign in to comment.