@oracle/oraclejet-core-pack 17.1.1 → 17.1.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/oj-c/InputDateText.json +43 -43
- package/oj-c/action-card/component.json +2 -2
- package/oj-c/area-chart/component.json +2 -2
- package/oj-c/area-chart-group/component.json +2 -2
- package/oj-c/area-chart-item/component.json +2 -2
- package/oj-c/area-chart-series/component.json +2 -2
- package/oj-c/avatar/component.json +2 -2
- package/oj-c/button/component.json +2 -2
- package/oj-c/buttonset-multiple/component.json +2 -2
- package/oj-c/buttonset-single/component.json +2 -2
- package/oj-c/card-view/component.json +2 -2
- package/oj-c/checkbox/component.json +2 -2
- package/oj-c/checkboxset/component.json +2 -2
- package/oj-c/collapsible/component.json +2 -2
- package/oj-c/component.json +3 -3
- package/oj-c/conveyor-belt/component.json +2 -2
- package/oj-c/date-picker/component.json +2 -2
- package/oj-c/drag-handle/component.json +2 -2
- package/oj-c/drawer-layout/component.json +2 -2
- package/oj-c/drawer-popup/component.json +2 -2
- package/oj-c/file-picker/component.json +2 -2
- package/oj-c/form-layout/component.json +2 -2
- package/oj-c/highlight-text/component.json +2 -2
- package/oj-c/input-date-mask/component.json +2 -2
- package/oj-c/input-date-picker/component.json +2 -2
- package/oj-c/input-date-text/__webdriver__/InputDateTextWebElement.js +9 -11
- package/oj-c/input-date-text/__webdriver__/InputDateTextWebElement.js.map +1 -1
- package/oj-c/input-date-text/component.json +2 -2
- package/oj-c/input-month-mask/component.json +2 -2
- package/oj-c/input-number/__webdriver__/InputNumberWebElement.js +10 -12
- package/oj-c/input-number/__webdriver__/InputNumberWebElement.js.map +1 -1
- package/oj-c/input-number/component.json +2 -2
- package/oj-c/input-password/__webdriver__/InputPasswordWebElement.js +9 -11
- package/oj-c/input-password/__webdriver__/InputPasswordWebElement.js.map +1 -1
- package/oj-c/input-password/component.json +2 -2
- package/oj-c/input-sensitive-text/__webdriver__/InputSensitiveTextWebElement.js +16 -12
- package/oj-c/input-sensitive-text/__webdriver__/InputSensitiveTextWebElement.js.map +1 -1
- package/oj-c/input-sensitive-text/component.json +2 -2
- package/oj-c/input-text/__webdriver__/InputTextWebElement.js +10 -12
- package/oj-c/input-text/__webdriver__/InputTextWebElement.js.map +1 -1
- package/oj-c/input-text/component.json +2 -2
- package/oj-c/labelled-link/component.json +2 -2
- package/oj-c/legend/component.json +2 -2
- package/oj-c/legend-item/component.json +2 -2
- package/oj-c/legend-section/component.json +2 -2
- package/oj-c/line-chart/component.json +2 -2
- package/oj-c/line-chart-group/component.json +2 -2
- package/oj-c/line-chart-item/component.json +2 -2
- package/oj-c/line-chart-series/component.json +2 -2
- package/oj-c/list-item-layout/component.json +2 -2
- package/oj-c/list-view/component.json +2 -2
- package/oj-c/menu-button/component.json +2 -2
- package/oj-c/message-banner/component.json +2 -2
- package/oj-c/message-toast/component.json +2 -2
- package/oj-c/metadata/allComponents.json +127 -127
- package/oj-c/meter-bar/component.json +2 -2
- package/oj-c/meter-circle/component.json +2 -2
- package/oj-c/popup/component.json +2 -2
- package/oj-c/progress-bar/component.json +2 -2
- package/oj-c/progress-button/component.json +2 -2
- package/oj-c/progress-circle/component.json +2 -2
- package/oj-c/radioset/component.json +2 -2
- package/oj-c/rating-gauge/component.json +2 -2
- package/oj-c/select-multiple/component.json +2 -2
- package/oj-c/select-single/component.json +2 -2
- package/oj-c/selection-card/component.json +2 -2
- package/oj-c/selector/component.json +2 -2
- package/oj-c/selector-all/component.json +2 -2
- package/oj-c/split-menu-button/component.json +2 -2
- package/oj-c/tab-bar/component.json +2 -2
- package/oj-c/tab-bar-mixed/component.json +2 -2
- package/oj-c/table/component.json +2 -2
- package/oj-c/tag-cloud/component.json +2 -2
- package/oj-c/tag-cloud-item/component.json +2 -2
- package/oj-c/text-area/__webdriver__/TextAreaWebElement.js +10 -12
- package/oj-c/text-area/__webdriver__/TextAreaWebElement.js.map +1 -1
- package/oj-c/text-area/component.json +2 -2
- package/oj-c/toggle-button/component.json +2 -2
- package/package.json +4 -4
|
@@ -19,18 +19,16 @@ class InputDateTextWebElement extends InputDateTextWebElementBase_1.InputDateTex
|
|
|
19
19
|
const disabled = await this.getDisabled();
|
|
20
20
|
if (!(disabled || readonly)) {
|
|
21
21
|
await this.whenBusyContextReady();
|
|
22
|
-
// Note that using element.clear() will blur, which commits the change and
|
|
23
|
-
//
|
|
24
|
-
// Instead
|
|
25
|
-
// in a new value. We mock committing the value by calling validate().
|
|
26
|
-
let currValue = await this.getProperty('rawValue');
|
|
27
|
-
while (currValue) {
|
|
28
|
-
const backspaces = new Array(currValue.length + 1).join(selenium_webdriver_1.Key.BACK_SPACE);
|
|
29
|
-
// First move the cursor to the end, then backspaces.
|
|
30
|
-
await this.sendKeys([selenium_webdriver_1.Key.END, backspaces].join(''));
|
|
31
|
-
currValue = await this.getProperty('rawValue');
|
|
32
|
-
}
|
|
22
|
+
// Note that using element.clear() will blur, which commits the change and calls
|
|
23
|
+
// onValueChanged, which we don't want until we're done updating the value.
|
|
24
|
+
// Instead do select-all, then delete to clear the value.
|
|
33
25
|
const input = await this.findElement(selenium_webdriver_1.By.css('input'));
|
|
26
|
+
const currValue = await this.getRawValue();
|
|
27
|
+
if (currValue) {
|
|
28
|
+
const platform = await (await this.getDriver().getCapabilities()).getPlatform();
|
|
29
|
+
await input.sendKeys(platform === 'mac' ? selenium_webdriver_1.Key.COMMAND : selenium_webdriver_1.Key.CONTROL, 'a');
|
|
30
|
+
await input.sendKeys(selenium_webdriver_1.Key.DELETE);
|
|
31
|
+
}
|
|
34
32
|
value && (await input.sendKeys(value));
|
|
35
33
|
return this.getDriver().executeAsyncScript(`
|
|
36
34
|
let el = arguments[0];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputDateTextWebElement.js","sourceRoot":"","sources":["InputDateTextWebElement.ts"],"names":[],"mappings":";;;AAAA,6EAA4E;AAC5E,yDAA6C;AAE7C;;;;GAIG;AACH,MAAa,uBAAwB,SAAQ,yDA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,CAAC,eAAe,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;gBAChF,MAAM,KAAK,CAAC,QAAQ,CAAC,QAAQ,KAAK,KAAK,CAAC,CAAC,CAAC,wBAAG,CAAC,OAAO,CAAC,CAAC,CAAC,wBAAG,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;gBAC1E,MAAM,KAAK,CAAC,QAAQ,CAAC,wBAAG,CAAC,MAAM,CAAC,CAAC;YACnC,CAAC;YACD,KAAK,IAAI,CAAC,MAAM,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;YAEvC,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC,kBAAkB,CACxC;;;;OAID,EACC,IAAI,CACL,CAAC;QACJ,CAAC;IACH,CAAC;IAED;;OAEG;IACH,KAAK;QACH,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;CACF;AAzCD,0DAyCC","sourcesContent":["import { InputDateTextWebElementBase } from './InputDateTextWebElementBase';\nimport { By, Key } from 'selenium-webdriver';\n\n/**\n * The component WebElement for [oj-c-input-date-text](../../../oj-c/docs/oj.InputDateText.html).\n * Do not instantiate this class directly, instead, use\n * [findInputDateText](../functions/findInputDateText.html).\n */\nexport class InputDateTextWebElement extends InputDateTextWebElementBase {\n /**\n * Sets the value of the \"value\" property of the input component.\n * @param value The value to set for the <code>value</code>\n */\n public async changeValue(value: string | null): Promise<void> {\n await this.getDriver().executeScript('arguments[0].focus()', this);\n const readonly = await this.getReadonly();\n const disabled = await this.getDisabled();\n if (!(disabled || readonly)) {\n await this.whenBusyContextReady();\n\n // Note that using element.clear() will blur, which commits the change and calls\n // onValueChanged, which we don't want until we're done updating the value.\n // Instead do select-all, then delete to clear the value.\n const input = await this.findElement(By.css('input'));\n const currValue = await this.getRawValue();\n if (currValue) {\n const platform = await (await this.getDriver().getCapabilities()).getPlatform();\n await input.sendKeys(platform === 'mac' ? Key.COMMAND : Key.CONTROL, 'a');\n await input.sendKeys(Key.DELETE);\n }\n value && (await input.sendKeys(value));\n\n return this.getDriver().executeAsyncScript(\n `\n let el = arguments[0];\n let done = arguments[1];\n el.validate().then(done).catch(done);\n `,\n this\n );\n }\n }\n\n /**\n * Clears the value of the component.\n */\n clear(): Promise<void> {\n return this.changeValue(null);\n }\n}\n"]}
|
|
@@ -19,19 +19,17 @@ class InputNumberWebElement extends InputNumberWebElementBase_1.InputNumberWebEl
|
|
|
19
19
|
const disabled = await this.getDisabled();
|
|
20
20
|
if (!(disabled || readonly)) {
|
|
21
21
|
await this.whenBusyContextReady();
|
|
22
|
-
// Note that using element.clear() will blur, which commits the change and
|
|
23
|
-
//
|
|
24
|
-
// Instead
|
|
25
|
-
// in a new value. We mock committing the value by calling validate().
|
|
26
|
-
let currValue = await this.getProperty('rawValue');
|
|
27
|
-
while (currValue) {
|
|
28
|
-
const backspaces = new Array(currValue.length + 1).join(selenium_webdriver_1.Key.BACK_SPACE);
|
|
29
|
-
// First move the cursor to the end, then backspaces.
|
|
30
|
-
await this.sendKeys([selenium_webdriver_1.Key.END, backspaces].join(''));
|
|
31
|
-
currValue = await this.getProperty('rawValue');
|
|
32
|
-
}
|
|
22
|
+
// Note that using element.clear() will blur, which commits the change and calls
|
|
23
|
+
// onValueChanged, which we don't want until we're done updating the value.
|
|
24
|
+
// Instead do select-all, then delete to clear the value.
|
|
33
25
|
const input = await this.findElement(selenium_webdriver_1.By.css('input'));
|
|
34
|
-
|
|
26
|
+
const currValue = await this.getRawValue();
|
|
27
|
+
if (currValue) {
|
|
28
|
+
const platform = await (await this.getDriver().getCapabilities()).getPlatform();
|
|
29
|
+
await input.sendKeys(platform === 'mac' ? selenium_webdriver_1.Key.COMMAND : selenium_webdriver_1.Key.CONTROL, 'a');
|
|
30
|
+
await input.sendKeys(selenium_webdriver_1.Key.DELETE);
|
|
31
|
+
}
|
|
32
|
+
value !== null && (await input.sendKeys(value));
|
|
35
33
|
return this.getDriver().executeAsyncScript(`
|
|
36
34
|
let el = arguments[0];
|
|
37
35
|
let done = arguments[1];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputNumberWebElement.js","sourceRoot":"","sources":["InputNumberWebElement.ts"],"names":[],"mappings":";;;AAAA,yEAAwE;AACxE,yDAA6C;AAE7C;;;;GAIG;AACH,MAAa,qBAAsB,SAAQ,qDAAyB;IAClE;;;OAGG;IACI,KAAK,CAAC,WAAW,CAAC,KAAoB;QAC3C,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC,aAAa,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAC;QACnE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QAC1C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QAC1C,IAAI,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAElC,
|
|
1
|
+
{"version":3,"file":"InputNumberWebElement.js","sourceRoot":"","sources":["InputNumberWebElement.ts"],"names":[],"mappings":";;;AAAA,yEAAwE;AACxE,yDAA6C;AAE7C;;;;GAIG;AACH,MAAa,qBAAsB,SAAQ,qDAAyB;IAClE;;;OAGG;IACI,KAAK,CAAC,WAAW,CAAC,KAAoB;QAC3C,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC,aAAa,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAC;QACnE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QAC1C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QAC1C,IAAI,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAElC,gFAAgF;YAChF,2EAA2E;YAC3E,yDAAyD;YACzD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,uBAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;YACtD,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;YAC3C,IAAI,SAAS,EAAE,CAAC;gBACd,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC,eAAe,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;gBAChF,MAAM,KAAK,CAAC,QAAQ,CAAC,QAAQ,KAAK,KAAK,CAAC,CAAC,CAAC,wBAAG,CAAC,OAAO,CAAC,CAAC,CAAC,wBAAG,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;gBAC1E,MAAM,KAAK,CAAC,QAAQ,CAAC,wBAAG,CAAC,MAAM,CAAC,CAAC;YACnC,CAAC;YACD,KAAK,KAAK,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;YAEhD,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC,kBAAkB,CACxC;;;;OAID,EACC,IAAI,CACL,CAAC;QACJ,CAAC;IACH,CAAC;IAED;;OAEG;IACH,KAAK;QACH,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;CACF;AAzCD,sDAyCC","sourcesContent":["import { InputNumberWebElementBase } from './InputNumberWebElementBase';\nimport { By, Key } from 'selenium-webdriver';\n\n/**\n * The component WebElement for [oj-c-input-number](../../../oj-c/docs/oj.InputNumber.html).\n * Do not instantiate this class directly, instead, use\n * [findInputNumber](../functions/findInputNumber.html).\n */\nexport class InputNumberWebElement extends InputNumberWebElementBase {\n /**\n * Sets the value of the \"value\" property of the input component.\n * @param value The value to set for the <code>value</code>\n */\n public async changeValue(value: number | null): Promise<void> {\n await this.getDriver().executeScript('arguments[0].focus()', this);\n const readonly = await this.getReadonly();\n const disabled = await this.getDisabled();\n if (!(disabled || readonly)) {\n await this.whenBusyContextReady();\n\n // Note that using element.clear() will blur, which commits the change and calls\n // onValueChanged, which we don't want until we're done updating the value.\n // Instead do select-all, then delete to clear the value.\n const input = await this.findElement(By.css('input'));\n const currValue = await this.getRawValue();\n if (currValue) {\n const platform = await (await this.getDriver().getCapabilities()).getPlatform();\n await input.sendKeys(platform === 'mac' ? Key.COMMAND : Key.CONTROL, 'a');\n await input.sendKeys(Key.DELETE);\n }\n value !== null && (await input.sendKeys(value));\n\n return this.getDriver().executeAsyncScript(\n `\n let el = arguments[0];\n let done = arguments[1];\n el.validate().then(done).catch(done);\n `,\n this\n );\n }\n }\n\n /**\n * Clears the value of the component.\n */\n clear(): Promise<void> {\n return this.changeValue(null);\n }\n}\n"]}
|
|
@@ -19,18 +19,16 @@ class InputPasswordWebElement extends InputPasswordWebElementBase_1.InputPasswor
|
|
|
19
19
|
const disabled = await this.getDisabled();
|
|
20
20
|
if (!(disabled || readonly)) {
|
|
21
21
|
await this.whenBusyContextReady();
|
|
22
|
-
// Note that using element.clear() will blur, which commits the change and
|
|
23
|
-
//
|
|
24
|
-
// Instead
|
|
25
|
-
// in a new value. We mock committing the value by calling validate().
|
|
26
|
-
let currValue = await this.getProperty('rawValue');
|
|
27
|
-
while (currValue) {
|
|
28
|
-
const backspaces = new Array(currValue.length + 1).join(selenium_webdriver_1.Key.BACK_SPACE);
|
|
29
|
-
// First move the cursor to the end, then backspaces.
|
|
30
|
-
await this.sendKeys([selenium_webdriver_1.Key.END, backspaces].join(''));
|
|
31
|
-
currValue = await this.getProperty('rawValue');
|
|
32
|
-
}
|
|
22
|
+
// Note that using element.clear() will blur, which commits the change and calls
|
|
23
|
+
// onValueChanged, which we don't want until we're done updating the value.
|
|
24
|
+
// Instead do select-all, then delete to clear the value.
|
|
33
25
|
const input = await this.findElement(selenium_webdriver_1.By.css('input'));
|
|
26
|
+
const currValue = await this.getRawValue();
|
|
27
|
+
if (currValue) {
|
|
28
|
+
const platform = await (await this.getDriver().getCapabilities()).getPlatform();
|
|
29
|
+
await input.sendKeys(platform === 'mac' ? selenium_webdriver_1.Key.COMMAND : selenium_webdriver_1.Key.CONTROL, 'a');
|
|
30
|
+
await input.sendKeys(selenium_webdriver_1.Key.DELETE);
|
|
31
|
+
}
|
|
34
32
|
value && (await input.sendKeys(value));
|
|
35
33
|
return this.getDriver().executeAsyncScript(`
|
|
36
34
|
let el = arguments[0];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputPasswordWebElement.js","sourceRoot":"","sources":["InputPasswordWebElement.ts"],"names":[],"mappings":";;;AAAA,6EAA4E;AAC5E,yDAA6C;AAE7C;;;;GAIG;AACH,MAAa,uBAAwB,SAAQ,yDAA2B;IACtE;;;OAGG;IACI,KAAK,CAAC,WAAW,CAAC,KAAoB;QAC3C,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC,aAAa,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAC;QACnE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QAC1C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QAC1C,IAAI,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAElC,
|
|
1
|
+
{"version":3,"file":"InputPasswordWebElement.js","sourceRoot":"","sources":["InputPasswordWebElement.ts"],"names":[],"mappings":";;;AAAA,6EAA4E;AAC5E,yDAA6C;AAE7C;;;;GAIG;AACH,MAAa,uBAAwB,SAAQ,yDAA2B;IACtE;;;OAGG;IACI,KAAK,CAAC,WAAW,CAAC,KAAoB;QAC3C,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC,aAAa,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAC;QACnE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QAC1C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QAC1C,IAAI,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAElC,gFAAgF;YAChF,2EAA2E;YAC3E,yDAAyD;YACzD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,uBAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;YACtD,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;YAC3C,IAAI,SAAS,EAAE,CAAC;gBACd,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC,eAAe,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;gBAChF,MAAM,KAAK,CAAC,QAAQ,CAAC,QAAQ,KAAK,KAAK,CAAC,CAAC,CAAC,wBAAG,CAAC,OAAO,CAAC,CAAC,CAAC,wBAAG,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;gBAC1E,MAAM,KAAK,CAAC,QAAQ,CAAC,wBAAG,CAAC,MAAM,CAAC,CAAC;YACnC,CAAC;YAED,KAAK,IAAI,CAAC,MAAM,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;YAEvC,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC,kBAAkB,CACxC;;;;OAID,EACC,IAAI,CACL,CAAC;QACJ,CAAC;IACH,CAAC;IAED;;OAEG;IACH,KAAK;QACH,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;CACF;AA1CD,0DA0CC","sourcesContent":["import { InputPasswordWebElementBase } from './InputPasswordWebElementBase';\nimport { By, Key } from 'selenium-webdriver';\n\n/**\n * The component WebElement for [oj-c-input-password](../../../oj-c/docs/oj.InputPassword.html).\n * Do not instantiate this class directly, instead, use\n * [findInputPassword](../functions/findInputPassword.html).\n */\nexport class InputPasswordWebElement extends InputPasswordWebElementBase {\n /**\n * Sets the value of the \"value\" property of the input component.\n * @param value The value to set for the <code>value</code>\n */\n public async changeValue(value: string | null): Promise<void> {\n await this.getDriver().executeScript('arguments[0].focus()', this);\n const readonly = await this.getReadonly();\n const disabled = await this.getDisabled();\n if (!(disabled || readonly)) {\n await this.whenBusyContextReady();\n\n // Note that using element.clear() will blur, which commits the change and calls\n // onValueChanged, which we don't want until we're done updating the value.\n // Instead do select-all, then delete to clear the value.\n const input = await this.findElement(By.css('input'));\n const currValue = await this.getRawValue();\n if (currValue) {\n const platform = await (await this.getDriver().getCapabilities()).getPlatform();\n await input.sendKeys(platform === 'mac' ? Key.COMMAND : Key.CONTROL, 'a');\n await input.sendKeys(Key.DELETE);\n }\n\n value && (await input.sendKeys(value));\n\n return this.getDriver().executeAsyncScript(\n `\n let el = arguments[0];\n let done = arguments[1];\n el.validate().then(done).catch(done);\n `,\n this\n );\n }\n }\n\n /**\n * Clears the value of the component.\n */\n clear(): Promise<void> {\n return this.changeValue(null);\n }\n}\n"]}
|
|
@@ -19,19 +19,23 @@ class InputSensitiveTextWebElement extends InputSensitiveTextWebElementBase_1.In
|
|
|
19
19
|
const disabled = await this.getDisabled();
|
|
20
20
|
if (!(disabled || readonly)) {
|
|
21
21
|
await this.whenBusyContextReady();
|
|
22
|
-
// Note that using element.clear() will blur, which commits the change and
|
|
23
|
-
//
|
|
24
|
-
// Instead
|
|
25
|
-
// in a new value. We mock committing the value by calling validate().
|
|
26
|
-
let currValue = await this.getProperty('rawValue');
|
|
27
|
-
while (currValue) {
|
|
28
|
-
const backspaces = new Array(currValue.length + 1).join(selenium_webdriver_1.Key.BACK_SPACE);
|
|
29
|
-
// First move the cursor to the end, then backspaces.
|
|
30
|
-
await this.sendKeys([selenium_webdriver_1.Key.END, backspaces].join(''));
|
|
31
|
-
currValue = await this.getProperty('rawValue');
|
|
32
|
-
}
|
|
22
|
+
// Note that using element.clear() will blur, which commits the change and calls
|
|
23
|
+
// onValueChanged, which we don't want until we're done updating the value.
|
|
24
|
+
// Instead do select-all, then delete to clear the value.
|
|
33
25
|
const input = await this.findElement(selenium_webdriver_1.By.css('input'));
|
|
34
|
-
|
|
26
|
+
const currValue = await this.getRawValue();
|
|
27
|
+
if (currValue) {
|
|
28
|
+
const platform = await (await this.getDriver().getCapabilities()).getPlatform();
|
|
29
|
+
await input.sendKeys(platform === 'mac' ? selenium_webdriver_1.Key.COMMAND : selenium_webdriver_1.Key.CONTROL, 'a');
|
|
30
|
+
await input.sendKeys(selenium_webdriver_1.Key.DELETE);
|
|
31
|
+
}
|
|
32
|
+
// Regular sendKeys does not work with InputSensitiveText, so we use the action
|
|
33
|
+
// framework instead. This uses the native gestures framework of the drivers
|
|
34
|
+
// and simulates keyboard entry. Note: actions.sendKeys doesn't target a specific
|
|
35
|
+
// element - it just sends keys to the browser as though the user were to type it.
|
|
36
|
+
// The input must have focus for it to work (which we already do earlier).
|
|
37
|
+
const actions = this.getDriver().actions();
|
|
38
|
+
value && (await actions.sendKeys(value).perform());
|
|
35
39
|
return this.getDriver().executeAsyncScript(`
|
|
36
40
|
let el = arguments[0];
|
|
37
41
|
let done = arguments[1];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputSensitiveTextWebElement.js","sourceRoot":"","sources":["InputSensitiveTextWebElement.ts"],"names":[],"mappings":";;;AAAA,uFAAsF;AACtF,yDAA6C;AAE7C;;;;GAIG;AACH,MAAa,4BAA6B,SAAQ,mEAAgC;IAChF;;;OAGG;IACI,KAAK,CAAC,WAAW,CAAC,KAAoB;QAC3C,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC,aAAa,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAC;QACnE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QAC1C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QAC1C,IAAI,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,CAAC,oB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,0EAA0E;YAC1E,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,CAAC;YAC3C,KAAK,IAAI,CAAC,MAAM,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;YAEnD,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC,kBAAkB,CACxC;;;;OAID,EACC,IAAI,CACL,CAAC;QACJ,CAAC;IACH,CAAC;IAED;;OAEG;IACH,KAAK;QACH,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;CACF;AAhDD,oEAgDC","sourcesContent":["import { InputSensitiveTextWebElementBase } from './InputSensitiveTextWebElementBase';\nimport { By, Key } from 'selenium-webdriver';\n\n/**\n * The component WebElement for [oj-c-input-sensitive-text](../../../oj-c/docs/oj.InputSensitiveText.html).\n * Do not instantiate this class directly, instead, use\n * [findInputSensitiveText](../functions/findInputSensitiveText.html).\n */\nexport class InputSensitiveTextWebElement extends InputSensitiveTextWebElementBase {\n /**\n * Sets the value of the \"value\" property of the input component.\n * @param value The value to set for the <code>value</code>\n */\n public async changeValue(value: string | null): Promise<void> {\n await this.getDriver().executeScript('arguments[0].focus()', this);\n const readonly = await this.getReadonly();\n const disabled = await this.getDisabled();\n if (!(disabled || readonly)) {\n await this.whenBusyContextReady();\n\n // Note that using element.clear() will blur, which commits the change and calls\n // onValueChanged, which we don't want until we're done updating the value.\n // Instead do select-all, then delete to clear the value.\n const input = await this.findElement(By.css('input'));\n const currValue = await this.getRawValue();\n if (currValue) {\n const platform = await (await this.getDriver().getCapabilities()).getPlatform();\n await input.sendKeys(platform === 'mac' ? Key.COMMAND : Key.CONTROL, 'a');\n await input.sendKeys(Key.DELETE);\n }\n\n // Regular sendKeys does not work with InputSensitiveText, so we use the action\n // framework instead. This uses the native gestures framework of the drivers\n // and simulates keyboard entry. Note: actions.sendKeys doesn't target a specific\n // element - it just sends keys to the browser as though the user were to type it.\n // The input must have focus for it to work (which we already do earlier).\n const actions = this.getDriver().actions();\n value && (await actions.sendKeys(value).perform());\n\n return this.getDriver().executeAsyncScript(\n `\n let el = arguments[0];\n let done = arguments[1];\n el.validate().then(done).catch(done);\n `,\n this\n );\n }\n }\n\n /**\n * Clears the value of the component.\n */\n clear(): Promise<void> {\n return this.changeValue(null);\n }\n}\n"]}
|
|
@@ -19,19 +19,17 @@ class InputTextWebElement extends InputTextWebElementBase_1.InputTextWebElementB
|
|
|
19
19
|
const disabled = await this.getDisabled();
|
|
20
20
|
if (!(disabled || readonly)) {
|
|
21
21
|
await this.whenBusyContextReady();
|
|
22
|
-
// Note that using element.clear() will blur, which commits the change and
|
|
23
|
-
//
|
|
24
|
-
// Instead
|
|
25
|
-
// in a new value. We mock committing the value by calling validate().
|
|
26
|
-
let currValue = await this.getProperty('rawValue');
|
|
27
|
-
while (currValue) {
|
|
28
|
-
const backspaces = new Array(currValue.length + 1).join(selenium_webdriver_1.Key.BACK_SPACE);
|
|
29
|
-
// First move the cursor to the end, then backspaces.
|
|
30
|
-
await this.sendKeys([selenium_webdriver_1.Key.END, backspaces].join(''));
|
|
31
|
-
currValue = await this.getProperty('rawValue');
|
|
32
|
-
}
|
|
22
|
+
// Note that using element.clear() will blur, which commits the change and calls
|
|
23
|
+
// onValueChanged, which we don't want until we're done updating the value.
|
|
24
|
+
// Instead do select-all, then delete to clear the value.
|
|
33
25
|
const input = await this.findElement(selenium_webdriver_1.By.css('input'));
|
|
34
|
-
|
|
26
|
+
const currValue = await this.getRawValue();
|
|
27
|
+
if (currValue) {
|
|
28
|
+
const platform = await (await this.getDriver().getCapabilities()).getPlatform();
|
|
29
|
+
await input.sendKeys(platform === 'mac' ? selenium_webdriver_1.Key.COMMAND : selenium_webdriver_1.Key.CONTROL, 'a');
|
|
30
|
+
await input.sendKeys(selenium_webdriver_1.Key.DELETE);
|
|
31
|
+
}
|
|
32
|
+
value !== null && (await input.sendKeys(value));
|
|
35
33
|
return this.getDriver().executeAsyncScript(`
|
|
36
34
|
let el = arguments[0];
|
|
37
35
|
let done = arguments[1];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputTextWebElement.js","sourceRoot":"","sources":["InputTextWebElement.ts"],"names":[],"mappings":";;;AAAA,qEAAoE;AACpE,yDAA6C;AAE7C;;;;GAIG;AACH,MAAa,mBAAoB,SAAQ,iDAAuB;IAC9D;;;OAGG;IACI,KAAK,CAAC,WAAW,CAAC,KAA6B;QACpD,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC,aAAa,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAC;QACnE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QAC1C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QAC1C,IAAI,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAElC,
|
|
1
|
+
{"version":3,"file":"InputTextWebElement.js","sourceRoot":"","sources":["InputTextWebElement.ts"],"names":[],"mappings":";;;AAAA,qEAAoE;AACpE,yDAA6C;AAE7C;;;;GAIG;AACH,MAAa,mBAAoB,SAAQ,iDAAuB;IAC9D;;;OAGG;IACI,KAAK,CAAC,WAAW,CAAC,KAA6B;QACpD,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC,aAAa,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAC;QACnE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QAC1C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QAC1C,IAAI,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAElC,gFAAgF;YAChF,2EAA2E;YAC3E,yDAAyD;YACzD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,uBAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;YACtD,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;YAC3C,IAAI,SAAS,EAAE,CAAC;gBACd,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC,eAAe,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;gBAChF,MAAM,KAAK,CAAC,QAAQ,CAAC,QAAQ,KAAK,KAAK,CAAC,CAAC,CAAC,wBAAG,CAAC,OAAO,CAAC,CAAC,CAAC,wBAAG,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;gBAC1E,MAAM,KAAK,CAAC,QAAQ,CAAC,wBAAG,CAAC,MAAM,CAAC,CAAC;YACnC,CAAC;YACD,KAAK,KAAK,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;YAEhD,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC,kBAAkB,CACxC;;;;OAID,EACC,IAAI,CACL,CAAC;QACJ,CAAC;IACH,CAAC;IAED;;OAEG;IACH,KAAK;QACH,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;CACF;AAzCD,kDAyCC","sourcesContent":["import { InputTextWebElementBase } from './InputTextWebElementBase';\nimport { By, Key } from 'selenium-webdriver';\n\n/**\n * The component WebElement for [oj-c-input-text](../../../oj-c/docs/oj.InputText.html).\n * Do not instantiate this class directly, instead, use\n * [findInputText](../functions/findInputText.html).\n */\nexport class InputTextWebElement extends InputTextWebElementBase {\n /**\n * Sets the value of the \"value\" property of the input component.\n * @param value The value to set for the <code>value</code>\n */\n public async changeValue(value: string | number | null): Promise<void> {\n await this.getDriver().executeScript('arguments[0].focus()', this);\n const readonly = await this.getReadonly();\n const disabled = await this.getDisabled();\n if (!(disabled || readonly)) {\n await this.whenBusyContextReady();\n\n // Note that using element.clear() will blur, which commits the change and calls\n // onValueChanged, which we don't want until we're done updating the value.\n // Instead do select-all, then delete to clear the value.\n const input = await this.findElement(By.css('input'));\n const currValue = await this.getRawValue();\n if (currValue) {\n const platform = await (await this.getDriver().getCapabilities()).getPlatform();\n await input.sendKeys(platform === 'mac' ? Key.COMMAND : Key.CONTROL, 'a');\n await input.sendKeys(Key.DELETE);\n }\n value !== null && (await input.sendKeys(value));\n\n return this.getDriver().executeAsyncScript(\n `\n let el = arguments[0];\n let done = arguments[1];\n el.validate().then(done).catch(done);\n `,\n this\n );\n }\n }\n\n /**\n * Clears the value of the component.\n */\n clear(): Promise<void> {\n return this.changeValue(null);\n }\n}\n"]}
|