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