Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 1 addition & 36 deletions e2e/tests/ui.spec.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test, expect } from "@playwright/test";

import { createApi, findRunnableEffect, getStack, readEnvelope, uniqueName } from "./helpers.mjs";
import { createApi, findRunnableEffect, getStack, readEnvelope } from "./helpers.mjs";

test("dashboard loads against the live stack", async ({ page }) => {
const stack = getStack();
Expand Down Expand Up @@ -38,38 +38,3 @@ test("effects page can activate an effect through the live UI", async ({ page, p
}
});

test("displays page can create, edit, and delete a simulator", async ({ page }) => {
const stack = getStack();
const simulatorName = uniqueName("E2E Simulator");
const updatedSimulatorName = `${simulatorName} Updated`;

await page.goto(`${stack.appOrigin}/displays`, { waitUntil: "networkidle" });
await expect(page.getByRole("heading", { name: "Displays" })).toBeVisible();

await page
.locator("li")
.filter({ hasText: stack.seededDisplay.name })
.getByTitle("Edit simulator")
.click();
await page.getByRole("button", { name: /delete simulator/i }).click();
await expect(page.locator("li").filter({ hasText: stack.seededDisplay.name })).toHaveCount(0);

await page.getByRole("button", { name: /create simulator/i }).click();
await page.getByLabel("Name").fill(simulatorName);
await page.getByLabel("Width").fill("320");
await page.getByLabel("Height").fill("320");
await page.getByRole("button", { name: /create simulator/i }).last().click();

await expect(page.getByText(simulatorName)).toBeVisible();

await page.locator("li").filter({ hasText: simulatorName }).getByTitle("Edit simulator").click();
await page.getByLabel("Name").fill(updatedSimulatorName);
await page.getByRole("button", { name: /save simulator/i }).click();

await expect(page.getByText(updatedSimulatorName)).toBeVisible();

await page.locator("li").filter({ hasText: updatedSimulatorName }).getByTitle("Edit simulator").click();
await page.getByRole("button", { name: /delete simulator/i }).click();

await expect(page.getByText(updatedSimulatorName)).toHaveCount(0);
});
2 changes: 2 additions & 0 deletions python/src/hypercolor/ws_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"device_metrics",
"sensors",
"display_preview",
"input_events",
)
WS_CAPABILITIES: Final = (
"frames",
Expand All @@ -38,6 +39,7 @@
"device_metrics",
"sensors",
"display_preview",
"input_events",
"commands",
"canvas_format_jpeg",
)
Expand Down