Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions spec/features/plans/exports_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
select('html')
new_window = window_opened_by { click_button 'Download Plan' }
within_window new_window do
expect(page.source).to have_text(plan.title)
expect(page.title).to have_text(plan.title)
end
end

Expand All @@ -60,7 +60,7 @@
select('html')
new_window = window_opened_by { click_button 'Download Plan' }
within_window new_window do
expect(page.source).to have_text(plan.title)
expect(page.title).to have_text(plan.title)
end
end

Expand Down Expand Up @@ -91,7 +91,7 @@
click_button 'Download Plan'
end
within_window new_window do
expect(page.source).to have_text(plan.title)
expect(page.title).to have_text(plan.title)
plan.phases.each do |phase|
expect(page.source).to have_text(phase.title)
end
Expand All @@ -101,7 +101,7 @@
click_button 'Download Plan'
end
within_window new_window do
expect(page.source).to have_text(plan.title)
expect(page.title).to have_text(plan.title)
expect(page.source).to have_text(plan.phases[1].title)
expect(page.source).not_to have_text(plan.phases[2].title) if plan.phases.length > 2
end
Expand Down Expand Up @@ -173,18 +173,18 @@ def _regular_download(format)
click_button 'Download Plan'
end
within_window new_window do
expect(page.source).to have_text(plan.title)
expect(page.title).to have_text(plan.title)
end
else
click_button 'Download Plan'
expect(page.source).to have_text(plan.title)
expect(page.title).to have_text(plan.title)
end
end

def _all_phase_download
_select_option('phase_id', 'All')
click_button 'Download Plan'
expect(page.source).to have_text(plan.title)
expect(page.title).to have_text(plan.title)
plan.phases.each do |phase| # All phase titles should be included in output
expect(page.source).to have_text(phase.title)
end
Expand All @@ -193,7 +193,7 @@ def _all_phase_download
def _single_phase_download
_select_option('phase_id', plan.phases[1].id)
click_button 'Download Plan'
expect(page.source).to have_text(plan.title)
expect(page.title).to have_text(plan.title)
expect(page.source).to have_text(plan.phases[1].title)
expect(page.source).not_to have_text(plan.phases[2].title) if plan.phases.length > 2
end
Expand Down
Loading