1
1
mirror of https://github.com/aelve/guide.git synced 2024-12-27 06:45:16 +03:00

[tests] Cancel discards edit

This commit is contained in:
Artyom 2016-09-18 02:14:19 +03:00
parent d420077f36
commit a77a36ff17

View File

@ -353,7 +353,15 @@ itemTests = session "items" $ using Firefox $ do
val <- getValue (form :// "textarea")
val `shouldBe` "foo *bar*\n\n# Blah"
click (form :// ".cancel")
-- TODO: check that edit and then cancel discards the edit
wd "edit-cancel-edit works" $ do
-- It should not store the edited text if it wasn't saved
do form <- openItemDescriptionEditForm item1
setInput "ehhhh" (form :// "textarea")
click (form :// ".cancel")
do form <- openItemDescriptionEditForm item1
val <- getValue (form :// "textarea")
val `shouldBe` "foo *bar*\n\n# Blah"
click (form :// ".cancel")
-- TODO: pros/cons
describe "ecosystem" $ do
wd "default state" $ do