Skip git check in windows & longer timeout (#622)

This commit is contained in:
Will Chen
2025-07-10 10:53:07 -07:00
committed by GitHub
parent 47385e0130
commit 72fd504f4a
2 changed files with 15 additions and 7 deletions

View File

@@ -436,7 +436,9 @@ export class PageObject {
} }
async snapshotProblemsPane() { async snapshotProblemsPane() {
await expect(this.page.getByTestId("problems-pane")).toMatchAriaSnapshot(); await expect(this.page.getByTestId("problems-pane")).toMatchAriaSnapshot({
timeout: Timeout.MEDIUM,
});
} }
async clickRebuild() { async clickRebuild() {

View File

@@ -3,6 +3,7 @@ import { test } from "./helpers/test_helper";
import fs from "fs-extra"; import fs from "fs-extra";
import path from "path"; import path from "path";
import { execSync } from "child_process"; import { execSync } from "child_process";
import os from "node:os";
test("supabase migrations", async ({ po }) => { test("supabase migrations", async ({ po }) => {
// Turning on native Git to catch this edge case: // Turning on native Git to catch this edge case:
@@ -46,12 +47,17 @@ test("supabase migrations", async ({ po }) => {
expect(await fs.readFile(path.join(migrationsDir, files[0]), "utf8")).toEqual( expect(await fs.readFile(path.join(migrationsDir, files[0]), "utf8")).toEqual(
"CREATE TABLE users (id serial primary key);", "CREATE TABLE users (id serial primary key);",
); );
// Make sure git is clean.
const gitStatus = execSync("git status --porcelain", { // Skip this check on Windows because git isn't configured and
cwd: appPath, // the mac test will catch this regression.
encoding: "utf8", if (os.platform() !== "win32") {
}).trim(); // Make sure git is clean.
expect(gitStatus).toBe(""); const gitStatus = execSync("git status --porcelain", {
cwd: appPath,
encoding: "utf8",
}).trim();
expect(gitStatus).toBe("");
}
// Send a prompt that triggers a migration // Send a prompt that triggers a migration
await po.sendPrompt("tc=execute-sql-no-description"); await po.sendPrompt("tc=execute-sql-no-description");