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