import{ Ensure, equals }from'@serenity-js/assertions' import{ describe, it, test }from'@serenity-js/playwright-test' import{ Photographer, TakePhotosOfFailures, Value }from'@serenity-js/web' describe(`Todo List App`,()=>{ test.use({ defaultActorName:'Serena', crew:[ Photographer.whoWill(TakePhotosOfFailures), ], }) it(`should allow me to add a todo item`,async({ actor })=>{ await actor.attemptsTo( startWithAnEmptyList(), recordItem('Buy some milk'), Ensure.that(itemNames(),equals([ 'Buy some milk', ])), ) }) it('should clear text input field when an item is added',async({ actor })=>{ await actor.attemptsTo( startWithAnEmptyList(), recordItem('Buy some milk'), Ensure.that(Value.of(newTodoInput()),equals('')), ) }) })
Declares a group of test scenarios.
Example
Learn more
describe
function