Skip to content

Commit ba4add6

Browse files
committed
Refactor StudioDetailsPanel and StudioDetailsRow components; improve formatting and style consistency
1 parent 96b7ac1 commit ba4add6

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

contentcuration/contentcuration/frontend/shared/views/__tests__/StudioDetailsPanel.spec.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,17 +153,19 @@ describe('StudioDetailsPanel', () => {
153153
// When levels array is populated, the levelsHeading row should be rendered
154154
expect(wrapper.container).toHaveTextContent('levelsHeading');
155155
// Levels are rendered through the component, verify the section exists
156-
const levelRows = Array.from(wrapper.container.querySelectorAll('*'))
157-
.filter(el => el.textContent?.includes('levelsHeading'));
156+
const levelRows = Array.from(wrapper.container.querySelectorAll('*')).filter(el =>
157+
el.textContent?.includes('levelsHeading'),
158+
);
158159
expect(levelRows.length).toBeGreaterThan(0);
159160
});
160161

161162
it('should render categories when present', () => {
162163
// When categories array is populated, the categoriesHeading row should be rendered
163164
expect(wrapper.container).toHaveTextContent('categoriesHeading');
164165
// Categories are rendered through the component, verify the section exists
165-
const categoryRows = Array.from(wrapper.container.querySelectorAll('*'))
166-
.filter(el => el.textContent?.includes('categoriesHeading'));
166+
const categoryRows = Array.from(wrapper.container.querySelectorAll('*')).filter(el =>
167+
el.textContent?.includes('categoriesHeading'),
168+
);
167169
expect(categoryRows.length).toBeGreaterThan(0);
168170
});
169171

@@ -256,8 +258,9 @@ describe('StudioDetailsPanel', () => {
256258
it('should not show primary language when not set', () => {
257259
// Language row should not appear if language is not set
258260
const container = wrapper.container;
259-
const languageRows = Array.from(container.querySelectorAll('*'))
260-
.filter(el => el.textContent?.includes('primaryLanguageHeading'));
261+
const languageRows = Array.from(container.querySelectorAll('*')).filter(el =>
262+
el.textContent?.includes('primaryLanguageHeading'),
263+
);
261264
expect(languageRows.length).toBe(0);
262265
});
263266

0 commit comments

Comments
 (0)