-
Notifications
You must be signed in to change notification settings - Fork 27
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
8f6e924
commit 5098b76
Showing
17 changed files
with
300 additions
and
74 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { expect, test } from "@playwright/test"; | ||
|
||
import { getBitcoinAddress } from "../utils"; | ||
|
||
test.describe("Chain Swap 0-amount", () => { | ||
test("should allow 0-amount chain swaps", async ({ page }) => { | ||
await page.goto("/"); | ||
|
||
const assetSelector = page.locator("div[class='asset asset-LN'] div"); | ||
await assetSelector.click(); | ||
|
||
await page.locator("div[data-testid='select-L-BTC']").click(); | ||
|
||
const inputOnchainAddress = page.locator( | ||
"input[data-testid='onchainAddress']", | ||
); | ||
await inputOnchainAddress.fill(await getBitcoinAddress()); | ||
|
||
const buttonCreateSwap = page.locator( | ||
"button[data-testid='create-swap-button']", | ||
); | ||
await buttonCreateSwap.click(); | ||
|
||
const skipDownload = page.getByText("Skip download"); | ||
await skipDownload.click(); | ||
}); | ||
|
||
test("should not allow 0-amount chain swaps when sending RBTC", async ({ | ||
page, | ||
}) => { | ||
await page.goto("/"); | ||
|
||
const assetSelector = page.locator("div[class='asset asset-LN'] div"); | ||
await assetSelector.click(); | ||
|
||
await page.locator("div[data-testid='select-RBTC']").click(); | ||
|
||
const inputOnchainAddress = page.locator( | ||
"input[data-testid='onchainAddress']", | ||
); | ||
await inputOnchainAddress.fill(await getBitcoinAddress()); | ||
|
||
const buttonCreateSwap = page.locator( | ||
"button[data-testid='create-swap-button']", | ||
); | ||
const createButton = await buttonCreateSwap.elementHandle(); | ||
await expect(createButton.getAttribute("disabled")).resolves.toEqual( | ||
"", | ||
); | ||
}); | ||
}); |
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
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
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
Oops, something went wrong.