Chain Missions
Use runMissions
to sequence flows, control parallelism, and share memory/env.
import { runMissions } from 'testronaut';
import { loginMission } from './login.mission.js';
import { logoutMission } from './logout.mission.js';
import { navigateToContactFormMission } from './navigateToContactForm.mission.js';
export const fillContactFormMission =
`Input the text "example@example.com" in the email field.
Input the phone number (555)555-5555 into the phone number field.
Click the submit button.
Upon submission success there should be a toast notification indicating the form information was saved successfully.
Take a screenshot.
If found, report SUCCESS. Otherwise, report FAILURE.`
export async function executeMission() {
await runMissions({
preMission: [loginMission, navigateToContactFormMission],
mission: fillContactFormMission,
postMission: logoutMission,
}, "Fill Contact Form Mission");
}
chaining uses strict ordering to ensure tests perform in the correct order.
runMissions({ preMission, mission, postMission }: {
preMission: string or array;
mission: string or array;
postMission: string or array;
}, missionName: string)
Each accepts array or singleton