Skip to content

Commit c718e74

Browse files
committed
ongoing
1 parent ac1ad3a commit c718e74

File tree

1 file changed

+33
-10
lines changed

1 file changed

+33
-10
lines changed

tests/e2e-playwright/tests/metamodeling/test_response_surface_modeling.py

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,41 @@ def test_response_surface_modeling(
4545
), "Expected workbench to be a dict!"
4646
node_ids: list[str] = list(jsonifier_project_data["workbench"])
4747
assert len(node_ids) == 1, "Expected 1 node in the workbench!"
48-
# create the number parameter
49-
page.get_by_test_id("newNodeBtn").click()
50-
page.get_by_placeholder("Filter").click()
51-
page.get_by_placeholder("Filter").fill("number parameter")
52-
page.get_by_placeholder("Filter").press("Enter")
53-
54-
# connect the jsonifier to the parameter
55-
page.get_by_test_id("nodeTreeItem").filter(has_text="jsonifier").click()
56-
page.locator(
57-
"body > div:nth-child(5) > div:nth-child(5) > div:nth-child(3) > div:nth-child(3) > div > div:nth-child(2) > div > div > div:nth-child(3) > div:nth-child(4) > div:nth-child(1) > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div > div:nth-child(2) > div.qx-panelview-content > div > div:nth-child(18)"
48+
49+
# select the jsonifier, it's the second one as the study has the same name
50+
page.get_by_test_id("nodeTreeItem").filter(has_text="jsonifier").all()[
51+
1
52+
].click()
53+
54+
# create the probe
55+
page.get_by_test_id("connect_probe_btn_number_3").click()
56+
57+
# create the parameter
58+
with page.expect_response(
59+
re.compile(rf"/projects/{jsonifier_project_data['uuid']}/nodes")
60+
):
61+
page.get_by_test_id("newNodeBtn").click()
62+
page.get_by_placeholder("Filter").click()
63+
page.get_by_placeholder("Filter").fill("number parameter")
64+
page.get_by_placeholder("Filter").press("Enter")
65+
66+
# connect the parameter
67+
page.get_by_test_id("nodeTreeItem").filter(has_text="jsonifier").all()[
68+
1
69+
].click()
70+
page.get_by_test_id("connect_input_btn_number_1").click()
71+
page.get_by_text("set existing parameter").nth(1).click()
72+
page.get_by_text("set existing parameter").nth(1).filter(
73+
has_text="number parameter"
5874
).click()
75+
page.wait_for_timeout(5000)
76+
# page.get_by_test_id("connect_input_btn_number_1").click()
77+
# page.get_by_text("new parameter").click()
5978

79+
# rename the project to identify it
80+
page.get_by_test_id("nodesTree").first.click()
81+
page.get_by_test_id("nodesTree").first.press("F2")
82+
page.get_by_test_id("nodesTree").first.fill("RSM study")
6083
# 2. convert it to a function
6184
# 3. start a RSM with that function
6285

0 commit comments

Comments
 (0)