Skip to content

Commit

Permalink
fix e2e tests for transfer flow
Browse files Browse the repository at this point in the history
  • Loading branch information
ost-ptk committed Sep 16, 2024
1 parent 3bfe81d commit 0d401c3
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 5 deletions.
28 changes: 26 additions & 2 deletions e2e-tests/popup/transfers/casper-native-transfer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,21 @@ popup.describe('Popup UI: Casper Native Transfer', () => {
).toBeDisabled();

await popupPage
.getByPlaceholder('Public key', { exact: true })
.getByPlaceholder('Public key or name', { exact: true })
.fill(DEFAULT_SECOND_ACCOUNT.publicKey);

await popupExpect(
popupPage.getByText(DEFAULT_SECOND_ACCOUNT.mediumTruncatedPublicKey, {
exact: true
})
).toBeVisible();

await popupPage
.getByText(DEFAULT_SECOND_ACCOUNT.mediumTruncatedPublicKey, {
exact: true
})
.click();

await popupPage.getByRole('button', { name: 'Next' }).click();

await popupExpect(
Expand Down Expand Up @@ -100,9 +112,21 @@ popup.describe('Popup UI: Casper Native Transfer', () => {
).toBeDisabled();

await popupPage
.getByPlaceholder('Public key', { exact: true })
.getByPlaceholder('Public key or name', { exact: true })
.fill(DEFAULT_SECOND_ACCOUNT.publicKey);

await popupExpect(
popupPage.getByText(DEFAULT_SECOND_ACCOUNT.mediumTruncatedPublicKey, {
exact: true
})
).toBeVisible();

await popupPage
.getByText(DEFAULT_SECOND_ACCOUNT.mediumTruncatedPublicKey, {
exact: true
})
.click();

await popupPage.getByRole('button', { name: 'Next' }).click();

await popupExpect(
Expand Down
28 changes: 26 additions & 2 deletions e2e-tests/popup/transfers/erc-20-transfer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,21 @@ popup.describe('Popup UI: ERC-20 transfer', () => {
).toBeDisabled();

await popupPage
.getByPlaceholder('Public key', { exact: true })
.getByPlaceholder('Public key or name', { exact: true })
.fill(DEFAULT_SECOND_ACCOUNT.publicKey);

await popupExpect(
popupPage.getByText(DEFAULT_SECOND_ACCOUNT.mediumTruncatedPublicKey, {
exact: true
})
).toBeVisible();

await popupPage
.getByText(DEFAULT_SECOND_ACCOUNT.mediumTruncatedPublicKey, {
exact: true
})
.click();

await popupPage.getByRole('button', { name: 'Next' }).click();

await popupExpect(
Expand Down Expand Up @@ -137,9 +149,21 @@ popup.describe('Popup UI: ERC-20 transfer', () => {
).toBeDisabled();

await popupPage
.getByPlaceholder('Public key', { exact: true })
.getByPlaceholder('Public key or name', { exact: true })
.fill(DEFAULT_SECOND_ACCOUNT.publicKey);

await popupExpect(
popupPage.getByText(DEFAULT_SECOND_ACCOUNT.mediumTruncatedPublicKey, {
exact: true
})
).toBeVisible();

await popupPage
.getByText(DEFAULT_SECOND_ACCOUNT.mediumTruncatedPublicKey, {
exact: true
})
.click();

await popupPage.getByRole('button', { name: 'Next' }).click();

await popupExpect(
Expand Down
14 changes: 13 additions & 1 deletion e2e-tests/popup/transfers/nft-transfer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,21 @@ popup.describe('Popup UI: NFT Transfer', () => {
).toBeDisabled();

await popupPage
.getByPlaceholder('Public key', { exact: true })
.getByPlaceholder('Public key or name', { exact: true })
.fill(DEFAULT_SECOND_ACCOUNT.publicKey);

await popupExpect(
popupPage.getByText(DEFAULT_SECOND_ACCOUNT.mediumTruncatedPublicKey, {
exact: true
})
).toBeVisible();

await popupPage
.getByText(DEFAULT_SECOND_ACCOUNT.mediumTruncatedPublicKey, {
exact: true
})
.click();

await popupPage.getByRole('button', { name: 'Next' }).click();

await popupExpect(
Expand Down

0 comments on commit 0d401c3

Please sign in to comment.