Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ability to leave street blank for organisers #922

Merged
merged 8 commits into from
Oct 19, 2024
Merged

Conversation

Anahkiasen
Copy link
Contributor

Added

  • Added ability to leave street blank for organisers

Ticket: https://jira.publiq.be/browse/III-6231

Copy link
Contributor

@simon-debruijn simon-debruijn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The e2e tests give a valid error

Error: locator.fill: Error: strict mode violation: getByLabel('Straat en nummer') resolved to 2 elements:
       1) <input type="text" name="address.streetAndNumber" id="organizer-address-streetAndNumber" class="Box__StyledBox-sc-ogeep9-0 dTTsTB form-control"/> aka getByLabel('Straat en nummer', { exact: *** })
       2) <input value="" type="checkbox" id="blank_address" name="blank_address" class="Box__StyledBox-sc-ogeep9-0 hiedRv custom-control-input"/> aka getByLabel('Ik wil mijn straat en nummer')

@@ -51,9 +51,10 @@ test('create a place', async ({ baseURL, page }) => {
await page
.getByRole('option', { name: dummyPlace.address.municipality })
.click();
await page.getByLabel('Straat en nummer').click();
await page.getByLabel('Straat en nummer').nth(0).click();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I slightly prefer the first method

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean? 🤔

Copy link
Contributor Author

@Anahkiasen Anahkiasen Oct 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the issue is maybe placing an actual field inside a field's info slot, which means the label applies to both. Like Playwright is correct that it's iffy. perhaps, I can find a way to work around it so that it's better from a semantics/a11y standpoint

@Anahkiasen Anahkiasen enabled auto-merge October 19, 2024 10:01
@Anahkiasen Anahkiasen merged commit 9b9565c into main Oct 19, 2024
5 checks passed
@Anahkiasen Anahkiasen deleted the feature/III-6231 branch October 19, 2024 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants