Skip to content

V3 update #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 39 commits into from
Sep 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
3629b93
Added first pass on command schema validation with error handling for…
Aug 29, 2019
fb53d88
fixed typo on code-export: targret into target (#784)
IndigoShock Aug 30, 2019
2357b73
Moved the isOptional declaration for arguments to the command object.
Sep 1, 2019
a1f656e
Added validation support for ignored commands, other commands with op…
Sep 1, 2019
f803508
Added first pass on command schema validation with error handling for…
Aug 29, 2019
79b40d7
Merge branch 'code-export-error-handling' into v3. Fixes #742.
Sep 1, 2019
0055731
Added side-model package with Commands and ArgTypes
Sep 1, 2019
f94a8fb
Stopped mixing ES5 & ES6 exports and added a test to verify that the …
Sep 1, 2019
6b76d73
Updated everything to use side-model instead of direct calls to model…
Sep 1, 2019
454435e
Config for stale bot, for managing issues
Sep 1, 2019
f73a46e
Remove stale bot config since it is on master now
Sep 2, 2019
19a9064
Added linting rule for the `.only` filter applied to tests/suites
Sep 2, 2019
af15d69
Removed .only filter from selianize index test
Sep 2, 2019
8de7841
Added linting rules from eslint-plugin-node
Sep 2, 2019
4380e98
Added master remnants to gitignore
Sep 2, 2019
8dd6621
Added installing the website deps to the CI config
Sep 2, 2019
982d643
Added userAgent checks to side-utils
Sep 3, 2019
abda382
Updated the beforeEach hook for each language to check the user agent…
Sep 3, 2019
7a34c92
Added environment checks to side-utils
Sep 3, 2019
132e504
Added side-utils to selenium-ide
Sep 3, 2019
21c1ca0
Exposed environment from side-utils
Sep 3, 2019
ae820d1
Updated selenium-ide/common/utils to use side-utils
Sep 3, 2019
73dc1ec
Added lowercasing to the JS beforeEach hook when using the browserNam…
Sep 3, 2019
05d77ac
Added check for `window` before setting the userAgent in side-utils/u…
Sep 3, 2019
83208eb
Catch undefined error for window in side-utils/user-agent
Sep 3, 2019
87574d3
re: side-utils/user-agent: Forgot to call the function. Storing it in…
Sep 3, 2019
a20f90c
Fixed erroneous reference change for Command. Fixes regression found …
Sep 3, 2019
3e29244
Reset timesVisited to 0 when finished iterating through a forEach col…
Sep 3, 2019
78f9e4c
Added test coverage for reseting timesVisited when completing a forEa…
Sep 4, 2019
13fb06c
Added linting to release-prep script
Sep 4, 2019
ea46da2
Updated changelog
Sep 4, 2019
324ab7a
v3.12.2
Sep 4, 2019
7756d5e
Fix for off-by-one error in nested forEach command blocks. Fixes #792
Sep 4, 2019
3ab7b7a
Updated changelog
Sep 4, 2019
aa03b67
v3.12.3
Sep 4, 2019
19eff15
Added a seed test for nested forEach
Sep 4, 2019
a7a4d35
Extending api to open SeleniumIDE and load projects
cdifino Sep 11, 2019
2da5bce
fixed typo
corevo Sep 11, 2019
f63dd02
fix lint
corevo Sep 11, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ module.exports = {
jest: true,
webextensions: true,
},
extends: ['eslint:recommended', 'plugin:react/recommended', 'prettier'],
extends: [
'eslint:recommended',
'plugin:node/recommended',
'plugin:react/recommended',
'prettier',
],
parser: 'babel-eslint',
parserOptions: {
ecmaFeatures: {
Expand All @@ -16,7 +21,7 @@ module.exports = {
},
sourceType: 'module',
},
plugins: ['jest', 'react', 'prettier'],
plugins: ['jest', 'react', 'prettier', 'no-only-tests'],
rules: {
'prettier/prettier': 'error',
'react/prop-types': [0],
Expand All @@ -30,5 +35,16 @@ module.exports = {
],
'constructor-super': 'error',
'valid-typeof': 'error',
'no-only-tests/no-only-tests': 'error',
'node/no-unsupported-features/es-syntax': 0,
'node/no-unsupported-features/node-builtins': 0,
'node/shebang': [
'error',
{
convertPath: {
'src/**/*.js': ['src/(.+)$', 'dist/$1'],
},
},
],
},
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ website/i18n
# auto-generated docs
docs/api/arguments.md
docs/api/commands.md

# master remnants from switching locally
*.tsbuildinfo
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ before_install:
- peru sync
install:
- yarn --ignore-engines
- cd website && yarn && cd ..
- yarn run lerna run build --ignore selenium-ide-extension --ignore selenium-ide-extension-boilerplate
- NODE_ENV="staging" yarn build:ext
- docker-compose up -d
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## v3.12.3
- Control flow: fix for off-by-one error in nested forEach command blocks

## v3.12.2
- Code export: Added command validation and error handling to notify the user of invalid commands
- Code export: Made the exported browser name match the current browser used for the IDE
- Control flow: Fixed a bug in forEach that prevented nested forEach command blocks from completely executing
- Runner: Fixed an off-by one error in forEach that prevented the last item in a collection from being used (PR #752)
- Docs: Updated runner documentation to specify required vendor prefix for browser specific options (PR #757)
- Docs: Fixed typo (PR #784)

## v3.12.1
- Fix for string escaping, to handle backslashes

Expand Down
23 changes: 21 additions & 2 deletions docs/api/plugins/system.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ sidebar_label: System

The System API is the most basic API which Selenium IDE provides. It is not prefixed and can be called with `/`.

#### Opening Selenium IDE
If the extension is installed, a request could be made by a plugin to open Selenium IDE.

```js
{
openSeleniumIDEIfClosed: true
}
```

### `GET /health`

Used for plugin health checks, see [Plugin Health Checks](../../plugins/health-checks).
Expand All @@ -30,6 +39,9 @@ Logs that explain plugin usage, or status should be logged here.
- `type` - log type, `undefined` is an info log, while `error` will appear red, and `warn` will appear orange.
- `message` - `string` message, any links will be automatically linkified.

#### Returns
Returns `true` if the log was added.

### `GET /project`

Fetches the `id` and `name` of the currently loaded project.
Expand All @@ -41,6 +53,13 @@ Fetches the `id` and `name` of the currently loaded project.
}
```

#### Returns
### `POST /project`

Loads a project into the IDE, as if the user opened it, if the user has unsaved changes a dialog will ask him before doing so.

```js
{
project: JSON parsed side file
}
```

Returns `true` if the log was added.
2 changes: 1 addition & 1 deletion docs/introduction/code-export.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ You can export either a test or suite of tests to WebDriver code by right-clicki
![code-export-right-click](/selenium-ide/img/docs/code-export/right-click.png)
![code-export-menu](/selenium-ide/img/docs/code-export/menu.png)

This will save a file containing the exported code for your targret language to your browser's download directory.
This will save a file containing the exported code for your target language to your browser's download directory.

### Origin Tracing Code Comments

Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"packages": [
"packages/*"
],
"version": "3.12.1",
"version": "3.12.3",
"npmClient": "yarn"
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"lint:styles": "stylelint \"packages/selenium-ide/src/neo/**/*.css\"",
"postinstall": "lerna bootstrap",
"watch": "lerna run --no-bail --parallel watch",
"release-prep": "yarn && peru sync && yarn test && env NODE_ENV=staging yarn build:ext && yarn test:ext",
"release-prep": "yarn && peru sync && yarn test && env NODE_ENV=staging yarn build:ext && yarn test:ext && yarn lint",
"postpublish": "yarn build:ext:prod && npx ./gh-release.js"
},
"jest": {
Expand All @@ -48,6 +48,8 @@
"eslint-plugin-jest": "^21.27.1",
"eslint-plugin-prettier": "^3.0.0",
"eslint-plugin-react": "^7.11.1",
"eslint-plugin-no-only-tests": "^2.3.1",
"eslint-plugin-node": "^9.2.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^24.3.1",
"lerna": "^3.4.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/browser-webdriver/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "browser-webdriver",
"version": "3.6.0",
"version": "3.12.2",
"main": "build/webdriver.js",
"repository": "https://github.com/SeleniumHQ/selenium-ide",
"license": "Apache-2.0",
Expand Down
1 change: 1 addition & 0 deletions packages/browser-webdriver/src/shims/process.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ process.versions = JSON.parse(`
}
`)

// eslint-disable-next-line node/no-deprecated-api
process.binding = name => {
if (name === 'constants') {
return JSON.parse(`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import static org.hamcrest.core.IsNot.not;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
Expand All @@ -26,7 +27,7 @@ public class LoginTest {
JavascriptExecutor js;
@Before
public void setUp() {
driver = new FirefoxDriver();
driver = new ChromeDriver();
js = (JavascriptExecutor) driver;
vars = new HashMap<String, Object>();
}
Expand Down Expand Up @@ -67,6 +68,7 @@ import static org.hamcrest.core.IsNot.not;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
Expand All @@ -82,7 +84,7 @@ public class ControlflowTest {
JavascriptExecutor js;
@Before
public void setUp() {
driver = new FirefoxDriver();
driver = new ChromeDriver();
js = (JavascriptExecutor) driver;
vars = new HashMap<String, Object>();
}
Expand Down Expand Up @@ -166,6 +168,7 @@ import static org.hamcrest.core.IsNot.not;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
Expand All @@ -181,7 +184,7 @@ public class LoginTest {
JavascriptExecutor js;
@Before
public void setUp() {
driver = new FirefoxDriver();
driver = new ChromeDriver();
js = (JavascriptExecutor) driver;
vars = new HashMap<String, Object>();
}
Expand Down Expand Up @@ -223,6 +226,7 @@ import static org.hamcrest.core.IsNot.not;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
Expand All @@ -238,7 +242,7 @@ public class DefaultSuiteTest {
JavascriptExecutor js;
@Before
public void setUp() {
driver = new FirefoxDriver();
driver = new ChromeDriver();
js = (JavascriptExecutor) driver;
vars = new HashMap<String, Object>();
}
Expand Down Expand Up @@ -286,6 +290,7 @@ import static org.hamcrest.core.IsNot.not;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
Expand All @@ -301,7 +306,7 @@ public class DefaultSuiteTest {
JavascriptExecutor js;
@Before
public void setUp() {
driver = new FirefoxDriver();
driver = new ChromeDriver();
js = (JavascriptExecutor) driver;
vars = new HashMap<String, Object>();
}
Expand Down Expand Up @@ -358,6 +363,7 @@ import static org.hamcrest.core.IsNot.not;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
Expand All @@ -373,7 +379,7 @@ public class LoginTest {
JavascriptExecutor js;
@Before
public void setUp() {
driver = new FirefoxDriver();
driver = new ChromeDriver();
js = (JavascriptExecutor) driver;
vars = new HashMap<String, Object>();
}
Expand Down Expand Up @@ -405,6 +411,7 @@ import static org.hamcrest.core.IsNot.not;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
Expand All @@ -420,7 +427,7 @@ public class ValidcredentialsTest {
JavascriptExecutor js;
@Before
public void setUp() {
driver = new FirefoxDriver();
driver = new ChromeDriver();
js = (JavascriptExecutor) driver;
vars = new HashMap<String, Object>();
}
Expand Down Expand Up @@ -456,6 +463,7 @@ import static org.hamcrest.core.IsNot.not;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
Expand All @@ -471,7 +479,7 @@ public class SelectwindowTest {
JavascriptExecutor js;
@Before
public void setUp() {
driver = new FirefoxDriver();
driver = new ChromeDriver();
js = (JavascriptExecutor) driver;
vars = new HashMap<String, Object>();
}
Expand Down
20 changes: 10 additions & 10 deletions packages/code-export-java-junit/__test__/src/command.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ describe('command code emitter', () => {
const command = {
command: 'clickAt',
target: 'link=button',
value: '',
value: '10,20',
}
return expect(prettify(command)).resolves.toMatchSnapshot()
})
Expand Down Expand Up @@ -249,7 +249,7 @@ describe('command code emitter', () => {
const command = {
command: 'doubleClickAt',
target: 'link=button',
value: '',
value: '10,20',
}
return expect(prettify(command)).resolves.toMatchSnapshot()
})
Expand Down Expand Up @@ -288,7 +288,7 @@ describe('command code emitter', () => {
it('should emit `else` command', () => {
const command = {
command: ControlFlowCommandNames.else,
target: 'true',
target: '',
value: '',
}
return expect(
Expand Down Expand Up @@ -371,11 +371,11 @@ describe('command code emitter', () => {
const command = {
command: 'mouseDownAt',
target: 'id=button',
value: '',
value: '10,20',
}
return expect(prettify(command)).resolves.toMatchSnapshot()
})
it('should emit `mouse move` event', () => {
it.skip('should emit `mouse move` event', () => {
const command = {
command: 'mouseMove',
target: 'id=button',
Expand All @@ -387,7 +387,7 @@ describe('command code emitter', () => {
const command = {
command: 'mouseMoveAt',
target: 'id=button',
value: '',
value: '10,20',
}
return expect(prettify(command)).resolves.toMatchSnapshot()
})
Expand Down Expand Up @@ -419,7 +419,7 @@ describe('command code emitter', () => {
const command = {
command: 'mouseUpAt',
target: 'id=button',
value: '',
value: '10,20',
}
return expect(prettify(command)).resolves.toMatchSnapshot()
})
Expand Down Expand Up @@ -554,7 +554,7 @@ describe('command code emitter', () => {
return expect(prettify(command)).resolves.toMatchSnapshot()
})
it('should emit `set speed`', () => {
const command = { command: 'setSpeed' }
const command = { command: 'setSpeed', target: '1000' }
return expect(prettify(command)).resolves.toMatchSnapshot()
})
it('should emit `setWindowSize`', () => {
Expand All @@ -568,7 +568,7 @@ describe('command code emitter', () => {
it('should skip playback supported commands, that are not supported in webdriver', () => {
return Promise.all([
expect(
prettify({ command: 'answerOnNextPrompt' })
prettify({ command: 'answerOnNextPrompt', target: 'blah' })
).resolves.toMatchSnapshot(),
expect(
prettify({ command: 'chooseCancelOnNextConfirmation' })
Expand Down Expand Up @@ -616,7 +616,7 @@ describe('command code emitter', () => {
it('should emit `store title` command', () => {
const command = {
command: 'storeTitle',
target: '',
target: 'blah',
value: 'myVar',
}
return expect(prettify(command)).resolves.toMatchSnapshot()
Expand Down
Loading