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 Oct 10, 2023
1 parent 5f3d031 commit 0c52af0
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 0c52af0

Please sign in to comment.