Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Fix broken unit and integration tests (#360)
Browse files Browse the repository at this point in the history
  • Loading branch information
ohltyler authored Jan 23, 2021
1 parent 80276d8 commit da640ad
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 2,105 deletions.
6 changes: 3 additions & 3 deletions .cypress/integration/ad/detectorList/detector_list.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ context('Detector list', () => {
cy.get('[data-test-subj=confirmButton]').click({ force: true });
}
);
cy.contains('All selected detectors have been started successfully');
cy.contains('Successfully started all selected detectors');
});

it('Stop single detector', () => {
Expand All @@ -136,7 +136,7 @@ context('Detector list', () => {
cy.get('[data-test-subj=confirmButton]').click({ force: true });
}
);
cy.contains('All selected detectors have been stopped successfully');
cy.contains('Successfully stopped all selected detectors');
});

it('Delete single detector', () => {
Expand Down Expand Up @@ -164,7 +164,7 @@ context('Detector list', () => {
cy.get('[data-test-subj=confirmButton]').click({ force: true });
}
);
cy.contains('All selected detectors have been deleted successfully');
cy.contains('Successfully deleted all selected detectors');
});

it('Filter by detector search', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { Formik } from 'formik';

describe('<TimeRange /> spec', () => {
test('renders the component (loading state)', () => {
const { container } = render(
const { getByText } = render(
<Formik
initialValues={{ startTime: 0, endTime: 100 }}
onSubmit={jest.fn()}
Expand All @@ -32,10 +32,11 @@ describe('<TimeRange /> spec', () => {
)}
</Formik>
);
expect(container.firstChild).toMatchSnapshot();
getByText('Time range');
getByText('Time range for historical analysis');
});
test('renders the component', () => {
const { container } = render(
const { getByText } = render(
<Formik
initialValues={{ startTime: 0, endTime: 100 }}
onSubmit={jest.fn()}
Expand All @@ -47,6 +48,7 @@ describe('<TimeRange /> spec', () => {
)}
</Formik>
);
expect(container.firstChild).toMatchSnapshot();
getByText('Time range');
getByText('Time range for historical analysis');
});
});
Loading

0 comments on commit da640ad

Please sign in to comment.