Skip to content

Commit

Permalink
Update tests & Jest snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
daningenthron committed Oct 5, 2019
1 parent 40c36f1 commit 16e1784
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 16 deletions.
14 changes: 7 additions & 7 deletions app/javascript/onboarding/__tests__/Onboarding.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ describe('<Onboarding />', () => {
test('should not move if terms and conditions are not met', () => {
const event = {
target: {
value: 'checked_code_of_conduct',
name: 'checked_code_of_conduct',
value: 'checkedCodeOfConduct',
name: 'checkedCodeOfConduct',
},
};
onboardingSlides
Expand All @@ -115,22 +115,22 @@ describe('<Onboarding />', () => {
fetch.once({});
onboardingSlides.find('#checked_code_of_conduct').simulate('change', {
target: {
value: 'checked_code_of_conduct',
name: 'checked_code_of_conduct',
value: 'checkedCodeOfConduct',
name: 'checkedCodeOfConduct',
},
});

onboardingSlides
.find('#checked_terms_and_conditions')
.simulate('change', {
target: {
value: 'checked_terms_and_conditions',
name: 'checked_terms_and_conditions',
value: 'checkedTermsAndConditions',
name: 'checkedTermsAndConditions',
},
});

const emailTerms = onboardingSlides.find(<EmailTermsConditionsForm />);
expect(emailTerms.state('checked_code_of_conduct')).toBe(true);
expect(emailTerms.state('checkedCodeOfConduct')).toBe(true);
onboardingSlides.find('.next-button').simulate('click');
await flushPromises();
expect(onboardingSlides.state().currentSlide).toBe(2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ preact-render-spy (1 nodes)
<label htmlFor="checked_code_of_conduct">
<input
type="checkbox"
name="checked_code_of_conduct"
id="checked_code_of_conduct"
name="checkedCodeOfConduct"
checked={false}
onChange={[Function bound handleChange]}
/>
Expand All @@ -140,7 +140,7 @@ preact-render-spy (1 nodes)
<input
type="checkbox"
id="checked_terms_and_conditions"
name="checked_terms_and_conditions"
name="checkedTermsAndConditions"
checked={false}
onChange={[Function bound handleChange]}
/>
Expand All @@ -158,7 +158,7 @@ preact-render-spy (1 nodes)
<input
type="checkbox"
id="email_membership_newsletter"
name="email_membership_newsletter"
name="emailMembershipNewsletter"
checked={true}
onChange={[Function bound handleChange]}
/>
Expand All @@ -168,7 +168,7 @@ preact-render-spy (1 nodes)
<input
type="checkbox"
id="email_digest_periodic"
name="email_digest_periodic"
name="emailDigestPeriodic"
checked={true}
onChange={[Function bound handleChange]}
/>
Expand Down Expand Up @@ -355,15 +355,27 @@ preact-render-spy (1 nodes)
</h1>
<div>
<p>
DEV is where programmers share ideas and help each other grow. 🤓
DEV is where programmers share ideas and help each other grow.
<span
role="img"
aria-label="nerd"
>
🤓
</span>
</p>
<p>
Ask questions, leave helpful comments, encourage others, and have fun! 🙌
Ask questions, leave helpful comments, encourage others, and have fun!
<span
role="img"
aria-label="raising hands"
>
🙌
</span>
</p>
<p>
A few
<strong>quick questions</strong>
for you before you get started...
A few
<strong> quick questions </strong>
for you before you get started...
</p>
</div>
</div>
Expand Down

0 comments on commit 16e1784

Please sign in to comment.