Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration tests: Support slower computers/network #1044

Merged
merged 4 commits into from Apr 3, 2020

Conversation

neuroscr
Copy link

@neuroscr neuroscr commented Apr 2, 2020

  • tweak some timeouts
  • better process killing on non-windows platforms
  • setValueWrapper to deal with electron/spectron bugs with addValue/SetValue/Keys stalling out (requires make closed group create button clickable (via minimum height), onBlur calls onChange #1043 to work)
  • add a prefix to all tests
  • prefix allows us to run the tests in batches which seems to have fewer false-positives: yarn test-integration-parts
  • refactored some of the Open Group tests to reuse the same code, so it doesn't get out of sync with each other
  • include byId xpath utility in common.page

@neuroscr neuroscr requested a review from Bilb April 2, 2020 07:25
await app.client.waitForExist(
ConversationPage.sessionToastJoinOpenGroupSuccess,
9000
60 * 1000
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the maximum test timeout is currently 30seconds. you want to increase that value too, isn't it? https://github.com/loki-project/session-desktop/pull/1044/files?file-filters%5B%5D=.js#diff-dd50b247dac58a9b47120e5c4f1b2c46R9

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can reduce these down, I didn't need that high but I could see other running the integration tests (maybe outside devs) may need it.

I'm fine either way tbh.

@@ -23,25 +23,25 @@ describe('Open groups', function() {
await common.killallElectron();
});

it('works with valid group url', async () => {
// reduce code duplication to get the initial join
async function joinOpenGroup(url, name) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be in common.js

Copy link
Author

@neuroscr neuroscr Apr 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, I feel like common shouldn't have functions for specific groups of tests. In fact I'd favor moving some of the constants out of it. I think we should favor smaller cleaner files (even though, I personally have no problem working with bigger ones).

// wait for toast to appear
await app.client.waitForExist(
ConversationPage.sessionToastJoinOpenGroupSuccess,
30 * 1000
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@neuroscr neuroscr merged commit 996d7c9 into oxen-io:clearnet Apr 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants