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

Commit95f53fd

Browse files
committed
fix(e2e): disable dynamic parameters for updateWorkspace tests
The updateWorkspace tests were written for the classic parameter flow.With dynamic parameters now being the default, these tests need toexplicitly disable dynamic parameters via the template settings pageto continue working as expected.This fix:1. Adds a disableDynamicParameters helper function2. Modifies all updateWorkspace tests to disable dynamic parameters after template creation3. Ensures tests use the classic parameter flow they were designed forFixes the failing e2e test 'update workspace with ephemeral parameter enabled'.
1 parentc4f4fe5 commit95f53fd

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

‎site/e2e/helpers.ts‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,3 +1203,36 @@ export async function addUserToOrganization(
12031203
}
12041204
awaitpage.mouse.click(10,10);// close the popover by clicking outside of it
12051205
}
1206+
1207+
/**
1208+
* disableDynamicParameters navigates to the template settings page and disables
1209+
* dynamic parameters by unchecking the "Enable dynamic parameters" checkbox.
1210+
*/
1211+
exportconstdisableDynamicParameters=async(
1212+
page:Page,
1213+
templateName:string,
1214+
orgName=defaultOrganizationName,
1215+
)=>{
1216+
awaitpage.goto(`/templates/${orgName}/${templateName}/settings`,{
1217+
waitUntil:"domcontentloaded",
1218+
});
1219+
1220+
// Find and uncheck the "Enable dynamic parameters" checkbox
1221+
constdynamicParamsCheckbox=page.getByRole("checkbox",{
1222+
name:/Enabledynamicparametersforworkspacecreation/,
1223+
});
1224+
1225+
// If the checkbox is checked, uncheck it
1226+
if(awaitdynamicParamsCheckbox.isChecked()){
1227+
awaitdynamicParamsCheckbox.click();
1228+
}
1229+
1230+
// Save the changes
1231+
awaitpage.getByRole("button",{name:/save/i}).click();
1232+
1233+
// Wait for the success message or page to update
1234+
awaitpage.waitForSelector("text=Template updated successfully",{
1235+
state:"visible",
1236+
timeout:10000,
1237+
});
1238+
};

‎site/e2e/tests/workspaces/updateWorkspace.spec.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { users } from "../../constants";
33
import{
44
createTemplate,
55
createWorkspace,
6+
disableDynamicParameters,
67
echoResponsesWithParameters,
78
updateTemplate,
89
updateWorkspace,
@@ -34,6 +35,9 @@ test("update workspace, new optional, immutable parameter added", async ({
3435
echoResponsesWithParameters(richParameters),
3536
);
3637

38+
// Disable dynamic parameters to use classic parameter flow for this test
39+
awaitdisableDynamicParameters(page,template);
40+
3741
awaitlogin(page,users.member);
3842
constworkspaceName=awaitcreateWorkspace(page,template);
3943

@@ -77,6 +81,9 @@ test("update workspace, new required, mutable parameter added", async ({
7781
echoResponsesWithParameters(richParameters),
7882
);
7983

84+
// Disable dynamic parameters to use classic parameter flow for this test
85+
awaitdisableDynamicParameters(page,template);
86+
8087
awaitlogin(page,users.member);
8188
constworkspaceName=awaitcreateWorkspace(page,template);
8289

@@ -122,6 +129,9 @@ test("update workspace with ephemeral parameter enabled", async ({ page }) => {
122129
echoResponsesWithParameters(richParameters),
123130
);
124131

132+
// Disable dynamic parameters to use classic parameter flow for this test
133+
awaitdisableDynamicParameters(page,template);
134+
125135
awaitlogin(page,users.member);
126136
constworkspaceName=awaitcreateWorkspace(page,template);
127137

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp