ContactEngineering / ce-ui

User interface of contact.engineering
https://contact.engineering
MIT License
0 stars 0 forks source link

Browser tests don't run in a sequence #17

Open mcrot opened 5 years ago

mcrot commented 5 years ago

Sometimes, when running all browser tests in a row, some tests fail, although they run when started as a single test (or in a smaller subset). Somehow there is a state which is different between the tests. Maybe this is related to to scope of some fixtures.

mcrot commented 5 years ago

These tests seem to be related to the uploading of topographies: In the moment, the file is moved from the (so far) temporary "wizard" directory under media, it is (sometimes?) not available.

mcrot commented 5 years ago

Main problem seems to be the loading of CSS and JS through the {{ form.media.css }} and {{ form.media.js }} entries in the template. When running as second tests, they are replaced with nothing and the tests fails, because the right DOM elements are not present. When running e.g. test_grouping_by_functionas first test, they are inserted and the tests succeeds.

mcrot commented 5 years ago

Okay, the problem with the form.media insertions is solved by using recent versions of selenium and pytest-selenium. A problem still remains, that the files cannot be found after going through the topography creation wizard, but only when run in a sequence. For example when running the test test_selection_synchronize as single test, everything's fine.

mcrot commented 5 years ago

Okay, the problem with the form.media insertions is solved by using recent versions of selenium and pytest-selenium.

Unfortunately this is not true. It seems to be the only remaining problem that {{ form.media.js }} and {{ form.media.css }} are not replaced (or replaced with empty string) from the second test on. Strange. I have another project where this works fine and I haven't spot the right difference yet.

pastewka commented 11 months ago

Browser Tests are currently disabled in CI. I don't think they still work.