Skip to content

Commit 6035919

Browse files
committed
im just doin this
1 parent d2d06d7 commit 6035919

37 files changed

+4250
-4
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"lint": "pnpm run lint:scripts",
2020
"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/",
2121
"test:ide": "npm-run-bg -s 'http-server -p 8080 ./tests/static::Available on::8080' 'node ./packages/selenium-ide/scripts/ide-runner.js -t 15000 ./tests/examples/*.side'",
22-
"test:side-runner": "npm-run-bg -s 'http-server -p 8080 ./tests/static::Available on::8080' 'node ./packages/side-runner/dist/bin.js -t 15000 ./tests/examples/*.side'",
22+
"test:side-runner": "npm-run-bg -s 'http-server -p 8080 ./tests/static::Available on::8080' 'node ./packages/side-runner/dist/bin.js -c \"browserName=firefox\" -t 15000 ./tests/examples/*.side'",
2323
"test:side-runner:ci": "npm-run-bg -s 'http-server -p 8080 ./tests/static::Available on::8080' 'node ./packages/side-runner/dist/bin.js -c \"goog:chromeOptions.args=[headless,no-sandbox] browserName=chrome\" -t 15000 ./tests/examples/*.side'",
2424
"typecheck": "tsc --noEmit --composite false",
2525
"watch": "run-p watch:ts watch:webpack",

packages/selenium-ide/src/main/session/controllers/Recorder/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export default class RecorderController extends BaseController {
7171
if (session.state.status !== 'recording') {
7272
return null
7373
}
74-
const commands = []
74+
const commands: CommandShape[] = []
7575
if (
7676
getLastActiveWindowHandleId(session) != cmd.winHandleId
7777
) {

packages/side-api/src/types/base.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ProjectShape } from '@seleniumhq/side-model'
1+
import { CommandShape, ProjectShape } from '@seleniumhq/side-model'
22
import { Chrome } from '@seleniumhq/browser-info'
33
import { Browser } from '@seleniumhq/get-driver'
44
import { StateShape } from '../models/state'
@@ -78,7 +78,8 @@ export type EventListenerParams<LISTENER extends BaseListener<any>> =
7878

7979
export type LocatorFields = 'target' | 'value'
8080

81-
export interface RecordNewCommandInput {
81+
export interface RecordNewCommandInput
82+
extends Omit<CommandShape, 'id' | 'target' | 'value'> {
8283
command: string
8384
target: string | [string, string][]
8485
value: string | [string, string][]
+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
load("@npm//@babel/cli:index.bzl", "babel")
2+
load("@npm//jest-cli:index.bzl", "jest_test")
3+
4+
babel(
5+
name = "build",
6+
args = [
7+
'--root-mode upward -d dist src --extensions ".js,.jsx,.ts,.tsx" --source-maps true'
8+
]
9+
)
10+
11+
filegroup(
12+
name = "test_lib",
13+
srcs = glob([
14+
"**/*.js"
15+
]),
16+
)
17+
18+
jest_test(
19+
name = "test",
20+
args = [
21+
"--no-cache",
22+
"--no-watchman",
23+
"--ci",
24+
"--colors",
25+
"--config",
26+
"babel.config.js",
27+
"--updateSnapshot"
28+
],
29+
data = [
30+
":test_lib",
31+
"//:babel.config.js"
32+
]
33+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = {
2+
testEnvironment: 'jsdom',
3+
testEnvironmentOptions: {
4+
url: 'http://localhost/index.html',
5+
},
6+
moduleNameMapper: {
7+
'^.+\\.(css|scss)$': 'identity-obj-proxy',
8+
},
9+
setupFilesAfterEnv: ['./scripts/jest/test.config.js'],
10+
testMatch: ['**/packages/**/__test?(s)__/**/*.spec.[jt]s?(x)'],
11+
testPathIgnorePatterns: ['/node_modules/'],
12+
transform: {
13+
'^.+\\.jsx?$': 'babel-jest',
14+
'^.+\\.tsx?$': 'ts-jest',
15+
},
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "@seleniumhq/side-executor-runtime",
3+
"version": "4.0.0-alpha.1",
4+
"private": false,
5+
"description": "Selenium IDE playback and execution",
6+
"author": "Tomer <[email protected]>",
7+
"homepage": "http://github.com/SeleniumHQ/selenium-ide",
8+
"license": "Apache-2.0",
9+
"scripts": {
10+
"build": "tsc",
11+
"clean": "rm -rf dist tsconfig.tsbuildinfo node_modules",
12+
"watch": "tsc --watch"
13+
},
14+
"main": "dist/index.js",
15+
"types": "dist/index.d.ts",
16+
"files": [
17+
"dist"
18+
],
19+
"repository": {
20+
"type": "git",
21+
"url": "git+https://github.com/SeleniumHQ/selenium-ide.git"
22+
},
23+
"bugs": {
24+
"url": "https://github.com/SeleniumHQ/selenium-ide/issues"
25+
},
26+
"devDependencies": {
27+
"@seleniumhq/side-testkit": "^4.0.0-alpha.1",
28+
"@seleniumhq/webdriver-testkit": "^4.0.0-alpha.1"
29+
},
30+
"dependencies": {
31+
"@seleniumhq/side-commons": "^4.0.0-alpha.1",
32+
"@seleniumhq/side-model": "^4.0.0-alpha.4",
33+
"@types/selenium-webdriver": "^4.1.15",
34+
"selenium-webdriver": "^4.11.1"
35+
},
36+
"gitHead": "507c7c802f34196e6ee4800bf5c0b36553d41369"
37+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Licensed to the Software Freedom Conservancy (SFC) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The SFC licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
18+
export default class AssertionError extends Error {
19+
constructor(...argv: string[]) {
20+
super(argv.join(' '))
21+
22+
if (Error.captureStackTrace) {
23+
Error.captureStackTrace(this, AssertionError)
24+
}
25+
}
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Licensed to the Software Freedom Conservancy (SFC) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The SFC licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
18+
export { default as AssertionError } from './assertion'
19+
export { default as VerificationError } from './verification'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Licensed to the Software Freedom Conservancy (SFC) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The SFC licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
18+
export default class VerificationError extends Error {
19+
constructor(...argv: string[]) {
20+
super(argv.join(' '))
21+
22+
if (Error.captureStackTrace) {
23+
Error.captureStackTrace(this, VerificationError)
24+
}
25+
}
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Licensed to the Software Freedom Conservancy (SFC) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The SFC licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
18+
export { default as Variables } from './variables'
19+
export { default as WebDriverExecutor } from './webdriver'
20+
21+
export * from './types'

0 commit comments

Comments
 (0)