84 Commits

Author SHA1 Message Date
4f088fb426 Merge branch 'master' into search
# Conflicts:
#	RIGS/templates/RIGS/index.html
2020-02-29 11:47:35 +00:00
4a4d4a5cf3 Add authorisation process for sign ups and allow access to EventDetail for basic users (#399)
* CHANGE: First pass at opening up RIGS #233

Whilst it makes it something of a misnomer, the intent is to make the 'view_event' perm a permission to view event details like client/price. I don't see the point in giving everyone 'view_event' and adding a new 'view_event_detail'...Open to arguments the other way.

* CHANGE: New user signups now require admin approval

Given that I intend to reveal much more data to new users this seems necessary...

* CHORE: Fix CI

* FIX: Legacy Profiles are now auto-approved correctly

* Add testing of approval mechanism

This fixes the other functional tests failing because the user cannot login without being approved.

* Superusers bypass approval check

This should fix the remainder of the tests

* Prevent unapproved users logging in through embeds

Test suite doing its job...!

* FIX: Require login on events and event embeds again

Little too far to the open side there Arona... Whooooooops!

* FIX: Use has_oembed decorator for events

* FIX: Re-prevent basic seeing reversion

This is to prevent financials/client data leaking when changed. Hopefully can show them a filtered version in future.

* FIX: Remove mitigation for #264

Someone quietly fixed it, it appears

* FEAT: Add admin email notif when an account is activated and awaiting approval

No async or time-since shenanigans yet!

* FIX: Whoops, undo accidental whitespace change

* FEAT: Add a fifteen min cooldown between emails to admins

Probably not the right way to go about it...but it does work!

TODO: How to handle cooldown-emailing shared mailbox addresses?

* FIX: Remove event modal history deadlink for basic users

Also removes some links on the RIGS homepage that will deadlink for them

* FIX: Wrong perms syntax for history pages

* CHORE: Squash migrations

* FIX: Use a setting for cooldown

* FIX: Minor code improvements
2020-02-29 11:34:50 +00:00
d5f54b1d88 Merge branch 'master' into search 2020-02-14 13:23:22 +00:00
ae151ed45e Add assets test suite (#400)
* Started POM and assets test

* FEAT: Adapt unit tests from RIGS to assets

* CHORE: pep8...

* Added Asset Create and Edit forms

* Add non-cable asset creation test

* CHORE: Frickin pep8...

* Add cable asset creation test

* Basic asset create validation testing

* Asset edit tests are here

A bit dodgy in places but par for the course for me :P

* Add access level tests

* Delete unused code

Much less effort way to increase coverage stats :D

* Add delete sample data test for completeness

Chasing that sweet 100% coverage...

* Add supplier list page + tests

Also fix the supplier page not being ordered alphabetically

* Helps if I add the migration...

* Add supplier create/edit tests

* Asset duplicate tests

Also fixed some random bugs

* Asset search tests

* 404 tests and test that everything requires authentication

* Test visibility of form errors

And fix supplier form not displaying errors correctly!

* Fix broken search test


Co-authored-by: Matthew Smith <mattysmith22@googlemail.com>
2020-02-08 13:52:07 +00:00
3d00b935fc FEAT: Basic testing of search 2020-02-04 18:02:44 +00:00
459a9b5b05 FIX: Select the event form, not the search one in tests! 2020-02-04 16:53:05 +00:00
1e03b5107e FIX: Rig Creation Test breaking on CI
Squashed commit messages below:
Also...
FIX: Person selection workflow in tests now works
FIX: Properly test name requirement in rig creation
And removed the dirty workaround for wercker so that the test no longer passes when it shouldn't. Which led to this mess of attempted fixes, now squashed:

Fine. Hardball.
What about if we click the button a different way...
Disable whole chunk of the test that was previously getting skipped
Perhaps you'd like to pass now Travis
Temporarily disable the offending part of the test.

Something odd is going on...TBC.
Reorder some selenium commands to try and fix test only failing on CI.
Another attempt at a CI test fix
FIX: Should fix rig create test failing on CI
2020-01-21 01:45:59 +00:00
3a25b85e95 FEAT: Add conditional formatting to whole auth panel
Matches the formatting on the button
2020-01-13 21:07:09 +00:00
f616017423 CHANGE: Remove phone number field from initial registration
Closes #354
2020-01-13 21:07:09 +00:00
4f036af85a Create the Asset Database (#363) 2019-12-04 23:14:27 +00:00
David Taylor
8872084cab Import URL functions from django.urls 2018-03-24 23:58:39 +00:00
David Taylor
a26e65073c Add no sandbox flag
See https://github.com/travis-ci/docs-travis-ci-com/pull/1671 for more info
2018-03-24 22:19:10 +00:00
David Taylor
0ccb669019 Add failing test for ICAL end time issue 2017-09-25 22:58:36 +01:00
David Taylor
f9389e3996 PEP8 all the things 2017-09-22 14:57:14 +01:00
David Taylor
131ff3e612 Fix chromedriver issues, and run headless on travis (#310)
* Fix chromedriver issues, and run headless on travis

* Explicitly set chrome window size

* Use travis chrome

* Try chrome beta

* Update chromedriver

* Remove virtual display from travis config
2017-09-22 14:24:20 +01:00
David Taylor
0aec836b1a Fix iCal tests 2017-09-04 23:19:22 +01:00
David Taylor
3035320e82 Run through 2-to-3 converter. This is not in a working state 2017-09-04 23:19:22 +01:00
David Taylor
7ec09fb774 Use chrome natively on Travis, hopefully faster 2017-05-25 14:23:34 +01:00
Tom Price
c6b7bbc219 Change to just using online auth for internal clients.
This effectively reverts 067e03b.
2017-05-23 18:19:02 +01:00
David Taylor
75a3059c88 Add failing duplicate test 2017-05-18 18:02:29 +01:00
David Taylor
b6e4c0ed14 Merge branch 'master' into feature/online-auth
# Conflicts:
#	RIGS/test_functional.py
2017-05-18 17:49:54 +01:00
David Taylor
cb23fd183e Add failing test 2017-05-16 14:50:18 +01:00
David Taylor
fbc039c274 Fix tests so they can actually run locally (I failed) 2017-05-16 13:58:05 +01:00
David Taylor
fdce2fa53d Update selenium, use chrome for tests, and use sauce-labs for CI integration tests 2017-05-15 21:46:00 +01:00
David Taylor
36d258253f Fix issues caused by dependency upgrades 2017-05-12 21:32:17 +01:00
David Taylor
f8aaf9f36e Merge branch 'master' into feature/online-auth
# Conflicts:
#	RIGS/rigboard.py
#	RIGS/test_functional.py
#	RIGS/urls.py
#	requirements.txt
2017-05-12 20:53:00 +01:00
David Taylor
e573088c5e Fix some issues caused by changes made over the last year 2017-05-10 17:51:55 +01:00
David Taylor
7ac9eef7a2 Merge master into python-deps
# Conflicts:
#	PyRIGS/settings.py
#	RIGS/admin.py
#	RIGS/models.py
#	RIGS/test_functional.py
#	RIGS/urls.py
#	requirements.txt
#	wercker.yml
2017-05-10 17:32:21 +01:00
David Taylor
286e4314f5 Require users to have nottinghamtec.co.uk address before allowing them to send messages to clients 2017-05-10 15:39:13 +01:00
Tom Price
331dab20f7 Add basic tracking of when an event authorisation request was sent.
Designed and requested by Ross because he can't remember if he's push a button...
2017-04-19 18:14:36 +01:00
Tom Price
430862b24d Add tracking of who sent the link 2017-04-11 15:52:38 +01:00
Tom Price
5be3842aea Fix test client login because we are still using Django 1.8 2017-04-10 23:28:00 +01:00
Tom Price
067e03b757 Remove Event.purchase_order in favour of a simple EventAuthorisation object. 2017-04-10 23:16:50 +01:00
Tom Price
22119a3d08 Add test for sending authorisation email to client 2017-04-10 20:50:28 +01:00
Tom Price
7fd0c50146 Add sending of emails to clients.
Add email sending methods.

Add TEC side sending of emails.
2017-04-10 20:39:19 +01:00
Tom Price
97b11eabbd Add test for sending emails.
Add backup email if there isn't an MIC
2017-04-10 19:28:35 +01:00
Tom Price
1670b190c2 Add tests for the client side authorisation 2017-04-10 18:11:49 +01:00
David Taylor
b939bc5a64 Do not display "not saved" message when the event has been saved 2016-10-23 14:05:25 +01:00
David Taylor
90c8b19915 Added tests for PO non-duplication 2016-10-23 12:45:27 +01:00
Tom Price
84393e9e4a Modify user creation test to replicate special character issue in #251 2016-07-11 23:26:43 +01:00
Tom Price
8cfda69717 Set wercker up to use postgres for tests again.
Modify the tests to be postgres compatible by using more pointers to things rather than getting them everytime.
2016-03-31 16:03:07 +01:00
Tom Price
98ee9bb0db Fix imports in tests 2016-03-31 12:13:11 +01:00
Tom Price
2ee7c064af Add a dirty work around for wercker not quite working correctly. 2016-03-18 16:48:43 +00:00
Tom Price
4370cf60d1 And yet some more waits 2016-03-17 18:44:03 +00:00
Tom Price
e7496a9d82 Add some more waits for animations in failing test 2016-03-17 18:37:15 +00:00
Tom Price
77f7a25fa8 Try maximising firefox so it is large enough to pass the test 2016-03-17 18:06:37 +00:00
Tom Price
10c5ea3e7c Add a wait for the animation to complete during event creation. 2016-03-17 17:47:02 +00:00
David Taylor
c6b45da72c Made tests more reliable - wait for success page to load before checking item exists in database 2016-03-16 12:49:42 +00:00
Tom Price
29126a558b Make the captcha Foxtrot Oscar from the functional tests 2016-01-04 23:38:17 +00:00
David Taylor
0b5936be90 Added test for rig/non-rig changing 2015-10-11 11:39:33 +01:00