@testdriverai/agent 7.11.237-test → 7.11.238-test

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 LocalSend (an open-source Flutter desktop app) on Linux, renames the
3
+ * device in Settings, and checks the new name on the Receive screen.
4
+ */
5
+ import { describe, expect, it } from "vitest";
6
+ import { TestDriver } from "../lib/vitest/hooks.mjs";
7
+
8
+ const LOCALSEND_DEB =
9
+ "https://github.com/localsend/localsend/releases/download/v1.18.2/LocalSend-1.18.2-linux-x86-64.deb";
10
+
11
+ describe("LocalSend (Flutter)", () => {
12
+ it("renames the device and shows the new name on the Receive screen", 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: LOCALSEND_DEB, launch: false });
17
+
18
+ // Pull in missing runtime dependencies (including the tray icon library), then start LocalSend.
19
+ await testdriver.exec(
20
+ "sh",
21
+ "sudo apt-get update -qq && sudo DEBIAN_FRONTEND=noninteractive apt-get install -f -y -qq && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -qq libayatana-appindicator3-1",
22
+ 240000,
23
+ );
24
+ await testdriver.exec("sh", "nohup localsend_app >/tmp/localsend.log 2>&1 &", 10000);
25
+
26
+ // Wait for the window. LocalSend opens on the Receive screen with a random device name.
27
+ await testdriver.find("the LocalSend window showing the Receive screen with a device name", {
28
+ timeout: 60000,
29
+ });
30
+
31
+ // Open Settings and scroll to the bottom of the list.
32
+ await testdriver.find("Settings tab in the LocalSend navigation").click();
33
+ await testdriver.find("the Animations row in the General settings section").hover();
34
+ await testdriver.scroll("down", { amount: 2000 });
35
+
36
+ // The device name lives in the Network section, which Advanced settings reveals.
37
+ await testdriver.find("the Advanced settings checkbox near the bottom of the Settings page").click();
38
+ await testdriver.find("the Device name text field in the Network section").click();
39
+
40
+ // Replace the name in the dialog and confirm.
41
+ await testdriver.find("the text input inside the Device name dialog").click();
42
+ await testdriver.pressKeys(["ctrl", "a"]);
43
+ await testdriver.type("TestDriver Laptop");
44
+ await testdriver.find("the green Confirm button in the Device name dialog").click();
45
+
46
+ // LocalSend asks for a server restart before the new name is used.
47
+ await testdriver.find("the circular restart arrow button in the Server row of the Network section").click();
48
+
49
+ // Go back to Receive, wait for the new name, then check it.
50
+ await testdriver.find("Receive tab in the LocalSend navigation").click();
51
+ await testdriver.find('the device name "TestDriver Laptop" shown under the logo on the Receive screen', {
52
+ timeout: 15000,
53
+ });
54
+ const renamed = await testdriver.assert(
55
+ 'the LocalSend Receive screen shows the device name "TestDriver Laptop" under the logo',
56
+ );
57
+ expect(renamed).toBeTruthy();
58
+ });
59
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testdriverai/agent",
3
- "version": "7.11.237-test",
3
+ "version": "7.11.238-test",
4
4
  "description": "Next generation autonomous AI agent for end-to-end testing of web & desktop",
5
5
  "main": "sdk.js",
6
6
  "types": "sdk.d.ts",