Skip to content

Commit

Permalink
fix(test): update mock item to reflect new thumbnails object
Browse files Browse the repository at this point in the history
  • Loading branch information
ReidyT committed Sep 20, 2024
1 parent f4ada02 commit a84ac7d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cypress/e2e/item/view/viewThumbnails.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PackedFolderItemFactory } from '@graasp/sdk';
import { PackedFolderItemFactory, PackedItem } from '@graasp/sdk';

import { HOME_PATH } from '../../../../src/config/paths';
import {
Expand All @@ -11,14 +11,14 @@ import { ITEM_THUMBNAIL_LINK } from '../../../fixtures/thumbnails/links';
const ITEM_WITHOUT_THUMBNAIL = PackedFolderItemFactory({
name: 'own_item_name1',
});
const ITEM_WITH_THUMBNAIL = {
const ITEM_WITH_THUMBNAIL: PackedItem = {
...PackedFolderItemFactory({
name: 'own_item_name2',
settings: {
hasThumbnail: true,
},
}),
thumbnails: ITEM_THUMBNAIL_LINK,
thumbnails: { small: ITEM_THUMBNAIL_LINK, medium: ITEM_THUMBNAIL_LINK },
};

describe('View Thumbnails', () => {
Expand All @@ -34,7 +34,7 @@ describe('View Thumbnails', () => {

cy.get(`#${buildItemCard(ITEM_WITH_THUMBNAIL.id)} img`)
.should('have.attr', 'src')
.and('contain', ITEM_WITH_THUMBNAIL.thumbnails);
.and('contain', ITEM_WITH_THUMBNAIL.thumbnails.medium);
});

it(`display member avatar`, () => {
Expand Down

0 comments on commit a84ac7d

Please sign in to comment.