Permalink
Browse files

feat(interactions): Clear.theValueOf(t: Target) clears an input field

  • Loading branch information...
jan-molak committed Dec 29, 2016
1 parent efb1f0c commit 09712cd2901cd14ee8a63ece68b81745ebcc7e89
@@ -0,0 +1,15 @@
import { Interaction, PerformsTasks, UsesAbilities } from '../../../serenity/screenplay';
import { BrowseTheWeb } from '../abilities/browse_the_web';
import { Target } from '../ui/target';
export class Clear implements Interaction {
static theValueOf = (field: Target): Interaction => new Clear(field);
performAs(actor: PerformsTasks & UsesAbilities): PromiseLike<void> {
return BrowseTheWeb.as(actor).locate(this.target).clear();
}
constructor(private target: Target) {
}
}
@@ -1,3 +1,4 @@
export * from './clear';
export * from './click';
export * from './double_click';
export * from './enter';

0 comments on commit 09712cd

Please sign in to comment.