-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: covering Batches API and partially covered Transactions (#156)
covering Batches API # What ❔ 1506 [Transactions] /transactions response returns elements (wasn't covered fully) 1513 [Batches] /batches response returns elements (wasn't covered fully) 1510 [Transactions] /address/{address}/logs response returns elements (wasn't covered fully) 1656 [Transactions] Verify failed tx (new test) 1655 [Transactions] Verify deployed the own ERC20 token contract in BE (new test) ## Why ❔ Why are these changes done? - expanding test coverage ## Checklist - [ +] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ +] Tests for the changes have been added / updated. - [ n/a] Documentation comments have been added / updated.
- Loading branch information
1 parent
0259377
commit fde87c4
Showing
4 changed files
with
107 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); | ||
}); |