This PR tests the ability of users to create new conservation records. Anonymous and read-only users are unable to access this page, and we check that the read-only user does not have any links to create a new record.
We add in a new check for unauthorized access that checks for disabled buttons for the specified link. If a button to that link is present, it must be disabled.
We increase testing specification for flash messages with two new helper methods: flash_notice and flash_alert, specifying that the flash text should be within a flash message and either be a standard notice or a warning alert. This presumes the use of bootstrap, which we are using to manage flash messages.
We created a shared example creates new conservation records that is called on by both the admin and the standard user, who should each be able to create new conservation records.
Code that checked that the users could create new conservation records has been removed from the old tests.
Ref #214
This PR tests the ability of users to create new conservation records. Anonymous and read-only users are unable to access this page, and we check that the read-only user does not have any links to create a new record.
We add in a new check for unauthorized access that checks for disabled buttons for the specified link. If a button to that link is present, it must be disabled.
We increase testing specification for flash messages with two new helper methods:
flash_notice
andflash_alert
, specifying that the flash text should be within a flash message and either be a standard notice or a warning alert. This presumes the use of bootstrap, which we are using to manage flash messages.We created a shared example
creates new conservation records
that is called on by both the admin and the standard user, who should each be able to create new conservation records.Code that checked that the users could create new conservation records has been removed from the old tests.