Closed bingeboy closed 9 months ago
@timbot1789 I think this is the test I mentioned on the call last night:
//React imports
import React from 'react';
import { render, screen } from '@testing-library/react';
import { BrowserRouter as Router } from 'react-router-dom';
// Testing imports
import { expect, it, describe } from 'vitest';
// Component being tested
import PodRegistrationForm from '../../../src/components/Signup/PodRegistrationForm';
describe('PodRegistrationForm', () => {
it('Renders the PodRegistrationForm Component', () => {
render(
<Router>
<PodRegistrationForm />
</Router>
);
const textField = screen.getByLabelText('Email');
const inputElementPassword = screen.getByLabelText('Password');
const inputElementConfirmPassord = screen.getByLabelText('Confirm Password');
expect(textField).to.equal('Email');
expect(inputElementPassword).to.equal('Password');
expect(inputElementConfirmPassord).to.equal('Confirm Password');
});
});
I think i'm going to be in PDX tonight so maybe we can discuss in person.
Were there any updates on this at last night's meeting?
Were there any updates on this at last night's meeting?
@andycwilliams I walked JP through the testing framework we're using. He wants to add a few more tests to it, and add one more commit.
@timbot1789 I added another test for the ShowNewPod component.
Squashing and merging once all tests are 🟢
Issue 408 refactor signup page into smaller chunks
This PR:
Resolves #408
The files this PR effects:
See Files Changed
Components
Signup.jsx Signup/Components/PodRegistrationForm.jsx Signup/Components/ShowNewPod.jsx
Tests
Added test for the PodRegistrationForm.test.jsx ShowNewPod.test,jsx seemed to be failing due to #420
Additional Context (optional):
Should act the same as what is currently in Development. The goal was to refactor the code. Please let me know any preferred naming conventions for the components or files.