Skip to content

Commit

Permalink
test: fix LIVE-9694
Browse files Browse the repository at this point in the history
  • Loading branch information
gre committed Oct 12, 2023
1 parent 08931ad commit c4d333f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions apps/ledger-live-desktop/src/renderer/animations/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ const Animation = ({
rendererSettings?: LottieProps["options"]["rendererSettings"];
isPaused?: boolean;
isStopped?: boolean;
}) =>
animation ? (
}) => {
// in case of playwright tests, we want to completely stop the animation
const isPlaywright = !!getEnv("PLAYWRIGHT_RUN");
return animation ? (
<Flex
style={{
maxHeight: `200px`,
Expand All @@ -35,17 +37,15 @@ const Animation = ({
isClickToPauseDisabled
ariaRole="animation"
isPaused={isPaused}
isStopped={
// in case of playwright tests, we want to completely stop the animation
!!getEnv("PLAYWRIGHT_RUN") || isStopped
}
isStopped={isStopped}
options={{
loop: loop,
autoplay: autoplay,
autoplay: !isPlaywright && autoplay,
animationData: animation,
rendererSettings,
}}
/>
</Flex>
) : null;
};
export default Animation;

0 comments on commit c4d333f

Please sign in to comment.