jenkins-bot has submitted this change and it was merged. Change subject: Add ContentTranslationPage class to the browser tests ......................................................................
Add ContentTranslationPage class to the browser tests Change-Id: Ie88822ee47fc5e7f15ebe7af443d83743287cf81 --- M tests/browser/features/special_content_translation.feature M tests/browser/features/step_definitions/special_content_translation_steps.rb A tests/browser/features/support/pages/content_translation_page.rb 3 files changed, 30 insertions(+), 12 deletions(-) Approvals: KartikMistry: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/browser/features/special_content_translation.feature b/tests/browser/features/special_content_translation.feature index 01e9e10..2d6d6f5 100644 --- a/tests/browser/features/special_content_translation.feature +++ b/tests/browser/features/special_content_translation.feature @@ -32,8 +32,8 @@ And I see an input box pre-filled with the text "Bratislava" above the editing area in the second column And I see a language label saying "dansk" below the translation column's title And I see a translation information column - And I see a "Publish Translation" button at the top of the page - And I see a translation progress bar at the top of the page + And I see a "Publish Translation" button + And I see a translation progress bar Scenario: Writing some translation text and saving it Given I am logged in diff --git a/tests/browser/features/step_definitions/special_content_translation_steps.rb b/tests/browser/features/step_definitions/special_content_translation_steps.rb index da628f3..f9a6dc3 100644 --- a/tests/browser/features/step_definitions/special_content_translation_steps.rb +++ b/tests/browser/features/step_definitions/special_content_translation_steps.rb @@ -3,31 +3,31 @@ end When(/^I press the "Publish Translation" button$/) do - pending # express the regexp above with the code you wish you had + on(ContentTranslationPage).publish_translation end When(/^I write "(.*?)" in the editing area in the translation column$/) do |translation| - pending # express the regexp above with the code you wish you had + on(ContentTranslationPage).translation_editing_area = translation end Then(/^I don't see a "Publish Translation" button$/) do - pending # express the regexp above with the code you wish you had + on(ContentTranslationPage).publish_translation_element.should_not be_visible end Then(/^I don't see a source column$/) do - pending # express the regexp above with the code you wish you had + on(ContentTranslationPage).source_column.should_not be_visible end Then(/^I don't see a translation column$/) do - pending # express the regexp above with the code you wish you had + on(ContentTranslationPage).translation_column.should_not be_visible end -Then(/^I see a "Publish Translation" button at the top of the page$/) do - pending # express the regexp above with the code you wish you had +Then(/^I see a "Publish Translation" button$/) do + on(ContentTranslationPage).publish_translation_element.should be_visible end -Then(/^I see a "view article" link that points to the page "(.*?)" on the same wiki$/) do |source_page| - pending # express the regexp above with the code you wish you had +Then(/^I see a "view article" link in the source column$/) do + on(ContentTranslationPage).view_article.should be_visible end Then(/^I see a language label saying "(.*?)" below the source column's title$/) do |language_name| @@ -54,7 +54,7 @@ pending # express the regexp above with the code you wish you had end -Then(/^I see a translation progress bar at the top of the page$/) do +Then(/^I see a translation progress bar$/) do pending # express the regexp above with the code you wish you had end @@ -93,3 +93,7 @@ Then(/^the page "(.+?)" is displayed$/) do |page_title| pending # express the regexp above with the code you wish you had end + +Then(/^the "view article" link points to the page "(.*?)" on the same wiki$/) do |source_page| + pending # express the regexp above with the code you wish you had +end diff --git a/tests/browser/features/support/pages/content_translation_page.rb b/tests/browser/features/support/pages/content_translation_page.rb new file mode 100644 index 0000000..e573f65 --- /dev/null +++ b/tests/browser/features/support/pages/content_translation_page.rb @@ -0,0 +1,14 @@ +class ContentTranslationPage + include PageObject + include URL + page_url URL.url("Special:ContentTranslation") + + button(:publish_translation, class: "publish-translation") + + div(:source_column, class: "source") + div(:translation_column, class: "translation") + + def translation_editing_area + @browser.div(css: ".translation div[contenteditable]") + end +end -- To view, visit https://gerrit.wikimedia.org/r/106228 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie88822ee47fc5e7f15ebe7af443d83743287cf81 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Amire80 <amir.ahar...@mail.huji.ac.il> Gerrit-Reviewer: KartikMistry <kartik.mis...@gmail.com> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits