-
Notifications
You must be signed in to change notification settings - Fork 528
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(e2e): changes for inclusion in monorepo
- Loading branch information
Showing
27 changed files
with
113 additions
and
3,906 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
"website:examples": "lerna run website:examples", | ||
"lint": "eslint --ext .js,.ts,.tsx .", | ||
"lint:fix": "eslint --ext .js,.ts,.tsx --fix .", | ||
"type-check": "tsc", | ||
"type-check": "tsc && lerna run type-check", | ||
"type-check:v3": "tsc --project tsconfig.v3.json", | ||
"test": "jest", | ||
"test:size": "bundlesize", | ||
|
@@ -46,14 +46,6 @@ | |
"@types/storybook__addon-actions": "3.4.2", | ||
"@typescript-eslint/eslint-plugin": "5.38.1", | ||
"@typescript-eslint/parser": "4.15.1", | ||
"@wdio/cli": "5.16.9", | ||
"@wdio/jasmine-framework": "5.16.5", | ||
"@wdio/junit-reporter": "5.16.11", | ||
"@wdio/local-runner": "5.16.9", | ||
"@wdio/sauce-service": "5.16.5", | ||
"@wdio/selenium-standalone-service": "5.16.5", | ||
"@wdio/spec-reporter": "5.16.5", | ||
"@wdio/static-server-service": "5.16.5", | ||
"algoliasearch": "4.11.0", | ||
"algoliasearch-v3": "npm:[email protected]", | ||
"babel-eslint": "10.0.3", | ||
|
@@ -76,7 +68,7 @@ | |
"eslint-plugin-prettier": "3.4.0", | ||
"eslint-plugin-react": "7.18.0", | ||
"eslint-plugin-react-hooks": "2.3.0", | ||
"instantsearch-e2e-tests": "algolia/instantsearch-e2e-tests#feat/monorepo", | ||
"eslint-plugin-wdio": "5.11.0", | ||
"jest": "27.1.0", | ||
"jest-diff": "27.1.0", | ||
"jest-environment-jsdom": "27.1.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
/* eslint-disable import/no-commonjs */ | ||
|
||
const { local } = require('instantsearch-e2e-tests'); | ||
|
||
exports.config = local; | ||
exports.config = { | ||
...require('@instantsearch/e2e-tests').local, | ||
// you can override the default options if needed here | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* eslint-disable import/no-commonjs */ | ||
|
||
const { saucelabs } = require('instantsearch-e2e-tests'); | ||
|
||
exports.config = saucelabs; | ||
exports.config = { | ||
...require('@instantsearch/e2e-tests').saucelabs, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,12 @@ | ||
# Contributing | ||
|
||
This repository contains the end-to-end (e2e) test suite for [InstantSearch](https://github.com/algolia/instantsearch.js). This test suite is meant to be shared across all InstantSearch flavors, this is why it is stored in a separate repository. | ||
This repository contains the end-to-end (e2e) test suite for InstantSearch. This test suite is meant to be shared across all InstantSearch flavors, this is why it is stored in the monorepo. | ||
|
||
## Development | ||
|
||
### Requirements | ||
|
||
To run this project, you will need: | ||
|
||
- Node.js >= v8.10.0, use nvm - [install instructions](https://github.com/creationix/nvm#install-script) | ||
- Yarn >= v1.16.0 - [install instructions](https://yarnpkg.com/en/docs/install#alternatives-stable) | ||
|
||
### Installation | ||
|
||
The easiest way to work on the tests is to link them into an InstantSearch project using [`yarn link`](https://yarnpkg.com/en/docs/cli/link). | ||
|
||
First, clone the `instantsearch-e2e-tests` repository, install its dependencies and link it. | ||
|
||
```sh | ||
git clone [email protected]:algolia/instantsearch-e2e-tests.git | ||
cd instantsearch-e2e-tests | ||
yarn | ||
yarn link | ||
``` | ||
|
||
Then, clone the [`instantsearch.js`](https://github.com/algolia/instantsearch.js/) repository (or any other flavor), install its dependencies and link `instantsearch-e2e-tests`. | ||
|
||
```sh | ||
git clone [email protected]:algolia/instantsearch.js | ||
cd instantsearch.js | ||
yarn | ||
yarn link instantsearch-e2e-tests | ||
``` | ||
|
||
You can now run your local end-2-end test suite using the `test:e2e:*` scripts from the InstantSearch project. | ||
Running the tests | ||
|
||
```sh | ||
yarn test:e2e # Run the test suite on Chrome browser on your local machine | ||
|
@@ -60,7 +33,7 @@ One spec file represents a scenario to test a behavior from a user point of view | |
|
||
Example of scenario: | ||
|
||
1. Load the `examples/e-commerce/` page | ||
1. Load the `examples/js/e-commerce/` page | ||
2. Click on "Appliances" category | ||
3. Click on rating "4 & up" | ||
4. Check if the result list matches the expected one | ||
|
@@ -122,31 +95,3 @@ A library of helpers is available in the [`helpers`](helpers) directory and are | |
These helpers are here to simplify the writing of tests, their readability and their maintenance. You are strongly encouraged to use them in your tests and to contribute to the helpers library. | ||
|
||
You can find more information about helpers in [WebdriverIO documentation](https://webdriver.io/docs/customcommands.html#adding-custom-commands). | ||
|
||
## Release | ||
|
||
This project uses [AngularJS's commit message convention](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines) with [Commitizen](http://commitizen.github.io/cz-cli/). | ||
|
||
### Commit current changes | ||
|
||
```sh | ||
yarn commit | ||
``` | ||
|
||
### Release a new version | ||
|
||
```sh | ||
yarn version | ||
``` | ||
|
||
### Updating dependents projects | ||
|
||
This package is not published on the npm registry. To update the test suite in an InstantSearch project, run the following command in it: | ||
|
||
```sh | ||
yarn add -D "algolia/instantsearch-e2e-tests#XXX" | ||
``` | ||
|
||
(`XXX` being the tag for the version you want to install) | ||
|
||
If [Renovate](https://renovatebot.com/) is enabled on your project then it should update it automatically like any other dependency. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.