Permalink
Browse files

fix(protractor): hit interaction reports the name of the actor correctly

affects: serenity-js

When the Hit interaction was reported, the name of the actor who performed the interaction was not
mentioned in the report.
Additionally, internally all the protractor interactions use the #actor
token instead of the older {0} notation.
  • Loading branch information...
jan-molak committed Nov 5, 2017
1 parent 4dd735c commit bcf61516b43769582cb7929cccb4dd8ef72b68fb
@@ -14,5 +14,5 @@ export class Clear implements Interaction {
constructor(private target: Target) {
}
toString = () => `{0} clears ${this.target}`;
toString = () => `#actor clears ${this.target}`;
}
@@ -15,5 +15,5 @@ export class Click implements Interaction {
constructor(private target: Target) { }
toString = () => `{0} clicks on ${this.target}`;
toString = () => `#actor clicks on ${this.target}`;
}
@@ -17,5 +17,5 @@ export class DoubleClick implements Interaction {
constructor(private target: Target) { }
toString = () => `{0} double-clicks on ${this.target}`;
toString = () => `#actor double-clicks on ${this.target}`;
}
@@ -43,5 +43,5 @@ class EnterValue implements Interaction {
constructor(private value: string | number, private target: Target) { }
toString = () => `{0} enters ${this.value} into ${this.target}`;
toString = () => `#actor enters ${this.value} into ${this.target}`;
}
@@ -18,5 +18,5 @@ class HitKeyIntoTarget implements Interaction {
constructor(private target: Target, private key: string) {}
toString = () => `Hits the ${keyNameOf(this.key)} key`;
toString = () => `#actor hits the ${keyNameOf(this.key)} key`;
}
@@ -12,5 +12,5 @@ export class Open implements Interaction {
constructor(private targetWebsite: string) { }
toString = () => `{0} opens the browser at "${this.targetWebsite}"`;
toString = () => `#actor opens the browser at "${this.targetWebsite}"`;
}
@@ -12,7 +12,7 @@ class MaximiseBrowserWindow implements Interaction {
return BrowseTheWeb.as(actor).manage().window().maximize();
}
toString = () => `{0} maximises the browser window`;
toString = () => `#actor maximises the browser window`;
}
class SetBrowserWindowSize implements Interaction {
@@ -23,5 +23,5 @@ class SetBrowserWindowSize implements Interaction {
return BrowseTheWeb.as(actor).manage().window().setSize(this.width, this.height);
}
toString = () => `{0} sets the size of the browser window to ${this.width} x ${this.height}`;
toString = () => `#actor sets the size of the browser window to ${this.width} x ${this.height}`;
}
@@ -17,5 +17,5 @@ export class Scroll implements Interaction {
constructor(private target: Target) { }
toString = () => `{0} scrolls to ${this.target}`;
toString = () => `#actor scrolls to ${this.target}`;
}
@@ -26,7 +26,7 @@ class SelectOption implements Interaction {
constructor(private value: string, private target: Target) {
}
toString = () => `{0} selects "${this.value}" from ${this.target}`;
toString = () => `#actor selects "${this.value}" from ${this.target}`;
}
class SelectOptions implements Interaction {

0 comments on commit bcf6151

Please sign in to comment.