From ce8c338fca9e8f8b9e0c6338d5cc7899412bbed0 Mon Sep 17 00:00:00 2001 From: Ramiro Medina <64783088+ramedina86@users.noreply.github.com> Date: Tue, 3 Dec 2024 11:12:52 +0000 Subject: [PATCH 1/6] fix: Cannot add tool when dragging by image --- src/ui/src/builder/sidebar/BuilderSidebarToolkit.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ui/src/builder/sidebar/BuilderSidebarToolkit.vue b/src/ui/src/builder/sidebar/BuilderSidebarToolkit.vue index c00ef7bb1..d9bc28bfc 100644 --- a/src/ui/src/builder/sidebar/BuilderSidebarToolkit.vue +++ b/src/ui/src/builder/sidebar/BuilderSidebarToolkit.vue @@ -26,6 +26,7 @@ { }) => { await page.getByPlaceholder(object).fill(color); await page.locator(`[data-automation-action="toggle-panel"][data-automation-key="log"]`).click(); - const rowLocator = page - .locator(".BuilderPanelSwitcher div.row") - .filter({ hasText: "Return value" }); + const rowsLocator = page + .locator(".BuilderPanelSwitcher div.row"); + await expect(rowsLocator).toHaveCount(3); + const rowLocator = rowsLocator.filter({ hasText: "Return value" }); await rowLocator.getByRole("button", { name: "Details" }).click(); const resultsLocator = page.locator( `.BuilderModal [data-automation-key="result"]`, @@ -93,9 +94,9 @@ test.describe("Workflows", () => { await page.locator(`[data-automation-action="run-workflow"]`).click(); await page.locator(`[data-automation-action="toggle-panel"][data-automation-key="log"]`).click(); - const rowLocator = page - .locator(".BuilderPanelSwitcher div.row") - .filter({ hasText: "Return value" }).first();; + const rowsLocator = page.locator(".BuilderPanelSwitcher div.row"); + await expect(rowsLocator).toHaveCount(3); + const rowLocator = rowsLocator.filter({ hasText: "Return value" }).first();; await rowLocator.getByRole("button", { name: "Details" }).click(); const returnValueLocator = page.locator( `.BuilderModal [data-automation-key="return-value"]`, From 7958f10a01e637728803ad8477e204510bc9e4eb Mon Sep 17 00:00:00 2001 From: Ramiro Medina <64783088+ramedina86@users.noreply.github.com> Date: Tue, 3 Dec 2024 13:41:53 +0100 Subject: [PATCH 3/6] test: Make Workflows tests less flaky --- tests/e2e/tests/workflows.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/tests/workflows.spec.ts b/tests/e2e/tests/workflows.spec.ts index 6b91e8db4..89dcc2664 100644 --- a/tests/e2e/tests/workflows.spec.ts +++ b/tests/e2e/tests/workflows.spec.ts @@ -95,7 +95,7 @@ test.describe("Workflows", () => { await page.locator(`[data-automation-action="toggle-panel"][data-automation-key="log"]`).click(); const rowsLocator = page.locator(".BuilderPanelSwitcher div.row"); - await expect(rowsLocator).toHaveCount(3); + await expect(rowsLocator).toHaveCount(5); const rowLocator = rowsLocator.filter({ hasText: "Return value" }).first();; await rowLocator.getByRole("button", { name: "Details" }).click(); const returnValueLocator = page.locator( From b1c14dae1a3eed040474283fbf32ed2457181c92 Mon Sep 17 00:00:00 2001 From: Ramiro Medina <64783088+ramedina86@users.noreply.github.com> Date: Tue, 3 Dec 2024 13:02:58 +0000 Subject: [PATCH 4/6] chore: Change capitalization, spelling --- apps/default/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/default/main.py b/apps/default/main.py index ce674c987..a20e88414 100644 --- a/apps/default/main.py +++ b/apps/default/main.py @@ -23,14 +23,14 @@ def increment(state): print("The counter has been incremented.") _update_message(state) -# Initialise the state +# Initialize the state -# "_my_private_element" won't be serialised or sent to the frontend, +# "_my_private_element" won't be serialized or sent to the frontend, # because it starts with an underscore initial_state = wf.init_state({ "my_app": { - "title": "MY APP" + "title": "My app" }, "_my_private_element": 1337, "message": None, From c7c955bec9a8b71402d6e57281137d1179e33d33 Mon Sep 17 00:00:00 2001 From: Ramiro Medina <64783088+ramedina86@users.noreply.github.com> Date: Tue, 3 Dec 2024 15:58:20 +0000 Subject: [PATCH 5/6] test: Improve e2e workflows --- tests/e2e/tests/workflows.spec.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/e2e/tests/workflows.spec.ts b/tests/e2e/tests/workflows.spec.ts index 89dcc2664..d8ccef8bc 100644 --- a/tests/e2e/tests/workflows.spec.ts +++ b/tests/e2e/tests/workflows.spec.ts @@ -33,6 +33,7 @@ test.describe("Workflows", () => { await expect(rowsLocator).toHaveCount(3); const rowLocator = rowsLocator.filter({ hasText: "Return value" }); await rowLocator.getByRole("button", { name: "Details" }).click(); + await expect(".BuilderModal").toBeVisible(); const resultsLocator = page.locator( `.BuilderModal [data-automation-key="result"]`, ); @@ -98,6 +99,7 @@ test.describe("Workflows", () => { await expect(rowsLocator).toHaveCount(5); const rowLocator = rowsLocator.filter({ hasText: "Return value" }).first();; await rowLocator.getByRole("button", { name: "Details" }).click(); + await expect(".BuilderModal").toBeVisible(); const returnValueLocator = page.locator( `.BuilderModal [data-automation-key="return-value"]`, ); From ba1bdf0ea20318a393846bb79a5850c2042225d2 Mon Sep 17 00:00:00 2001 From: Ramiro Medina <64783088+ramedina86@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:16:34 +0000 Subject: [PATCH 6/6] test: Improve e2e workflows --- src/ui/src/builder/BuilderApp.vue | 6 ++---- tests/e2e/tests/workflows.spec.ts | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/ui/src/builder/BuilderApp.vue b/src/ui/src/builder/BuilderApp.vue index 5668e1fd4..421a08bac 100644 --- a/src/ui/src/builder/BuilderApp.vue +++ b/src/ui/src/builder/BuilderApp.vue @@ -29,9 +29,7 @@ :key="selectedId ?? 'noneSelected'" > - + @@ -375,7 +373,7 @@ onMounted(() => { --notificationsDisplacement: calc(var(--builderSettingsWidth) + 24px); } -.builderPanelSwitcher { +.panelSwitcher { grid-column: 2 / 3; grid-row: 3; } diff --git a/tests/e2e/tests/workflows.spec.ts b/tests/e2e/tests/workflows.spec.ts index d8ccef8bc..e579b960c 100644 --- a/tests/e2e/tests/workflows.spec.ts +++ b/tests/e2e/tests/workflows.spec.ts @@ -33,7 +33,7 @@ test.describe("Workflows", () => { await expect(rowsLocator).toHaveCount(3); const rowLocator = rowsLocator.filter({ hasText: "Return value" }); await rowLocator.getByRole("button", { name: "Details" }).click(); - await expect(".BuilderModal").toBeVisible(); + await expect(page.locator(".BuilderModal")).toBeVisible(); const resultsLocator = page.locator( `.BuilderModal [data-automation-key="result"]`, ); @@ -99,7 +99,7 @@ test.describe("Workflows", () => { await expect(rowsLocator).toHaveCount(5); const rowLocator = rowsLocator.filter({ hasText: "Return value" }).first();; await rowLocator.getByRole("button", { name: "Details" }).click(); - await expect(".BuilderModal").toBeVisible(); + await expect(page.locator(".BuilderModal")).toBeVisible(); const returnValueLocator = page.locator( `.BuilderModal [data-automation-key="return-value"]`, );