diff --git a/packages/quantic/cypress/e2e/default-1/sort/sort-expectations.ts b/packages/quantic/cypress/e2e/default-1/sort/sort-expectations.ts index f3fe8621bf1..23ab9e5afdd 100644 --- a/packages/quantic/cypress/e2e/default-1/sort/sort-expectations.ts +++ b/packages/quantic/cypress/e2e/default-1/sort/sort-expectations.ts @@ -1,5 +1,5 @@ import {Interception} from 'cypress/types/net-stubbing'; -import {InterceptAliases} from '../../../page-objects/search'; +import {getQueryAlias, InterceptAliases} from '../../../page-objects/search'; import {useCaseEnum} from '../../../page-objects/use-case'; import { completeSearchRequest, @@ -45,12 +45,7 @@ function sortExpectations(selector: SortSelector) { value: string, useCase: useCaseEnum ) => { - const interceptAliasToUse = - useCase === useCaseEnum.search - ? InterceptAliases.Search - : InterceptAliases.Insight; - - cy.get(interceptAliasToUse) + cy.get(getQueryAlias(useCase)) .then((interception) => { const body = interception.request.body; expect(body.sortCriteria).to.equal(value); diff --git a/packages/quantic/force-app/main/default/lwc/quanticRefineModalContent/quanticRefineModalContent.js b/packages/quantic/force-app/main/default/lwc/quanticRefineModalContent/quanticRefineModalContent.js index 47c63c3f3e2..a349f59f1d9 100644 --- a/packages/quantic/force-app/main/default/lwc/quanticRefineModalContent/quanticRefineModalContent.js +++ b/packages/quantic/force-app/main/default/lwc/quanticRefineModalContent/quanticRefineModalContent.js @@ -75,6 +75,8 @@ export default class QuanticRefineModalContent extends LightningElement { /** @type {object} */ facetData; + /** @type {boolean} */ + isSortComponentReady; /** @type {object} */ sortData; /** @type {boolean} */ @@ -136,6 +138,7 @@ export default class QuanticRefineModalContent extends LightningElement { */ getSortOptionsFromStore() { this.sortData = getAllSortOptionsFromStore(this.engineId); + this.isSortComponentReady = true; } /** @@ -266,7 +269,7 @@ export default class QuanticRefineModalContent extends LightningElement { * @returns {Array} */ get sortOptions() { - return this.hasSortOptions ? this.sortData : []; + return this.isSortComponentReady ? this.sortData : []; } get shouldDisplayFiltersTitle() { @@ -294,14 +297,6 @@ export default class QuanticRefineModalContent extends LightningElement { return this.facetData && !!Object.keys(this.facetData).length; } - /** - * Indicates whether the sort options are available. - * @returns {boolean} - */ - get hasSortOptions() { - return this.sortData?.length > 0; - } - /** * @param {CustomEvent} event */ diff --git a/packages/quantic/force-app/main/default/lwc/quanticRefineModalContent/templates/disabledDynamicNavigation.html b/packages/quantic/force-app/main/default/lwc/quanticRefineModalContent/templates/disabledDynamicNavigation.html index 3c2b191fa64..af19c4c8f75 100644 --- a/packages/quantic/force-app/main/default/lwc/quanticRefineModalContent/templates/disabledDynamicNavigation.html +++ b/packages/quantic/force-app/main/default/lwc/quanticRefineModalContent/templates/disabledDynamicNavigation.html @@ -6,7 +6,7 @@