Add integration test for folders.
authorTom Clegg <tom@curoverse.com>
Wed, 30 Apr 2014 20:57:16 +0000 (16:57 -0400)
committerTom Clegg <tom@curoverse.com>
Wed, 30 Apr 2014 20:57:16 +0000 (16:57 -0400)
apps/workbench/test/integration/folders_test.rb [new file with mode: 0644]

diff --git a/apps/workbench/test/integration/folders_test.rb b/apps/workbench/test/integration/folders_test.rb
new file mode 100644 (file)
index 0000000..4d569e4
--- /dev/null
@@ -0,0 +1,24 @@
+require 'integration_helper'
+require 'selenium-webdriver'
+require 'headless'
+
+class FoldersTest < ActionDispatch::IntegrationTest
+
+  test 'Find a folder and edit its description' do
+    Capybara.current_driver = Capybara.javascript_driver
+    visit page_with_token 'active', '/'
+    find('nav a', text: 'Folders').click
+    find('tr', text: 'A Folder').
+      find('a', text: 'zzzzz-').
+      click
+    within('.panel', text: api_fixture('groups')['afolder']['name']) do
+      find('span', text: api_fixture('groups')['afolder']['name']).click
+      find('.glyphicon-ok').click
+      find('.btn', text: 'Edit description').click
+      find('textarea').set('I just edited this.')
+      find('.glyphicon-ok').click
+    end
+    find('.panel', text: 'I just edited this.')
+  end
+
+end