<commit_before>import expect = require('../expect');

import { by, protractor } from 'protractor';

import {
    Actor,
    BrowseTheWeb,
    Clear,
    Click,
    Duration,
    Enter,
    Is,
    Open,
    PerformsTasks,
    Select,
    Target,
    Task,
    Wait,
    WebElement,
} from '../../src/screenplay-protractor';

import { AppServer } from '../support/server';

export class Playground {
    static Examples       = Target.the('example type').located(by.id('example_type'));
    static Timeout_Type        = Target.the('timeout function type').located(by.id('timeout_type'));
    static Timeout_Length      = Target.the('timeout length').located(by.id('timeout_length'));
    static Trigger = Target.the('trigger button').located(by.css('#timeouts button'));
    static Result  = Target.the('result').located(by.css('#timeouts #example .result'));
}

class ChooseAnExample implements Task {
    private timeout_length = Duration.ofMillis(500);
    private timeout_type   = '$timeout' ;

    static whereElementBecomes = (example: string) => new ChooseAnExample(example);

    using = (timeout_type: string) => {
        this.timeout_type = timeout_type;

        return this;
    }

    after = (length: Duration) => {
        this.timeout_length = length;

        return this;
    }

    performAs = (actor: PerformsTasks) => actor.attemptsTo(
        Select.theValue(this.example).from(Playground.Examples),
        Select.theValue(this.timeout_type).from(Playground.Timeout_Type),
        Clear.theValueOf(Playground.Timeout_Length),
        Enter.theValue(this.timeout_length.toMillis()).into(Playground.Timeout_Length),
        Click.on(Playground.Trigger),
    );

    constructor(private example: string) {
    }
}

describe ('When waiting for things to happen, a test scenario', function () {

    this.timeout(10000);

    const Trigger_Delay   = Duration.ofMillis(500),
          Not_Long_Enough = Duration.ofMillis(100),
          Long_Enough     = Duration.ofMillis(1500);

    let app   = new AppServer();
    let james = Actor.named('James').whoCan(BrowseTheWeb.using(protractor.browser));

    before(app.start());
    after(app.stop());
<commit_msg>test(ci): Adjusted the timeouts<commit_after>import expect = require('../expect');

import { by, protractor } from 'protractor';

import {
    Actor,
    BrowseTheWeb,
    Clear,
    Click,
    Duration,
    Enter,
    Is,
    Open,
    PerformsTasks,
    Select,
    Target,
    Task,
    Wait,
    WebElement,
} from '../../src/screenplay-protractor';

import { AppServer } from '../support/server';

export class Playground {
    static Examples       = Target.the('example type').located(by.id('example_type'));
    static Timeout_Type        = Target.the('timeout function type').located(by.id('timeout_type'));
    static Timeout_Length      = Target.the('timeout length').located(by.id('timeout_length'));
    static Trigger = Target.the('trigger button').located(by.css('#timeouts button'));
    static Result  = Target.the('result').located(by.css('#timeouts #example .result'));
}

class ChooseAnExample implements Task {
    private timeout_length = Duration.ofMillis(500);
    private timeout_type   = '$timeout' ;

    static whereElementBecomes = (example: string) => new ChooseAnExample(example);

    using = (timeout_type: string) => {
        this.timeout_type = timeout_type;

        return this;
    }

    after = (length: Duration) => {
        this.timeout_length = length;

        return this;
    }

    performAs = (actor: PerformsTasks) => actor.attemptsTo(
        Select.theValue(this.example).from(Playground.Examples),
        Select.theValue(this.timeout_type).from(Playground.Timeout_Type),
        Clear.theValueOf(Playground.Timeout_Length),
        Enter.theValue(this.timeout_length.toMillis()).into(Playground.Timeout_Length),
        Click.on(Playground.Trigger),
    );

    constructor(private example: string) {
    }
}

describe ('When waiting for things to happen, a test scenario', function () {

    this.timeout(10000);

    const Trigger_Delay   = Duration.ofMillis(500),
          Not_Long_Enough = Duration.ofMillis(100),
          Long_Enough     = Duration.ofMillis(1000);

    let app   = new AppServer();
    let james = Actor.named('James').whoCan(BrowseTheWeb.using(protractor.browser));

    before(app.start());
    after(app.stop());

{'fraction_non_alphanumeric': 0.13426349496797804, 'fraction_numerical': 0.008234217749313814, 'mean_word_length': 3.2538910505836576, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5301671', 'n_tokens_mistral': 1356, 'n_tokens_neox': 1278, 'n_words': 253}