Skip to content
This repository has been archived by the owner on May 3, 2020. It is now read-only.

Commit

Permalink
Modernised the seed
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-molak committed Jun 13, 2018
1 parent 8cb0aff commit c3c1515
Show file tree
Hide file tree
Showing 15 changed files with 2,701 additions and 72 deletions.
3 changes: 2 additions & 1 deletion features/greeter/greet_by_name.feature
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ Feature: Greeting developers by name

Scenario: The Basics

When James introduces himself as Bond, James Bond
Given James wants to interact with AngularJS apps
When he introduces himself as Bond, James Bond
Then he should be greeted with "Hello Bond, James Bond!"
24 changes: 24 additions & 0 deletions features/step_definitions/greeter.steps.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { Open } from 'serenity-js/lib/screenplay-protractor';

import { CheckIfGreeterMessage, EnterName } from '../../test/greeter';

export = function greeterSteps() {

this.Given(/^(.*) wants to interact with AngularJS apps$/, function(actor: string) {
return this.stage.theActorCalled(actor).attemptsTo(
Open.browserOn('https://www.angularjs.org/'),
);
});

this.When(/^(?:he|she|they) introduces? (?:himself|herself|themselves) as (.*)$/, function(name: string) {
return this.stage.theActorInTheSpotlight().attemptsTo(
EnterName.of(name),
);
});

this.Then(/^he should be greeted with "([^"]*)"$/, function(message: string) {
return this.stage.theActorInTheSpotlight().attemptsTo(
CheckIfGreeterMessage.reads(message),
);
});
};
27 changes: 0 additions & 27 deletions features/step_definitions/steps.ts

This file was deleted.

3 changes: 3 additions & 0 deletions features/support/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export = function() {
this.setDefaultTimeout(30 * 1000);
};
8 changes: 8 additions & 0 deletions features/support/world.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { serenity } from 'serenity-js';
import { Actors } from '../../test/Actors';

export = function() {
this.World = function() {
this.stage = serenity.callToStageFor(new Actors());
};
};
Loading

0 comments on commit c3c1515

Please sign in to comment.