From 6d0fb5227e353bbd34178dd77f45f58002938716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E9=B9=B0?= <17kungfuboy@gmail.com> Date: Mon, 22 Aug 2022 19:05:45 +0800 Subject: [PATCH] feat: add playwirght config --- e2e/env.t | 81 +++++++++++++++++++++++++++++++++++++++++++- playwright.config.js | 5 +++ 2 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 playwright.config.js diff --git a/e2e/env.t b/e2e/env.t index 5f435bbfc..5cd5381e2 100644 --- a/e2e/env.t +++ b/e2e/env.t @@ -1,6 +1,85 @@ +::: env_manage { + +find: (<) + [select 'Environment'] = sel + +sel -> 'Mangage Environment' + +find: (<) + [icon] [label 'New'] = newLabel + +newLabel -> click +} + +::: modal_layout { +find: + [input] = envName + [input] = host + [input] = name [input] = value [input] = desc [icon] + [button 'Save'] = save +} + +::: add_data { +name -> '{$1}' +value -> '{$2}' +desc -> '{$3}' +} === Env ---- show modal & new & change & delete +--- add case + +goto 'http://localhost:4200' + +--- env_manage + +--- modal_layout + +envName -> 'myEnv' +host -> 'https://youtube.com' + +--- add_data :a:b:c + +save -> click + +find: (<) + [label 'myEnv'] + +find: (<) + [select 'Environment'] = sel + +sel -> 'myEnv' + +find: + [label 'myEnv'] [input] + + + +--- del case goto 'http://localhost:4200' + +--- env_manage + +--- modal_layout + +envName -> 'myEnv' +host -> 'https://youtube.com' + +--- add_data :a:b:c + +save -> click +sel -> hover + +find: + [label 'myEnv'] [icon] = del_icon +icon -> click + +find: + [label 'Cancel'] [label 'OK']=OK +ok -> click + +find: (!) + [label 'myEnv'] + + diff --git a/playwright.config.js b/playwright.config.js new file mode 100644 index 000000000..c97c3b447 --- /dev/null +++ b/playwright.config.js @@ -0,0 +1,5 @@ +const config = { + testDir: './e2e', +}; + +module.exports = config;