Implement native opening scenes, battle foundation and overworld movement
Checks / web (push) Canceled after 0s
Checks / web (push) Canceled after 0s
This commit is contained in:
1 parent
8b80d05ca2
commit
c08d250cf6
39 files changed
+10727
-1524
No files matched your search
+33
-2
@@ -6,8 +6,8 @@ test("ROM gate, help and responsive layouts", async ({ page }) => {
|
||||
page.on("pageerror", (error) => errors.push(error.message));
|
||||
await page.goto("/");
|
||||
await expect(
|
||||
page.getByRole("heading", { name: "A little adventure. Anywhere." }),
|
||||
).toBeVisible();
|
||||
page.getByRole("tab", { name: "Game", exact: true }),
|
||||
).toHaveAttribute("aria-selected", "true");
|
||||
await expect(page.locator("#play")).toBeDisabled();
|
||||
await page.locator("#rom-file").setInputFiles({
|
||||
name: "wrong.gbc",
|
||||
@@ -24,6 +24,7 @@ test("ROM gate, help and responsive layouts", async ({ page }) => {
|
||||
[768, 1024],
|
||||
[390, 844],
|
||||
[320, 740],
|
||||
[320, 568],
|
||||
[844, 390],
|
||||
]) {
|
||||
await page.setViewportSize({ width, height });
|
||||
@@ -44,10 +45,40 @@ test("ROM gate, help and responsive layouts", async ({ page }) => {
|
||||
expect(button.width).toBeGreaterThanOrEqual(44);
|
||||
expect(button.height).toBeGreaterThanOrEqual(44);
|
||||
}
|
||||
await page.locator("#player-name").scrollIntoViewIfNeeded();
|
||||
await expect(page.locator("#player-name")).toBeInViewport({ ratio: 0.9 });
|
||||
await page.locator("#rom-label").scrollIntoViewIfNeeded();
|
||||
await expect(page.locator("#rom-label")).toBeInViewport({ ratio: 0.9 });
|
||||
}
|
||||
expect(errors).toEqual([]);
|
||||
});
|
||||
|
||||
test("game menu tabs expose real tools and honest planned states with keyboard navigation", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto("/");
|
||||
const game = page.getByRole("tab", { name: "Game", exact: true });
|
||||
await game.focus();
|
||||
await page.keyboard.press("ArrowRight");
|
||||
await expect(page.locator("#tab-saves")).toBeFocused();
|
||||
await expect(page.locator("#panel-saves")).toBeVisible();
|
||||
await expect(page.locator("#save")).toBeDisabled();
|
||||
await expect(page.locator("#backup")).toBeDisabled();
|
||||
await page.keyboard.press("ArrowRight");
|
||||
await expect(page.locator("#panel-map")).toBeVisible();
|
||||
await expect(page.locator("#map-empty")).toBeVisible();
|
||||
await page.keyboard.press("End");
|
||||
await expect(page.locator("#tab-friends")).toBeFocused();
|
||||
await expect(page.locator("#panel-friends")).toContainText(/planned/i);
|
||||
await page.keyboard.press("Home");
|
||||
await expect(game).toBeFocused();
|
||||
await expect(page.locator("#panel-game")).toBeVisible();
|
||||
for (const id of ["pokedex", "link"]) {
|
||||
await page.locator(`#tab-${id}`).click();
|
||||
await expect(page.locator(`#panel-${id}`)).toContainText(/planned/i);
|
||||
}
|
||||
});
|
||||
|
||||
test("actual WASM executes an original cartridge, reads input and round-trips state", async ({
|
||||
page,
|
||||
}) => {
|
||||
|
||||
Reference in new issue
Block a user