Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browser tests #370

Merged
merged 5 commits into from
Feb 7, 2019
Merged

Browser tests #370

merged 5 commits into from
Feb 7, 2019

Conversation

bfirsh
Copy link
Member

@bfirsh bfirsh commented Feb 7, 2019

It's a robot that clicks through the website!

This is using Cypress which is so so much nicer than the selenium tests of old. The test results are available on the web! They have screenshots and video to debug! (Link is at end of Travis log output.)

There are various other changes in this PR, so you might want to click through the commits one by one to review. I've organised them carefully for that reason.

fixes #302
fixes #339

@bfirsh bfirsh force-pushed the browser-tests branch 6 times, most recently from feca69f to 6d4b97d Compare February 7, 2019 04:03
@bfirsh bfirsh changed the title WIP: Browser tests Browser tests Feb 7, 2019
Copy link
Collaborator

@jonathan-s jonathan-s left a comment

Choose a reason for hiding this comment

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

Looks good to me, I'll take a whirl before I merge it.

@@ -2301,15 +2301,17 @@ def process_unsaved_booking(request):
return


def user_login(request):
def user_login(request, username=None):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would suggest that we use https://djangopackages.org/packages/p/django-registration/ for registration / login. If you agree let's open a new issue for that.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes sounds good! These views looked like a bit of a mess but I didn’t want to refactor them now. 🙈

Copy link
Collaborator

Choose a reason for hiding this comment

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

There will come a day :)

Copy link
Member

Choose a reason for hiding this comment

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

yes agree! this project was started before django had a registration or profile functionality built in. have been keen to move to the newer functionality.


We use [Cypress](https://www.cypress.io/) to test the high-level features of Modernomad in a browser. This checks that the frontend code and backend code all work together from the level of a user clicking around on the site.

Cypress needs to run on your local machine, not inside Chrome or a VM, because it has to start and control your browser.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps it would be worth making a note that it needs to run on a clean install, using generate_test_data command?

@jonathan-s jonathan-s merged commit 4790cdc into embassynetwork:master Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Headless browser tests for key workflows Fix behaviour tests
3 participants