Skip to content

Commit

Permalink
❄️ Deflake amp-carousel e2e test (ampproject#39530)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrozenberg authored and eszponder committed Apr 22, 2024
1 parent b1fe611 commit 1ad078d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions extensions/amp-base-carousel/0.1/test-e2e/test-carousel.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {sleep} from '#testing/helpers';

import {
getScrollingElement,
getSlide,
Expand Down Expand Up @@ -166,6 +168,9 @@ describes.endtoend(
left: 0,
});

// Arbitrary wait because of an interaction conflict between the scroll
// action and click action.
await sleep(100);
await controller.click(goToSlideBtn);
await expect(controller.getElementRect(firstSlide)).to.include({left: 0});
});
Expand Down

0 comments on commit 1ad078d

Please sign in to comment.