Skip to content

Commit

Permalink
Update the validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotrk39 committed Jan 23, 2025
1 parent 55d18be commit 32ec626
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions e2e/portalicious/pages/PaymentsPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,14 @@ class PaymentsPage extends BasePage {
failed: number;
}) {
const graph = await this.page.locator('canvas').getAttribute('aria-label');

if (graph) {
const graphText = graph
.replace('Payment status chart.', '')
.replace(/\s+/g, ' ')
.trim();

await this.page.waitForTimeout(1000); // Wait for the graph to be updated after the loader is hidden
expect(graphText).toContain(
`Pending: ${pending}, Successful: ${successful}, Failed: ${failed}`,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ test('[32297] Graph should reflect transfer statuses', async ({ page }) => {
await paymentsPage.validatePaymentsDetailsPageByDate(lastPaymentDate);
});

await page.waitForTimeout(5000);

await test.step('Validate payemnt in progress in Payment overview', async () => {
await paymentsPage.validateToastMessage('Payment created.');
await paymentsPage.waitForPaymentToComplete();
Expand Down

0 comments on commit 32ec626

Please sign in to comment.