From 0ad1bc4bfe0a045aaa2bd3590c3072f64128f5e1 Mon Sep 17 00:00:00 2001 From: Michalina Date: Thu, 27 Jul 2023 09:19:51 +0200 Subject: [PATCH] Fix assertions made on the latest transaction There is a stage in the tests when we want to verify the attributes of the latest transaction. By mistake we did some of the checks on an objet that wasn't a latest transaction, but on an object of 'any' transaction. The assertion was failing if more than one object was detected. --- e2e-tests/regular/transactions.spec.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/e2e-tests/regular/transactions.spec.ts b/e2e-tests/regular/transactions.spec.ts index 1784554db1..f776edaa5b 100644 --- a/e2e-tests/regular/transactions.spec.ts +++ b/e2e-tests/regular/transactions.spec.ts @@ -195,10 +195,12 @@ test.describe("Transactions", () => { latestSentTx.getByText(/^[a-zA-Z]{3} \d{1,2}$/) ).toBeVisible() await expect( - popup.getByTestId("activity_list_item_amount").getByText(/^0$/) + latestSentTx.getByTestId("activity_list_item_amount").getByText(/^0$/) ).toBeVisible() await expect( - popup.getByTestId("activity_list_item_amount").getByText(/^ETH$/) + latestSentTx + .getByTestId("activity_list_item_amount") + .getByText(/^ETH$/) ).toBeVisible() await expect(latestSentTx.getByText(/^To: 0x4774…875a6$/)).toBeVisible() @@ -248,10 +250,12 @@ test.describe("Transactions", () => { latestSentTx.getByText(/^[a-zA-Z]{3} \d{1,2}$/) ).toBeVisible() await expect( - popup.getByTestId("activity_list_item_amount").getByText(/^0$/) + latestSentTx.getByTestId("activity_list_item_amount").getByText(/^0$/) ).toBeVisible() await expect( - popup.getByTestId("activity_list_item_amount").getByText(/^ETH$/) + latestSentTx + .getByTestId("activity_list_item_amount") + .getByText(/^ETH$/) ).toBeVisible() await expect(latestSentTx.getByText(/^To: 0x4774…875a6$/)).toBeVisible()