sqlectron / sqlectron-gui

A simple and lightweight SQL client desktop with cross database and platform support.
https://sqlectron.github.io/
MIT License
4.55k stars 522 forks source link

Fix spurious sqlite e2e test failure #704

Closed MasterOdin closed 2 years ago

MasterOdin commented 2 years ago

When running test:e2e, I was finding that the sqlite test was failing some amount of the time on:

    await helper.expectToEqualText(
      mainWindow,
      '.react-tabs__tab-panel--selected .ace_content',
      'SELECT * FROM "document" LIMIT 101',
    );

Where the amount of time taken to load the results was just long enough between the prior click and then running this line that it would fail. As we cannot add a timeout on this particular line, easier to add a waitForSelector for some other part of the UI that changes (in this case the query results table appearing) to achieve that goal, and improve stability on this test.