behat change_account_settings.feature doesn't test functionality

Bug #1703751 reported by Rebecca Blundell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Unassigned

Bug Description

This test is currently not testing actual functionality. It should be changed to check notification options are available and to check one or two actually work.

Tags: behat
Changed in mahara:
status: New → In Progress
Changed in mahara:
importance: Undecided → Medium
milestone: none → 17.10.0
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 17.10.0 → 18.04.0
Revision history for this message
Rebecca Blundell (rjb-dev) wrote :

Actually, we already have some tests to check what options are available - We can combine those with this:
test/behat/features/settings/notification_choices.feature
This systematically tests all options are available for user and admin.
 - Change feature text to accurately describe what the test does.

test/behat/features/settings/notification_setting_order.feature
 - take out all the "I should see" steps as if they aren't on the page, the "should appear" steps won't work anyway.
 - Add the remaining steps as a Scenario called "Check options are in alphabetical order" to notification_choices.feature.
 - Delete notification_setting_order.feature

 - At the end of the main scenario of notification_choices.feature, after the I press "Save" step, add the steps:
And I should see "Preferences saved"
And I should not see "Delete account"
 - Delete the change_account_settings.feature
 - Rename notification_choices.feature as notification_settings.feature

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/8486

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

To clarify any potential ambiguities from the previous note:

- Take out all the "I should see" steps in test/behat/features/settings/notification_setting_order.feature
- Add more "should appear" steps to check that every notification type in the list is tested in their respective alphabetical order. Currently, not all notification types are checked if they are in the correct order. Only a few are checked but that wouldn't mean that the rest is in the correct order.
- Once these steps are added, take the content from that file and add it as scenario to the notification_choices.feature and make changes to the feature description as needed.
- In notification_choices.feature, after the
I press "Save" step, add the step:
And I should see "Preferences saved"

The step to not see "Delete account" is not necessary as you are on a different page.

- Rename notification_choices.feature as notification_settings.feature

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/8486
Committed: https://git.mahara.org/mahara/mahara/commit/afaf0bd872f98d5fd2153df57e31e4207f55f2e9
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit afaf0bd872f98d5fd2153df57e31e4207f55f2e9
Author: Niranjan Bandi <email address hidden>
Date: Wed Jan 31 16:01:16 2018 +1300

Bug 1703751- Check notification options

- combined notification_choices.feature into this test
- Changed feature text
- Removed And I should see steps from notification_setting_order.feature
- Deleted notification_setting_order.feature
- Added steps after saving the settings
- Renamed the file to notification_settings.feature

Change-Id: Id20a2c3407e44b35c16932d570ba7f597365f6b4

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.