Skip to content

Commit 7918ede

Browse files
Copilotalexprudhommedeveloper-experience-bot[bot]
authored
chore(atomic): migrate atomic-automatic-facet to Lit (#6576)
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: alexprudhomme <[email protected]> Co-authored-by: developer-experience-bot[bot] <91079284+developer-experience-bot[bot]@users.noreply.github.com>
1 parent d8832b3 commit 7918ede

28 files changed

+649
-1001
lines changed

packages/atomic-react/src/components/search/components.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {
22
AtomicAriaLive as LitAtomicAriaLive,
3+
AtomicAutomaticFacet as LitAtomicAutomaticFacet,
34
AtomicComponentError as LitAtomicComponentError,
45
AtomicExternal as LitAtomicExternal,
56
AtomicFacet as LitAtomicFacet,
@@ -49,6 +50,12 @@ export const AtomicAriaLive = createComponent({
4950
elementClass: LitAtomicAriaLive,
5051
});
5152

53+
export const AtomicAutomaticFacet = createComponent({
54+
tagName: 'atomic-automatic-facet',
55+
react: React,
56+
elementClass: LitAtomicAutomaticFacet,
57+
});
58+
5259
export const AtomicComponentError = createComponent({
5360
tagName: 'atomic-component-error',
5461
react: React,

packages/atomic/cypress/e2e/breadbox.cypress.ts

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import {
77
import * as BreadboxAssertions from './breadbox-assertions';
88
import {breadboxComponent, BreadboxSelectors} from './breadbox-selectors';
99
import * as CommonAssertions from './common-assertions';
10-
import {addAutomaticFacetGenerator} from './facets/automatic-facet-generator/automatic-facet-generator-actions';
11-
import {AutomaticFacetSelectors} from './facets/automatic-facet/automatic-facet-selectors';
1210
import {
1311
addCategoryFacet,
1412
canadaHierarchy,
@@ -59,64 +57,6 @@ describe('Breadbox Test Suites', () => {
5957
.init();
6058
}
6159

62-
// When an automatic facet generator is used with other facets, if the query is too narrow, there won't be any automatic facet.
63-
describe('when selecting an automatic facet', () => {
64-
const selectionIndex = 2;
65-
function setupBreadboxWithMultipleSelectedFacets() {
66-
new TestFixture()
67-
.withTranslation({'a.translated.label': 'This is a translated label'})
68-
.with(addBreadbox())
69-
.with(
70-
addAutomaticFacetGenerator({
71-
'desired-count': '1',
72-
})
73-
)
74-
.init();
75-
selectIdleCheckboxValueAt(AutomaticFacetSelectors, selectionIndex);
76-
}
77-
78-
describe('verify rendering', () => {
79-
beforeEach(() => setupBreadboxWithMultipleSelectedFacets());
80-
BreadboxAssertions.assertDisplayBreadcrumb(true);
81-
CommonAssertions.assertAccessibility(breadboxComponent);
82-
BreadboxAssertions.assertDisplayBreadcrumbClearAllButton(true);
83-
BreadboxAssertions.assertBreadcrumbLabel(breadboxLabel);
84-
it('should display the selected checkbox facets in the breadcrumbs', () => {
85-
AutomaticFacetSelectors.labelButton()
86-
.invoke('text')
87-
.then((facetLabel) => {
88-
BreadboxAssertions.assertSelectedCheckboxFacetsInBreadcrumbAssertions(
89-
AutomaticFacetSelectors,
90-
facetLabel
91-
);
92-
});
93-
});
94-
BreadboxAssertions.assertDisplayBreadcrumbClearIcon();
95-
BreadboxAssertions.assertBreadcrumbDisplayLength(1);
96-
});
97-
98-
describe('when selecting "Clear all" button', () => {
99-
function setupClearAllBreadcrumb() {
100-
setupBreadboxWithMultipleSelectedFacets();
101-
deselectAllBreadcrumbs();
102-
}
103-
104-
describe('verify rendering', () => {
105-
beforeEach(setupClearAllBreadcrumb);
106-
BreadboxAssertions.assertDisplayBreadcrumb(false);
107-
CommonFacetAssertions.assertNumberOfSelectedCheckboxValues(
108-
AutomaticFacetSelectors,
109-
0
110-
);
111-
});
112-
113-
describe('verify analytics', () => {
114-
beforeEach(setupClearAllBreadcrumb);
115-
BreadboxAssertions.assertLogBreadcrumbClearAll();
116-
});
117-
});
118-
});
119-
12060
describe('when selecting a standard facet, a numeric facet', () => {
12161
const selectionIndex = 2;
12262
function setupBreadboxWithMultipleSelectedFacets(props: TagProps = {}) {

packages/atomic/cypress/e2e/facets/automatic-facet-generator/automatic-facet-generator-actions.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

packages/atomic/cypress/e2e/facets/automatic-facet-generator/automatic-facet-generator-assertions.ts

Lines changed: 0 additions & 28 deletions
This file was deleted.

packages/atomic/cypress/e2e/facets/automatic-facet-generator/automatic-facet-generator.cypress.ts

Lines changed: 0 additions & 86 deletions
This file was deleted.

packages/atomic/cypress/e2e/facets/automatic-facet/automatic-facet-assertions.ts

Lines changed: 0 additions & 65 deletions
This file was deleted.

packages/atomic/cypress/e2e/facets/automatic-facet/automatic-facet-selectors.ts

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)