paulgibbs / behat-wordpress-extension

WordHat: Behat for WordPress
https://wordhat.info
GNU General Public License v3.0
106 stars 20 forks source link

Add login page object #230

Closed ataylorme closed 5 years ago

ataylorme commented 5 years ago

Description

Related issue

Inconsistent user authentication. See this Slack thread.

Motivation and context

When writing tests using WordHat I found any scenarios requiring user authentication to be very inconsistent. The tests would fail on one run and pass on the next.

How has this been tested?

This is an attempt to get my work done in https://github.com/pantheon-systems/example-wordpress-composer/pull/79 merged back upstream in WordHat.

Tests with authentication using these updates, specifically filling fields with JavaScript, have passed with the wp-cli driver locally in a Docker instance, on CircleCI and on GitLab. Previously, the tests would fail intermittently.

Screenshots (if appropriate):

Types of changes

Checklist:

CLAassistant commented 5 years ago

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Gitlab CI seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

ataylorme commented 5 years ago

@paulgibbs I think I've sorted through all the issues. The tests are passing here. My custom tests, that previously failed during WordPress authentication, now pass using this fork. Let me know what else I can do to help get this update into WordHat - I would rather not maintain a fork.

ataylorme commented 5 years ago

Link to the passing tests of this PR working with my custom context and feature files that make use of Wordhat

ataylorme commented 5 years ago

Hopefully, the login fields being cut-off when filling out username, password, then submitting will eventually be fixed even further upstream in Mink as there is an open issue for it with multiple reports.

paulgibbs commented 5 years ago

Main ticket for this issue is #47

paulgibbs commented 5 years ago

@ataylorme Really nice work here -- thanks! I'm assuming you made the commits with the "Gitlab CI" user instead of your regular Github account.

ataylorme commented 5 years ago

I'm assuming you made the commits with the "Gitlab CI" user instead of your regular Github account.

Ah, yes, sorry about that. I was testing by running in GitLab (where I experienced the highest failure rate). I pushed from a working GitLab repo to my fork as a second remote, which is probably why the commits are "Gitlab CI".