@testdriverai/mcp 7.11.227-test → 7.11.228-canary
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Installs Yaak (an open-source Tauri API client) on Linux, sends an HTTP request,
|
|
3
|
+
* checks the response, then switches the app to dark mode from its Settings dialog.
|
|
4
|
+
*/
|
|
5
|
+
import { describe, expect, it } from "vitest";
|
|
6
|
+
import { TestDriver } from "../lib/vitest/hooks.mjs";
|
|
7
|
+
|
|
8
|
+
const YAAK_DEB =
|
|
9
|
+
"https://github.com/mountain-loop/yaak/releases/download/v2026.9.0/yaak_2026.9.0_amd64.deb";
|
|
10
|
+
|
|
11
|
+
describe("Yaak (Tauri)", () => {
|
|
12
|
+
it("sends a request, then switches the app to dark mode", async (context) => {
|
|
13
|
+
const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP });
|
|
14
|
+
|
|
15
|
+
// Download and install the .deb. We start the app ourselves below.
|
|
16
|
+
await testdriver.provision.installer({ url: YAAK_DEB, launch: false });
|
|
17
|
+
|
|
18
|
+
// Pull in Tauri's Linux runtime dependencies (WebKitGTK, libsoup) and start Yaak.
|
|
19
|
+
await testdriver.exec(
|
|
20
|
+
"sh",
|
|
21
|
+
"sudo apt-get update -qq && sudo DEBIAN_FRONTEND=noninteractive apt-get install -f -y -qq",
|
|
22
|
+
240000,
|
|
23
|
+
);
|
|
24
|
+
await testdriver.exec("sh", "nohup yaak-app-client >/tmp/yaak.log 2>&1 &", 10000);
|
|
25
|
+
|
|
26
|
+
// Start with an empty workspace. The first find waits for the window to appear.
|
|
27
|
+
await testdriver.find('"Start fresh" card on the Yaak welcome screen', { timeout: 60000 }).click();
|
|
28
|
+
|
|
29
|
+
// Create a new HTTP request, enter a URL and send it.
|
|
30
|
+
await testdriver.find('"New Request" button in the middle of the empty workspace').click();
|
|
31
|
+
await testdriver.find('"HTTP" option in the New Request dropdown menu').click();
|
|
32
|
+
await testdriver.find('URL input with the placeholder "https://example.com" next to the GET method selector').click();
|
|
33
|
+
await testdriver.type("https://httpbin.org/json");
|
|
34
|
+
await testdriver.find("Send button (paper airplane icon) at the right end of the URL bar").click();
|
|
35
|
+
|
|
36
|
+
// Wait for the response, then check what the app rendered.
|
|
37
|
+
await testdriver.find("green 200 OK status label at the top of the response panel", { timeout: 30000 });
|
|
38
|
+
const responseShown = await testdriver.assert(
|
|
39
|
+
'the response panel shows a green 200 OK status and a JSON body containing "Sample Slide Show"',
|
|
40
|
+
);
|
|
41
|
+
expect(responseShown).toBeTruthy();
|
|
42
|
+
|
|
43
|
+
// Open Settings from the gear in Yaak's custom title bar.
|
|
44
|
+
await testdriver.find("settings gear icon in the top-right title bar, just left of the window minimize button").click();
|
|
45
|
+
await testdriver.find('"Settings" item at the top of the main menu dropdown').click();
|
|
46
|
+
|
|
47
|
+
// Switch the appearance from Automatic to Dark.
|
|
48
|
+
await testdriver.find('"Theme" tab in the left sidebar of the Settings dialog, just below "General"').click();
|
|
49
|
+
await testdriver.find('"Automatic" dropdown on the right of the Appearance row in the Theme settings').click();
|
|
50
|
+
await testdriver.find('"Dark" option at the bottom of the Appearance dropdown list').click();
|
|
51
|
+
|
|
52
|
+
// The dropdown updates before the window repaints, so wait for a dark-only detail first.
|
|
53
|
+
await testdriver.find('moon icon next to "Yaak (preview)" on a dark navy background in the Preview section', { timeout: 30000 });
|
|
54
|
+
const darkMode = await testdriver.assert(
|
|
55
|
+
'the Appearance dropdown in the Theme settings shows "Dark" and the window, title bar and settings dialog all use a dark background',
|
|
56
|
+
);
|
|
57
|
+
expect(darkMode).toBeTruthy();
|
|
58
|
+
});
|
|
59
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Installs Yaak (an open-source Tauri API client) on Linux, sends an HTTP request
|
|
3
|
+
* from its UI, and checks the response it renders.
|
|
4
|
+
*/
|
|
5
|
+
import { describe, expect, it } from "vitest";
|
|
6
|
+
import { TestDriver } from "../lib/vitest/hooks.mjs";
|
|
7
|
+
|
|
8
|
+
const YAAK_DEB =
|
|
9
|
+
"https://github.com/mountain-loop/yaak/releases/download/v2026.9.0/yaak_2026.9.0_amd64.deb";
|
|
10
|
+
|
|
11
|
+
describe("Yaak (Tauri)", () => {
|
|
12
|
+
it("sends a GET request and shows the JSON response", async (context) => {
|
|
13
|
+
const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP });
|
|
14
|
+
|
|
15
|
+
// Download and install the .deb. We start the app ourselves below.
|
|
16
|
+
await testdriver.provision.installer({ url: YAAK_DEB, launch: false });
|
|
17
|
+
|
|
18
|
+
// Pull in Tauri's Linux runtime dependencies (WebKitGTK, libsoup) and start Yaak.
|
|
19
|
+
await testdriver.exec(
|
|
20
|
+
"sh",
|
|
21
|
+
"sudo apt-get update -qq && sudo DEBIAN_FRONTEND=noninteractive apt-get install -f -y -qq",
|
|
22
|
+
240000,
|
|
23
|
+
);
|
|
24
|
+
await testdriver.exec("sh", "nohup yaak-app-client >/tmp/yaak.log 2>&1 &", 10000);
|
|
25
|
+
|
|
26
|
+
// Start with an empty workspace. The first find waits for the window to appear.
|
|
27
|
+
await testdriver.find('"Start fresh" card on the Yaak welcome screen', { timeout: 60000 }).click();
|
|
28
|
+
|
|
29
|
+
// Create a new HTTP request.
|
|
30
|
+
await testdriver.find('"New Request" button in the middle of the empty workspace').click();
|
|
31
|
+
await testdriver.find('"HTTP" option in the New Request dropdown menu').click();
|
|
32
|
+
|
|
33
|
+
// Enter a URL and send it.
|
|
34
|
+
await testdriver.find('URL input with the placeholder "https://example.com" next to the GET method selector').click();
|
|
35
|
+
await testdriver.type("https://httpbin.org/json");
|
|
36
|
+
await testdriver.find("Send button (paper airplane icon) at the right end of the URL bar").click();
|
|
37
|
+
|
|
38
|
+
// Wait for the response to arrive, then check what the app rendered.
|
|
39
|
+
await testdriver.find("green 200 OK status label at the top of the response panel", { timeout: 30000 });
|
|
40
|
+
const responseShown = await testdriver.assert(
|
|
41
|
+
'the response panel shows a green 200 OK status and a JSON body containing "Sample Slide Show"',
|
|
42
|
+
);
|
|
43
|
+
expect(responseShown).toBeTruthy();
|
|
44
|
+
|
|
45
|
+
const savedInSidebar = await testdriver.assert(
|
|
46
|
+
'the sidebar lists the request as "httpbin.org/json" with a 200 status badge',
|
|
47
|
+
);
|
|
48
|
+
expect(savedInSidebar).toBeTruthy();
|
|
49
|
+
});
|
|
50
|
+
});
|