@nyaruka/temba-components 0.32.0 → 0.32.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/cla.yml +25 -0
- package/CHANGELOG.md +17 -0
- package/{LICENSE.md → LICENSE} +3 -3
- package/dist/{193d2225.js → 1b980073.js} +6 -6
- package/dist/index.js +6 -6
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/templates/components-body.html +1 -1
- package/dist/templates/components-head.html +1 -1
- package/out-tsc/src/contacts/ContactFields.js +2 -2
- package/out-tsc/src/contacts/ContactFields.js.map +1 -1
- package/out-tsc/src/contacts/ContactStoreElement.js +4 -2
- package/out-tsc/src/contacts/ContactStoreElement.js.map +1 -1
- package/out-tsc/src/datepicker/DatePicker.js +2 -1
- package/out-tsc/src/datepicker/DatePicker.js.map +1 -1
- package/out-tsc/src/dropdown/Dropdown.js +2 -2
- package/out-tsc/src/dropdown/Dropdown.js.map +1 -1
- package/out-tsc/src/list/TembaMenu.js +1 -4
- package/out-tsc/src/list/TembaMenu.js.map +1 -1
- package/out-tsc/test/temba-contact-fields.test.js +40 -0
- package/out-tsc/test/temba-contact-fields.test.js.map +1 -0
- package/out-tsc/test/temba-datepicker.test.js +5 -0
- package/out-tsc/test/temba-datepicker.test.js.map +1 -1
- package/out-tsc/test/utils.test.js +1 -0
- package/out-tsc/test/utils.test.js.map +1 -1
- package/package.json +2 -3
- package/screenshots/truth/contacts/fields-updated.png +0 -0
- package/screenshots/truth/contacts/fields.png +0 -0
- package/screenshots/truth/datepicker/date-truncated-time.png +0 -0
- package/src/contacts/ContactFields.ts +2 -2
- package/src/contacts/ContactStoreElement.ts +4 -2
- package/src/datepicker/DatePicker.ts +2 -1
- package/src/dropdown/Dropdown.ts +2 -2
- package/src/list/TembaMenu.ts +1 -3
- package/src/untyped.d.ts +6 -1
- package/test/temba-contact-fields.test.ts +61 -0
- package/test/temba-datepicker.test.ts +9 -0
- package/test/utils.test.ts +1 -0
- package/test-assets/contacts/contact-dave-active +1 -9
- package/web-test-runner.config.mjs +15 -3
|
@@ -229,15 +229,27 @@ const wireScreenshots = async (page, context) => {
|
|
|
229
229
|
|
|
230
230
|
await page.exposeFunction(
|
|
231
231
|
'typeInto',
|
|
232
|
-
async (selector, text, replace = false) => {
|
|
233
|
-
|
|
232
|
+
async (selector, text, replace = false, enter = false) => {
|
|
233
|
+
|
|
234
|
+
const selectors = selector.split(":");
|
|
234
235
|
const frame = await page.frames().find(f => {
|
|
235
236
|
return true;
|
|
236
237
|
});
|
|
237
|
-
|
|
238
|
+
await frame.$(selectors[0]);
|
|
239
|
+
|
|
240
|
+
let codeSelector = `document.querySelector("${selectors[0]}")`;
|
|
241
|
+
selectors.shift();
|
|
242
|
+
if (selectors.length > 0) {
|
|
243
|
+
codeSelector += "." + selectors.map((entry)=>`shadowRoot.querySelector("${entry}")`).join(".");
|
|
244
|
+
}
|
|
238
245
|
|
|
246
|
+
const element = await page.evaluateHandle(codeSelector);
|
|
239
247
|
await element.click({ clickCount: replace ? 3 : 1 });
|
|
240
248
|
await page.keyboard.type(text);
|
|
249
|
+
|
|
250
|
+
if (enter) {
|
|
251
|
+
await page.keyboard.press("Enter");
|
|
252
|
+
}
|
|
241
253
|
}
|
|
242
254
|
);
|
|
243
255
|
|