Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Paterick committed Dec 5, 2023
1 parent fc3c167 commit 7a10c6b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/pages/HostingPreferences.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ function onTogglePaidHosting(isToggledOn: boolean): void {
<TogglePaidHostingSection
:paidHostingEnabled="isPaidHostingEnabled"
@paid_hosting_toggled="onTogglePaidHosting"
data-test-toggle-paid-hosting-section
/>
<PricesSection
v-if="isPaidHostingEnabled"
Expand Down
12 changes: 8 additions & 4 deletions src/pages/__tests__/HostingPreferences.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,16 @@ describe('hosting preferences page', () => {
expect(wrapper.findAll('[data-test-hosting-preferences-layout]')).toHaveLength(1)
})

it('with prices section', () => {
expect(wrapper.findAll('[data-test-hosting-preferences-prices-section]')).toHaveLength(1)
it('with toggle paid hosting section', () => {
expect(wrapper.findAll('[data-test-toggle-paid-hosting-section]')).toHaveLength(1)
})

it('without prices section when paid hosting toggled off', () => {
expect(wrapper.findAll('[data-test-hosting-preferences-prices-section]')).toHaveLength(0)
})

it('with invoices section', () => {
expect(wrapper.findAll('[data-test-hosting-preferences-invoices-section]')).toHaveLength(1)
it('without invoices section when paid hosting toggled off', () => {
expect(wrapper.findAll('[data-test-hosting-preferences-invoices-section]')).toHaveLength(0)
})

it('with happ selection section', () => {
Expand Down

0 comments on commit 7a10c6b

Please sign in to comment.