Skip to content

Commit

Permalink
update more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ashton22305 committed Jun 5, 2024
1 parent 097060d commit b972ac9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions apps/dashboard/test/system/project_manager_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def add_auto_environment_variable(project_id, script_id, save: true)
HEREDOC

success_message = I18n.t('dashboard.jobs_scripts_created')
assert_selector('.alert-success', text: "×\nClose\n#{success_message}")
assert_selector('.alert-success', text: "Close\n#{success_message}")
assert_equal(expected_yml, File.read("#{dir}/projects/#{project_id}/.ondemand/scripts/#{script_id}/form.yml"))

launcher_path = project_launcher_path(project_id, script_id)
Expand Down Expand Up @@ -304,7 +304,7 @@ def add_auto_environment_variable(project_id, script_id, save: true)
HEREDOC

success_message = I18n.t('dashboard.jobs_scripts_created')
assert_selector('.alert-success', text: "×\nClose\n#{success_message}")
assert_selector('.alert-success', text: "Close\n#{success_message}")
assert_equal(expected_yml, File.read("#{dir}/projects/#{project_id}/.ondemand/scripts/#{script_id}/form.yml"))
end
end
Expand Down Expand Up @@ -475,7 +475,7 @@ def add_auto_environment_variable(project_id, script_id, save: true)
.returns(['', 'some error message', exit_failure])

click_on 'Launch'
assert_selector('.alert-danger', text: "×\nClose\nsome error message")
assert_selector('.alert-danger', text: "Close\nsome error message")
assert_nil YAML.safe_load(File.read("#{script_dir}/job_history.log"))
end
end
Expand Down Expand Up @@ -552,7 +552,7 @@ def add_auto_environment_variable(project_id, script_id, save: true)
# correctly saves
click_on(I18n.t('dashboard.save'))
success_message = I18n.t('dashboard.jobs_scripts_updated')
assert_selector('.alert-success', text: "×\nClose\n#{success_message}")
assert_selector('.alert-success', text: "Close\n#{success_message}")
assert_current_path project_path(project_id)

# note that bc_num_hours has default, min & max
Expand Down Expand Up @@ -639,7 +639,7 @@ def add_auto_environment_variable(project_id, script_id, save: true)
# correctly saves
click_on(I18n.t('dashboard.save'))
success_message = I18n.t('dashboard.jobs_scripts_updated')
assert_selector('.alert-success', text: "×\nClose\n#{success_message}")
assert_selector('.alert-success', text: "Close\n#{success_message}")
assert_current_path project_path(project_id)

expected_yml = <<~HEREDOC
Expand Down Expand Up @@ -728,7 +728,7 @@ def add_auto_environment_variable(project_id, script_id, save: true)
project_id = setup_project(dir)
visit project_launcher_path(project_id, '1')
assert_current_path("/projects/#{project_id}")
assert_selector('.alert-danger', text: "×\nClose\nCannot find script 1")
assert_selector('.alert-danger', text: "Close\nCannot find script 1")
end
end

Expand All @@ -737,7 +737,7 @@ def add_auto_environment_variable(project_id, script_id, save: true)
project_id = setup_project(dir)
visit edit_project_launcher_path(project_id, '1')
assert_current_path("/projects/#{project_id}")
assert_selector('.alert-danger', text: "×\nClose\nCannot find script 1")
assert_selector('.alert-danger', text: "Close\nCannot find script 1")
end
end

Expand Down

0 comments on commit b972ac9

Please sign in to comment.