Skip to content

Commit 61e6664

Browse files
precillapPrecilla Prempehbessleefaisonr
authored
Tests that all drupal form fields exist on the new project wizard (#1916)
* Completed testing the new project request wizard and ensuring all elements from the current druple form is present on the new wizard Co-authored-by: Bess Sadler <[email protected]> Co-authored-by: Robert-Anthony Lee-Faison <[email protected]> * Test that all drupal form fields exist on the new project wizard Co-authored-by: Bess Sadler <[email protected]> Co-authored-by: Robert-Anthony Lee-Faison <[email protected]> * Updated space ghost system spec to be more specific to the test Co-authored-by: Bess Sadler <[email protected]> Co-authored-by: Robert-Anthony Lee-Faison <[email protected]> * Fixing some comments --------- Co-authored-by: Precilla Prempeh <[email protected]> Co-authored-by: Bess Sadler <[email protected]> Co-authored-by: Robert-Anthony Lee-Faison <[email protected]> Co-authored-by: Bess Sadler <[email protected]>
1 parent 983a690 commit 61e6664

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

db/schema.rb

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/system/space_ghost_spec.rb

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
test_strategy = Flipflop::FeatureSet.current.test!
2424
test_strategy.switch!(:allow_all_users_wizard_access, true)
2525
Affiliation.load_from_file(Rails.root.join("spec", "fixtures", "departments.csv"))
26-
expect(Project.count).to eq 0
2726
another_user = FactoryBot.create(:user)
27+
expect(Project.count).to eq 0
2828
sign_in user
2929
visit "/"
3030
expect(page).to have_content("Welcome, #{user.given_name}!")
@@ -45,9 +45,13 @@
4545
expect(page).to have_content("(77777) RDSS-Research Data and Scholarship Services")
4646
expect(page).to have_field("request[departments][]", type: :hidden, with: "{\"code\":\"77777\",\"name\":\"RDSS-Research Data and Scholarship Services\"}")
4747
click_on "Next"
48+
49+
# This part of the test is filling out the data manager and sponsor
4850
expect(page).to have_content("Assign roles for your project")
4951
fill_in :request_data_sponsor, with: datasponsor.uid
5052
fill_in :request_data_manager, with: datamanager.uid
53+
54+
# This part of the test is filling out the data users
5155
click_on "Add User(s)"
5256
fill_in :user_find, with: another_user.uid
5357
sleep(1.2)
@@ -56,7 +60,13 @@
5660
select another_user_str + "\u00A0", from: "user_find"
5761
click_on "Add Users"
5862

59-
# next step is to click on "add user" then figure out how to load in the user for the druple
63+
# This part of the code is going through the rest of the fields of the wizard form to review and submit the project request
64+
click_on "Next"
65+
expect(page).to have_content("Enter the storage and access needs for your project.")
66+
click_on "Next"
67+
expect(page).to have_content("Take a moment to review your details and make any necessary edits before finalizing.")
68+
click_on "Next"
69+
expect(page).to have_content("Your new project request is submitted")
6070
test_strategy.switch!(:allow_all_users_wizard_access, false)
6171
end
6272
end

0 commit comments

Comments
 (0)