Open alexander-goncharuk opened 2 months ago
@AZANIR please do the following
types.d.ts
We can also use Playwright steps to write description to tests
Step Format Proposal The proposed format will include the following elements:
title: The name of the step. body: The function that performs the step, returning a Promise. options (optional): Additional options such as box. We will define the structure to support nested steps by allowing the body to call other steps.
// types.d.ts
type StepOptions = {
box?: boolean;
};
type StepFunction = () => Promise<any>;
interface Step {
title: string;
body: StepFunction;
options?: StepOptions;
}
type Steps = Step[];
Step Declaration: Use test.step('Title', async () => { ... }) to declare steps. Nested Steps: Nest steps by calling test.step within another test.step. Step Formatting: Titles and body functions are used to describe and implement steps, which are then shown in the test reports. Options: Customize step behavior using options like box.
Describe the solution you'd like When uploading a Playwright test run repot to testomat.io, we would like to be able to:
It's similar to what you get in Playwright HTML reporter or when running in --ui mode.
When I go to Test => Automated in my testomat.io dashboard or explore test run report in a List view, I get close to what we need, but the missing part is simple sub-list of steps.
Describe alternatives you've considered Step in Testomat functions. But ideally would prefer to not adjust tests code for concrete reporter needs.