Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcao13 committed Aug 23, 2022
1 parent 53bf04c commit 6e038bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/app/RecordingMetadata/BulkEditLabels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ export const BulkEditLabels: React.FunctionComponent<BulkEditLabelsProps> = (pro
const updateCommonLabels = React.useCallback(
(setLabels: (l: RecordingLabel[]) => void) => {
let allRecordingLabels = [] as RecordingLabel[][];
console.log("updateCommonLabels", recordings);
console.log(recordings)
recordings.forEach((r: ArchivedRecording, idx) => {
if (props.checkedIndices.includes(idx)) {
allRecordingLabels.push(parseLabels(r.metadata.labels));
Expand Down
7 changes: 4 additions & 3 deletions src/test/RecordingMetadata.tsx/BulkEditLabels.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ import { of } from 'rxjs';
import '@testing-library/jest-dom';
import { BulkEditLabels } from '@app/RecordingMetadata/BulkEditLabels';
import { ServiceContext, defaultServices } from '@app/Shared/Services/Services';
import { ActiveRecording, ArchivedRecording } from '@app/Shared/Services/Api.service';
import { ArchivedRecording } from '@app/Shared/Services/Api.service';
import { NotificationMessage } from '@app/Shared/Services/NotificationChannel.service';
import { Button, TextInput } from '@patternfly/react-core';

jest.mock('@patternfly/react-core', () => ({
...jest.requireActual('@patternfly/react-core'),
Expand Down Expand Up @@ -76,7 +75,9 @@ const mockArchivedRecordingsResponse = {
targetNodes: [
{
recordings: {
archived: [mockRecording] as ArchivedRecording[],
archived: {
data: [mockRecording] as ArchivedRecording[]
}
},
},
],
Expand Down

0 comments on commit 6e038bf

Please sign in to comment.