-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e2c4ed8
commit 9b699b9
Showing
8 changed files
with
85 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export enum MockedTokensSelectors { | ||
Sip10TokenTestId = 'SP265WBWD4NH7TVPYQTVD23X3607NNK4484DTXQZ3.longcoin::longcoin', | ||
Brc20TokenTestId = 'doge', | ||
Src20TokenTestId = 'pxl', | ||
Stx20TokenTestId = 'MEME', | ||
RuneTokenTestId = 'DOGGOTOTHEMOON', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { expect } from '@playwright/test'; | ||
import { TEST_ACCOUNT_2_STX_ADDRESS } from '@tests/mocks/constants'; | ||
import { mockStacksBroadcastTransaction } from '@tests/mocks/mock-stacks-txs'; | ||
import { SendCryptoAssetSelectors } from '@tests/selectors/send.selectors'; | ||
|
||
import { test } from '../../fixtures/fixtures'; | ||
|
||
const amount = '0.000001'; | ||
|
||
test.describe('Send sip10', () => { | ||
test.beforeEach(async ({ extensionId, globalPage, homePage, onboardingPage, sendPage }) => { | ||
await globalPage.setupAndUseApiCalls(extensionId); | ||
await mockStacksBroadcastTransaction(globalPage.page); | ||
|
||
await onboardingPage.signInWithTestAccount(extensionId); | ||
await homePage.sendButton.click(); | ||
await sendPage.selectSIP10AndGoToSendForm(); | ||
}); | ||
|
||
test('can send sip10 token', async ({ sendPage }) => { | ||
await sendPage.amountInput.fill(amount); | ||
await sendPage.recipientInput.fill(TEST_ACCOUNT_2_STX_ADDRESS); | ||
await sendPage.previewSendTxButton.click(); | ||
const details = await sendPage.confirmationDetails.allInnerTexts(); | ||
|
||
test.expect(details).toBeTruthy(); | ||
|
||
await sendPage.confirmSendTransaction(); | ||
|
||
const sentTransactionSummaryPage = sendPage.page.getByTestId( | ||
SendCryptoAssetSelectors.SentTransactionSummary | ||
); | ||
|
||
await expect(sentTransactionSummaryPage).toBeAttached(); | ||
}); | ||
}); |