Skip to content

Commit e92c6e8

Browse files
committed
adding test for recursion to core set
1 parent 6941e81 commit e92c6e8

File tree

2 files changed

+52
-2
lines changed

2 files changed

+52
-2
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@
1717
"pretest": "cd packages/webdriver-testkit && npm run download-drivers",
1818
"start": "cd packages/selenium-ide && npm start",
1919
"test:jest:core": "jest",
20-
"test": "npm run test:jest && npm run test:side-runner && npm run test:ide",
20+
"test": "npm run test:jest && npm run test:side-runner && npm run test:ide && npm run test:code-export",
2121
"test:ci": "npm-run-bg -s 'http-server -p 8080 ./packages/side-testkit/fixtures/static::Available on::8080' 'npm run pretest && npm run test:jest:core && npm run test:side-runner:ci'",
2222
"test:jest": "npm-run-bg -s 'http-server -p 8080 ./packages/side-testkit/fixtures/static::Available on::8080' 'npm run test:jest:core'",
2323
"lint": "pnpm run lint:scripts",
2424
"lint:scripts": "eslint --ignore-pattern node_modules --ignore-pattern third-party --ignore-pattern dist --ignore-pattern build --ignore-pattern json --ext .ts,.tsx --ext .js packages/",
25+
"test:code-export": "./packages/side-code-export/dist/bin.js ./packages/code-export-python-pytest/dist/index.js ./tests/examples/simple-parent.side ./output-tests",
2526
"test:ide": "npm-run-bg -s 'http-server -p 8080 ./packages/side-testkit/fixtures/static::Available on::8080' 'node ./packages/selenium-ide/scripts/ide-runner.js'",
2627
"test:ide:ci": "node ./packages/selenium-ide/scripts/ide-runner.js",
2728
"test:side-runner": "npm-run-bg -s 'http-server -p 8080 ./packages/side-testkit/fixtures/static::Available on::8080' 'node ./packages/side-runner/dist/bin.js -t 15000 ./tests/examples/*.side'",

tests/examples/simple-parent.side

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"parallel": false,
1515
"persistSession": false,
1616
"tests": [
17+
"d28f4cec-2da9-4230-b83c-ee61673cc58b",
1718
"b722bec1-cd73-4df1-af19-0d4f977fca47",
1819
"8b8e2497-1a65-46e4-baa5-a4dd2a0670c0"
1920
],
@@ -76,10 +77,58 @@
7677
{
7778
"command": "waitForElementNotPresent",
7879
"target": "css=.dne",
79-
"value": "",
80+
"value": "10000",
8081
"id": "d341e173-b4f8-4645-b25d-1b58f55ef371"
8182
}
8283
]
84+
},
85+
{
86+
"id": "a677029f-ad77-4b13-8bb2-d4211be82629",
87+
"name": "recurse",
88+
"commands": [
89+
{
90+
"id": "28021ae0-91a3-4f12-b5c5-db5dd3ea1962",
91+
"command": "if",
92+
"target": "Number(${RECURSE_COUNT}) < 3",
93+
"value": ""
94+
},
95+
{
96+
"command": "executeScript",
97+
"target": "return Number(${RECURSE_COUNT}) + 1",
98+
"value": "RECURSE_COUNT",
99+
"id": "82900f85-ffba-46df-9d48-f2a4bd4d7377"
100+
},
101+
{
102+
"command": "run",
103+
"target": "recurse",
104+
"value": "",
105+
"id": "c4b6767a-26f0-40f9-a4f5-30d07122e9f5"
106+
},
107+
{
108+
"command": "end",
109+
"target": "",
110+
"value": "",
111+
"id": "5edf0787-4a1e-4864-bd43-bc10392f75e1"
112+
}
113+
]
114+
},
115+
{
116+
"id": "d28f4cec-2da9-4230-b83c-ee61673cc58b",
117+
"name": "recurse outer",
118+
"commands": [
119+
{
120+
"command": "store",
121+
"target": "0",
122+
"value": "RECURSE_COUNT",
123+
"id": "8735776c-738a-4d75-91b4-1a0b9561d26f"
124+
},
125+
{
126+
"id": "96d0d1bd-ff56-43a6-84eb-4e4c2d4e6295",
127+
"command": "run",
128+
"target": "recurse",
129+
"value": ""
130+
}
131+
]
83132
}
84133
],
85134
"snapshot": {

0 commit comments

Comments
 (0)