-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ZF3][Behat,Settings] fixed all errors in /en/settings page
- Loading branch information
Showing
22 changed files
with
451 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Feature: Update application settings | ||
In order to use Yawik | ||
As an administrator | ||
I should able to update yawik settings | ||
|
||
Background: | ||
Given I am logged in as an administrator | ||
|
||
@javascript @settings | ||
Scenario: Successfully change settings | ||
Given I go to settings page | ||
When I select "German" from "choose your language" | ||
And I select "Europe/Berlin" from "choose your timzone" | ||
And I press "Save" | ||
And I wait for the ajax response | ||
Then I should see "Changes successfully saved" | ||
|
||
@javascript @settings-email | ||
Scenario: Successfully change E-Mail Notifications Settings | ||
Given I go to email template settings page | ||
When I check "receive E-Mail alert" | ||
And I check "confirm application immidiatly after submit" | ||
And I check "get blind carbon copy of all own mails" | ||
And I wait for the ajax response | ||
And I fill in the following: | ||
| Mailtext | Some Mailtext | | ||
| Confirmation mail text | Confirmation Mail | | ||
| Invitation mail text | Invitation mail | | ||
| Accept mail text | Accept mail text | | ||
| Rejection mail text | Rejection mail text | | ||
And I press "Save" | ||
And I wait for the ajax response | ||
Then I should see "Changes successfully saved" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
/** | ||
* YAWIK | ||
* | ||
* @filesource | ||
* @license MIT | ||
* @copyright 2013 - 2017 Cross Solution <http://cross-solution.de> | ||
*/ | ||
|
||
namespace Yawik\Behat; | ||
|
||
|
||
use Behat\Behat\Hook\Scope\BeforeScenarioScope; | ||
use Behat\MinkExtension\Context\MinkContext; | ||
|
||
trait CommonContextTrait | ||
{ | ||
/** | ||
* @var MinkContext | ||
*/ | ||
protected $minkContext; | ||
|
||
/** | ||
* @var CoreContext | ||
*/ | ||
protected $coreContext; | ||
|
||
/** | ||
* @var UserContext | ||
*/ | ||
protected $userContext; | ||
|
||
/** | ||
* @BeforeScenario | ||
* | ||
* @param BeforeScenarioScope $scope | ||
*/ | ||
public function gatherContexts(BeforeScenarioScope $scope) | ||
{ | ||
$this->minkContext = $scope->getEnvironment()->getContext(MinkContext::class); | ||
$this->coreContext = $scope->getEnvironment()->getContext(CoreContext::class); | ||
$this->userContext = $scope->getEnvironment()->getContext(UserContext::class); | ||
} | ||
|
||
public function generateUrl($url) | ||
{ | ||
return $this->coreContext->generateUrl($url); | ||
} | ||
|
||
public function visit($url) | ||
{ | ||
$this->coreContext->iVisit($this->generateUrl($url)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
/** | ||
* YAWIK | ||
* | ||
* @filesource | ||
* @license MIT | ||
* @copyright 2013 - 2017 Cross Solution <http://cross-solution.de> | ||
*/ | ||
|
||
namespace Yawik\Behat; | ||
|
||
|
||
use Behat\Behat\Context\Context; | ||
|
||
class SettingsContext implements Context | ||
{ | ||
use CommonContextTrait; | ||
|
||
/** | ||
* @Given I go to settings page | ||
*/ | ||
public function iGoToSettingsPage() | ||
{ | ||
$this->visit('/en/settings'); | ||
} | ||
|
||
/** | ||
* @Given I go to email template settings page | ||
*/ | ||
public function iGoToEmailTemplatePage() | ||
{ | ||
$this->visit('/en/settings/Applications'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.