Skip to content

Commit

Permalink
fix(e2e): Stabilizes snapshots of coin tests
Browse files Browse the repository at this point in the history
adds mask to spinning trezor icon
removes completely one snapshots that kept changing resolution from time to time
  • Loading branch information
Vere-Grey committed Jan 22, 2025
1 parent 59d6e69 commit c432ac5
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,14 @@ test.describe('Coin market buy', { tag: ['@group=other', '@snapshot', '@webOnly'
await walletPage.openCoinMarket();
});

test('Buy crypto from compared offers', async ({ marketPage }) => {
test('Select compared offers to buy', async ({ marketPage }) => {
await test.step('Fill input amount and opens offer comparison', async () => {
await marketPage.setYouPayAmount(mockedInputAmount);
await expect(marketPage.section).toHaveScreenshot('buy-coins-layout.png');
await marketPage.compareButton.click();
});

await test.step('Check offers and chooses the first one', async () => {
await expect(marketPage.buyOffersPage).toHaveScreenshot('compared-offers-buy.png', {
mask: [marketPage.refreshTime],
});
await marketPage.validateBuyQuotes();
await marketPage.selectThisQuoteButton.first().click();
});
Expand All @@ -31,6 +28,7 @@ test.describe('Coin market buy', { tag: ['@group=other', '@snapshot', '@webOnly'
await marketPage.confirmTrade();
await expect(marketPage.tradeConfirmation).toHaveScreenshot(
'compared-offers-buy-confirmation.png',
{ mask: [marketPage.confirmOnTrezorButton] },
);
await expect(marketPage.tradeConfirmationContinueButton).toBeEnabled();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ interface ConfirmedOnTrezorProps {
}

export const ConfirmedOnTrezor = ({ device }: ConfirmedOnTrezorProps) => (
<Confirmed>
<Confirmed data-testid="@coinmarket/offer/confirm-on-trezor-button">
<StyledRotateDeviceImage
deviceModel={device?.features?.internal_model}
deviceColor={device?.features?.unit_color}
Expand Down

0 comments on commit c432ac5

Please sign in to comment.