Fix stale app UI (supabase) & overall E2E test infra improvements (#337)
Fixes #269
This commit is contained in:
2
e2e-tests/fixtures/add-supabase.md
Normal file
2
e2e-tests/fixtures/add-supabase.md
Normal file
@@ -0,0 +1,2 @@
|
||||
Adding supabase...
|
||||
<dyad-add-integration provider="supabase"></dyad-add-integration>
|
||||
@@ -258,6 +258,10 @@ export class PageObject {
|
||||
.click();
|
||||
}
|
||||
|
||||
async clickBackButton() {
|
||||
await this.page.getByRole("button", { name: "Back" }).click();
|
||||
}
|
||||
|
||||
async sendPrompt(prompt: string) {
|
||||
await this.getChatInput().click();
|
||||
await this.getChatInput().fill(prompt);
|
||||
@@ -382,6 +386,10 @@ export class PageObject {
|
||||
await this.page.getByTestId("app-details-more-options-button").click();
|
||||
}
|
||||
|
||||
async clickConnectSupabaseButton() {
|
||||
await this.page.getByTestId("connect-supabase-button").click();
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
// Settings related
|
||||
////////////////////////////////
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
- paragraph: tc=add-supabase
|
||||
- paragraph: Adding supabase...
|
||||
- text: Integrate with supabase?
|
||||
- button "Set up supabase"
|
||||
- button "Retry":
|
||||
- img
|
||||
@@ -0,0 +1,8 @@
|
||||
- paragraph: tc=add-supabase
|
||||
- paragraph: Adding supabase...
|
||||
- img
|
||||
- text: Supabase integration complete
|
||||
- paragraph: "This app is connected to Supabase project: Fake Supabase Project"
|
||||
- paragraph: Click the chat suggestion "Keep going" to continue.
|
||||
- button "Retry":
|
||||
- img
|
||||
@@ -0,0 +1,6 @@
|
||||
- paragraph: tc=add-supabase
|
||||
- paragraph: Adding supabase...
|
||||
- text: Integrate with supabase?
|
||||
- button "Set up supabase"
|
||||
- button "Retry":
|
||||
- img
|
||||
25
e2e-tests/supabase_stale_ui.spec.ts
Normal file
25
e2e-tests/supabase_stale_ui.spec.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { testSkipIfWindows } from "./helpers/test_helper";
|
||||
|
||||
// https://github.com/dyad-sh/dyad/issues/269
|
||||
testSkipIfWindows("supabase - stale ui", async ({ po }) => {
|
||||
await po.setUp();
|
||||
await po.sendPrompt("tc=add-supabase");
|
||||
await po.snapshotMessages();
|
||||
|
||||
await po.page.getByText("Set up supabase").click();
|
||||
// On app details page:
|
||||
await po.clickConnectSupabaseButton();
|
||||
// TODO: for some reason on Windows this navigates to the main (apps) page,
|
||||
// rather than the original chat page, so this test is skipped on Windows.
|
||||
// However, the underlying issue is platform-agnostic, so it seems OK to test
|
||||
// only on Mac.
|
||||
await po.clickBackButton();
|
||||
|
||||
// On chat page:
|
||||
await po.snapshotMessages();
|
||||
|
||||
// Create a second app; do NOT integrate it with Supabase, and make sure UI is correct.
|
||||
await po.goToAppsTab();
|
||||
await po.sendPrompt("tc=add-supabase");
|
||||
await po.snapshotMessages();
|
||||
});
|
||||
Reference in New Issue
Block a user