PR-722301: Adding Library Components. #1

Merged
aleleba merged 8 commits from PR-722301 into master 2023-10-11 18:56:52 -06:00
4 changed files with 30 additions and 2 deletions
Showing only changes of commit 77935d20b9 - Show all commits

View File

@ -0,0 +1,11 @@
import React from 'react';
import { Button } from '@components';
describe('Testing Button Component', () => {
beforeEach(() => {
cy.mount(<Button />);
});
it('Show Button', () => {
cy.get('button').should('have.length', 1);
});
})

View File

@ -0,0 +1,17 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import { Button } from '@components';
describe('Testing Button Component', () => {
beforeEach(() => {
// fetchMock.resetMocks();
render(<Button />)
});
it('Show Button', async () => {
/* fetchMock.mockResponseOnce(JSON.stringify({
//First Data Fetch
data: 'data'
})); */
expect(screen.getByRole('button')).toBeInTheDocument();
})
})

View File

@ -1,7 +1,7 @@
import React from 'react';
import { Item, Status } from '@components';
describe('Testing Card Component', () => {
describe('Testing Item Component', () => {
beforeEach(() => {
cy.mount(<Item name='Item Test' status={Status.DONE} />);
})

View File

@ -2,7 +2,7 @@ import React from 'react';
import { render, screen } from '@testing-library/react';
import { Item, Status } from '@components';
describe('<App/> Component', () => {
describe('Testing Item Component', () => {
beforeEach(() => {
// fetchMock.resetMocks();
render(<Item name='Item Test' status={Status.DONE} handleChange={ () => {}} />)