opentechinstitute/luci-commotion — pull request #41 by gradyoti (2013-10-29 21:43:08+00:00)
Title: Issue20

Added test for name collisions with uploaded profiles, including a warning and a prompt to allow the user to overwrite the existing profile with the same name.

To test:
1) Upload a profile (for instance, "TEST") (must be valid profile)
2) Change one value in the profile (but not the name). Example: ssid was "TEST", change it to "TESTover"
3) Upload the profile again, you should be prompted with a warning and a set of options
4) Click "No, I will rename the file and upload later", then "Confirm". Check the profile "TEST" in etc/commotion/profiles.d/ to confirm that the previous TEST profile was not overwritten
5) Upload the profile again, click "Yes, please overwrite the existing profile". Check the profile in profiles.d/ to confirm that TEST was in fact overwritten with the new ssid value
6) After clicking "confirm", you should see the default meshprofile page (no warning or overwrite options)

Serve chilled.