Skip to content

Commit

Permalink
add additional checks so that page snapshots reflect loaded state
Browse files Browse the repository at this point in the history
  • Loading branch information
rkuo-danswer committed Nov 21, 2024
1 parent f436d8f commit 6d0a00c
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions web/tests/e2e/admin_add_connector.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ test(
// Test simple loading
await page.goto("http://localhost:3000/admin/add-connector");
await expect(page.locator("h1.text-3xl")).toHaveText("Add Connector");
await expect(page.locator("h1.text-lg").nth(0)).toHaveText(/^Storage/);
}
);
3 changes: 3 additions & 0 deletions web/tests/e2e/admin_assistants.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@ test(
// Test simple loading
await page.goto("http://localhost:3000/admin/assistants");
await expect(page.locator("h1.text-3xl")).toHaveText("Assistants");
await expect(page.locator("p.text-sm").nth(0)).toHaveText(
/^Assistants are a way to build/
);
}
);
3 changes: 3 additions & 0 deletions web/tests/e2e/admin_bots.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@ test(
// Test simple loading
await page.goto("http://localhost:3000/admin/bots");
await expect(page.locator("h1.text-3xl")).toHaveText("Slack Bots");
await expect(page.locator("p.text-sm").nth(0)).toHaveText(
/^Setup Slack bots that connect to Danswer./
);
}
);
3 changes: 3 additions & 0 deletions web/tests/e2e/admin_documents_explorer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@ test(
// Test simple loading
await page.goto("http://localhost:3000/admin/documents/explorer");
await expect(page.locator("h1.text-3xl")).toHaveText("Document Explorer");
await expect(page.locator("div.flex.text-emphasis.mt-3")).toHaveText(
"Search for a document above to modify its boost or hide it from searches."
);
}
);
6 changes: 6 additions & 0 deletions web/tests/e2e/admin_documents_feedback.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,11 @@ test(
// Test simple loading
await page.goto("http://localhost:3000/admin/documents/feedback");
await expect(page.locator("h1.text-3xl")).toHaveText("Document Feedback");
await expect(page.locator("h1.text-lg").nth(0)).toHaveText(
"Most Liked Documents"
);
await expect(page.locator("h1.text-lg").nth(1)).toHaveText(
"Most Disliked Documents"
);
}
);
3 changes: 3 additions & 0 deletions web/tests/e2e/admin_documents_sets.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@ test(
// Test simple loading
await page.goto("http://localhost:3000/admin/documents/sets");
await expect(page.locator("h1.text-3xl")).toHaveText("Document Sets");
await expect(page.locator("p.text-sm")).toHaveText(
/^Document Sets allow you to group logically connected documents into a single bundle./
);
}
);
3 changes: 3 additions & 0 deletions web/tests/e2e/admin_indexing_status.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@ test(
// Test simple loading
await page.goto("http://localhost:3000/admin/indexing/status");
await expect(page.locator("h1.text-3xl")).toHaveText("Existing Connectors");
await expect(page.locator("p.text-sm")).toHaveText(
/^It looks like you don't have any connectors setup yet./
);
}
);

0 comments on commit 6d0a00c

Please sign in to comment.