|
1 | | -use crate::e2e::asserts::{assert_ok, assert_response_title}; |
2 | | -use crate::e2e::client::Client; |
3 | | -use crate::e2e::connection_info::connection_with_no_token; |
4 | | -use crate::e2e::http::Query; |
| 1 | +use crate::e2e::asserts::{assert_response_title, assert_text_ok}; |
| 2 | +use crate::e2e::env::TestEnv; |
5 | 3 |
|
6 | 4 | #[tokio::test] |
7 | 5 | #[cfg_attr(not(feature = "e2e-tests"), ignore)] |
8 | 6 | async fn it_should_load_the_about_page_with_information_about_the_api() { |
9 | | - let client = Client::new(connection_with_no_token("localhost:3000")); |
| 7 | + let client = TestEnv::default().guess_client(); |
10 | 8 |
|
11 | | - let response = client.get("about", Query::empty()).await; |
| 9 | + let response = client.about().await; |
12 | 10 |
|
13 | | - assert_ok(&response); |
| 11 | + assert_text_ok(&response); |
14 | 12 | assert_response_title(&response, "About"); |
15 | 13 | } |
16 | 14 |
|
17 | 15 | #[tokio::test] |
18 | 16 | #[cfg_attr(not(feature = "e2e-tests"), ignore)] |
19 | 17 | async fn it_should_load_the_license_page_at_the_api_entrypoint() { |
20 | | - let client = Client::new(connection_with_no_token("localhost:3000")); |
| 18 | + let client = TestEnv::default().guess_client(); |
21 | 19 |
|
22 | | - let response = client.get("about/license", Query::empty()).await; |
| 20 | + let response = client.license().await; |
23 | 21 |
|
24 | | - assert_ok(&response); |
| 22 | + assert_text_ok(&response); |
25 | 23 | assert_response_title(&response, "Licensing"); |
26 | 24 | } |
0 commit comments