forked from trent_larson/crowd-funder-for-time-pwa
fix: adjust playwright tests to new home-page button, and use 3 threads for fewer random failures
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { test, expect, Page } from '@playwright/test';
|
||||
import { importUser } from './testUtils';
|
||||
|
||||
async function testProjectGive(page: Page, selector: string) {
|
||||
async function testProjectGive(page: Page, isToProject: boolean) {
|
||||
const selector = isToProject ? 'gives-to' : 'gives-from';
|
||||
|
||||
// Generate a random string of a few characters
|
||||
const randomString = Math.random().toString(36).substring(2, 6);
|
||||
@@ -42,9 +43,9 @@ async function testProjectGive(page: Page, selector: string) {
|
||||
}
|
||||
|
||||
test('Record a give to a project', async ({ page }) => {
|
||||
await testProjectGive(page, 'gives-to');
|
||||
await testProjectGive(page, true);
|
||||
});
|
||||
|
||||
test('Record a give from a project', async ({ page }) => {
|
||||
await testProjectGive(page, 'gives-from');
|
||||
await testProjectGive(page, false);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user