mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-22 01:02:41 +00:00
On the wide settings layout, a plugin settings screen showed only its title and the plugin's content, so getting back to the Plugins page meant finding Plugins in the sidebar again. The compact layout already had a Back header and project settings already had a desktop "Back to projects" link. Plugin settings screens now render a "Back to plugins" link on desktop the same way, including when the screen is offline or unavailable. Closes #5518 Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
69 lines
2.0 KiB
TypeScript
69 lines
2.0 KiB
TypeScript
import {
|
|
test,
|
|
openDisplaySettings,
|
|
openCompactDisplaySettings,
|
|
groupByWorkspace,
|
|
hideMetadata,
|
|
reloadSavedDisplaySettings,
|
|
editTitle,
|
|
replaceTitle,
|
|
saveTitle,
|
|
expectTitleRequired,
|
|
expectSavedTitle,
|
|
changeMetadataFromAnotherClient,
|
|
expectConflictPreservesDraft,
|
|
discardTitle,
|
|
returnAndReopenSettings,
|
|
returnToPluginsPage,
|
|
expectSettingsUnavailable,
|
|
} from "../support/helpers/plugin-settings";
|
|
|
|
test("display preferences survive a reload", async ({ page }) => {
|
|
await openDisplaySettings(page);
|
|
await groupByWorkspace(page);
|
|
await hideMetadata(page);
|
|
await reloadSavedDisplaySettings(page);
|
|
});
|
|
|
|
test("invalid titles stay editable until a valid title is saved", async ({ page }) => {
|
|
await openDisplaySettings(page);
|
|
await editTitle(page, "");
|
|
await saveTitle(page);
|
|
await expectTitleRequired(page);
|
|
await replaceTitle(page, "My monitor");
|
|
await saveTitle(page);
|
|
await expectSavedTitle(page, "My monitor");
|
|
});
|
|
|
|
test("another client's save preserves a conflicting draft", async ({ page }) => {
|
|
await openDisplaySettings(page);
|
|
await editTitle(page, "Unsaved title");
|
|
await changeMetadataFromAnotherClient(page);
|
|
await saveTitle(page);
|
|
await expectConflictPreservesDraft(page, "Unsaved title");
|
|
await discardTitle(page);
|
|
});
|
|
|
|
test("Back to plugins returns from a plugin settings screen", async ({ page }) => {
|
|
await openDisplaySettings(page);
|
|
await returnToPluginsPage(page);
|
|
});
|
|
|
|
test.describe("compact plugin settings", () => {
|
|
test.use({ viewport: { width: 390, height: 844 } });
|
|
|
|
test("Back and plugin re-enable restore the settings screen", async ({
|
|
page,
|
|
settingsPlugin,
|
|
}) => {
|
|
await openCompactDisplaySettings(page);
|
|
await groupByWorkspace(page);
|
|
await hideMetadata(page);
|
|
await returnAndReopenSettings(page);
|
|
await settingsPlugin.disablePlugin("settings-example");
|
|
await expectSettingsUnavailable(page);
|
|
await settingsPlugin.enablePlugin("settings-example");
|
|
await reloadSavedDisplaySettings(page);
|
|
});
|
|
});
|