An executable compiler for creating Maestro's yaml-flows with typescript.
npm install maests- 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.
If you have not installed maestro yet, you have to install it at first.
``sh:`
pnpm -D add maests
Create a new file \
`typescript
import { M } from "maests";
M.initFlow({ appId: "com.myTeam.myApp" });
M.tapOn("someTestId");
`
`sh`
npx maests my-first-flow.ts
There is sample flow you can try actually in playground
sample-flow.ts
`typescript
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
`shellclone this repo
git clone https://github.com/shoma-mano/maests
cd maests
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.
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.
This package is currently under active development, and we welcome contributions from everyone!