scidea-schools 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. data/MIT-LICENSE +7 -0
  2. data/README.md +1 -0
  3. data/Rakefile +2 -0
  4. data/app/assets/javascripts/backbone_apps/models/school.js +13 -0
  5. data/app/assets/javascripts/backbone_apps/school_selector.js +396 -0
  6. data/app/assets/stylesheets/scidea/admin/pages/schools/edit_user.css +57 -0
  7. data/app/assets/stylesheets/scidea/admin/pages/schools/user_migrate.css +3 -0
  8. data/app/assets/stylesheets/scidea/pages/schools/user_profile.css +53 -0
  9. data/app/controllers/admin/schools_controller.rb +125 -0
  10. data/app/controllers/application_controller.rb +5 -0
  11. data/app/controllers/schools_controller.rb +58 -0
  12. data/app/controllers/test/scidea_schools_qunit_tests_controller.rb +51 -0
  13. data/app/helpers/schools_helper.rb +22 -0
  14. data/app/models/school.rb +93 -0
  15. data/app/themes/global_sass/_mixins.scss +5 -0
  16. data/app/themes/scidea/sass/_config.scss +7 -0
  17. data/app/themes/scidea/sass/admin/pages/schools/edit_user.scss +14 -0
  18. data/app/themes/scidea/sass/admin/pages/schools/user_migrate.scss +21 -0
  19. data/app/themes/scidea/sass/components/_schools.scss +170 -0
  20. data/app/themes/scidea/sass/pages/schools/user_profile.scss +6 -0
  21. data/app/views/admin/schools/_form.html.erb +20 -0
  22. data/app/views/admin/schools/_school.html.erb +10 -0
  23. data/app/views/admin/schools/_search.html.erb +14 -0
  24. data/app/views/admin/schools/confirm_migration.html.erb +17 -0
  25. data/app/views/admin/schools/edit.html.erb +7 -0
  26. data/app/views/admin/schools/index.html.erb +60 -0
  27. data/app/views/admin/schools/new.html.erb +5 -0
  28. data/app/views/admin/schools/new_migration.html.erb +76 -0
  29. data/app/views/admin/schools/show.html.erb +46 -0
  30. data/app/views/admin/users/_profile_show_school.html.erb +4 -0
  31. data/app/views/admin/users/_school_edit.html.erb +5 -0
  32. data/app/views/layouts/application.html.erb +14 -0
  33. data/app/views/schools/_form.html.erb +19 -0
  34. data/app/views/schools/_profile_form.html.erb +43 -0
  35. data/app/views/schools/_script_form.html.erb +3 -0
  36. data/app/views/schools/_search.html.erb +6 -0
  37. data/app/views/users/_school_edit.html.erb +5 -0
  38. data/config/compass.rb +28 -0
  39. data/config/cucumber.yml +8 -0
  40. data/config/environment.rb +18 -0
  41. data/config/initializers/schools_assets.rb +6 -0
  42. data/config/locales/en.yml +8 -0
  43. data/config/requirejs.yml +2 -0
  44. data/config/routes.rb +25 -0
  45. data/db/seeds.rb +14 -0
  46. data/features/applying_for_seminars.feature +0 -0
  47. data/features/edit_seminar_application.feature +42 -0
  48. data/features/manage_users.feature +23 -0
  49. data/features/qunit/qunit.feature +7 -0
  50. data/features/schools/manage_schools.feature +87 -0
  51. data/features/schools/schools.feature +208 -0
  52. data/features/step_definitions/audience_steps.rb +10 -0
  53. data/features/step_definitions/authentication_steps.rb +34 -0
  54. data/features/step_definitions/custom_form_steps.rb +33 -0
  55. data/features/step_definitions/email_steps.rb +206 -0
  56. data/features/step_definitions/menu_steps.rb +4 -0
  57. data/features/step_definitions/misc_steps.rb +52 -0
  58. data/features/step_definitions/qunit_steps.rb +20 -0
  59. data/features/step_definitions/registration_steps.rb +17 -0
  60. data/features/step_definitions/school_steps.rb +35 -0
  61. data/features/step_definitions/seminar_application_steps.rb +16 -0
  62. data/features/step_definitions/seminar_steps.rb +5 -0
  63. data/features/step_definitions/steps.rb +0 -0
  64. data/features/step_definitions/user_steps.rb +16 -0
  65. data/features/step_definitions/web_steps.rb +211 -0
  66. data/features/support/env.rb +21 -0
  67. data/features/support/hooks.rb +16 -0
  68. data/features/support/paths.rb +39 -0
  69. data/features/support/seed_user_roles.rb +16 -0
  70. data/features/support/selectors.rb +66 -0
  71. data/lib/generators/scidea/schools/migrations_generator.rb +14 -0
  72. data/lib/generators/scidea/schools/removal_migrations_generator.rb +14 -0
  73. data/lib/generators/scidea/schools/templates/removal/scidea_schools_99_remove.rb +35 -0
  74. data/lib/generators/scidea/schools/templates/scidea_schools_01_install.rb +35 -0
  75. data/lib/scidea/schools/engine.rb +31 -0
  76. data/lib/scidea/schools/models/ability.rb +28 -0
  77. data/lib/scidea/schools/models/profile.rb +25 -0
  78. data/lib/scidea/schools/version.rb +5 -0
  79. data/lib/scidea/schools.rb +5 -0
  80. data/lib/scidea-schools.rb +1 -0
  81. data/lib/tasks/db/seed.rake +5 -0
  82. data/qunit/helpers/qunit.js +1598 -0
  83. data/qunit/html_fixtures/backbone_apps/_school_selector.html.erb +16 -0
  84. data/qunit/test_runner.html.erb +25 -0
  85. data/qunit/tests/backbone_apps/school_selector.js +50 -0
  86. data/spec/factories/schools.rb +10 -0
  87. data/spec/models/ability_spec.rb +27 -0
  88. data/spec/models/profile_spec.rb +38 -0
  89. data/spec/models/school_spec.rb +304 -0
  90. data/spec/routing/admin/admin_schools_routing_spec.rb +47 -0
  91. data/spec/routing/schools_routing_spec.rb +35 -0
  92. data/spec/spec_helper.rb +48 -0
  93. metadata +249 -0
@@ -0,0 +1,46 @@
1
+ <% page_title 'Educational Institution Detail' %>
2
+
3
+ <p>
4
+ <b>Name</b>:
5
+ <%= @school.name %>
6
+ </p>
7
+
8
+ <p>
9
+ <b>Address</b>:
10
+ <%= @school.address_1 %>
11
+ </p>
12
+
13
+ <p>
14
+ <b>Address 2</b>:
15
+ <%= @school.address_2 if @school.address_2 && !@school.address_2.empty? %>
16
+ </p>
17
+
18
+ <p>
19
+ <b>City</b>:
20
+ <%= @school.city %>
21
+ </p>
22
+
23
+ <p>
24
+ <b>State</b>:
25
+ <%= GeographicalRegions.us_state_by_abbreviation @school.state %>
26
+ </p>
27
+
28
+ <p>
29
+ <b>Zipcode</b>:
30
+ <%= @school.zipcode %>
31
+ </p>
32
+
33
+ <p>
34
+ <b>Phone</b>:
35
+ <%= @school.phone %>
36
+ </p>
37
+
38
+ <p>
39
+ <b>Approved</b>:
40
+ <%= @school.approved ? 'Yes' : 'No' %>
41
+ </p>
42
+
43
+
44
+ <%= link_to 'Edit', edit_admin_school_path(@school) %> |
45
+ <%= link_to 'Migrate Users to Different Educational Institution', migration_new_admin_school_path(@school) %> |
46
+ <%= link_to 'Manage Educational Institutions', admin_schools_path %>
@@ -0,0 +1,4 @@
1
+ <% if user.profile.school %>
2
+ <dt>Educational Institution:</dt>
3
+ <dd><%= user.profile.school.name %></dd>
4
+ <% end %>
@@ -0,0 +1,5 @@
1
+ <% css do
2
+ stylesheet_link_tag 'scidea/admin/pages/schools/edit_user'
3
+ end %>
4
+ <%= render :partial => 'schools/script_form', :locals => { :form => form } %>
5
+ <%= render :partial => 'schools/profile_form', :locals => { :form => form } %>
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Schools</title>
5
+ <%= stylesheet_link_tag :all %>
6
+ <%= javascript_include_tag :defaults %>
7
+ <%= csrf_meta_tag %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,19 @@
1
+ <% school = defined?(@school) ? @school : School.new %>
2
+
3
+ <%= render :partial => 'shared/form_errors', :locals => { :object => school } %>
4
+
5
+ <%= semantic_form_for school do |f| %>
6
+ <%= f.inputs :id => "new-school-fields" do %>
7
+ <%= f.input :name %>
8
+ <%= f.input :address_1 %>
9
+ <%= f.input :address_2 %>
10
+ <%= f.input :city %>
11
+ <%= f.input :state, :as => :select, :collection => GeographicalRegions.all_us_states_as_select_field_pairs %>
12
+ <%= f.input :zipcode, :input_html => { :maxlength => '5' } %>
13
+ <%= f.input :phone, :as => :string %>
14
+ <% end %>
15
+ <fieldset class="buttons">
16
+ <%= f.submit "#{school.new_record? ? 'Add' : 'Update'} Institution", :id => 'school_submit' %>
17
+ <a href="#cancel-edit-school">Cancel</a>
18
+ </fieldset>
19
+ <% end %>
@@ -0,0 +1,43 @@
1
+ <li id="profile-school">
2
+ <fieldset id="school-selection-fields">
3
+ <legend>Educational Institution <abbr title="required">*</abbr></legend>
4
+ <ol>
5
+ <li class="string required" id="school-select-zipcode-input">
6
+ <label for="school-select-zipcode">Educational Institution Zipcode</label>
7
+ <input type="text"
8
+ id="school-select-zipcode"
9
+ name="school_zipcode"
10
+ data-partial-pattern="\d{5}"
11
+ pattern="\d{5}"
12
+ data-minlength="5"
13
+ maxlength="5"
14
+ data-errormessage="Invalid zipcode"
15
+ required="required"
16
+ placeholder="zipcode"
17
+ value="<%= school_select_zipcode(form.object.school, params) %>" />
18
+ </li>
19
+
20
+ <%= form.input :school,
21
+ :as => :select,
22
+ :collection => [['Select an Educational Institution', '']],
23
+ :include_blank => false,
24
+ :input_html => {
25
+ :id => 'school-id',
26
+ 'data-selected-id' => school_selected_id(form.object.school, params),
27
+ :disabled => "disabled",
28
+ :required => "required"
29
+ },
30
+ :wrapper_html => { :class => 'select required', :id => 'school-id-input' } %>
31
+
32
+ </ol>
33
+ <p id="schools-initial-message" class="inline-hints">Provide your institution&rsquo;s zipcode before selecting an institution.</p>
34
+ <p id="schools-not-found-message" class="inline-hints">No institutions were found for zipcode. Try another one or <a href="#select-new-school">use the new institution you added.</a><a href="#add-new-school">add a new institution.</a><%= link_to 'add a new institution.', new_admin_school_path, :id => "admin-new-school" %> </p>
35
+ </fieldset>
36
+ <div id="new-school">
37
+ <p id="new-school-actions" class="inline-hints">
38
+ <span id="add-school">Don&rsquo;t see your institution? <a href="#add-new-school" style="width: 200px; height: 1em;">Add a new one.</a><%= link_to 'Add a new one.', new_admin_school_path, :id => "admin-new-school" %></span>
39
+ <span id="edit-school">Made a mistake while typing your institution information? No problem, you can still <a href="#edit-new-school">edit it.</a></span>
40
+ </p>
41
+ <div id="new-school-form"></div>
42
+ </div>
43
+ </li>
@@ -0,0 +1,3 @@
1
+ <script type="text/template" id="new-school-form-tpl">
2
+ <%= render :partial => 'schools/form' %>
3
+ </script>
@@ -0,0 +1,6 @@
1
+ <% unless @schools.empty? %>
2
+ <option value="">Select an institution</option>
3
+ <% @schools.each do |school| %>
4
+ <option<%= raw(' selected="selected"') if @selected_school == school %> value="<%= school.id %>"><%= school.name %></option>
5
+ <% end %>
6
+ <% end %>
@@ -0,0 +1,5 @@
1
+ <% css do
2
+ stylesheet_link_tag 'scidea/pages/schools/user_profile'
3
+ end %>
4
+ <%= render :partial => 'schools/script_form', :locals => { :form => form } %>
5
+ <%= render :partial => 'schools/profile_form', :locals => { :form => form } %>
data/config/compass.rb ADDED
@@ -0,0 +1,28 @@
1
+ # This configuration file works with both the Compass command line tool and within Rails.
2
+ # Require any additional compass plugins here.
3
+ project_type = :rails
4
+
5
+ # Set this to the root of your project when deployed:
6
+ http_path = "/"
7
+ css_dir = "app/assets/stylesheets/scidea"
8
+ sass_dir = "app/themes/scidea/sass"
9
+
10
+ # You can select your preferred output style here (can be overridden via the command line):
11
+ output_style = :compact
12
+
13
+ # To enable relative paths to assets via compass helper functions. Uncomment:
14
+ # relative_assets = true
15
+
16
+ # To disable debugging comments that display the original location of your selectors. Uncomment:
17
+ line_comments = false
18
+
19
+
20
+ # If you prefer the indented syntax, you might want to regenerate this
21
+ # project again passing --syntax sass, or you can uncomment this:
22
+ # preferred_syntax = :sass
23
+ # and then run:
24
+ # sass-convert -R --from scss --to sass app/stylesheets scss && rm -rf sass && mv scss sass
25
+
26
+ sass_options = {
27
+ :debug_info => false
28
+ }
@@ -0,0 +1,8 @@
1
+ <%
2
+ rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
3
+ rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
4
+ std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip"
5
+ %>
6
+ default: <%= std_opts %> features -r features
7
+ wip: --tags @wip:3 --wip features
8
+ rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
@@ -0,0 +1,18 @@
1
+ # Load schools Gemfile and get the path to the local core application
2
+ # (from standard rails config/boot.rb)
3
+ gemfile = File.expand_path('../../Gemfile', __FILE__)
4
+ begin
5
+ ENV['BUNDLE_GEMFILE'] = gemfile
6
+ require 'bundler'
7
+ Bundler.setup
8
+ rescue Bundler::GemNotFound => e
9
+ STDERR.puts e.message
10
+ STDERR.puts "Try running `bundle install`."
11
+ exit!
12
+ end if File.exist?(gemfile)
13
+
14
+ # get only the paths constants; let scidea core load all gems
15
+ require 'scidea/paths.rb'
16
+
17
+ # Load and initialize the Scidea core application
18
+ require File.expand_path('../config/environment', Scidea::APP_PATH)
@@ -0,0 +1,6 @@
1
+ Phoenix::Application.configure do
2
+ config.assets.precompile += ['scidea/admin/pages/schools/edit_user.css',
3
+ 'scidea/admin/pages/schools/user_migrate.css',
4
+ 'scidea/pages/schools/user_profile.css']
5
+ end
6
+
@@ -0,0 +1,8 @@
1
+ en:
2
+ activerecord:
3
+ models:
4
+ school:
5
+ zero: educational institutions
6
+ one: educational institution
7
+ few: educational institutions
8
+ other: educational institutions
@@ -0,0 +1,2 @@
1
+ modules:
2
+ - name: 'backbone_apps/school_selector'
data/config/routes.rb ADDED
@@ -0,0 +1,25 @@
1
+ Rails.application.routes.draw do
2
+ resources :schools, :only => [:index, :create, :update, :edit]
3
+
4
+ namespace 'admin' do
5
+ resources :schools do
6
+ member do
7
+ get "migration/new", :action => :new_migration
8
+ get "migration/:target_school_id/confirm", :action => :confirm_migration, :as => 'confirm_migration'
9
+ post "migration/:target_school_id",
10
+ :action => :create_migration,
11
+ :constraints => { :target_school_id => /\d+/ },
12
+ :as => 'create_migration'
13
+ end
14
+ end
15
+ end
16
+
17
+ # non-production routes
18
+ unless Rails.env.production?
19
+ namespace 'test' do
20
+ get 'scidea_schools_qunit_tests', :to => 'scidea_schools_qunit_tests#index'
21
+ get 'scidea_schools_qunit_tests/*test_names', :to => 'scidea_schools_qunit_tests#index'
22
+ end
23
+ end
24
+
25
+ end
data/db/seeds.rb ADDED
@@ -0,0 +1,14 @@
1
+ admin_nav_secondary = Menu.find_or_create_by_name(:name => "Admin Navigation: Secondary")
2
+
3
+ # Helper method for assigning roles to menu elements and subelements
4
+ def roles_to_list(role_array)
5
+ role_array.map{ |r| r.id.to_s }.join(',')
6
+ end
7
+
8
+ MenuElement.find_or_create_by_display_name(
9
+ :display_name => "Educational Institutions",
10
+ :menu => admin_nav_secondary,
11
+ :url => "/admin/schools",
12
+ :view_role_list => roles_to_list([Role.course_admin, Role.scitent_admin]),
13
+ :edit_role_list => roles_to_list([Role.product_admin, Role.scitent_admin]),
14
+ :order_sequence => 102)
File without changes
@@ -0,0 +1,42 @@
1
+ Feature: edit seminar application
2
+ As an admin, I want to edit a seminar application, so that I can take action to approve/deny/wailist it.
3
+
4
+ Background:
5
+ Given there exists a menu element "Seminars" linking to "/admin/seminars" for menu "Admin Navigation: Secondary"
6
+ Given I login as a new "course admin"
7
+
8
+ Scenario: a seminar application status is updated, triggering an email to the applicant
9
+ Given there exists a seminar application for seminar "first seminar" and user "one@scitent.com" named "aaa"
10
+ Given user "one@scitent.com" has school "Madison School"
11
+ Given seminar "first seminar" has application form "my application"
12
+ Given there exists a "required" "text field" field "my text" in "my application"
13
+ Given there exists a "dropdown list" field "my dropdown list" in "my application" with options "first,second,third"
14
+ Given field "my text" in seminar application form "my application" for user "one@scitent.com" is set to "blah"
15
+ Given field "my dropdown list" in seminar application form "my application" for user "one@scitent.com" is set to "second"
16
+ When I follow "Seminars"
17
+ And I follow "All Applications"
18
+ And I should see "aaa, aaa"
19
+ And I should see "Displaying 1 seminar application"
20
+ Given a clear email queue
21
+ When I follow "Edit"
22
+ Then I should see "Editing Seminar Application"
23
+ And I should see "first seminar"
24
+ And I should see "aaa"
25
+ And I should see "one@scitent.com"
26
+ And I should see "Madison School"
27
+ And "second" should be selected for "my dropdown list"
28
+ And the "my text" field should contain "blah"
29
+ And "seminar_application[status]" should not contain option "Enrolled"
30
+ When I select "Approved" from "seminar_application[status]"
31
+ And I fill in "my text" with ""
32
+ And I check "Waive fee"
33
+ And I press "Submit"
34
+ Then I should see "can't be blank"
35
+ And "Approved" should be selected for "seminar_application[status]"
36
+ And I fill in "my text" with "some text"
37
+ And I press "Submit"
38
+ Then I should see "Seminar application was successfully updated."
39
+ Then "one@scitent.com" should receive an email
40
+ When "one@scitent.com" opens the email with subject "Seminar Application Approved"
41
+ When they click the first link in the email
42
+ Then I should be on the learner dashboard
@@ -0,0 +1,23 @@
1
+ Feature: admins manage users
2
+ As an admin I want to manage users
3
+
4
+ Background:
5
+ Given there exists a menu element "Users" linking to "/admin/users" for menu "Admin Navigation: Secondary"
6
+ Given I login as a new "scitent admin"
7
+
8
+ @javascript
9
+ Scenario: admin edits user
10
+ Given there exists learner "aaa@test.local" named "bbb"
11
+ Given user "aaa@test.local" has school "Madison School"
12
+ When I follow "Users"
13
+ When I fill in "search" with "bbb"
14
+ And I press "Search"
15
+ Then I should see "bbb"
16
+ When I follow "Edit"
17
+ When I fill in "user[profile_attributes][last_name]" with "zzz"
18
+ When I fill in "user[profile_attributes][first_name]" with "zzz"
19
+ Then I should see "Madison School"
20
+ And I press "Update"
21
+ When I follow "Users"
22
+ Then I should see "zzz, zzz"
23
+ And I should not see "bbb, bbb"
@@ -0,0 +1,7 @@
1
+ Feature: JavaScript Unit Tests
2
+ As a developer, I want to ensure correct presentation logic
3
+
4
+ @javascript
5
+ Scenario: schools in the profile form
6
+ And I run the qunit tests
7
+ Then I should see no qunit failures
@@ -0,0 +1,87 @@
1
+ Feature: admins manage schools
2
+ As an admin I want to manage subtopics
3
+
4
+ Background:
5
+ Given there exists a menu element "Educational Institution" linking to "/admin/schools" for menu "Admin Navigation: Secondary"
6
+
7
+ Given there exists a menu element "Schools" linking to "/admin/schools" for menu "Admin Navigation: Secondary"
8
+ Given I login as a new "scitent admin"
9
+
10
+ Scenario: admin creates school
11
+ When I follow "Schools"
12
+ And I follow "New Educational Institution"
13
+ And I fill in "Name" with "My Favorite School"
14
+ And I fill in "Address" with "400 Preston"
15
+ And I fill in "Address 2" with "Ste 300"
16
+ And I fill in "City" with "400 Preston"
17
+ And I select "Virginia" from "State"
18
+ And I fill in "Zipcode" with "22902"
19
+ And I fill in "Phone" with "9393939393"
20
+ And I check "Approved"
21
+ And I press "Submit"
22
+ Then I should see "Educational institution was successfully created."
23
+ And I should see "My Favorite School"
24
+ And I should see "Virginia"
25
+ And I should see "22902"
26
+ And I should see "Yes"
27
+
28
+ Scenario: admin searches/sorts/paginates schools
29
+ Given there exists a school "My Favorite School"
30
+ Given there exists a school "Your Favorite School"
31
+ When I follow "Schools"
32
+ Then the 1st non-link item in the table should be "My Favorite School"
33
+ When I follow "Name"
34
+ Then the 1st non-link item in the table should be "Your Favorite School"
35
+ When I fill in "search" with "My"
36
+ And I press "Search"
37
+ Then I should see "My Favorite School"
38
+ And I should not see "Your Favorite School"
39
+
40
+ Scenario: admin edits school
41
+ Given there exists a school "My Favorite School"
42
+ When I follow "Schools"
43
+ When I follow "Edit"
44
+ When I fill in "Name" with "Nobody's Favorite School"
45
+ And I press "Submit"
46
+ And I should not see "My Favorite School"
47
+
48
+ Scenario: admin approves a school
49
+ Given there exists an unapproved school "My Favorite School"
50
+ When I follow "Schools"
51
+ When I follow "Edit"
52
+ When I check "Approved"
53
+ And I press "Submit"
54
+ Then I should see "Approved: Yes"
55
+
56
+ Scenario: admin migrates all users from a school to another because it is a duplicate
57
+ Given there exists a learner associated with the school "Richard Nixon School of Presidentialism"
58
+ Given there exists a school "Nixon School of Presidentialism"
59
+ Given there exists a school "Richard M. Nixon School" in "Yorba Linda, CA"
60
+ Given there exists a school "My Favorite School"
61
+ When I follow "Schools"
62
+ When I fill in "search" with "Richard Nixon School"
63
+ And I press "Search"
64
+ And I follow "Edit"
65
+ And I follow "Migrate Users to Different Educational Institution"
66
+ And I fill in "search" with "Richard M. Nixon"
67
+ And I press "Search"
68
+ Then I should see "Yorba Linda"
69
+ And I should see "CA"
70
+ And I should see "Richard M. Nixon School"
71
+ And I follow "Choose"
72
+ Then the page title should contain "Confirm User Migration between Educational Institution"
73
+ Then I should see "Richard Nixon School of Presidentialism"
74
+ And I should see "Yorba Linda"
75
+ And I press "Yes, Migrate Users"
76
+ Then I should see "Successfully migrated 1 user from Richard Nixon School of Presidentialism to Richard M. Nixon School"
77
+ And the page title should contain "Manage Educational Institutions"
78
+
79
+ @javascript
80
+ Scenario: admin deletes a school
81
+ Given there exists a school "UVA"
82
+ When I follow "Schools"
83
+ Then I should see "UVA"
84
+ When I follow "Delete"
85
+ When I accept the popup
86
+ Then I should not see "UVA"
87
+ And the page title should contain "Manage Educational Institutions"