From 186609e62b5ef20d634aa8b274d6f9ab5d5f1c5f Mon Sep 17 00:00:00 2001 From: Emma Fabre Date: Thu, 31 Oct 2024 15:53:19 +0100 Subject: [PATCH 1/6] Only show Blank Street toggle for organizers, not offers --- src/pages/steps/LocationStep.tsx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/pages/steps/LocationStep.tsx b/src/pages/steps/LocationStep.tsx index 6a83968df..5dc6a097f 100644 --- a/src/pages/steps/LocationStep.tsx +++ b/src/pages/steps/LocationStep.tsx @@ -708,14 +708,16 @@ const LocationStep = ({ t('location.add_modal.errors.streetAndNumber') } info={ - - onFieldChange({ - streetAndNumber, - location: { streetAndNumber }, - }) - } - /> + scope === ScopeTypes.ORGANIZERS && ( + + onFieldChange({ + streetAndNumber, + location: { streetAndNumber }, + }) + } + /> + ) } /> From 9923562e534be58ed5d8176bbf6238d9d61e87e2 Mon Sep 17 00:00:00 2001 From: Emma Fabre Date: Thu, 31 Oct 2024 16:06:36 +0100 Subject: [PATCH 2/6] Add regression to test to besure --- src/pages/steps/LocationStep.tsx | 2 +- src/test/e2e/create-place.spec.ts | 1 + src/ui/Inline.tsx | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/steps/LocationStep.tsx b/src/pages/steps/LocationStep.tsx index 5dc6a097f..5863de3fc 100644 --- a/src/pages/steps/LocationStep.tsx +++ b/src/pages/steps/LocationStep.tsx @@ -268,7 +268,7 @@ export const BlankStreetToggle = ({ return ( diff --git a/src/test/e2e/create-place.spec.ts b/src/test/e2e/create-place.spec.ts index d255f532a..fa72135c5 100644 --- a/src/test/e2e/create-place.spec.ts +++ b/src/test/e2e/create-place.spec.ts @@ -51,6 +51,7 @@ test('create a place', async ({ baseURL, page }) => { await page .getByRole('option', { name: dummyPlace.address.municipality }) .click(); + await expect(page.getByTestId('blank_address')).not.toBeVisible(); await page.getByLabel('Straat en nummer').nth(0).click(); await page .getByLabel('Straat en nummer') diff --git a/src/ui/Inline.tsx b/src/ui/Inline.tsx index 4b9277953..8efb65f05 100644 --- a/src/ui/Inline.tsx +++ b/src/ui/Inline.tsx @@ -98,7 +98,7 @@ const inlinePropTypes = [ const getInlineProps = (props: UnknownProps) => pickBy(props, (_value, key) => { // pass aria attributes to the DOM element - if (key.startsWith('aria-')) { + if (key.startsWith('aria-') || key.startsWith('data-')) { return true; } From a0386717449c548fd63796f8dbe872705e271bac Mon Sep 17 00:00:00 2001 From: Emma Fabre Date: Thu, 14 Nov 2024 11:54:07 +0100 Subject: [PATCH 3/6] Use field name instead of testid --- package.json | 2 +- src/pages/steps/LocationStep.tsx | 1 - src/test/e2e/create-place.spec.ts | 2 +- src/ui/Inline.tsx | 2 +- yarn.lock | 30 ++++++++++++++++++------------ 5 files changed, 21 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 6c6f3dcb8..144db0eb9 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ }, "devDependencies": { "@faker-js/faker": "^8.0.2", - "@playwright/test": "^1.31.2", + "@playwright/test": "^1.48.2", "@storybook/addon-a11y": "^6.5.16", "@storybook/addon-actions": "^6.5.16", "@storybook/addon-essentials": "^6.5.16", diff --git a/src/pages/steps/LocationStep.tsx b/src/pages/steps/LocationStep.tsx index 5863de3fc..0ca07a1f6 100644 --- a/src/pages/steps/LocationStep.tsx +++ b/src/pages/steps/LocationStep.tsx @@ -268,7 +268,6 @@ export const BlankStreetToggle = ({ return ( diff --git a/src/test/e2e/create-place.spec.ts b/src/test/e2e/create-place.spec.ts index fa72135c5..6c99e2671 100644 --- a/src/test/e2e/create-place.spec.ts +++ b/src/test/e2e/create-place.spec.ts @@ -51,7 +51,7 @@ test('create a place', async ({ baseURL, page }) => { await page .getByRole('option', { name: dummyPlace.address.municipality }) .click(); - await expect(page.getByTestId('blank_address')).not.toBeVisible(); + await expect(page.getByLabel('blank_address')).not.toBeVisible(); await page.getByLabel('Straat en nummer').nth(0).click(); await page .getByLabel('Straat en nummer') diff --git a/src/ui/Inline.tsx b/src/ui/Inline.tsx index 8efb65f05..4b9277953 100644 --- a/src/ui/Inline.tsx +++ b/src/ui/Inline.tsx @@ -98,7 +98,7 @@ const inlinePropTypes = [ const getInlineProps = (props: UnknownProps) => pickBy(props, (_value, key) => { // pass aria attributes to the DOM element - if (key.startsWith('aria-') || key.startsWith('data-')) { + if (key.startsWith('aria-')) { return true; } diff --git a/yarn.lock b/yarn.lock index 374157541..ecc793f29 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1767,15 +1767,12 @@ tiny-glob "^0.2.9" tslib "^2.4.0" -"@playwright/test@^1.31.2": - version "1.31.2" - resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.31.2.tgz#426d8545143a97a6fed250a2a27aa1c8e5e2548e" - integrity sha512-BYVutxDI4JeZKV1+ups6dt5WiqKhjBtIYowyZIJ3kBDmJgsuPKsqqKNIMFbUePLSCmp2cZu+BDL427RcNKTRYw== +"@playwright/test@^1.48.2": + version "1.48.2" + resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.48.2.tgz#87dd40633f980872283404c8142a65744d3f13d6" + integrity sha512-54w1xCWfXuax7dz4W2M9uw0gDyh+ti/0K/MxcCUxChFh37kkdxPdfZDw5QBbuPUJHr1CiHJ1hXgSs+GgeQc5Zw== dependencies: - "@types/node" "*" - playwright-core "1.31.2" - optionalDependencies: - fsevents "2.3.2" + playwright "1.48.2" "@pmmmwh/react-refresh-webpack-plugin@^0.5.3": version "0.5.10" @@ -11332,10 +11329,19 @@ pkg-dir@^5.0.0: dependencies: find-up "^5.0.0" -playwright-core@1.31.2: - version "1.31.2" - resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.31.2.tgz#debf4b215d14cb619adb7e511c164d068075b2ed" - integrity sha512-a1dFgCNQw4vCsG7bnojZjDnPewZcw7tZUNFN0ZkcLYKj+mPmXvg4MpaaKZ5SgqPsOmqIf2YsVRkgqiRDxD+fDQ== +playwright-core@1.48.2: + version "1.48.2" + resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.48.2.tgz#cd76ed8af61690edef5c05c64721c26a8db2f3d7" + integrity sha512-sjjw+qrLFlriJo64du+EK0kJgZzoQPsabGF4lBvsid+3CNIZIYLgnMj9V6JY5VhM2Peh20DJWIVpVljLLnlawA== + +playwright@1.48.2: + version "1.48.2" + resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.48.2.tgz#fca45ae8abdc34835c715718072aaff7e305167e" + integrity sha512-NjYvYgp4BPmiwfe31j4gHLa3J7bD2WiBz8Lk2RoSsmX38SVIARZ18VYjxLjAcDsAhA+F4iSEXTSGgjua0rrlgQ== + dependencies: + playwright-core "1.48.2" + optionalDependencies: + fsevents "2.3.2" please-upgrade-node@^3.2.0: version "3.2.0" From 44ff2a6a9ca2ef9e8689154b6f824496ee380ce2 Mon Sep 17 00:00:00 2001 From: Emma Fabre Date: Thu, 14 Nov 2024 11:57:45 +0100 Subject: [PATCH 4/6] Revert accidental package upgrade --- package.json | 2 +- yarn.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 144db0eb9..6c6f3dcb8 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ }, "devDependencies": { "@faker-js/faker": "^8.0.2", - "@playwright/test": "^1.48.2", + "@playwright/test": "^1.31.2", "@storybook/addon-a11y": "^6.5.16", "@storybook/addon-actions": "^6.5.16", "@storybook/addon-essentials": "^6.5.16", diff --git a/yarn.lock b/yarn.lock index ecc793f29..ab580e40b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1767,7 +1767,7 @@ tiny-glob "^0.2.9" tslib "^2.4.0" -"@playwright/test@^1.48.2": +"@playwright/test@^1.31.2": version "1.48.2" resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.48.2.tgz#87dd40633f980872283404c8142a65744d3f13d6" integrity sha512-54w1xCWfXuax7dz4W2M9uw0gDyh+ti/0K/MxcCUxChFh37kkdxPdfZDw5QBbuPUJHr1CiHJ1hXgSs+GgeQc5Zw== From fb43adada42e94dddf466c54fdb881b19f9ad0bd Mon Sep 17 00:00:00 2001 From: Emma Fabre Date: Thu, 14 Nov 2024 12:17:13 +0100 Subject: [PATCH 5/6] Regenerate lockfile --- yarn.lock | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/yarn.lock b/yarn.lock index ab580e40b..fbcfce1f3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1767,12 +1767,15 @@ tiny-glob "^0.2.9" tslib "^2.4.0" -"@playwright/test@^1.31.2": - version "1.48.2" - resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.48.2.tgz#87dd40633f980872283404c8142a65744d3f13d6" - integrity sha512-54w1xCWfXuax7dz4W2M9uw0gDyh+ti/0K/MxcCUxChFh37kkdxPdfZDw5QBbuPUJHr1CiHJ1hXgSs+GgeQc5Zw== +"@playwright/test@1.31.2": + version "1.31.2" + resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.31.2.tgz#426d8545143a97a6fed250a2a27aa1c8e5e2548e" + integrity sha512-BYVutxDI4JeZKV1+ups6dt5WiqKhjBtIYowyZIJ3kBDmJgsuPKsqqKNIMFbUePLSCmp2cZu+BDL427RcNKTRYw== dependencies: - playwright "1.48.2" + "@types/node" "*" + playwright-core "1.31.2" + optionalDependencies: + fsevents "2.3.2" "@pmmmwh/react-refresh-webpack-plugin@^0.5.3": version "0.5.10" @@ -11329,19 +11332,10 @@ pkg-dir@^5.0.0: dependencies: find-up "^5.0.0" -playwright-core@1.48.2: - version "1.48.2" - resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.48.2.tgz#cd76ed8af61690edef5c05c64721c26a8db2f3d7" - integrity sha512-sjjw+qrLFlriJo64du+EK0kJgZzoQPsabGF4lBvsid+3CNIZIYLgnMj9V6JY5VhM2Peh20DJWIVpVljLLnlawA== - -playwright@1.48.2: - version "1.48.2" - resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.48.2.tgz#fca45ae8abdc34835c715718072aaff7e305167e" - integrity sha512-NjYvYgp4BPmiwfe31j4gHLa3J7bD2WiBz8Lk2RoSsmX38SVIARZ18VYjxLjAcDsAhA+F4iSEXTSGgjua0rrlgQ== - dependencies: - playwright-core "1.48.2" - optionalDependencies: - fsevents "2.3.2" +playwright-core@1.31.2: + version "1.31.2" + resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.31.2.tgz#debf4b215d14cb619adb7e511c164d068075b2ed" + integrity sha512-a1dFgCNQw4vCsG7bnojZjDnPewZcw7tZUNFN0ZkcLYKj+mPmXvg4MpaaKZ5SgqPsOmqIf2YsVRkgqiRDxD+fDQ== please-upgrade-node@^3.2.0: version "3.2.0" From 492a31618ddb5756214400b4f25a83e629a0e6b1 Mon Sep 17 00:00:00 2001 From: Emma Fabre Date: Thu, 14 Nov 2024 12:18:25 +0100 Subject: [PATCH 6/6] Just lock goddamn Playwright since we're stuck on 31 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6c6f3dcb8..c134343a0 100644 --- a/package.json +++ b/package.json @@ -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",