Skip to content

Commit ce0a8ac

Browse files
committed
Fix new org test
1 parent 8383c61 commit ce0a8ac

File tree

2 files changed

+27
-23
lines changed

2 files changed

+27
-23
lines changed

tests/e2e/NewOrgModal.spec.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,18 @@ test.describe("without being signed in", () => {
1414
test("can *NOT* see the 'New Org' button", async ({ page, isMobile }) => {
1515
const response = await page.goto("http://localhost:1234");
1616
expect(response?.status()).toBeLessThan(400);
17-
await expect(page).toHaveScreenshot("no-new-org-button.png", { maxDiffPixels: 100 });
17+
await expect(page).toHaveScreenshot("no-new-org-button.png", {
18+
maxDiffPixels: 100,
19+
});
1820

1921
if (isMobile) {
2022
await expect(
2123
page.locator(".signed-in-nav_mobile .button").getByText("New Org"),
22-
).toBeVisible();
24+
).not.toBeVisible();
2325
} else {
2426
await expect(
2527
page.locator(".signed-in-nav_desktop .button").getByText("New Org"),
26-
).toBeVisible();
28+
).not.toBeVisible();
2729
}
2830
});
2931
});
@@ -36,7 +38,9 @@ test.describe("while being signed in", () => {
3638
test("can see the 'New Org' button", async ({ page, isMobile }) => {
3739
const response = await page.goto("http://localhost:1234");
3840
expect(response?.status()).toBeLessThan(400);
39-
await expect(page).toHaveScreenshot("new-org-button.png", { maxDiffPixels: 100 });
41+
await expect(page).toHaveScreenshot("new-org-button.png", {
42+
maxDiffPixels: 100,
43+
});
4044

4145
if (isMobile) {
4246
await expect(

tests/e2e/TestHelpers/Data.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -210,28 +210,28 @@ type DiffErrorCulprit = "new" | "old";
210210
type DiffErrorDetails =
211211
| { tag: "impossibleError" }
212212
| {
213-
tag: "constructorAlias";
214-
oldOrNewBranch: DiffErrorCulprit;
215-
typeName: string;
216-
constructorName1: string;
217-
constructorName2: string;
218-
}
213+
tag: "constructorAlias";
214+
oldOrNewBranch: DiffErrorCulprit;
215+
typeName: string;
216+
constructorName1: string;
217+
constructorName2: string;
218+
}
219219
| {
220-
tag: "missingConstructorName";
221-
oldOrNewBranch: DiffErrorCulprit;
222-
typeName: string;
223-
}
220+
tag: "missingConstructorName";
221+
oldOrNewBranch: DiffErrorCulprit;
222+
typeName: string;
223+
}
224224
| {
225-
tag: "nestedDeclAlias";
226-
oldOrNewBranch: DiffErrorCulprit;
227-
constructorName1: string;
228-
constructorName2: string;
229-
}
225+
tag: "nestedDeclAlias";
226+
oldOrNewBranch: DiffErrorCulprit;
227+
constructorName1: string;
228+
constructorName2: string;
229+
}
230230
| {
231-
tag: "strayConstructor";
232-
oldOrNewBranch: DiffErrorCulprit;
233-
constructorName: string;
234-
};
231+
tag: "strayConstructor";
232+
oldOrNewBranch: DiffErrorCulprit;
233+
constructorName: string;
234+
};
235235

236236
type ContributionDiffConfig =
237237
| { tag: "ok" }

0 commit comments

Comments
 (0)