com-pas / compas-open-scd

A substation configuration description editor for projects using SCL IEC 61850-6 Edition 2 or greater
https://openscd.github.io
Apache License 2.0
12 stars 3 forks source link

Plugging mixin test fails sporadically #290

Closed juancho0202 closed 6 months ago

juancho0202 commented 8 months ago

Describe the bug When you run your tests, sometimes you will get all tests passing successfully but sometimes you will see the following error popping out:

❌ PluggingElement > add custom plugin dialog > adds a new editor kind plugin on add button click
      AssertionError: expected [ Array(9) ] to have a length of 10 but got 9
      + expected - actual

      -9
      +10

      at o.<anonymous> (test/unit/Plugging.test.ts:146:38)

To Reproduce Steps to reproduce the behavior:

  1. Run npm test
  2. Cross fingers
  3. See error

Expected behavior This test should pass consistently

Sander3003 commented 7 months ago

This might has to do with clearing the local storage.

Stef3st commented 6 months ago

@juancho0202 did you notice this error occuring on Open-SCD? If so, it should be moved there. If this behavior only happend in Compas-Open-SCD this ticket can be closed. Since we moved to a mono-repo structure the Plugging test will no longer be run in Compas, as this has already been tested within Open-SCD and will remain in that package. Only the Compas package will be tested in Compas-Open-SCD.