mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-12 07:25:13 +00:00
1671a07d7d
This allows an arbitrary number of revisions to be created on a page very easily. The page created will have a name relating to RevisionSlider suffixed by a random float. The base logic for this is taken from: Ic165f108517c534a4b1c12883621b3624c7b0336 This patch also removes the @vagrant tags as RevisonSlider is not yet in vragrant. Please see T139296 for the ticket to add it. Bug: T133278 Change-Id: I8a25db411bee2fa44555a23d1a840907a185c998
39 lines
1.1 KiB
Ruby
39 lines
1.1 KiB
Ruby
Given(/^I am on the page$/) do
|
|
visit(ArticlePage, using_params: { article_name: "RevisionSlider-#{@random_string}" })
|
|
end
|
|
|
|
Given(/^I am on the diff page$/) do
|
|
visit(ArticlePage, using_params: { article_name: "RevisionSlider-#{@random_string}", query: 'type=revision&diff=' })
|
|
end
|
|
|
|
Given(/^a page with (\d+) revision\(s\) exists$/) do |number_of_revisions|
|
|
(1..number_of_revisions.to_i).each do |i|
|
|
api.edit(title: "RevisionSlider-#{@random_string}", text: "Text-#{i}")
|
|
end
|
|
end
|
|
|
|
Given(/^I refresh the page$/) do
|
|
on(ArticlePage) do |page|
|
|
page.refresh
|
|
end
|
|
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 |