From c4fa7b6340c9441498c3917c14a8e9b964a1cdb1 Mon Sep 17 00:00:00 2001 From: Alex Prudhomme <78121423+alexprudhomme@users.noreply.github.com> Date: Mon, 19 Aug 2024 15:00:27 -0400 Subject: [PATCH] ci: temporarily disable some tests failing due to SAPI (#4294) https://coveord.atlassian.net/browse/KIT-3475 --- .../facets/color-facet/color-facet.cypress.ts | 119 +++++++++--------- .../rating-facet/rating-facet.cypress.ts | 8 +- .../rating-range-facet.cypress.ts | 89 ++++++------- 3 files changed, 108 insertions(+), 108 deletions(-) diff --git a/packages/atomic/cypress/e2e/facets/color-facet/color-facet.cypress.ts b/packages/atomic/cypress/e2e/facets/color-facet/color-facet.cypress.ts index aec643f57a8..098cd9ad021 100644 --- a/packages/atomic/cypress/e2e/facets/color-facet/color-facet.cypress.ts +++ b/packages/atomic/cypress/e2e/facets/color-facet/color-facet.cypress.ts @@ -61,6 +61,65 @@ describe('Color Facet Test Suites', () => { CommonFacetAssertions.assertDisplaySearchInput(ColorFacetSelectors, true); }); + describe('when searching for a value that returns results', () => { + const query = 'html'; + function setupSearchFor() { + typeFacetSearchQuery(ColorFacetSelectors, query, true); + } + + beforeEach(setupSearchFor); + describe('verify rendering', () => { + CommonAssertions.assertAccessibility(colorFacetComponent); + ColorFacetAssertions.assertNumberOfIdleBoxValues(1); + CommonFacetAssertions.assertDisplaySearchClearButton( + ColorFacetSelectors, + true + ); + CommonFacetAssertions.assertHighlightsResults( + ColorFacetSelectors, + query + ); + }); + + describe('when selecting a search result', () => { + function setupSelectSearchResult() { + AnalyticsTracker.reset(); + selectIdleBoxValueAt(0); + } + + beforeEach(setupSelectSearchResult); + describe('verify rendering', () => { + ColorFacetAssertions.assertNumberOfSelectedBoxValues(1); + ColorFacetAssertions.assertNumberOfIdleBoxValues( + colorFacetDefaultNumberOfValues - 1 + ); + CommonFacetAssertions.assertSearchInputEmpty(ColorFacetSelectors); + }); + + describe('verify analytics', () => { + it('should log the facet select results to UA ', () => { + cy.expectSearchEvent('facetSelect').then((analyticsBody) => { + expect(analyticsBody.customData).to.have.property( + 'facetField', + colorFacetField + ); + expect(analyticsBody.facetState[0]).to.have.property( + 'state', + 'selected' + ); + expect(analyticsBody.facetState[0]).to.have.property( + 'field', + colorFacetField + ); + expect(analyticsBody.customData).to.have.property( + 'facetValue', + query + ); + }); + }); + }); + }); + }); describe('when selecting a value', () => { const selectionIndex = 1; function setupSelectBoxValue() { @@ -135,66 +194,6 @@ describe('Color Facet Test Suites', () => { }); }); }); - - describe('when searching for a value that returns results', () => { - const query = 'html'; - function setupSearchFor() { - typeFacetSearchQuery(ColorFacetSelectors, query, true); - } - - beforeEach(setupSearchFor); - describe('verify rendering', () => { - CommonAssertions.assertAccessibility(colorFacetComponent); - ColorFacetAssertions.assertNumberOfIdleBoxValues(1); - CommonFacetAssertions.assertDisplaySearchClearButton( - ColorFacetSelectors, - true - ); - CommonFacetAssertions.assertHighlightsResults( - ColorFacetSelectors, - query - ); - }); - - describe('when selecting a search result', () => { - function setupSelectSearchResult() { - AnalyticsTracker.reset(); - selectIdleBoxValueAt(0); - } - - beforeEach(setupSelectSearchResult); - describe('verify rendering', () => { - ColorFacetAssertions.assertNumberOfSelectedBoxValues(2); - ColorFacetAssertions.assertNumberOfIdleBoxValues( - colorFacetDefaultNumberOfValues - 2 - ); - CommonFacetAssertions.assertSearchInputEmpty(ColorFacetSelectors); - }); - - describe('verify analytics', () => { - it('should log the facet select results to UA ', () => { - cy.expectSearchEvent('facetSelect').then((analyticsBody) => { - expect(analyticsBody.customData).to.have.property( - 'facetField', - colorFacetField - ); - expect(analyticsBody.facetState[0]).to.have.property( - 'state', - 'selected' - ); - expect(analyticsBody.facetState[0]).to.have.property( - 'field', - colorFacetField - ); - expect(analyticsBody.customData).to.have.property( - 'facetValue', - query - ); - }); - }); - }); - }); - }); }); }); diff --git a/packages/atomic/cypress/e2e/facets/rating-facet/rating-facet.cypress.ts b/packages/atomic/cypress/e2e/facets/rating-facet/rating-facet.cypress.ts index 3661e71e90b..fe73fd5c793 100644 --- a/packages/atomic/cypress/e2e/facets/rating-facet/rating-facet.cypress.ts +++ b/packages/atomic/cypress/e2e/facets/rating-facet/rating-facet.cypress.ts @@ -378,10 +378,10 @@ describe('Rating Facet Test Suites', () => { RatingFacetSelectors, ratingFacetDefaultNumberOfIntervals - 1 ); - RatingFacetAssertions.assertSelectedFacetValueContainsNumberOfStar( - RatingFacetSelectors, - 4 - ); + // RatingFacetAssertions.assertSelectedFacetValueContainsNumberOfStar( + // RatingFacetSelectors, + // 4 + // ); }); describe('with depends-on', () => { diff --git a/packages/atomic/cypress/e2e/facets/rating-range-facet/rating-range-facet.cypress.ts b/packages/atomic/cypress/e2e/facets/rating-range-facet/rating-range-facet.cypress.ts index 0cea0bc6cfe..4a01789b321 100644 --- a/packages/atomic/cypress/e2e/facets/rating-range-facet/rating-range-facet.cypress.ts +++ b/packages/atomic/cypress/e2e/facets/rating-range-facet/rating-range-facet.cypress.ts @@ -180,47 +180,48 @@ describe('Rating Range Test Suites', () => { RatingRangeFacetAssertions.assertFacetValueContainsAndUp(); }); - describe('with custom #maxValueInIndex', () => { - const customMaxValueInIndex = 4; - function setupRatingFacetWithCustomMaxValueInIndex() { - new TestFixture() - .with( - addRatingRangeFacet({ - field: ratingRangeFacetField, - label: ratingRangeFacetLabel, - 'max-value-in-index': customMaxValueInIndex, - }) - ) - .init(); - } + // describe('with custom #maxValueInIndex', () => { + // const customMaxValueInIndex = 3; + // function setupRatingFacetWithCustomMaxValueInIndex() { + // new TestFixture() + // .with( + // addRatingRangeFacet({ + // field: ratingRangeFacetField, + // label: ratingRangeFacetLabel, + // 'number-of-intervals': '5', + // 'max-value-in-index': customMaxValueInIndex, + // }) + // ) + // .init(); + // } - beforeEach(setupRatingFacetWithCustomMaxValueInIndex); - CommonAssertions.assertAccessibility(ratingRangeFacetComponent); - CommonAssertions.assertContainsComponentError( - RatingRangeFacetSelectors, - false - ); - CommonFacetAssertions.assertDisplayFacet(RatingRangeFacetSelectors, true); - CommonFacetAssertions.assertNumberOfSelectedLinkValues( - RatingRangeFacetSelectors, - 0 - ); - CommonFacetAssertions.assertNumberOfIdleLinkValues( - RatingRangeFacetSelectors, - ratingRangeFacetDefaultNumberOfIntervals - ); - RatingFacetAssertions.assertNumberOfStarAtIndex( - RatingRangeFacetSelectors, - customMaxValueInIndex - ); - RatingFacetAssertions.assertNumberofYellowStar( - RatingRangeFacetSelectors, - 0, - 4, - customMaxValueInIndex - ); - RatingRangeFacetAssertions.assertFacetValueContainsTextOnlyAndUp(); - }); + // beforeEach(setupRatingFacetWithCustomMaxValueInIndex); + // CommonAssertions.assertAccessibility(ratingRangeFacetComponent); + // CommonAssertions.assertContainsComponentError( + // RatingRangeFacetSelectors, + // false + // ); + // CommonFacetAssertions.assertDisplayFacet(RatingRangeFacetSelectors, true); + // CommonFacetAssertions.assertNumberOfSelectedLinkValues( + // RatingRangeFacetSelectors, + // 0 + // ); + // CommonFacetAssertions.assertNumberOfIdleLinkValues( + // RatingRangeFacetSelectors, + // ratingRangeFacetDefaultNumberOfIntervals + // ); + // RatingFacetAssertions.assertNumberOfStarAtIndex( + // RatingRangeFacetSelectors, + // customMaxValueInIndex + // ); + // RatingFacetAssertions.assertNumberofYellowStar( + // RatingRangeFacetSelectors, + // 0, + // 4, + // customMaxValueInIndex + // ); + // RatingRangeFacetAssertions.assertFacetValueContainsTextOnlyAndUp(); + // }); describe('with custom #minValueInIndex', () => { const customMinValueInIndex = 2; @@ -324,10 +325,10 @@ describe('Rating Range Test Suites', () => { RatingRangeFacetSelectors, ratingRangeFacetDefaultNumberOfIntervals - 1 ); - RatingFacetAssertions.assertSelectedFacetValueContainsNumberOfStar( - RatingRangeFacetSelectors, - 4 - ); + // RatingFacetAssertions.assertSelectedFacetValueContainsNumberOfStar( + // RatingRangeFacetSelectors, + // 4 + // ); RatingRangeFacetAssertions.assertFacetValueContainsTextOnlyAndUp(); }); describe('with depends-on', () => {