How to use the @serenity-js/assertions.property function in @serenity-js/assertions

To help you get started, we’ve selected a few @serenity-js/assertions examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jan-molak / serenity-js / packages / protractor / spec / screenplay / questions / Browser.spec.ts View on Github external
it('clears the log upon invocation', () => Bernie.attemptsTo(
        Navigate.to(pageFromTemplate(`
            
                
                    <button id="trigger">Print to console</button>
                
            
        `)),

        Click.on(Trigger),
        Ensure.that(Browser.log(), property('length', equals(1))),

        Click.on(Trigger),
        Ensure.that(Browser.log(), property('length', equals(1))),
    ));
});
github jan-molak / serenity-js / examples / protractor-jasmine-todomvc / spec / manage_a_todo_list.spec.ts View on Github external
it('removes the recorded items', function (this: WithStage) {
                return this.stage.theActorCalled('Jasmine').attemptsTo(
                    Start.withAListContaining('Walk a dog'),
                    RemoveItem.called('Walk a dog'),
                    Ensure.that(RecordedItems(), property('length', equals(0))),
                );
            });