testdriverai 7.2.21 → 7.2.22
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.
- package/docs/v7/_drafts/plugin-migration.mdx +3 -5
- package/package.json +1 -1
- package/test/testdriver/hover-image.test.mjs +19 -1
- package/test/testdriver/hover-text-with-description.test.mjs +19 -1
- package/test/testdriver/match-image.test.mjs +19 -1
- package/test/testdriver/scroll-until-text.test.mjs +19 -1
- package/docs/v7/_drafts/implementation-plan.mdx +0 -994
- package/docs/v7/_drafts/optimal-sdk-design.mdx +0 -1348
- package/docs/v7/_drafts/performance.mdx +0 -517
- package/docs/v7/_drafts/platforms/linux.mdx +0 -308
- package/docs/v7/_drafts/platforms/macos.mdx +0 -433
- package/docs/v7/_drafts/platforms/windows.mdx +0 -430
- package/docs/v7/_drafts/sdk-logging.mdx +0 -222
- package/test/testdriver/setup/globalTeardown.mjs +0 -11
- package/test/testdriver/setup/lifecycleHelpers.mjs +0 -357
- package/test/testdriver/setup/testHelpers.mjs +0 -541
- package/test/testdriver/setup/vitestSetup.mjs +0 -40
|
@@ -142,11 +142,9 @@ export default defineConfig({
|
|
|
142
142
|
|
|
143
143
|
### Test Helpers
|
|
144
144
|
|
|
145
|
-
- ✅ **
|
|
146
|
-
-
|
|
147
|
-
-
|
|
148
|
-
- Removed `__testdriverMeta` initialization
|
|
149
|
-
- Uses `globalThis.__testdriverPlugin.registerDashcamUrl()` instead
|
|
145
|
+
- ✅ **Removed**: `test/testdriver/setup/` folder (legacy helpers)
|
|
146
|
+
- Code moved to `lib/vitest/hooks.mjs` framework
|
|
147
|
+
- Tests now use `TestDriver(context, options)` pattern directly
|
|
150
148
|
|
|
151
149
|
### Documentation
|
|
152
150
|
|
package/package.json
CHANGED
|
@@ -5,7 +5,25 @@
|
|
|
5
5
|
|
|
6
6
|
import { describe, expect, it } from "vitest";
|
|
7
7
|
import { TestDriver } from "../../lib/vitest/hooks.mjs";
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Perform login flow for SauceLabs demo app
|
|
11
|
+
* @param {TestDriver} client - TestDriver client
|
|
12
|
+
* @param {string} username - Username (default: 'standard_user')
|
|
13
|
+
*/
|
|
14
|
+
async function performLogin(client, username = "standard_user") {
|
|
15
|
+
await client.focusApplication("Google Chrome");
|
|
16
|
+
const password = await client.extract("the password");
|
|
17
|
+
const usernameField = await client.find(
|
|
18
|
+
"Username, label above the username input field on the login form",
|
|
19
|
+
);
|
|
20
|
+
await usernameField.click();
|
|
21
|
+
await client.type(username);
|
|
22
|
+
await client.pressKeys(["tab"]);
|
|
23
|
+
await client.type(password, { secret: true });
|
|
24
|
+
await client.pressKeys(["tab"]);
|
|
25
|
+
await client.pressKeys(["enter"]);
|
|
26
|
+
}
|
|
9
27
|
|
|
10
28
|
describe("Hover Image Test", () => {
|
|
11
29
|
it("should click on shopping cart icon and verify empty cart", async (context) => {
|
|
@@ -5,7 +5,25 @@
|
|
|
5
5
|
|
|
6
6
|
import { describe, expect, it } from "vitest";
|
|
7
7
|
import { TestDriver } from "../../lib/vitest/hooks.mjs";
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Perform login flow for SauceLabs demo app
|
|
11
|
+
* @param {TestDriver} client - TestDriver client
|
|
12
|
+
* @param {string} username - Username (default: 'standard_user')
|
|
13
|
+
*/
|
|
14
|
+
async function performLogin(client, username = "standard_user") {
|
|
15
|
+
await client.focusApplication("Google Chrome");
|
|
16
|
+
const password = await client.extract("the password");
|
|
17
|
+
const usernameField = await client.find(
|
|
18
|
+
"Username, label above the username input field on the login form",
|
|
19
|
+
);
|
|
20
|
+
await usernameField.click();
|
|
21
|
+
await client.type(username);
|
|
22
|
+
await client.pressKeys(["tab"]);
|
|
23
|
+
await client.type(password, { secret: true });
|
|
24
|
+
await client.pressKeys(["tab"]);
|
|
25
|
+
await client.pressKeys(["enter"]);
|
|
26
|
+
}
|
|
9
27
|
|
|
10
28
|
describe("Hover Text With Description Test", () => {
|
|
11
29
|
it("should add TestDriver Hat to cart and verify", async (context) => {
|
|
@@ -7,7 +7,25 @@ import path, { dirname } from "path";
|
|
|
7
7
|
import { fileURLToPath } from "url";
|
|
8
8
|
import { describe, expect, it } from "vitest";
|
|
9
9
|
import { TestDriver } from "../../lib/vitest/hooks.mjs";
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Perform login flow for SauceLabs demo app
|
|
13
|
+
* @param {TestDriver} client - TestDriver client
|
|
14
|
+
* @param {string} username - Username (default: 'standard_user')
|
|
15
|
+
*/
|
|
16
|
+
async function performLogin(client, username = "standard_user") {
|
|
17
|
+
await client.focusApplication("Google Chrome");
|
|
18
|
+
const password = await client.extract("the password");
|
|
19
|
+
const usernameField = await client.find(
|
|
20
|
+
"Username, label above the username input field on the login form",
|
|
21
|
+
);
|
|
22
|
+
await usernameField.click();
|
|
23
|
+
await client.type(username);
|
|
24
|
+
await client.pressKeys(["tab"]);
|
|
25
|
+
await client.type(password, { secret: true });
|
|
26
|
+
await client.pressKeys(["tab"]);
|
|
27
|
+
await client.pressKeys(["enter"]);
|
|
28
|
+
}
|
|
11
29
|
|
|
12
30
|
// Get the directory of the current module
|
|
13
31
|
const __filename = fileURLToPath(import.meta.url);
|
|
@@ -5,7 +5,25 @@
|
|
|
5
5
|
|
|
6
6
|
import { describe, expect, it } from "vitest";
|
|
7
7
|
import { TestDriver } from "../../lib/vitest/hooks.mjs";
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Perform login flow for SauceLabs demo app
|
|
11
|
+
* @param {TestDriver} client - TestDriver client
|
|
12
|
+
* @param {string} username - Username (default: 'standard_user')
|
|
13
|
+
*/
|
|
14
|
+
async function performLogin(client, username = "standard_user") {
|
|
15
|
+
await client.focusApplication("Google Chrome");
|
|
16
|
+
const password = await client.extract("the password");
|
|
17
|
+
const usernameField = await client.find(
|
|
18
|
+
"Username, label above the username input field on the login form",
|
|
19
|
+
);
|
|
20
|
+
await usernameField.click();
|
|
21
|
+
await client.type(username);
|
|
22
|
+
await client.pressKeys(["tab"]);
|
|
23
|
+
await client.type(password, { secret: true });
|
|
24
|
+
await client.pressKeys(["tab"]);
|
|
25
|
+
await client.pressKeys(["enter"]);
|
|
26
|
+
}
|
|
9
27
|
|
|
10
28
|
describe("Scroll Until Text Test", () => {
|
|
11
29
|
it('should scroll until "testdriver socks" appears', async (context) => {
|