Skip to content

Commit

Permalink
Merge pull request #319 from CambioML/fix/e2e-testing
Browse files Browse the repository at this point in the history
Fixing E2E tests
  • Loading branch information
lingjiekong authored Dec 29, 2024
2 parents d0cd71a + 2f14078 commit 9f7a306
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/coreTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ dotenv.config({ path: './tests/.env' });
const SIMILARITY_THRESHOLD = 85;

async function login(page: Page, username: string, password: string) {
await page.goto('/sandbox');
await page.goto('/anyparser');
await page.click('text=Login');
await page.waitForURL(`https://${process.env.AUTH0_DOMAIN}/**`, { timeout: 5000 });
await page.fill('input[name="username"]', username);
await page.fill('input[name="password"]', password);
await page.click('button[type="submit"]');

await page.waitForURL('**/sandbox', { timeout: 5000 });
await page.waitForURL('**/anyparser', { timeout: 5000 });
}

async function signup(page: Page, username: string, password: string) {
await page.goto('/sandbox');
await page.goto('/anyparser');
await page.click('text=Login');

await page.waitForURL(`https://${process.env.AUTH0_DOMAIN}/**`, { timeout: 5000 });
Expand All @@ -40,7 +40,7 @@ async function signup(page: Page, username: string, password: string) {
await page.click('button[value="accept"]');

// Wait for the final URL after acceptance
await page.waitForURL('**/sandbox', { timeout: 5000 });
await page.waitForURL('**/anyparser', { timeout: 5000 });
}

async function uploadFile(page: Page, file: TestFile, testFilename: string) {
Expand Down

0 comments on commit 9f7a306

Please sign in to comment.