Skip to content

Commit

Permalink
test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sara4994 committed Aug 23, 2023
1 parent fca31ab commit 1fa31a1
Show file tree
Hide file tree
Showing 13 changed files with 1,188 additions and 325 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('KogitoAppContextProvider tests', () => {
</KogitoAppContextProvider>
);

expect(screen).toMatchSnapshot();
expect(container).toMatchSnapshot();

const MockedComponent = container.querySelector('div');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('EmbeddedCustomDashboardList tests', () => {

const { container } = render(<EmbeddedCustomDashboardList {...props} />);

expect(screen).toMatchSnapshot();
expect(container).toMatchSnapshot();

const contentDiv = container.querySelector('div');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,56 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`EmbeddedCustomDashboardList tests Snapshot 1`] = `
Object {
"debug": [Function],
"findAllByAltText": [Function],
"findAllByDisplayValue": [Function],
"findAllByLabelText": [Function],
"findAllByPlaceholderText": [Function],
"findAllByRole": [Function],
"findAllByTestId": [Function],
"findAllByText": [Function],
"findAllByTitle": [Function],
"findByAltText": [Function],
"findByDisplayValue": [Function],
"findByLabelText": [Function],
"findByPlaceholderText": [Function],
"findByRole": [Function],
"findByTestId": [Function],
"findByText": [Function],
"findByTitle": [Function],
"getAllByAltText": [Function],
"getAllByDisplayValue": [Function],
"getAllByLabelText": [Function],
"getAllByPlaceholderText": [Function],
"getAllByRole": [Function],
"getAllByTestId": [Function],
"getAllByText": [Function],
"getAllByTitle": [Function],
"getByAltText": [Function],
"getByDisplayValue": [Function],
"getByLabelText": [Function],
"getByPlaceholderText": [Function],
"getByRole": [Function],
"getByTestId": [Function],
"getByText": [Function],
"getByTitle": [Function],
"logTestingPlaygroundURL": [Function],
"queryAllByAltText": [Function],
"queryAllByDisplayValue": [Function],
"queryAllByLabelText": [Function],
"queryAllByPlaceholderText": [Function],
"queryAllByRole": [Function],
"queryAllByTestId": [Function],
"queryAllByText": [Function],
"queryAllByTitle": [Function],
"queryByAltText": [Function],
"queryByDisplayValue": [Function],
"queryByLabelText": [Function],
"queryByPlaceholderText": [Function],
"queryByRole": [Function],
"queryByTestId": [Function],
"queryByText": [Function],
"queryByTitle": [Function],
}
<div>
<div />
</div>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,22 @@ describe('customDashboard card tests', () => {
Date.now = jest.fn(() => 1487076708000);
const driver = new MockedCustomDashboardListDriver();
it('renders card - with tsx', () => {
render(
const { container } = render(
<CustomDashboardCard
driver={driver}
customDashboardData={customDashboardInfos[0]}
/>
);
expect(screen).toMatchSnapshot();
expect(container).toMatchSnapshot();
});
it('renders card - with html', () => {
render(
const { container } = render(
<CustomDashboardCard
driver={driver}
customDashboardData={customDashboardInfos[1]}
/>
);
expect(screen).toMatchSnapshot();
expect(container).toMatchSnapshot();
});
it('simulate click on card', () => {
const openDashboardSpy = jest.spyOn(driver, 'openDashboard');
Expand Down
Loading

0 comments on commit 1fa31a1

Please sign in to comment.