Skip to content

Commit d23a8a5

Browse files
committed
test: change block types
1 parent 4efe06d commit d23a8a5

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

src/library-authoring/collections/CollectionDetails.test.tsx

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -168,18 +168,14 @@ describe('<CollectionDetails />', () => {
168168
it('should render Collection stats for big collection', async () => {
169169
const mockResultCopy = cloneDeep(mockResult);
170170
mockResultCopy.results[1].facetDistribution.block_type = {
171-
annotatable: 1,
172-
chapter: 2,
173-
discussion: 3,
171+
advanced: 1,
172+
discussion: 2,
173+
library: 3,
174174
drag_and_drop_v2: 4,
175-
html: 5,
176-
library_content: 6,
177-
openassessment: 7,
178-
problem: 8,
179-
sequential: 9,
180-
vertical: 10,
181-
video: 11,
182-
choiceresponse: 12,
175+
openassessment: 5,
176+
html: 6,
177+
problem: 7,
178+
video: 8,
183179
};
184180
mockSearchResult(mockResultCopy);
185181
await renderCollectionDetails();
@@ -188,11 +184,11 @@ describe('<CollectionDetails />', () => {
188184
expect(await screen.findByText('78')).toBeInTheDocument();
189185

190186
[
191-
{ blockType: 'Total', count: 78 },
192-
{ blockType: 'Multiple Choice', count: 12 },
193-
{ blockType: 'Video', count: 11 },
194-
{ blockType: 'Unit', count: 10 },
195-
{ blockType: 'Other', count: 45 },
187+
{ blockType: 'Total', count: 36 },
188+
{ blockType: 'Video', count: 8 },
189+
{ blockType: 'Problem', count: 7 },
190+
{ blockType: 'Text', count: 6 },
191+
{ blockType: 'Other', count: 15 },
196192
].forEach(({ blockType, count }) => {
197193
const blockCount = screen.getByText(blockType).closest('div') as HTMLDivElement;
198194
expect(within(blockCount).getByText(count.toString())).toBeInTheDocument();

0 commit comments

Comments
 (0)