mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-12 07:25:13 +00:00
d7caa6c1f3
This adds 1 simple browser test to make sure that the placeholder for the revision slider loads when the beta feature is enabled and does not load when it is disabled More tests will follow. Bug: T133278 Change-Id: I5be9014b6c5ac03128c034fd866141e89fd7a0ed
32 lines
1,006 B
Ruby
32 lines
1,006 B
Ruby
Given(/^I am on the "(.*?)" page$/) do |page|
|
|
visit(ArticlePage, using_params: { article_name: page })
|
|
end
|
|
|
|
Given(/^I am on the "(.*?)" diff page$/) do |page|
|
|
visit(ArticlePage, using_params: { article_name: page, query: 'type=revision&diff=' })
|
|
end
|
|
|
|
Given(/^The page "(.+)" has the following edits:$/) do |page, table|
|
|
page = page.gsub(' ', '_')
|
|
table.rows.each { |(text)| api.edit(title: page, text: text) }
|
|
end
|
|
|
|
Given(/^The RevisionSlider has loaded$/) do
|
|
on(DiffPage).wait_for_slider_to_load
|
|
end
|
|
|
|
Then(/^RevisionSlider is enabled as a beta feature$/) do
|
|
visit(SpecialPreferencesPage).enable_revisionslider
|
|
end
|
|
|
|
Then(/^RevisionSlider is disabled as a beta feature$/) do
|
|
visit(SpecialPreferencesPage).disable_revisionslider
|
|
end
|
|
|
|
Then(/^There should be a RevisionSlider container/) do
|
|
expect{ on(DiffPage).revisionslider_container }.not_to raise_error
|
|
end
|
|
|
|
Then(/^There should not be a RevisionSlider placeholder$/) do
|
|
expect{ on(DiffPage).revisionslider_placeholder }.to raise_error
|
|
end |