2.8.6 • Published 8 months ago

maests v2.8.6

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

A TypeScript-based solution inspired by maestro-ts for writing and running Maestro flows in a modular and reusable way.

✅ Features

  • You can write Maestro flows in TypeScript and execute directly.
  • Break down Flow into smaller, reusable modules
  • Automatically load environment variables from .env
  • Handling runScript with type.

🚀 Getting Started

Requirement

If you have not installed maestro yet, you have to install it at first.

Installation

pnpm -D add maests

Step 1: Create your first flow

Create a new file \.ts:

import { M } from "maests";

M.initFlow({ appId: "com.myTeam.myApp" });
M.tapOn("someTestId");

Step 2: Execute Test

npx maests my-first-flow.ts

🛹 Playground

There is sample flow you can try actually in playground

sample-flow.ts

import { getOutput, M } from "maests";
import { openApp } from "@/e2e/utils/openApp";
import { someScript } from "./utils/script";

// use composable flow easiliy
openApp();

// run script like this
M.runScript(someScript);

// use variables set in someScript
M.assertVisible({ id: getOutput("id") });

// use runFlow to run some flow with condition
M.runFlow({
  flow: () => {
    M.repeatWhileNotVisible(
      {
        text: "4",
      },
      () => {
        M.tapOnText("Increment");
      }
    );
  },
  condition: {
    visible: "Increment",
  },
});

You can try maests by this sample flow with simulator in playground

# clone this repo
git clone https://github.com/shoma-mano/maests
cd maests

# build maests
pnpm install
pnpm build

# try maests in playground
cd playground
pnpm install
pnpm test

🛠️ Commands

This package offers a rich set of commands to cover various actions in your flows, including initializing flows, performing taps and presses, swiping, asserting conditions, and more.

For a detailed list of all commands with examples, refer to the Commands Documentation.

🚨 Trouble Shooting

Most of the issues are caused by Maestro itself rather than this library. But you can still check the YAML files that are generated by maests in the "maests" folder.

⭐️ Contributing

This package is currently under active development, and we welcome contributions from everyone!

2.5.0

9 months ago

2.7.0

8 months ago

2.6.1

9 months ago

2.5.2

9 months ago

2.6.0

9 months ago

2.5.1

9 months ago

2.8.1

8 months ago

2.7.2

8 months ago

2.5.4

9 months ago

2.8.0

8 months ago

2.7.1

8 months ago

2.5.3

9 months ago

2.8.3

8 months ago

2.8.2

8 months ago

2.7.3

8 months ago

2.8.5

8 months ago

2.8.4

8 months ago

2.8.6

8 months ago

2.3.0

9 months ago

2.2.1

9 months ago

2.1.2

9 months ago

2.2.0

9 months ago

2.1.1

9 months ago

2.4.1

9 months ago

2.4.0

9 months ago

2.1.0

9 months ago

1.0.6

9 months ago

1.0.5

9 months ago

1.0.4

9 months ago

2.0.3

9 months ago

2.0.2

9 months ago

2.0.5

9 months ago

2.0.4

9 months ago

2.0.7

9 months ago

2.0.6

9 months ago

2.0.8

9 months ago

2.0.1

9 months ago

2.0.0

9 months ago

1.0.2

10 months ago

1.0.3

10 months ago

1.0.1

11 months ago

1.0.0

11 months ago

0.4.10

11 months ago