fix: adjust playwright tests to new home-page button, and use 3 threads for fewer random failures

This commit is contained in:
2025-12-20 19:59:30 -07:00
parent e7ca2bb791
commit f460d6c3e2
6 changed files with 11 additions and 10 deletions

View File

@@ -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);
});