PR-722301: Adding ContainerList Tests.
This commit is contained in:
parent
77935d20b9
commit
966ef13300
@ -0,0 +1,11 @@
|
||||
import React from 'react';
|
||||
import { ContainerList } from '@components';
|
||||
|
||||
describe('Testing ContainerList Component', () => {
|
||||
beforeEach(() => {
|
||||
cy.mount(<ContainerList title='Test Title' />);
|
||||
});
|
||||
it('Show Title of Container List', () => {
|
||||
cy.get('div').contains('Test Title');
|
||||
});
|
||||
})
|
@ -0,0 +1,18 @@
|
||||
import React from 'react';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { ContainerList } from '@components';
|
||||
|
||||
describe('Testing ContainerList Component', () => {
|
||||
beforeEach(() => {
|
||||
// fetchMock.resetMocks();
|
||||
render(<ContainerList title='Test Title'/>)
|
||||
});
|
||||
it('Show Title of Container List', async () => {
|
||||
/* fetchMock.mockResponseOnce(JSON.stringify({
|
||||
//First Data Fetch
|
||||
data: 'data'
|
||||
})); */
|
||||
const title = screen.getByText('Test Title');
|
||||
expect(title).toBeInTheDocument();
|
||||
})
|
||||
})
|
Loading…
Reference in New Issue
Block a user