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

test(pagination): add common test suite #5836

Merged
merged 12 commits into from
Sep 8, 2023
Merged

test(pagination): add common test suite #5836

merged 12 commits into from
Sep 8, 2023

Conversation

sarahdayan
Copy link
Member

This reworks the tests for the pagination widget to move them in the common test suite and reduce flavor-specific tests.

https://algolia.atlassian.net/browse/FX-2516

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 6, 2023

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 f61c43f:

Sandbox Source
InstantSearch.js Configuration
react-instantsearch-app Configuration
example-react-instantsearch-default-theme Configuration
example-vue-instantsearch-default-theme Configuration

<div v-if="state" :class="suit()">
<div
v-if="state"
:class="{ [suit()]: true, [suit('', 'noRefinement')]: state.nbPages <= 1 }"
Copy link
Member Author

Choose a reason for hiding this comment

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

This is additive, so it shouldn't be considered breaking IMO.

Worst case, if users have snapshot tests they can break, but this won't break production.

Comment on lines +19 to +20
.replace(/(\s+)?<!---->(\s+)?/g, '') // Vue 2
.replace(/(\s+)?<!--v-if-->(\s+)?/g, '') // Vue 3
Copy link
Member Author

Choose a reason for hiding this comment

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

Vue also adds space after :table-flip:

@sarahdayan sarahdayan changed the base branch from master to fix/pagination-modifier-click September 6, 2023 15:45
@@ -168,6 +168,7 @@ function PaginationLink({
rootTagName="span"
rootProps={{
className: cssClasses.link,
'aria-label': ariaLabel,
Copy link
Member Author

Choose a reason for hiding this comment

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

This is additive, so it shouldn't be considered breaking IMO.

Worst case, if users have snapshot tests they can break, but this won't break production.

@sarahdayan sarahdayan marked this pull request as ready for review September 6, 2023 16:00
@sarahdayan sarahdayan requested review from a team, dhayab and aymeric-giraudet and removed request for a team September 6, 2023 16:01
Base automatically changed from fix/pagination-modifier-click to master September 8, 2023 08:59
@sarahdayan sarahdayan requested review from dhayab and Haroenv September 8, 2023 09:11
@sarahdayan sarahdayan requested a review from Haroenv September 8, 2023 12:33
@sarahdayan sarahdayan enabled auto-merge (squash) September 8, 2023 12:42
@sarahdayan sarahdayan merged commit ad6c7c8 into master Sep 8, 2023
@sarahdayan sarahdayan deleted the tests/pagination branch September 8, 2023 13:14
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.

3 participants