import { test, expect } from '@playwright/test'; import { declineWallet, orderHistory } from '../seed'; test("Declined wallet payment in Order history", async ({ page }) => { await declineWallet(page); const history = orderHistory(page); const order = history.getByRole('row').filter({ has: page.getByRole('cell', { name: "$19.99", exact: true }), }); await expect(order).toHaveCount(1); const columns = await history.getByRole('columnheader').allTextContents(); const column = columns.indexOf("Status"); expect(column).toBeGreaterThanOrEqual(0); await expect(order.getByRole('cell').nth(column)).toHaveText("Declined"); });