Skip to content
End-2-End test suite for InstantSearch
TypeScript JavaScript
Branch: master
Clone or download
yannickcr fix(helper): fix getSelectedHierarchicalMenuItems to wait for the ele…
…ments

Sometimes the menu was not quite ready yet and getSelectedHierarchicalMenuItems was returning an
empty array
Latest commit 5a2456b Aug 23, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
helpers fix(helper): fix getSelectedHierarchicalMenuItems to wait for the ele… Aug 23, 2019
specs feat(helper): add setRangeSliderUpperBound helper Aug 21, 2019
.editorconfig
.eslintignore chore: add ESLint configuration Aug 7, 2019
.eslintrc.js refactor(spec): move browser maximization to webdriverio configuration Aug 21, 2019
.gitignore chore: add gitignore Aug 7, 2019
.prettierrc chore: add ESLint configuration Aug 7, 2019
.yarnrc chore(release): update release default commit message Aug 19, 2019
CHANGELOG.md chore(release): 1.1.0 Aug 19, 2019
LICENSE chore: Add LICENSE Aug 7, 2019
README.md
index.js
package.json chore(release): 1.1.0 Aug 19, 2019
tsconfig.json chore: add TypeScript configuration Aug 7, 2019
wdio.base.conf.js refactor(spec): move browser maximization to webdriverio configuration Aug 21, 2019
wdio.local.conf.js feat(webdriverio): add WebdriverIO local configuration Aug 7, 2019
wdio.saucelabs.conf.js feat(webdriverio): add Internet Explorer 11 to the Sauce Labs configu… Aug 19, 2019
yarn.lock

README.md

End-2-End test suite for InstantSearch

This repository contains the end-2-end test suite for InstantSearch.

Installation

Install instantsearch-e2e-tests and its peedDependencies in your InstantSearch project:

yarn add --dev \
algolia/instantsearch-e2e-tests \
@wdio/cli @wdio/jasmine-framework @wdio/spec-reporter \
@wdio/static-server-service \
@wdio/local-runner @wdio/selenium-standalone-service \
@wdio/sauce-service

Running the test suite

In addition to the test suite this package contains two WebdriverIO configurations:

All configurations will run a static web server on your machine on port 5000 to serve the content of the website directory in your project, containing the InstantSearch demos to run our tests against.

Locally

To run the test suite locally create a wdio.local.conf.js file in your project root and import the local configuration.

const { local } = require('instantsearch-e2e-tests');

exports.config = local;

Then execute the following command to run the test suite.

./node_modules/.bin/wdio wdio.local.conf.js

On Sauce Labs

To run the test suite on Sauce Labs create a wdio.saucelabs.conf.js file in your project root and import the saucelabs configuration.

const { saucelabs } = require('instantsearch-e2e-tests');

exports.config = saucelabs;

Credentials

You'll need a username and access key to be able to run the test suite on Sauce Labs. You can find them in the User Profile > User Settings section of your Sauce Labs dashboard.

instantsearch-e2-tests will read the username and access key from the SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables respectively. More information about setting up environment variables for Sauce Labs.

Alternatively you can store them in a .env file at the root of your project, instantsearch-e2e-tests will automatically load them using dotenv. But don't forget to add this file to your .gitignore.

Once your config file created and your credentials set you can execute the following command to run the test suite.

./node_modules/.bin/wdio wdio.saucelabs.conf.js

Overriding configuration

The default configuration can easily be overridden if you need to change some project specific settings.

const { local } = require('instantsearch-e2e-tests');

exports.config = {
  ...local,
  /*
   * Run local tests on Firefox instead of Chrome
   */
  capabilities: [
    {
      browserName: 'firefox',
    },
  ],
};

License

instantsearch-e2-tests is licensed under the MIT License.

You can’t perform that action at this time.