Skip to content

Commit

Permalink
test: add unit test for data library filters
Browse files Browse the repository at this point in the history
  • Loading branch information
fboulnois committed Nov 15, 2024
1 parent e43775e commit 3c8db98
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions cypress/component/DataSearch/dataset_search_filters.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/* eslint-disable no-undef */

import { mount } from 'cypress/react';
import React from 'react';
import {Storage} from '../../../src/libs/storage';
import DatasetFilterList from '../../../src/components/data_search/DatasetFilterList';

const duosUser = {
isSigningOfficial: false,
};

describe('Data Library Filters', () => {
// Intercept configuration calls
beforeEach(() => {
cy.intercept({
method: 'GET',
url: '/config.json',
hostname: 'localhost',
}, { 'env': 'ci' });
});

it('Renders the data library filters', () => {
const props = { datasets: [], filters: [], filterHandler: () => {}, isFiltered: () => {}};
mount(<DatasetFilterList {...props} />);
cy.get('div').should('contain', 'Filters');
});
});

0 comments on commit 3c8db98

Please sign in to comment.