-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
4 changed files
with
106 additions
and
0 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,44 @@ | ||
import { expect, test } from "@playwright/test"; | ||
|
||
import { config } from "./config"; | ||
import { BlockExplorer, Buffer } from "../../src/entities"; | ||
import { Helper } from "../../src/helper"; | ||
|
||
import type { Locator } from "@playwright/test"; | ||
|
||
const bufferRoute = "src/playbook/"; | ||
const helper = new Helper(); | ||
let url: string; | ||
let bufferFile; | ||
let failedTxHash: string; | ||
let contract: string; | ||
let element: Locator; | ||
let selector: string; | ||
|
||
//@id1656 | ||
test("Verify failed tx", async ({ page }) => { | ||
bufferFile = bufferRoute + Buffer.failedState; | ||
failedTxHash = await helper.getStringFromFile(bufferFile); | ||
url = BlockExplorer.baseUrl + `/tx/${failedTxHash}` + BlockExplorer.localNetwork; | ||
|
||
await page.goto(url); | ||
|
||
selector = `text=Failed`; | ||
element = await page.locator(selector); | ||
|
||
await expect(element).toBeVisible(config.extraTimeout); | ||
}); | ||
|
||
//@id1655 | ||
test("Verify deployed the own ERC20 token contract", async ({ page }) => { | ||
bufferFile = bufferRoute + Buffer.L2; | ||
contract = await helper.getStringFromFile(bufferFile); | ||
url = BlockExplorer.baseUrl + `/address/${contract}` + BlockExplorer.localNetwork; | ||
|
||
await page.goto(url); | ||
|
||
selector = `text=${contract}`; | ||
element = await page.locator(selector).first(); | ||
|
||
await expect(element).toBeVisible(config.extraTimeout); | ||
}); |