diff --git a/tests/_support/Step/Acceptance/Administrator/Content.php b/tests/_support/Step/Acceptance/Administrator/Content.php index 4290a648ce..6d752020d9 100644 --- a/tests/_support/Step/Acceptance/Administrator/Content.php +++ b/tests/_support/Step/Acceptance/Administrator/Content.php @@ -37,12 +37,12 @@ public function iSaveAnArticle() } /** - * @Then I wait for the title :title and see the message :message + * @Then I should see the :arg1 message */ - public function iShouldSeeTheMessage($title, $message) + public function iShouldSeeTheMessage($message) { $I = $this; - $I->waitForPageTitle($title); + $I->waitForText($message, 60, AdminPage::$systemMessageContainer); $I->see($message, AdminPage::$systemMessageContainer); } @@ -67,16 +67,6 @@ public function iFeatureTheContentWithTitle() $I->clickToolbarButton('featured'); } - /** - * @Then I save and see the :arg1 message - */ - /*public function iSaveAndSeeTheMessage($message) - { - $I = $this; - $I->waitForPageTitle($message, AdminPage::$systemMessageContainer); - $I->see($message, AdminPage::$systemMessageContainer); - }*/ - /** * @Given I select the content article with title :arg1 */ @@ -109,7 +99,7 @@ public function iSaveTheArticle() } /** - * @Given I have article with name :arg1 + * @Given I have article with name :title */ public function iHaveArticleWithName($title) { @@ -169,4 +159,4 @@ public function iSeeArticleTrashMessage($title, $message) $I->waitForPageTitle($title); $I->see($message, AdminPage::$systemMessageContainer); } -} \ No newline at end of file +} diff --git a/tests/_support/Step/Acceptance/Administrator/User.php b/tests/_support/Step/Acceptance/Administrator/User.php index 58621f85b3..24d22b1e14 100644 --- a/tests/_support/Step/Acceptance/Administrator/User.php +++ b/tests/_support/Step/Acceptance/Administrator/User.php @@ -33,7 +33,7 @@ public function iCreateNewUser($name, $username, $password, $email) } /** - * @When I Save the user + * @When I Save the user */ public function iSaveTheUser() { @@ -42,12 +42,12 @@ public function iSaveTheUser() } /** - * @Then I should wait for the title :title and see the message :message + * @Then I should see the :arg1 message */ - public function iSeeTheMessage($title, $message) + public function iSeeTheMessage($message) { $I = $this; - $I->waitForPageTitle($title); + $I->waitForText($message, 60, AdminPage::$systemMessageContainer); $I->see($message, AdminPage::$systemMessageContainer); } @@ -77,17 +77,6 @@ public function iAssignedNameAndUserGroup($name, $userGroup) $I->checkOption('#1group_4'); } - /** - * @Then I should wait for :arg1 title and see the :arg2 message - */ - public function iShouldDisplayTheMessage($title, $message) - { - $I = $this; - $I->clickToolbarButton('Save & Close'); - $I->waitForPageTitle($title); - $I->see($message, AdminPage::$systemMessageContainer); - } - /** * @Given I have a user with user name :username */ @@ -109,16 +98,6 @@ public function iBlockTheUser() $I->clickToolbarButton('unpublish'); } - /** - * @Then I wait for the title :title and see the message :message - */ - public function iShouldSeeTheUserBlockMessage($title, $message) - { - $I = $this; - $I->waitForPageTitle($title); - $I->see($message, AdminPage::$systemMessageContainer); - } - /** * @Given I have a blocked user with user name :username */ @@ -137,20 +116,9 @@ public function iHaveABlockedUserWithUserName($username) public function iUnblockTheUser() { $I = $this; - $I->waitForPageTitle('Users'); $I->clickToolbarButton('unblock'); } - /** - * @Then I should see the user unblock message :message - */ - /*public function iShouldSeeTheUserUnblockMessage($message) - { - $I = $this; - $I->waitForPageTitle($message, AdminPage::$systemMessageContainer); - $I->see($message, AdminPage::$systemMessageContainer); - }*/ - /** * @When I Delete the user :username */ @@ -165,17 +133,6 @@ public function iDeleteTheUser($username) $I->acceptPopup(); } - /** - * @Then I confirm the user should have been deleted by getting the title :title and see the message :message - */ - public function iConfirmTheUserDeleteSucessfully($title, $message) - { - $I = $this; - $I->checkForPhpNoticesOrWarnings(); - $I->waitForPageTitle($title); - $I->see($message, AdminPage::$systemMessageContainer); - } - /** * @Given There is an user link */ @@ -226,7 +183,7 @@ public function iSetAssignedUserGroupAsAnAdministrator() $I->click('Assigned User Groups'); $I->checkOption('#1group_7'); } - + /** * @Then Login in backend with username :username and password :password */ @@ -298,16 +255,6 @@ public function iSaveTheGroup() $I->clickToolbarButton('Save & Close'); } - /** - * @Then I should wait for :title title and see the message :message - */ - public function iShouldSeeTheMessage($title, $message) - { - $I = $this; - $I->waitForPageTitle($title); - $I->see($message, AdminPage::$systemMessageContainer); - } - /** * @Given I search and select the Group with name :grouptitle */ @@ -330,7 +277,6 @@ public function iSetGroupTitleAsA($GroupTitle) $I->fillField(UserManagerPage::$title, $GroupTitle); } - /** * @When I Delete the Group :arg1 */ @@ -345,17 +291,6 @@ public function iDeleteTheGroup($GroupTitle) $I->acceptPopup(); } - /** - * @Then I confirm the group should have been deleted by getting the title :title and see the message :message - */ - public function iDeleteUserGroup($title, $message) - { - $I = $this; - $I->checkForPhpNoticesOrWarnings(); - $I->waitForPageTitle($title); - $I->see($message, AdminPage::$systemMessageContainer); - } - /** * @Given There is a add viewing access level link */ @@ -385,16 +320,6 @@ public function iSaveTheAccessLevel() $I->clickToolbarButton('Save & Close'); } - /** - * @Then I wait for the title :title see the message :message - */ - public function iShouldBeSeeTheMessage($title, $message) - { - $I = $this; - $I->waitForPageTitle($title); - $I->see($message, AdminPage::$systemMessageContainer); - } - /** * @Given I search and select the Access Level with name :leveltitle */ @@ -417,15 +342,6 @@ public function iSetAccessLevelTitleAsA($LevelTitle) $I->fillField(UserManagerPage::$title, $LevelTitle); } - /** - * @When I save Access Level - */ - public function iSaveAccessLevel() - { - $I = $this; - $I->clickToolbarButton('Save & Close'); - } - /** * @When I Delete the Access level :leveltitle */ @@ -440,16 +356,6 @@ public function iDeleteTheAccessLeVel($LevelTitle) $I->acceptPopup(); } - /** - * @Then I confirm the Access Level have been deleted by getting the title :title and see the message :message - */ - public function iDeleteAccessLevel($title, $message) - { - $I = $this; - $I->checkForPhpNoticesOrWarnings(); - $I->waitForPageTitle($title); - $I->see($message, AdminPage::$systemMessageContainer); - } /** * @Given There is a User link */ @@ -496,6 +402,4 @@ public function iShouldBeSeeTheLinkCreateAnAccountInFrontend() $I = $this; $I->click(['class' => 'brand visible-desktop visible-tablet']); } - - } diff --git a/tests/acceptance/content.feature b/tests/acceptance/content.feature index 439275b2fe..6a7c8031bb 100644 --- a/tests/acceptance/content.feature +++ b/tests/acceptance/content.feature @@ -12,26 +12,26 @@ Feature: content Given There is a add content link When I create new content with field title as "My_Article" and content as a "This is my first article" And I save an article - Then I wait for the title "Articles" and see the message "Article successfully saved." + Then I should see the "Article successfully saved." message Scenario: Feature an Article Given I search and select content article with title "My_Article" When I featured the article - Then I wait for the title "Articles" and see the message "1 article featured." + Then I should see the "1 article featured." message Scenario: Modify an article Given I select the content article with title "My_Article" And I set access level as a "Registered" When I save the article - Then I wait for the title "Articles" and see the message "Article successfully saved." + Then I should see the "Article successfully saved." message Scenario: Unpublish an article Given I have article with name "My_Article" When I unpublish the article - Then I wait for title "Articles" and see the unpublish message "1 article unpublished." + Then I should see the "1 article unpublished." message Scenario: Trash an article Given I have "My_Article" content article which needs to be Trash When I Trash the article - Then I wait for the title "Articles" and see article trash message "1 article trashed." + Then I should see the "1 article trashed." message diff --git a/tests/acceptance/users.feature b/tests/acceptance/users.feature index 4d95435c17..db5864ad08 100644 --- a/tests/acceptance/users.feature +++ b/tests/acceptance/users.feature @@ -16,41 +16,41 @@ Feature: users Scenario: Create a add new user Given There is a add user link When I create new user with fields Name "register", Login Name "register", Password "register" and Email "register@gmail.com" - And I Save the user - Then I should wait for the title "Users" and see the message "User successfully saved." + And I Save the user + Then I should see the "User successfully saved." message Scenario: Edit user Given I search and select the user with user name "register" When I set name as an "Editor" and User Group as "Editor" - And I Save the user - Then I should wait for the title "Users" and see the message "User successfully saved." + And I Save the user + Then I should see the "User successfully saved." message Scenario: Block a User Given I have a user with user name "register" When I block the user - Then I wait for the title "Users" and see the message "User blocked." + Then I should see the "User blocked." message - Scenario: Unblock user - Given I have a blocked user with user name "register" - When I unblock the user - Then I wait for the title "Users" and see the message "User enabled." +# Scenario: Unblock user +# Given I have a blocked user with user name "register" +# When I unblock the user +# Then I should see the "User enabled." message Scenario: Delete user Given I have a user with user name "Editor" When I Delete the user "Editor" - Then I confirm the user should have been deleted by getting the title "Users" and see the message "1 user successfully deleted." + Then I should see the "1 user successfully deleted." message Scenario: Create super admin and login into the backend Given There is a add user link And I fill a super admin with fields Name "prital", Login Name "prital", Password "prital", and Email "prital@gmail.com" When I set assigned user group as an Administrator - And I Save the user + And I Save the user Then Login in backend with username "prital" and password "prital" Scenario: Create User without username fails Given There is a add user link When I don't fill Login Name but fulfill remaining mandatory fields: Name "piyu", Password "piyu" and Email "piyu@gmail.com" - And I Save the user + And I Save the user Then I see the title "Users: New" But I see the alert error "Invalid field: Login Name" @@ -58,35 +58,35 @@ Feature: users Given There is a add new group link When I fill Group Title as a "Gsoc" And I save the Group - Then I should wait for "Users: Groups" title and see the message "Group successfully saved." + Then I should see the "Group successfully saved." message Scenario: Edit group Given I search and select the Group with name "Gsoc" And I set group Title as a "Gsoc_admin" When I save the Group - Then I should wait for "Users: Groups" title and see the message "Group successfully saved." + Then I should see the "Group successfully saved." message Scenario: Delete Group Given I search and select the Group with name "Gsoc_admin" When I Delete the Group "Gsoc_admin" - Then I confirm the group should have been deleted by getting the title "Users: Groups" and see the message "1 User Group successfully deleted." + Then I should see the "1 User Group successfully deleted." message Scenario: Create ACL level Given There is a add viewing access level link When I fill Level Title as a "joomla" and set Access as a public And I save the Access Level - Then I wait for the title "Users: Viewing Access Levels" see the message "Access level successfully saved." + Then I should see the "Access level successfully saved." message Scenario: Edit ACL Given I search and select the Access Level with name "joomla" And I set Access Level title as a "Gsoc_joomla" - When I save Access Level - Then I wait for the title "Users: Viewing Access Levels" and see the message "Access level successfully saved." + When I save the Access Level + Then I should see the "Access level successfully saved." message Scenario: Delete ACL Given I search and select the Access Level with name "Gsoc_joomla" When I Delete the Access level "Gsoc_joomla" - Then I confirm the Access Level have been deleted by getting the title "Users: Viewing Access Levels" and see the message "1 View Access Level successfully removed." + Then I should see the "1 View Access Level successfully removed." message Scenario: User settings (Allow user registration) Given There is a User link