PR-722301: Adding ContainerList Tests.

This commit is contained in:
Alejandro Lembke Barrientos 2023-10-11 23:35:53 +00:00
parent 77935d20b9
commit 966ef13300
2 changed files with 29 additions and 0 deletions

View File

@ -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');
});
})

View File

@ -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();
})
})