Skip to content

Commit

Permalink
Merge branch 'master' into KIT-3830
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-bompart authored Jan 18, 2025
2 parents b5f1776 + 240f26e commit d5a06ac
Show file tree
Hide file tree
Showing 30 changed files with 881 additions and 58 deletions.
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ui-kit",
"private": true,
"version": "3.0.10",
"version": "3.0.11",
"scripts": {
"postinstall": "husky install && patch-package && npx playwright install",
"reset:install": "git checkout origin/master package-lock.json && npm i",
Expand Down
2 changes: 1 addition & 1 deletion packages/atomic-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@angular/platform-browser": "18.2.13",
"@angular/platform-browser-dynamic": "18.2.13",
"@angular/router": "18.2.13",
"@coveo/atomic": "3.15.2",
"@coveo/atomic": "3.15.3",
"rxjs": "7.8.1"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/atomic-angular/projects/atomic-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@coveo/atomic-angular",
"version": "3.3.3",
"version": "3.3.4",
"license": "Apache-2.0",
"repository": {
"url": "https://github.com/coveo/ui-kit"
Expand All @@ -11,7 +11,7 @@
"@coveo/headless": "3.13.2"
},
"dependencies": {
"@coveo/atomic": "3.15.2"
"@coveo/atomic": "3.15.3"
},
"engines": {
"node": "^20.9.0 || ^22.11.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/atomic-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@coveo/atomic-react",
"sideEffects": false,
"type": "module",
"version": "3.2.13",
"version": "3.2.14",
"description": "React specific wrapper for the Atomic component library",
"repository": {
"type": "git",
Expand Down Expand Up @@ -30,7 +30,7 @@
"commerce/"
],
"dependencies": {
"@coveo/atomic": "3.15.2",
"@coveo/atomic": "3.15.3",
"@lit/react": "1.0.6",
"lit": "3.2.1"
},
Expand Down
4 changes: 4 additions & 0 deletions packages/atomic/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## <small>3.15.3 (2025-01-17)</small>

- fix(atomic): revert getAssetPath change (#4870) ([8961432](https://github.com/coveo/ui-kit/commits/8961432)), closes [#4870](https://github.com/coveo/ui-kit/issues/4870)

## <small>3.15.2 (2025-01-16)</small>

- refactor(atomic): replace @stencil/store with in-house implementation (#4814) ([cc9cd0f](https://github.com/coveo/ui-kit/commits/cc9cd0f)), closes [#4814](https://github.com/coveo/ui-kit/issues/4814) [/github.com/coveo/ui-kit/pull/4814#discussion_r1901058283](https://github.com//github.com/coveo/ui-kit/pull/4814/issues/discussion_r1901058283)
Expand Down
2 changes: 1 addition & 1 deletion packages/atomic/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@coveo/atomic",
"type": "module",
"version": "3.15.2",
"version": "3.15.3",
"description": "A web-component library for building modern UIs interfacing with the Coveo platform",
"homepage": "https://docs.coveo.com/en/atomic/latest/",
"repository": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ export const GeneratedAnswerSelectors: GeneratedAnswerSelector = {
GeneratedAnswerSelectors.get().find('[data-cy="generated-answer__answer"]'),
likeButton: () =>
GeneratedAnswerSelectors.get().find(
'[data-cy="generated-answer__feedback"] c-quantic-stateful-button[data-cy="feedback__like-button"] button'
'[data-cy="generated-answer__feedback"] c-quantic-stateful-button[data-testid="feedback__like-button"] button'
),
dislikeButton: () =>
GeneratedAnswerSelectors.get().find(
'[data-cy="generated-answer__feedback"] c-quantic-stateful-button[data-cy="feedback__dislike-button"] button'
'[data-cy="generated-answer__feedback"] c-quantic-stateful-button[data-testid="feedback__dislike-button"] button'
),
citations: () =>
GeneratedAnswerSelectors.get().find(
Expand Down Expand Up @@ -84,7 +84,7 @@ export const GeneratedAnswerSelectors: GeneratedAnswerSelector = {
),
feedbackCancelButton: () =>
GeneratedAnswerSelectors.feedbackModal().find(
'[data-cy="feedback-modal-footer__cancel"]'
'[data-testid="feedback-modal-footer__cancel"]'
),
feedbackDoneButton: () =>
GeneratedAnswerSelectors.feedbackModal().find(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ export const SmartSnippetSuggestionsSelectors: SmartSnippetSuggestionsSelector =
.eq(index),
smartSnippetSuggestionsSourceUri: (index: number) =>
SmartSnippetSuggestionsSelectors.get()
.find('[data-cy="smart-snippet__source-uri"]')
.find('[data-testid="smart-snippet__source-uri"]')
.eq(index),
smartSnippetSuggestionsSourceTitle: (index: number) =>
SmartSnippetSuggestionsSelectors.get()
.find('[data-cy="smart-snippet__source-title"]')
.find('[data-testid="smart-snippet__source-title"]')
.eq(index),
smartSnippetSuggestionsInlineLink: (index: number) =>
SmartSnippetSuggestionsSelectors.get()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,17 @@ export const SmartSnippetSelectors: SmartSnippetSelector = {
smartSnippetAnswer: () =>
SmartSnippetSelectors.get().find('[data-cy="smart-snippet-answer"]'),
smartSnippetSourceUri: () =>
SmartSnippetSelectors.get().find('[data-cy="smart-snippet__source-uri"]'),
SmartSnippetSelectors.get().find(
'[data-testid="smart-snippet__source-uri"]'
),
smartSnippetSourceTitle: () =>
SmartSnippetSelectors.get().find('[data-cy="smart-snippet__source-title"]'),
SmartSnippetSelectors.get().find(
'[data-testid="smart-snippet__source-title"]'
),
smartSnippetAnswerToggle: () =>
SmartSnippetSelectors.get().find('[data-cy="smart-snippet-answer-toggle"]'),
SmartSnippetSelectors.get().find(
'[data-testid="smart-snippet__toggle-button"]'
),
smartSnippetExpandableAnswer: () =>
SmartSnippetSelectors.get().find(
'[data-cy="expandable-smart-snippet-answer"]'
Expand All @@ -45,19 +51,25 @@ export const SmartSnippetSelectors: SmartSnippetSelector = {
'[data-cy="smart-snippet__inline-link"] > a'
),
smartSnippetLikeButton: () =>
SmartSnippetSelectors.get().find('[data-cy="feedback__like-button"]'),
SmartSnippetSelectors.get().find('[data-testid="feedback__like-button"]'),
smartSnippetDislikeButton: () =>
SmartSnippetSelectors.get().find('[data-cy="feedback__dislike-button"]'),
SmartSnippetSelectors.get().find(
'[data-testid="feedback__dislike-button"]'
),
smartSnippetExplainWhyButton: () =>
SmartSnippetSelectors.get().find(
'[data-cy="feedback__explain-why-button"]'
'[data-testid="feedback__explain-why-button"]'
),
feedbackOption: (index: number) =>
cy.get('lightning-modal').find('lightning-radio-group input').eq(index),
feedbackSubmitButton: () =>
cy.get('lightning-modal').find('[data-cy="feedback-modal-footer__submit"]'),
cy
.get('lightning-modal')
.find('[data-testid="feedback-modal-footer__submit"]'),
feedbackCancelButton: () =>
cy.get('lightning-modal').find('[data-cy="feedback-modal-footer__cancel"]'),
cy
.get('lightning-modal')
.find('[data-testid="feedback-modal-footer__cancel"]'),
feedbackDoneButton: () =>
cy.get('lightning-modal').find('[data-cy="feedback-modal-footer__done"]'),
feedbackDetailsInput: () =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ jest.mock(

const selectors = {
feedbackQuestion: '.feedback__question',
likeButton: 'c-quantic-stateful-button[data-cy="feedback__like-button"]',
likeButton: 'c-quantic-stateful-button[data-testid="feedback__like-button"]',
dislikeButton:
'c-quantic-stateful-button[data-cy="feedback__dislike-button"]',
'c-quantic-stateful-button[data-testid="feedback__dislike-button"]',
successMessage: '.feedback__success-message',
explainWhyButton: '.feedback__explain-why',
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<div class="slds-grid feedback__main-section">
<span class="slds-var-p-right_small slds-text-color_weak feedback__question"
id="feedback__question">{question}</span>
<c-quantic-stateful-button selected={liked} data-cy="feedback__like-button" tooltip={likeLabel}
<c-quantic-stateful-button selected={liked} data-testid="feedback__like-button" tooltip={likeLabel}
icon-name={likeIconName} onquantic__select={handleLike} onquantic__deselect={handleLike} without-borders selected-state-color="#2e844a"
label={likeButtonLabel} icon-size={size}></c-quantic-stateful-button>
<c-quantic-stateful-button selected={disliked} data-cy="feedback__dislike-button" tooltip={dislikeLabel}
<c-quantic-stateful-button selected={disliked} data-testid="feedback__dislike-button" tooltip={dislikeLabel}
icon-name={dislikeIconName} onquantic__select={handleDislike} onquantic__deselect={handleDislike} without-borders selected-state-color="#ea001e"
label={dislikeButtonLabel} icon-size={size}></c-quantic-stateful-button>
</div>
<template if:true={displaySuccessMessage}>
<div class="slds-grid feedback__success-message">
<span class="slds-var-p-vertical_x-small">{successMessage}</span>
<template if:false={hideExplainWhyButton}>
<lightning-button data-cy="feedback__explain-why-button" class="slds-var-m-left_x-small feedback__explain-why"
<lightning-button data-testid="feedback__explain-why-button" class="slds-var-m-left_x-small feedback__explain-why"
variant="base" label={labels.explainWhy} onclick={handlePressExplainWhyButton}></lightning-button>
</template>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div data-cy="feedback-modal-body__error" class="error-message slds-text-color_destructive">{error}</div>
</lightning-modal-body>
<lightning-modal-footer>
<lightning-button data-cy="feedback-modal-footer__cancel" class="slds-button" variant="neutral"
<lightning-button data-testid="feedback-modal-footer__cancel" class="slds-button" variant="neutral"
label={labels.cancel} onclick={closeModal}></lightning-button>
</lightning-modal-footer>
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
</div>
</lightning-modal-body>
<lightning-modal-footer>
<lightning-button data-cy="feedback-modal-footer__cancel" class="slds-button" variant="neutral" label={labels.cancel}
<lightning-button data-testid="feedback-modal-footer__cancel" class="slds-button" variant="neutral" label={labels.cancel}
onclick={closeModal}></lightning-button>
<lightning-button data-cy="feedback-modal-footer__submit" class="slds-button slds-m-left_x-small feedback-modal-footer__submit" variant="brand"
<lightning-button data-testid="feedback-modal-footer__submit" class="slds-button slds-m-left_x-small feedback-modal-footer__submit" variant="brand"
label={labels.sendFeedback} onclick={handleSubmitFeedback}></lightning-button>
</lightning-modal-footer>
</template>
Expand Down
Loading

0 comments on commit d5a06ac

Please sign in to comment.