Skip to content

Commit

Permalink
Merge pull request #947 from cultuurnet/bugfix/III-6384-blank-street-…
Browse files Browse the repository at this point in the history
…toggle
  • Loading branch information
Anahkiasen authored Nov 14, 2024
2 parents 90cfd8a + 492a316 commit b2ba463
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
},
"devDependencies": {
"@faker-js/faker": "^8.0.2",
"@playwright/test": "^1.31.2",
"@playwright/test": "1.31.2",
"@storybook/addon-a11y": "^6.5.16",
"@storybook/addon-actions": "^6.5.16",
"@storybook/addon-essentials": "^6.5.16",
Expand Down
19 changes: 10 additions & 9 deletions src/pages/steps/LocationStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ export const BlankStreetToggle = ({

return (
<RadioButtonWithLabel
id={'blank_address'}
name={'blank_address'}
label={
<Text className={'ml-1'}>
Expand Down Expand Up @@ -708,14 +707,16 @@ const LocationStep = ({
t('location.add_modal.errors.streetAndNumber')
}
info={
<BlankStreetToggle
onChange={(streetAndNumber) =>
onFieldChange({
streetAndNumber,
location: { streetAndNumber },
})
}
/>
scope === ScopeTypes.ORGANIZERS && (
<BlankStreetToggle
onChange={(streetAndNumber) =>
onFieldChange({
streetAndNumber,
location: { streetAndNumber },
})
}
/>
)
}
/>
</Stack>
Expand Down
1 change: 1 addition & 0 deletions src/test/e2e/create-place.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ test('create a place', async ({ baseURL, page }) => {
await page
.getByRole('option', { name: dummyPlace.address.municipality })
.click();
await expect(page.getByLabel('blank_address')).not.toBeVisible();
await page.getByLabel('Straat en nummer').nth(0).click();
await page
.getByLabel('Straat en nummer')
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1767,7 +1767,7 @@
tiny-glob "^0.2.9"
tslib "^2.4.0"

"@playwright/test@^1.31.2":
"@playwright/[email protected]":
version "1.31.2"
resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.31.2.tgz#426d8545143a97a6fed250a2a27aa1c8e5e2548e"
integrity sha512-BYVutxDI4JeZKV1+ups6dt5WiqKhjBtIYowyZIJ3kBDmJgsuPKsqqKNIMFbUePLSCmp2cZu+BDL427RcNKTRYw==
Expand Down

0 comments on commit b2ba463

Please sign in to comment.