@atomic-testing/component-driver-mui-v9 0.88.0 → 0.89.0
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/dist/index.cjs +4 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +4 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/components/RatingDriver.ts +9 -17
package/dist/index.cjs
CHANGED
|
@@ -1323,17 +1323,11 @@ var RatingDriver = class extends _atomic_testing_core.ComponentDriver {
|
|
|
1323
1323
|
return this.interactor.hasCssClass(this.locator, disabledClassName);
|
|
1324
1324
|
}
|
|
1325
1325
|
async setValue(value) {
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
const
|
|
1329
|
-
if (valueToClick == null) return true;
|
|
1330
|
-
const targetLocator = _atomic_testing_core.locatorUtil.append(this.parts.choices.locator, (0, _atomic_testing_core.byValue)(valueToClick.toString(), "Same"));
|
|
1326
|
+
if (value === await this.getValue()) return true;
|
|
1327
|
+
const targetValue = value == null ? "" : value.toString();
|
|
1328
|
+
const targetLocator = _atomic_testing_core.locatorUtil.append(this.parts.choices.locator, (0, _atomic_testing_core.byValue)(targetValue, "Same"));
|
|
1331
1329
|
const targetExists = await this.interactor.exists(targetLocator);
|
|
1332
|
-
if (targetExists)
|
|
1333
|
-
const id = await this.interactor.getAttribute(targetLocator, "id");
|
|
1334
|
-
const labelLocator = _atomic_testing_core.locatorUtil.append(this.locator, (0, _atomic_testing_core.byCssSelector)(`label[for="${id}"]`));
|
|
1335
|
-
await this.interactor.click(labelLocator);
|
|
1336
|
-
}
|
|
1330
|
+
if (targetExists) await this.interactor.activate(targetLocator);
|
|
1337
1331
|
return targetExists;
|
|
1338
1332
|
}
|
|
1339
1333
|
get driverName() {
|