Skip to content

Commit

Permalink
Merge pull request #6110 from Formasitchijoh/refactor-multiwiki-assig…
Browse files Browse the repository at this point in the history
…nment-spec

Fix: Added rapid: false parameter to textarea set method
  • Loading branch information
ragesoss authored Jan 10, 2025
2 parents 4ce9dee + 515af36 commit 4f0fbc1
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions spec/features/multiwiki_assignment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
end

it 'creates valid assignments from multiple article titles' do
pending 'Fails in CI caused by Assign all button not found'

VCR.use_cassette 'multiwiki_assignment' do
visit "/courses/#{course.slug}/students/articles"
first('.student-selection .student').click
Expand All @@ -60,7 +58,8 @@

within('#users') do
first('textarea').set(
"Terre\nhttps://fr.wikipedia.org/wiki/Anglais"
"Terre\nhttps://fr.wikipedia.org/wiki/Anglais",
rapid: false
)
end
click_button 'Assign all'
Expand All @@ -76,8 +75,6 @@
expect(page).to have_css('a[href="https://fr.wikipedia.org/wiki/Anglais"]')
expect(page).to have_css('a[href="https://fr.wikipedia.org/wiki/Terre"]')
end

pass_pending_spec
end

it 'creates a valid assignment from an article and a project and language from tracked Wikis' do
Expand All @@ -90,7 +87,7 @@
button.click

within('#users') do
find('textarea', visible: true).set('No le des prisa, dolor')
find('textarea', visible: true).set('No le des prisa, dolor', rapid: false)
click_link 'Change'
find('div.wiki-select').click
within('.wiki-select') do
Expand All @@ -112,8 +109,6 @@
end

it 'will create a valid assignment for multilingual wikisource projects' do
pending 'Fails in CI caused by Heyder Cansa content not found'

VCR.use_cassette 'multiwiki_assignment' do
visit "/courses/#{course.slug}/students/articles"
first('.student-selection .student').click
Expand All @@ -122,7 +117,7 @@
expect(button).to have_content 'Assign/remove an article'
button.click
within('#users') do
first('textarea').set('https://wikisource.org/wiki/Heyder_Cansa')
first('textarea').set('https://wikisource.org/wiki/Heyder_Cansa', rapid: false)
end
click_button 'Assign'
visit "/courses/#{course.slug}/students/articles"
Expand All @@ -134,13 +129,9 @@
expect(link[:href]).to include('wikisource')
end
end

pass_pending_spec
end

it 'will create a valid assignment for multilingual wikimedia incubator projects' do
pending 'Fails in CI caused by Wp/kiu/Hey content not found'

VCR.use_cassette 'multiwiki_assignment' do
visit "/courses/#{course.slug}/students/articles"
first('.student-selection .student').click
Expand All @@ -149,7 +140,8 @@
expect(button).to have_content 'Assign/remove an article'
button.click
within('#users') do
first('textarea').set('https://incubator.wikimedia.org/wiki/Wp/kiu/Heyder_Cansa')
first('textarea').set('https://incubator.wikimedia.org/wiki/Wp/kiu/Heyder_Cansa',
rapid: false)
end
click_button 'Assign'
visit "/courses/#{course.slug}/students/articles"
Expand All @@ -161,7 +153,5 @@
expect(link[:href]).to include('incubator.wikimedia')
end
end

pass_pending_spec
end
end

0 comments on commit 4f0fbc1

Please sign in to comment.