Skip to content

Commit

Permalink
update e2e placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak committed Dec 18, 2024
1 parent d878159 commit c27fdf1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions e2e/tests/ui-driven/src/helpers/addComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ const createBaseComponent = async (
break;
case ComponentType.AddressInput:
await page.getByPlaceholder("Title").fill(title || "");
await page.getByPlaceholder("Data Field").fill(options?.[0] || "");
await page.getByPlaceholder("Data field").fill(options?.[0] || "");

Check failure on line 58 in e2e/tests/ui-driven/src/helpers/addComponent.ts

View workflow job for this annotation

GitHub Actions / E2E tests

[chromium] › create-flow.spec.ts:60:7 › Flow creation

3) [chromium] › create-flow.spec.ts:60:7 › Flow creation, publish and preview › Create a flow ──── Error: locator.fill: Error: strict mode violation: getByPlaceholder('Data field') resolved to 2 elements: 1) <div required="" role="status" aria-atomic="true" aria-live="polite" placeholder="Data field" class="MuiAutocomplete-root css-n0fqzr">…</div> aka getByRole('status').first() 2) <input value="" required="" type="text" role="combobox" autocomplete="off" spellcheck="false" aria-invalid="false" aria-expanded="false" autocapitalize="none" placeholder="Data field" aria-autocomplete="list" id="data-field-autocomplete" class="MuiInputBase-input MuiOutlinedInput-input MuiAutocomplete-input MuiAutocomplete-inputFocused css-63e1h8"/> aka getByRole('combobox', { name: 'Data field' }) Call log: - waiting for getByPlaceholder('Data field') at helpers/addComponent.ts:58 56 | case ComponentType.AddressInput: 57 | await page.getByPlaceholder("Title").fill(title || ""); > 58 | await page.getByPlaceholder("Data field").fill(options?.[0] || ""); | ^ 59 | break; 60 | case ComponentType.ContactInput: 61 | await page.getByPlaceholder("Title").fill(title || ""); at createBaseComponent (/home/runner/work/planx-new/planx-new/e2e/tests/ui-driven/src/helpers/addComponent.ts:58:49) at createAddressInput (/home/runner/work/planx-new/planx-new/e2e/tests/ui-driven/src/helpers/addComponent.ts:255:3) at PlaywrightEditor.createAddressInput (/home/runner/work/planx-new/planx-new/e2e/tests/ui-driven/src/pages/Editor.ts:162:5) at /home/runner/work/planx-new/planx-new/e2e/tests/ui-driven/src/create-flow.spec.ts:81:5
break;
case ComponentType.ContactInput:
await page.getByPlaceholder("Title").fill(title || "");
await page.getByPlaceholder("Data Field").fill(options?.[0] || "");
await page.getByPlaceholder("Data field").fill(options?.[0] || "");
break;
case ComponentType.TaskList:
await page.getByPlaceholder("Main Title").fill(title || "");
Expand Down Expand Up @@ -108,15 +108,15 @@ const createBaseComponent = async (
}
break;
case ComponentType.FileUpload:
await page.getByPlaceholder("Data Field").fill(options?.[0] || "");
await page.getByPlaceholder("Data field").fill(options?.[0] || "");
break;
case ComponentType.FileUploadAndLabel:
await page.getByPlaceholder("File type").fill(options?.[0] || "");
await page.getByPlaceholder("Data Field").fill(options?.[1] || "");
await page.getByPlaceholder("Data field").fill(options?.[1] || "");
break;
case ComponentType.List:
await page.getByPlaceholder("Title").fill(title || "");
await page.getByPlaceholder("Data Field").fill(options?.[0] || "");
await page.getByPlaceholder("Data field").fill(options?.[0] || "");
break;
case ComponentType.Content:
await page
Expand Down Expand Up @@ -172,7 +172,7 @@ export const createQuestionWithDataFieldOptions = async (
await locatingNode.click();
await page.getByRole("dialog").waitFor();
await page.getByPlaceholder("Text").fill(questionText);
await page.getByPlaceholder("Data Field").fill(dataField);
await page.getByPlaceholder("Data field").fill(dataField);

Check failure on line 175 in e2e/tests/ui-driven/src/helpers/addComponent.ts

View workflow job for this annotation

GitHub Actions / E2E tests

[chromium] › create-flow-with-geospatial.spec.ts:59:7 › Flow creation

1) [chromium] › create-flow-with-geospatial.spec.ts:59:7 › Flow creation, publish and preview › Create a flow Error: locator.fill: Error: strict mode violation: getByPlaceholder('Data field') resolved to 2 elements: 1) <div role="status" aria-atomic="true" aria-live="polite" placeholder="Data field" class="MuiAutocomplete-root css-n0fqzr">…</div> aka locator('fieldset').filter({ hasText: 'Always put to user (forgo' }).getByRole('status') 2) <input value="" type="text" role="combobox" autocomplete="off" spellcheck="false" aria-invalid="false" aria-expanded="false" autocapitalize="none" placeholder="Data field" aria-autocomplete="list" id="data-field-autocomplete" class="MuiInputBase-input MuiOutlinedInput-input MuiAutocomplete-input MuiAutocomplete-inputFocused css-63e1h8"/> aka getByRole('combobox', { name: 'Data field' }) Call log: - waiting for getByPlaceholder('Data field') at helpers/addComponent.ts:175 173 | await page.getByRole("dialog").waitFor(); 174 | await page.getByPlaceholder("Text").fill(questionText); > 175 | await page.getByPlaceholder("Data field").fill(dataField); | ^ 176 | await createComponentOptionsWithDataValues(page, options); 177 | await page.locator('button[form="modal"][type="submit"]').click(); 178 | }; at createQuestionWithDataFieldOptions (/home/runner/work/planx-new/planx-new/e2e/tests/ui-driven/src/helpers/addComponent.ts:175:45) at PlaywrightEditor.createQuestionWithDataFieldOptions (/home/runner/work/planx-new/planx-new/e2e/tests/ui-driven/src/pages/Editor.ts:93:5) at /home/runner/work/planx-new/planx-new/e2e/tests/ui-driven/src/create-flow-with-geospatial.spec.ts:74:5

Check failure on line 175 in e2e/tests/ui-driven/src/helpers/addComponent.ts

View workflow job for this annotation

GitHub Actions / E2E tests

[chromium] › create-flow-with-geospatial.spec.ts:59:7 › Flow creation

1) [chromium] › create-flow-with-geospatial.spec.ts:59:7 › Flow creation, publish and preview › Create a flow Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.fill: Error: strict mode violation: getByPlaceholder('Data field') resolved to 2 elements: 1) <div role="status" aria-atomic="true" aria-live="polite" placeholder="Data field" class="MuiAutocomplete-root css-n0fqzr">…</div> aka locator('fieldset').filter({ hasText: 'Always put to user (forgo' }).getByRole('status') 2) <input value="" type="text" role="combobox" autocomplete="off" spellcheck="false" aria-invalid="false" aria-expanded="false" autocapitalize="none" placeholder="Data field" aria-autocomplete="list" id="data-field-autocomplete" class="MuiInputBase-input MuiOutlinedInput-input MuiAutocomplete-input MuiAutocomplete-inputFocused css-63e1h8"/> aka getByRole('combobox', { name: 'Data field' }) Call log: - waiting for getByPlaceholder('Data field') at helpers/addComponent.ts:175 173 | await page.getByRole("dialog").waitFor(); 174 | await page.getByPlaceholder("Text").fill(questionText); > 175 | await page.getByPlaceholder("Data field").fill(dataField); | ^ 176 | await createComponentOptionsWithDataValues(page, options); 177 | await page.locator('button[form="modal"][type="submit"]').click(); 178 | }; at createQuestionWithDataFieldOptions (/home/runner/work/planx-new/planx-new/e2e/tests/ui-driven/src/helpers/addComponent.ts:175:45) at PlaywrightEditor.createQuestionWithDataFieldOptions (/home/runner/work/planx-new/planx-new/e2e/tests/ui-driven/src/pages/Editor.ts:93:5) at /home/runner/work/planx-new/planx-new/e2e/tests/ui-driven/src/create-flow-with-geospatial.spec.ts:74:5

Check failure on line 175 in e2e/tests/ui-driven/src/helpers/addComponent.ts

View workflow job for this annotation

GitHub Actions / E2E tests

[chromium] › create-flow-with-geospatial.spec.ts:59:7 › Flow creation

1) [chromium] › create-flow-with-geospatial.spec.ts:59:7 › Flow creation, publish and preview › Create a flow Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.fill: Error: strict mode violation: getByPlaceholder('Data field') resolved to 2 elements: 1) <div role="status" aria-atomic="true" aria-live="polite" placeholder="Data field" class="MuiAutocomplete-root css-n0fqzr">…</div> aka locator('fieldset').filter({ hasText: 'Always put to user (forgo' }).getByRole('status') 2) <input value="" type="text" role="combobox" autocomplete="off" spellcheck="false" aria-invalid="false" aria-expanded="false" autocapitalize="none" placeholder="Data field" aria-autocomplete="list" id="data-field-autocomplete" class="MuiInputBase-input MuiOutlinedInput-input MuiAutocomplete-input MuiAutocomplete-inputFocused css-63e1h8"/> aka getByRole('combobox', { name: 'Data field' }) Call log: - waiting for getByPlaceholder('Data field') at helpers/addComponent.ts:175 173 | await page.getByRole("dialog").waitFor(); 174 | await page.getByPlaceholder("Text").fill(questionText); > 175 | await page.getByPlaceholder("Data field").fill(dataField); | ^ 176 | await createComponentOptionsWithDataValues(page, options); 177 | await page.locator('button[form="modal"][type="submit"]').click(); 178 | }; at createQuestionWithDataFieldOptions (/home/runner/work/planx-new/planx-new/e2e/tests/ui-driven/src/helpers/addComponent.ts:175:45) at PlaywrightEditor.createQuestionWithDataFieldOptions (/home/runner/work/planx-new/planx-new/e2e/tests/ui-driven/src/pages/Editor.ts:93:5) at /home/runner/work/planx-new/planx-new/e2e/tests/ui-driven/src/create-flow-with-geospatial.spec.ts:74:5
await createComponentOptionsWithDataValues(page, options);
await page.locator('button[form="modal"][type="submit"]').click();
};
Expand Down Expand Up @@ -377,7 +377,7 @@ async function createComponentOptionsWithDataValues(
for (const option of options) {
await page.locator("button").filter({ hasText: "add new" }).click();
await page.getByPlaceholder("Option").nth(index).fill(option.optionText);
await page.getByPlaceholder("Data Value").nth(index).fill(option.dataValue);
await page.getByPlaceholder("Data field").nth(index).fill(option.dataValue);
index++;
}
}
Expand Down

0 comments on commit c27fdf1

Please sign in to comment.