Skip to content
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

refactor(e2e-tests): import the instantsearch-e2e-tests repo #5169

Merged
merged 94 commits into from
Nov 24, 2022

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Nov 23, 2022

based on the state after algolia/instantsearch-e2e-tests#38 and its review

NOTE: this PR must be rebased (not squashed), keeping the original history to have a working git blame

FX-1964

@Haroenv Haroenv changed the title Feat/import e2e refactor(e2e-tests): import the instantsearch-e2e-tests repo Nov 23, 2022
@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 23, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 2931f8f:

Sandbox Source
InstantSearch.js Configuration

@Haroenv Haroenv force-pushed the feat/import-e2e branch 2 times, most recently from 854a553 to 7d52dbf Compare November 23, 2022 15:10
@Haroenv Haroenv marked this pull request as ready for review November 23, 2022 15:21
@Haroenv Haroenv requested review from a team, FabienMotte and aymeric-giraudet and removed request for a team November 23, 2022 15:21
.eslintrc.js Show resolved Hide resolved
tests/e2e/CHANGELOG.md Show resolved Hide resolved
tests/e2e/LICENSE Outdated Show resolved Hide resolved
tests/e2e/all-flavors.spec.ts Show resolved Hide resolved
tests/e2e/README.md Outdated Show resolved Hide resolved
tests/e2e/README.md Show resolved Hide resolved
tests/e2e/README.md Outdated Show resolved Hide resolved
tests/e2e/CONTRIBUTING.md Show resolved Hide resolved
tests/e2e/flavors.js Show resolved Hide resolved
tests/e2e/package.json Outdated Show resolved Hide resolved
Yannick Croissant and others added 24 commits November 24, 2022 11:18
…ntsearch-e2e-tests#15)

* fix(setSearchBoxValue): reset searchbox before editing

In React and Preact the CLEAR selenium instruction does not fire any event, and therefore does not update the component's internal state (see this job for example: https://app.saucelabs.com/tests/4518f96fdfd447e998786d0ff463658a#54)

It is equivalent to `input.value = ''`.

There are multiple sources reporting a similar behaviour (see SeleniumHQ/selenium#6741)

Since this change: #4202

```jsx
<input value={state.query} />
```

instead of

```jsx
<input value={props.query} />
```

Since binding the input value to a `state.query` (rather than a `props.query`), it appears the click we use to focus on the searchbox re-syncs `input.value` with `state.query`.
…nstantsearch-e2e-tests#21)

* Remove debugging and performance flags on Chrome on SauceLabs.
  This was making the tests longer to run and therefore getting an higher chance to timeout.

* Update helpers to always wait for the URL to be updated.
  This way we always wait for all changes to be done before running the next command.

* Replace the `getTextFromElements` helper by `getTextFromSelector`
  This helper is way more performant since all operations are made in the browser.
  It removes a lot of back and forth between the runner and the browser, minimizing the risk of errors.

* Round elements coordinates when doing a drag and drop
  From my tests it improves drag and drop precision on Internet Explorer. There is still some flackyness on drag and drop, but I did not find way to completely solve it.
…instantsearch-e2e-tests#29)

BREAKING CHANGE: tested projects now require `@wdio/junit-reporter`.
- wrap tests in "flavor" factory
- remove ci setup (doesn't work with old URL anymore)

BREAKING CHANGE: this requires the url to be /examples/js/e-commerce instead of /examples/e-commerce. This means that until the package is in the monorepo, its tests wouldn't pass. After the main monorepo PR is merged, this repo will move inside and will no longer be published.
Copy link
Member

@sarahdayan sarahdayan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some final nits, but this LGTM.

CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
tests/e2e/CONTRIBUTING.md Outdated Show resolved Hide resolved
tests/e2e/CONTRIBUTING.md Outdated Show resolved Hide resolved
tests/e2e/CONTRIBUTING.md Outdated Show resolved Hide resolved
tests/e2e/CONTRIBUTING.md Outdated Show resolved Hide resolved
tests/e2e/CONTRIBUTING.md Outdated Show resolved Hide resolved
tests/e2e/CONTRIBUTING.md Show resolved Hide resolved
tests/e2e/CONTRIBUTING.md Outdated Show resolved Hide resolved
@Haroenv Haroenv enabled auto-merge (rebase) November 24, 2022 13:25
@Haroenv Haroenv merged commit 54ff6a0 into master Nov 24, 2022
@Haroenv Haroenv deleted the feat/import-e2e branch November 24, 2022 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants