Skip to content
This repository was archived by the owner on Mar 17, 2020. It is now read-only.

Conversation

pritalpatel
Copy link
Contributor

Pull Request for Issue #16 and rewrite of #44

Summary of Changes

Create an users_frontend.feature file.

$I->waitForElement(['id' => 'mod-login-username'], 60);
$I->waitForText('Log in', 60, ['xpath' => "//fieldset[@class='loginform']//button"]);
$I->waitForElement(['id' => 'mod-login-username'], TIMEOUT);
$I->waitForText('Log in', TIMEOUT, ['xpath' => "//fieldset[@class='loginform']//button"]);
Copy link
Contributor

@yvesh yvesh Jul 10, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of an xpath you can also use the btn-primary class as identifier. This should be faster and here it is important, as this method will be executed often.

@yvesh
Copy link
Contributor

yvesh commented Jul 10, 2016

@pritalpatel This PR has merge conflicts you need to resolve. Ping me if you need help with that :-)

And I create a user with fields Name "patel", Username "patel", Password "patel" and Email "[email protected]"
When I press the "Register"
Then I see "Could not instantiate mail function." message
And user is created
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This scenario should be

Scenario: Create user from frontend (index.php?option=com_users)
    Given that user registration is enabled
    And there is no user with Username "patel" or Email "[email protected]"
    When I click on the link "Create an account"
    And I create a user with fields Name "patel", Username "patel", Password "patel" and Email "[email protected]"
    And I press the "Register"
    Then I see "Could not instantiate mail function." message
    And user is created
  • I click on the link "Create an account" is not a pre-condition, it is already part of your action, so it belongs to the When part.
  • I see "Could not instantiate mail function." message surely is not the expected message under the given pre-conditions. If you really mean this, add And mail is not configured correctly to the Given section. Otherwise, mail is assumed to be working as expected, and the message should contain Your account has been created.

Copy link
Contributor Author

@pritalpatel pritalpatel Jul 10, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your suggestions. I will update it.

@pritalpatel pritalpatel force-pushed the users-frontend-gherkin-new branch from 0674cc6 to b7c316a Compare July 10, 2016 15:32
Scenario: check the created user in the backend
Given There is a user manager page in administrator
When I search the user with user name "patel"
Then I should see the user "prital"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is always a user manager - in current Joomla, you can't uninstall it. So it should be

    Given I am on the User Manager page

The reference to the backend is not necessarily needed, because the User Manager page is in the backend. But it would not be wrong to say it explicitely.

And I create a user with fields Name "patel", Username "patel", Password "patel" and Email "[email protected]"
When I press the "Register"
And I press the "Register"
Then I see "Could not instantiate mail function." message
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still wondering about this expected outcome.

@pritalpatel
Copy link
Contributor Author

Travis is failing in PHP 5.6 because of weird error. Can we restart this build?

@yvesh
Copy link
Contributor

yvesh commented Jul 14, 2016

@pritalpatel Updated Travis to only run our system tests.

@javigomez
Copy link
Contributor

I have added fixes at pull #56:

And I press on "Log in"
Then I should see the "Login denied! Your account has either been blocked or you have not activated it yet." warning

Scenario: Check if block and activation are working
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rename it for "Unblocked user can login in frontend"

@javigomez
Copy link
Contributor

Closing since this pull has a clean version at #56

@javigomez javigomez closed this Jul 25, 2016
@pritalpatel pritalpatel changed the title Users frontend gherkin new Users frontend gherkin and acceptance scenarios Aug 4, 2016
@pritalpatel pritalpatel deleted the users-frontend-gherkin-new branch August 4, 2016 14:15
pritalpatel added a commit to pritalpatel/gsoc16_browser-automated-tests that referenced this pull request Aug 6, 2016
pritalpatel added a commit to pritalpatel/gsoc16_browser-automated-tests that referenced this pull request Aug 10, 2016
pritalpatel added a commit to pritalpatel/gsoc16_browser-automated-tests that referenced this pull request Aug 17, 2016
pritalpatel added a commit to pritalpatel/gsoc16_browser-automated-tests that referenced this pull request Aug 21, 2016
pritalpatel added a commit to pritalpatel/gsoc16_browser-automated-tests that referenced this pull request Aug 23, 2016
yvesh pushed a commit that referenced this pull request Aug 23, 2016
* Fix issue_#57 Update frontend_user tests as per commented in PR #51

* [codestyle] Adding docblock and code style improvement in Robo and user frontend

* Verify in backend that user is created

* Fix scenario in user_frontend.feature to proper English
yvesh pushed a commit that referenced this pull request Jun 17, 2017
* Codestyle

* indent

* order

* oops

* changes requested by @andrepereiradasilva

* cs

* changes requested by @wojsmol

* Update mod_logged.xml (#43)

* Update templateDetails.xml (#45)

i need to fix my ide!!

* Update mod_popular.xml (#44)

* Update templateDetails.xml (#57)

* Update mod_version.xml (#56)

* Update mod_toolbar.xml (#55)

* Update mod_title.xml (#54)

* Update mod_submenu.xml (#53)

* Update mod_status.xml (#52)

* Update mod_stats_admin.xml (#51)

* Update mod_quickicon.xml (#50)

* Update mod_menu.xml (#49)

* Update mod_login.xml (#48)

* Update mod_latest.xml (#47)

* Update mod_feed.xml (#46)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants