To test it, look at the test case provided in #67. It should work there. It should also work in the following situations (in the example tests below, M is the result of the test on the master branch, and `B' is the result on this branch when I tested it).
Test A
Go to homepage.
Select any councilmember's district from the top navigation drop down menu.
Go back.
We should be on the homepage again.
M: fails
B: pass
Test B
Go to homepage.
Select district 1.
Select district 2.
Go back.
We should be on district 1's page.
M: fails
B: pass
Test C
Go to homepage.
Click example address.
We should see district 3 highlighted and that district's results shown, with the marker near Baseline Rd.
Click back.
We should be on the homepage.
M: fails (requires two clicks, as above)
B: pass
Test D
Go to homepage.
Wait for district boundaries to load.
Drag marker to location in another district.
We should see that district highlighted and it's results shown.
Drag marker to another district.
We should see the new district highlighted and it's results shown.
click back
We should see the first district highlighted and it's results shown.
Click back.
We should see the homepage.
M: fails (and if you go back too far, you get some json stuff at http://localhost:3000/?lat=33.38128611549358&lng=-111.80408477783203; as you click back, the page isn't updated but the address bar is, and eventually you are at localhost:3000 and going back one more gives unexpected json output).
B: pass
Test E
Go to homepage.
Type '455 W Baseline Rd, Mesa AZ' in the address search field and click the button.
We should see district 3 highlighted and that district's results shown, with the marker near Baseline Rd.
Enter an address in district 4 (20 E Main St, Mesa AZ)
We should see district 4 highlighted and that district's results shown, with the marker at the address you specified.
Drag the marker to district 5.
The marker should stay where you dropped it, in district 5. That district should be highlighted and its results shown.
Drag the marker to district 6.
The marker should stay where you dropped it, in district 6. That district should be highlighted and its results shown.
Click back.
We should see the results from district 5.
Click back.
We should see the results from district 4.
Click back.
We should see the results from district 3.
Click back.
We should see the home page.
M: fails
B: pass
Test F:
Go to codeforamerica.org
Go to homepage (type the url in the addressbar).
Click back.
We should see codeforamerica.org
M: pass
B: pass
Test G:
Go to homepage.
Drag the marker to a district on the map (ex: D1)
Select a different district from the menu (ex: D2)
This fixes #67
To test it, look at the test case provided in #67. It should work there. It should also work in the following situations (in the example tests below,
M
is the result of the test on the master branch, and `B' is the result on this branch when I tested it).Test A
M: fails B: pass
Test B
M: fails B: pass
Test C
M: fails (requires two clicks, as above) B: pass
Test D
M: fails (and if you go back too far, you get some json stuff at http://localhost:3000/?lat=33.38128611549358&lng=-111.80408477783203; as you click back, the page isn't updated but the address bar is, and eventually you are at localhost:3000 and going back one more gives unexpected json output).
B: pass
Test E
M: fails B: pass
Test F:
M: pass B: pass
Test G:
M: Broken, you might see a bunch of json. B: pass