Skip to content

Commit

Permalink
Issue #3183878: Fix Cucumber composer and .info.yml to work with Drup…
Browse files Browse the repository at this point in the history
…al 9 ( ^9.0 ) only
  • Loading branch information
Natshah committed Nov 28, 2020
1 parent baa5c93 commit 815318e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
22 changes: 11 additions & 11 deletions tests/features/bootstrap/CucumberContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@
class CucumberContext extends RawDrupalContext implements SnippetAcceptingContext {

/**
* Hold all passed parameters.
*/
protected $parameters = array();
* Hold all passed parameters.
*
* @var array
*/
protected $parameters = [];

/**
* Initializes context.
*
* @param array $parameters
* The parameters.
*/
public function __construct(array $parameters) {

Expand All @@ -28,16 +33,11 @@ public function __construct(array $parameters) {

}

/**
* Clean users.
*/
public function cleanUsers() {

}

/**
* Maximize the window before scenario.
*
* @BeforeScenario @javascript
*/
public function maximizeWindow() {
$this->getSession()->getDriver()->maximizeWindow();
}
}
7 changes: 3 additions & 4 deletions tests/features/cucumber/001-anonymous-user.feature
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
Feature: Aonymous user
Feature: Anonymous user

@javascript @local @development @staging @production
Scenario: Check that anonymous users cannot register.
Given I am an anonymous user
When I go to "user/register"
When I go to "/user/register"
Then I should see "You are not authorized to access this page."

@javascript @local @development @staging @production
Scenario: Check that anonymous users cannot access admin pages.
Given I am an anonymous user
When I go to "admin"
When I go to "/admin"
Then I should see "You are not authorized to access this page."

0 comments on commit 815318e

Please sign in to comment.