@checksum-ai/runtime 1.0.2 → 1.0.4

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 @@
1
+ Checksum readme
@@ -0,0 +1,56 @@
1
+ import { RunMode, getChecksumConfig } from "@checksum-ai/runtime";
2
+
3
+ export default getChecksumConfig({
4
+ /**
5
+ * Checksum runtime running mode -
6
+ * normal - tests run normally
7
+ * heal - checksum will attempt to heal tests that failed using fallback
8
+ * refactor - checksum will attempt to refactor and improve your tests
9
+ */
10
+ runMode: RunMode.Normal,
11
+
12
+ /**
13
+ * Insert here your Checksum API key
14
+ */
15
+ apiKey: "<API key>",
16
+
17
+ /**
18
+ * This is the base URL of the tested app
19
+ */
20
+ baseURL: "<base URL>",
21
+
22
+ /**
23
+ * Insert the account's username that will be used
24
+ * to login into your testing environment
25
+ */
26
+ username: "<username>",
27
+
28
+ /**
29
+ * Insert the account's password that will be used
30
+ * to login into your testing environment
31
+ */
32
+ password: "<password>",
33
+
34
+ options: {
35
+ /**
36
+ * Whether to fallback to ESRA if the action selector is not found
37
+ */
38
+ actionsESRAfallback: true,
39
+
40
+ /**
41
+ * Whether to use LLM fallback if action selector is not found
42
+ */
43
+ actionsLLMFallback: true,
44
+
45
+ /**
46
+ * Whether to use mock API data when running your tests
47
+ */
48
+ useMockData: false,
49
+
50
+ /**
51
+ * Print runtime logs.
52
+ * Use for debug only
53
+ */
54
+ printLogs: false,
55
+ },
56
+ });
@@ -0,0 +1,19 @@
1
+ import { ChecksumConfig, IChecksumPage } from "@checksum-ai/runtime";
2
+
3
+ /**
4
+ * Login method
5
+ */
6
+ export default async function login(
7
+ page: IChecksumPage,
8
+ config: ChecksumConfig
9
+ ) {
10
+ /**
11
+ * Update this function to login to your application
12
+ * i.e.:
13
+ * await page.goto('/login');
14
+ * await page.getByPlaceholder("Email...").fill(config.username);
15
+ * await page.getByPlaceholder("Password...").fill(config.password);
16
+ * await page.getByText("Continue").click();
17
+ * await page.waitForURL("/main");
18
+ */
19
+ }
@@ -0,0 +1,32 @@
1
+ import { defineConfig, devices } from "@playwright/test";
2
+
3
+ export default defineConfig({
4
+ timeout: 120000,
5
+ testMatch: [/.*.[.]checksum.spec.ts/],
6
+ testDir: ".",
7
+ /* disable parallel test runs */
8
+ workers: 1,
9
+ /* Run tests in files in parallel */
10
+ fullyParallel: false,
11
+ /* Reporter to use. See https://playwright.dev/docs/test-reporters */
12
+ reporter: "html",
13
+ /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
14
+ use: {
15
+ /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
16
+ trace: "on",
17
+ video: "on",
18
+ },
19
+
20
+ /* Configure projects for major browsers */
21
+ projects: [
22
+ {
23
+ name: "chromium",
24
+ use: { ...devices["Desktop Chrome"] },
25
+ },
26
+ {
27
+ name: "checksumpage",
28
+ use: { ...devices["Desktop Chrome"] },
29
+ testDir: "./src/lib/runtime",
30
+ },
31
+ ],
32
+ });