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(quantic): Playwright migration for facet manager E2E tests #4943

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

SimonMilord
Copy link
Contributor

@SimonMilord SimonMilord commented Feb 5, 2025

SFINT-5795

IN THIS PR:

  • added unit tests for quanticFacetManager component
  • added Playwright e2e tests for quanticFacetManager component

UNIT TESTS:

image

E2E TESTS:

image

Copy link

github-actions bot commented Feb 5, 2025

Pull Request Report

PR Title

❌ Title should follow the conventional commit spec:
<type>(optional scope): <description>

Example: feat(headless): add result-list controller

Live demo links

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 244.2 244.2 0
commerce 355.5 355.5 0
search 415.5 415.5 0
insight 406.7 406.7 0
recommendation 256.3 256.3 0
ssr 409.3 409.3 0
ssr-commerce 373.2 373.2 0

@SimonMilord SimonMilord changed the title feat(SFINT-5795): Playwright migration for Facets E2E tests feat(SFINT-5795): Playwright migration for facet manager E2E tests Feb 7, 2025
@SimonMilord SimonMilord marked this pull request as ready for review February 11, 2025 18:34
@SimonMilord SimonMilord requested a review from a team as a code owner February 11, 2025 18:34
Copy link
Contributor

@mmitiche mmitiche left a comment

Choose a reason for hiding this comment

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

The E2E tests do not test the Quantic Facet Manager component,

on a separate note, the title of the PR should be test(quantic):....

@SimonMilord SimonMilord marked this pull request as draft February 12, 2025 14:33
@SimonMilord SimonMilord changed the title feat(SFINT-5795): Playwright migration for facet manager E2E tests test(quantic): Playwright migration for facet manager E2E tests Feb 12, 2025
@SimonMilord SimonMilord marked this pull request as ready for review February 12, 2025 21:11
@SimonMilord SimonMilord requested a review from mmitiche February 12, 2025 21:11
Copy link
Collaborator

@erocheleau erocheleau left a comment

Choose a reason for hiding this comment

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

I think there's an issue with your test with the mock returned facet values.


facetIds.forEach((facetId, idx) => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const facet = facets.find((f: any) => f.facetId === facetId);
Copy link
Collaborator

Choose a reason for hiding this comment

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

You probably don't need to explicitely set any and you can probably remove the eslint disable here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if I do it "works" but I still have the Parameter 'f' implicitly has an 'any' type error

const exampleFacetsOrder = ['objecttype', 'date', 'language'];

/**
* Filters out any facetId which contains a filter input "_input" because they are not displayed in the facet manager.
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is that exactly? What are facets with _input?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

some facets are returned with a _input filter for example, date has date and date_input which takes values like ascending/descending. So its not a facet in itself but serves as a filter.

Copy link
Contributor

@mmitiche mmitiche left a comment

Choose a reason for hiding this comment

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

Couple final adjustments to address, but looks good to me!

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