Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: add e2e test for updating theme#16897

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
aslilac merged 1 commit intomainfromlilac/e2e-user-theme-preference
Mar 14, 2025
Merged
Show file tree
Hide file tree
Changes fromall 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
28 changes: 28 additions & 0 deletionssite/e2e/tests/users/userSettings.spec.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
import { expect, test } from "@playwright/test";
import { users } from "../../constants";
import { login } from "../../helpers";
import { beforeCoderTest } from "../../hooks";

test.beforeEach(({ page }) => {
beforeCoderTest(page);
});

test("adjust user theme preference", async ({ page }) => {
await login(page, users.member);

await page.goto("/settings/appearance", { waitUntil: "domcontentloaded" });

await page.getByText("Light", { exact: true }).click();
await expect(page.getByLabel("Light")).toBeChecked();

// Make sure the page is actually updated to use the light theme
const [root] = await page.$$("html");
expect(await root.evaluate((it) => it.className)).toContain("light");

await page.goto("/", { waitUntil: "domcontentloaded" });

// Make sure the page is still using the light theme after reloading and
// navigating away from the settings page.
const [homeRoot] = await page.$$("html");
expect(await homeRoot.evaluate((it) => it.className)).toContain("light");
});
10 changes: 3 additions & 7 deletionssite/e2e/tests/workspaces/createWorkspace.spec.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,11 +5,11 @@ import {
createTemplate,
createWorkspace,
echoResponsesWithParameters,
login,
openTerminalWindow,
requireTerraformProvisioner,
verifyParameters,
} from "../../helpers";
import { login } from "../../helpers";
import { beforeCoderTest } from "../../hooks";
import {
fifthParameter,
Expand DownExpand Up@@ -150,9 +150,7 @@ test("create workspace with disable_param search params", async ({ page }) => {
await login(page, users.member);
await page.goto(
`/templates/${templateName}/workspace?disable_params=first_parameter,second_parameter`,
{
waitUntil: "domcontentloaded",
},
{ waitUntil: "domcontentloaded" },
);

await expect(page.getByLabel(/First parameter/i)).toBeDisabled();
Expand All@@ -173,9 +171,7 @@ test.skip("create docker workspace", async ({ context, page }) => {
// The workspace agents must be ready before we try to interact with the workspace.
await page.waitForSelector(
`//div[@role="status"][@data-testid="agent-status-ready"]`,
{
state: "visible",
},
{ state: "visible" },
);

// Wait for the terminal button to be visible, and click it.
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp