-
Notifications
You must be signed in to change notification settings - Fork 384
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
Add tests for custom bridge GUI #6136
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r1, 1 of 1 files at r2, 1 of 1 files at r3, 3 of 3 files at r4, 1 of 1 files at r5, 1 of 1 files at r6, 1 of 1 files at r7, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @raksooo)
gui/test/e2e/installed/state-dependent/custom-bridge.spec.ts
line 86 at r4 (raw file):
await inputs.nth(1).fill('443'); await expect(addButton).toBeEnabled();
Is there a particular reason why '443'
is hardcoded here? Can we use SHADOWSOCKS_SERVER_PORT
instead? 😊
Code quote:
await inputs.nth(1).fill('443');
await expect(addButton).toBeEnabled();
test/test-manager/src/tests/helpers.rs
line 256 at r5 (raw file):
/// This will first check whether we are logged in. If not, it will also try to login /// on your behalf. If this function returns with any errors, it means that we are logged in /// to.
Reading my own comment here is painful, I must have been so tired 😂
Anyway, I think this comment is misleading. It should say "If this function returns without any errors, we are logged in to a valid account" or something along those lines 😊
Code quote:
/// This will first check whether we are logged in. If not, it will also try to login
/// on your behalf. If this function returns with any errors, it means that we are logged in
/// to.
test/test-manager/src/tests/ui.rs
line 209 at r6 (raw file):
) .await .map_err(|_| Error::DaemonNotRunning)??;
Tip Cleaning up modified environment variables should no longer be necessary as of this commit.
If you have seen issues related to this lately, please file a bug report about it 😊
Code quote:
// Reset the `api-override` feature.
tokio::time::timeout(
std::time::Duration::from_secs(60),
rpc.set_daemon_environment(helpers::get_app_env()),
)
.await
.map_err(|_| Error::DaemonNotRunning)??;
02470a6
to
6499729
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @MarkusPettersson98)
gui/test/e2e/installed/state-dependent/custom-bridge.spec.ts
line 86 at r4 (raw file):
Previously, MarkusPettersson98 (Markus Pettersson) wrote…
Is there a particular reason why
'443'
is hardcoded here? Can we useSHADOWSOCKS_SERVER_PORT
instead? 😊
I used 443
since in a later test we edit the method and I wanted something to change in the edit 😆 We never actually connect so we could use bogus values as well.
test/test-manager/src/tests/helpers.rs
line 256 at r5 (raw file):
Previously, MarkusPettersson98 (Markus Pettersson) wrote…
Reading my own comment here is painful, I must have been so tired 😂
Anyway, I think this comment is misleading. It should say "If this function returns without any errors, we are logged in to a valid account" or something along those lines 😊
Done.
test/test-manager/src/tests/ui.rs
line 209 at r6 (raw file):
Previously, MarkusPettersson98 (Markus Pettersson) wrote…
Tip Cleaning up modified environment variables should no longer be necessary as of this commit.
If you have seen issues related to this lately, please file a bug report about it 😊
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 8 files at r8, 8 of 8 files at r9, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved
gui/test/e2e/installed/state-dependent/custom-bridge.spec.ts
line 86 at r4 (raw file):
Previously, raksooo (Oskar Nyberg) wrote…
I used
443
since in a later test we edit the method and I wanted something to change in the edit 😆 We never actually connect so we could use bogus values as well.
Alright!
1e6b5bd
to
5d2e506
Compare
5d2e506
to
9931f2c
Compare
This PR adds tests for the custom bridge GUI. When implementing the tests I also noticed that the bridge type wasn't set to normal when "Automatic was selected". This has also been fixed in this PR.
This change is