Skip to content

Commit

Permalink
e2e: awaits for /projects response
Browse files Browse the repository at this point in the history
  • Loading branch information
agnlez committed Jan 27, 2025
1 parent dd8adf2 commit 1661364
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions e2e/tests/projects/projects-overview-table.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { expect, Page, test } from "@playwright/test";
import { E2eTestManager } from "@shared/lib/e2e-test-manager";
import { User } from "@shared/entities/users/user.entity";
import {Country} from "@shared/entities/country.entity";
import {Project, PROJECT_PRICE_TYPE} from "@shared/entities/projects.entity";
import {PROJECT_OVERVIEW_TABLE_LOCATOR} from "../../page-objects";
Expand Down Expand Up @@ -32,7 +31,8 @@ test.describe("Projects - Overview Table", () => {
await testManager.mocks().createProject({countryCode: china.code, projectName: `${priceType} China Mangrove Conservation`, priceType});
await testManager.mocks().createProject({countryCode: india.code, projectName: `${priceType} India Mangrove Conservation`, priceType});
}
await page.goto('http://localhost:3000/');
page.goto('http://localhost:3000/');
await page.waitForResponse('**/projects?**');
const firstRowCellsBeforeFilter = await page.locator(PROJECT_OVERVIEW_TABLE_LOCATOR).nth(0).locator('td').allTextContents();
expect(firstRowCellsBeforeFilter).toContain(`Market price China Mangrove Conservation`)
await page.locator('button').filter({ hasText: 'Market price' }).click();
Expand Down

0 comments on commit 1661364

Please sign in to comment.