Skip to content

Commit 4ca4b2b

Browse files
committed
add delete transaction method
1 parent 3b360e4 commit 4ca4b2b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/pages/transactions/TransactionListPage.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Page } from '@playwright/test';
1+
import { expect, Page } from '@playwright/test';
22

33
import BasePageModel from '@/pages/BasePageModel';
44

@@ -14,6 +14,12 @@ class TransactionListPage extends BasePageModel {
1414
get successMessage() {
1515
return this.page.locator('.message');
1616
}
17+
18+
async getDeleteTransaction(n: number) {
19+
await this.table.row(n).actionsButton.click();
20+
await this.table.deleteButton.click();
21+
await expect(this.page.locator('.message')).toBeVisible();
22+
}
1723
}
1824

1925
export default TransactionListPage;

0 commit comments

Comments
 (0)