Skip to content

Commit

Permalink
adding test for recursion to core set
Browse files Browse the repository at this point in the history
  • Loading branch information
toddtarsi committed Jul 16, 2024
1 parent 6941e81 commit e92c6e8
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 2 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
"pretest": "cd packages/webdriver-testkit && npm run download-drivers",
"start": "cd packages/selenium-ide && npm start",
"test:jest:core": "jest",
"test": "npm run test:jest && npm run test:side-runner && npm run test:ide",
"test": "npm run test:jest && npm run test:side-runner && npm run test:ide && npm run test:code-export",
"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'",
"test:jest": "npm-run-bg -s 'http-server -p 8080 ./packages/side-testkit/fixtures/static::Available on::8080' 'npm run test:jest:core'",
"lint": "pnpm run lint:scripts",
"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/",
"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",
"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'",
"test:ide:ci": "node ./packages/selenium-ide/scripts/ide-runner.js",
"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'",
Expand Down
51 changes: 50 additions & 1 deletion tests/examples/simple-parent.side
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"parallel": false,
"persistSession": false,
"tests": [
"d28f4cec-2da9-4230-b83c-ee61673cc58b",
"b722bec1-cd73-4df1-af19-0d4f977fca47",
"8b8e2497-1a65-46e4-baa5-a4dd2a0670c0"
],
Expand Down Expand Up @@ -76,10 +77,58 @@
{
"command": "waitForElementNotPresent",
"target": "css=.dne",
"value": "",
"value": "10000",
"id": "d341e173-b4f8-4645-b25d-1b58f55ef371"
}
]
},
{
"id": "a677029f-ad77-4b13-8bb2-d4211be82629",
"name": "recurse",
"commands": [
{
"id": "28021ae0-91a3-4f12-b5c5-db5dd3ea1962",
"command": "if",
"target": "Number(${RECURSE_COUNT}) < 3",
"value": ""
},
{
"command": "executeScript",
"target": "return Number(${RECURSE_COUNT}) + 1",
"value": "RECURSE_COUNT",
"id": "82900f85-ffba-46df-9d48-f2a4bd4d7377"
},
{
"command": "run",
"target": "recurse",
"value": "",
"id": "c4b6767a-26f0-40f9-a4f5-30d07122e9f5"
},
{
"command": "end",
"target": "",
"value": "",
"id": "5edf0787-4a1e-4864-bd43-bc10392f75e1"
}
]
},
{
"id": "d28f4cec-2da9-4230-b83c-ee61673cc58b",
"name": "recurse outer",
"commands": [
{
"command": "store",
"target": "0",
"value": "RECURSE_COUNT",
"id": "8735776c-738a-4d75-91b4-1a0b9561d26f"
},
{
"id": "96d0d1bd-ff56-43a6-84eb-4e4c2d4e6295",
"command": "run",
"target": "recurse",
"value": ""
}
]
}
],
"snapshot": {
Expand Down

0 comments on commit e92c6e8

Please sign in to comment.