chore: fix flaky pv meter and soc range tests (#30570)
This commit is contained in:
parent
abc66802ad
commit
8a2c8c56dc
2 changed files with 8 additions and 3 deletions
|
|
@ -96,8 +96,12 @@ export default defineComponent({
|
|||
this.$emit("opened");
|
||||
if (this.autofocus) {
|
||||
this.$nextTick(() => {
|
||||
const firstInput =
|
||||
this.$refs["modalBody"]?.querySelector("input, select, button");
|
||||
const modalBody = this.$refs["modalBody"];
|
||||
// don't steal focus if user already interacts with the modal content
|
||||
if (modalBody?.contains(document.activeElement)) {
|
||||
return;
|
||||
}
|
||||
const firstInput = modalBody?.querySelector("input, select, button");
|
||||
if (firstInput instanceof HTMLElement) {
|
||||
firstInput.focus();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,8 @@ export function simulatorConfig() {
|
|||
const input = "./tests/simulator.evcc.yaml";
|
||||
const content = fs.readFileSync(input, "utf8");
|
||||
const result = content.replace(/localhost:7072/g, simulatorHost());
|
||||
const resultName = "simulator.evcc.generated.yaml";
|
||||
// per-worker file name, multiple workers write their own port concurrently
|
||||
const resultName = `simulator-${workerPort()}.evcc.generated.yaml`;
|
||||
const resultPath = path.join(os.tmpdir(), resultName);
|
||||
fs.writeFileSync(resultPath, result);
|
||||
return resultPath;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue