@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 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
- const currentValue = await this.getValue();
1327
- if (value === currentValue) return true;
1328
- const valueToClick = value ?? currentValue;
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() {