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): added playwright tests and unit test for quantic generated answer component #4803

Merged
merged 9 commits into from
Dec 31, 2024

Conversation

mmitiche
Copy link
Contributor

@mmitiche mmitiche commented Dec 19, 2024

SFINT-5789

  • Playwright E2E tests added for the Quantic Generated Answer component.
  • Jest unit tests added for the Quantic Generated Answer component.

Unit tests:

Screenshot 2024-12-19 at 3 14 07 PM

E2E tests

Screenshot 2024-12-19 at 3 21 04 PM

Copy link

github-actions bot commented Dec 19, 2024

Pull Request Report

PR Title

✅ Title follows the conventional commit spec.

Live demo links

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 242.9 242.9 0
commerce 354 354 0
search 414 414 0
insight 405.2 405.2 0
recommendation 255.1 255.1 0
ssr 407.4 407.4 0
ssr-commerce 371.3 371.3 0

SSR Progress

Use case SSR (#) CSR (#) Progress (%)
search 39 44 89
recommendation 0 4 0
case-assist 0 6 0
insight 0 27 0
commerce 0 15 0
Detailed logs search : buildInteractiveResult
search : buildInteractiveInstantResult
search : buildInteractiveRecentResult
search : buildInteractiveCitation
search : buildGeneratedAnswer
recommendation : missing SSR support
case-assist : missing SSR support
insight : missing SSR support
commerce : missing SSR support

@mmitiche mmitiche marked this pull request as ready for review December 19, 2024 15:15
@mmitiche mmitiche requested a review from a team as a code owner December 19, 2024 15:15
@mmitiche mmitiche requested a review from mikegron December 20, 2024 13:24
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.

Small suggestions but pretty much there!

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.

Guess what @mmitiche, I found another cool thing Playwright offers :D

https://playwright.dev/docs/locators#locate-by-test-id

If you set data-testId on your HTML elements, you can simply do getByTestId('') to locate an element. instead of having to do '[data-test="generated-answer__copy-to-clipboard"]' for example

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.

Made some modifications to use the getByTestId selector from playwright mainly.
Updated one selector to use getByRole too

@erocheleau erocheleau enabled auto-merge December 31, 2024 15:00
@erocheleau erocheleau added this pull request to the merge queue Dec 31, 2024
Merged via the queue into master with commit 99ed76a Dec 31, 2024
101 checks passed
@erocheleau erocheleau deleted the SFINT-5789 branch December 31, 2024 16:17
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.

2 participants