From 2732f1495e4f5429bddd8a58dd45ce98dbccf204 Mon Sep 17 00:00:00 2001 From: gabalafou Date: Tue, 10 Sep 2024 16:29:01 -0500 Subject: [PATCH 1/3] Increase timeout to build existing env for Playwright test --- test/playwright/test_ux.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/playwright/test_ux.py b/test/playwright/test_ux.py index 11039b79..872ca085 100644 --- a/test/playwright/test_ux.py +++ b/test/playwright/test_ux.py @@ -120,7 +120,7 @@ def _create_new_environment(page, screenshot=False): def _existing_environment_interactions( - page, env_name, time_to_build_env=3 * 60 * 1000, screenshot=False + page, env_name, time_to_build_env=5 * 60 * 1000, screenshot=False ): """test interactions with existing environments. During this test, the test will be rebuilt twice. From 9b25a4452d671b270726f4929a81811dd8371d2a Mon Sep 17 00:00:00 2001 From: gabalafou Date: Tue, 10 Sep 2024 16:31:41 -0500 Subject: [PATCH 2/3] Also increase default timeout --- test/playwright/test_ux.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/playwright/test_ux.py b/test/playwright/test_ux.py index 872ca085..a41f3bd1 100644 --- a/test/playwright/test_ux.py +++ b/test/playwright/test_ux.py @@ -10,7 +10,7 @@ import random -DEFAULT_TIMEOUT = 30_000 # time in ms +DEFAULT_TIMEOUT = 60_000 # time in ms expect.set_options(timeout=DEFAULT_TIMEOUT) From acf26a61ac6627043f992d45041f5906d9cf13bf Mon Sep 17 00:00:00 2001 From: gabalafou Date: Wed, 11 Sep 2024 18:22:01 -0500 Subject: [PATCH 3/3] make Playwright yaml interaction more robust --- src/features/yamlEditor/components/editor.tsx | 3 ++- test/playwright/test_ux.py | 15 ++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/features/yamlEditor/components/editor.tsx b/src/features/yamlEditor/components/editor.tsx index 202770bb..45998819 100644 --- a/src/features/yamlEditor/components/editor.tsx +++ b/src/features/yamlEditor/components/editor.tsx @@ -27,7 +27,7 @@ export const CodeEditor = ({ code, onChangeEditor }: ICodeEditor) => { const convertToJSON = (e: string) => { try { setIsError(false); - onChangeEditor(parse(e)); + onChangeEditor(parse(e) || {}); } catch (e) { setIsError(true); } @@ -52,6 +52,7 @@ export const CodeEditor = ({ code, onChangeEditor }: ICodeEditor) => { theme={isGrayscaleStyleType ? undefined : greenAccentTheme} extensions={[StreamLanguage.define(yamlLanguage)]} onChange={e => convertToJSON(e)} + data-testid="yaml-editor" />