Permalink
Browse files

fix(interactions): Enter.theValue(v: string \| number)

`Enter` can be used to enter both text and numbers into input fields.
  • Loading branch information...
jan-molak committed Dec 29, 2016
1 parent 09712cd commit c04c5e6835190edf9b3f072d6fae5c28e4ef3291
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/serenity-protractor/screenplay/interactions/enter.ts
@@ -9,7 +9,7 @@ export class Enter implements Interaction {
private target: Target;
private interactions: Interaction[] = [];
static theValue(value: string): Enter {
static theValue(value: string | number): Enter {
return new Enter(value);
}
@@ -32,15 +32,15 @@ export class Enter implements Interaction {
);
}
constructor(private value: string) { }
constructor(private value: string | number) { }
}
class EnterValue implements Interaction {
@step('{0} enters "#value" into #target')
performAs(actor: UsesAbilities): PromiseLike<void> {
return BrowseTheWeb.as(actor).locate(this.target).sendKeys(this.value);
return BrowseTheWeb.as(actor).locate(this.target).sendKeys(<string> this.value);
}
constructor(private value: string, private target: Target) { }
constructor(private value: string | number, private target: Target) { }
}

0 comments on commit c04c5e6

Please sign in to comment.