import { Interaction , UsesAbilities } from '@serenity-js/core' ; import { BrowseTheWeb } from '../abilities' ; desc Instructs the  {@link @serenity-js/core/lib/screenplay/actor~Actor} to
 *  resize the browser window.
 *
 *  **Please note** that another way to set the size of the browser window
 *  is to configure it in [`protractor.conf.js`](https://github.com/angular/protractor/blob/master/lib/config.ts).
 *
 *  see Window export class ResizeBrowserWindow { desc Instantiates a version of this  {@link @serenity-js/core/lib/screenplay~Interaction} *  setting the size of the browser window to maximum.
     *
     *  example returns { serenity-js see BrowseTheWeb see Window . size see {@link @serenity-js/assertions~Ensure} see {@link @serenity-js/assertions/lib/expectations~property} see {@link @serenity-js/assertions/lib/expectations~isGreaterThan} static toMaximum ( ) { return new MaximiseBrowserWindow ( ) ; } desc Instantiates a version of this  {@link @serenity-js/core/lib/screenplay~Interaction} *  setting the size of the browser window to given `width` and `height`
     *
     *  example see BrowseTheWeb param { number } width param { number } height returns { serenity-js static to ( width , height ) { return new SetBrowserWindowSize ( width , height ) ; } } package class MaximiseBrowserWindow implements Interaction { desc Makes the provided  {@link @serenity-js/core/lib/screenplay/actor~Actor} *  perform this  {@link @serenity-js/core/lib/screenplay~Interaction} .
     *
     *  param { UsesAbilities & AnswersQuestions } actor An  {@link @serenity-js/core/lib/screenplay/actor~Actor} to perform this  {@link @serenity-js/core/lib/screenplay~Interaction} returns { PromiseLike < void > } see {@link @serenity-js/core/lib/screenplay/actor~Actor} see {@link @serenity-js/core/lib/screenplay/actor~UsesAbilities} see {@link @serenity-js/core/lib/screenplay/actor~AnswersQuestions} performAs ( actor ) { return BrowseTheWeb . as ( actor ) . manage ( ) . window ( ) . maximize ( ) ; } desc Generates a description to be used when reporting this  {@link @serenity-js/core/lib/screenplay~Activity} .
     *
     *  returns { string } toString ( ) { return `#actor maximises the browser window` ; } } package class SetBrowserWindowSize implements Interaction { constructor ( private width , private height ) { } desc Makes the provided  {@link @serenity-js/core/lib/screenplay/actor~Actor} *  perform this  {@link @serenity-js/core/lib/screenplay~Interaction} .
     *
     *  param { UsesAbilities & AnswersQuestions } actor An  {@link @serenity-js/core/lib/screenplay/actor~Actor} to perform this  {@link @serenity-js/core/lib/screenplay~Interaction} returns { PromiseLike < void > } see {@link @serenity-js/core/lib/screenplay/actor~Actor} see {@link @serenity-js/core/lib/screenplay/actor~UsesAbilities} see {@link @serenity-js/core/lib/screenplay/actor~AnswersQuestions} performAs ( actor ) { return BrowseTheWeb . as ( actor ) . manage ( ) . window ( ) . setSize ( this . width , this . height ) ; } desc Generates a description to be used when reporting this  {@link @serenity-js/core/lib/screenplay~Activity} .
     *
     *  returns { string } toString ( ) { return `#actor sets the size of the browser window to ${ this . width } x ${ this . height }` ; } }