Divec has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/106708


Change subject: Implement test for anonymous users
......................................................................

Implement test for anonymous users

Change-Id: Ia2c2479f461baf8cc06b85520c63b15fc4e74874
---
M tests/browser/features/special_content_translation.feature
M tests/browser/features/step_definitions/special_content_translation_steps.rb
M tests/browser/features/support/pages/content_translation_page.rb
3 files changed, 5 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/08/106708/1

diff --git a/tests/browser/features/special_content_translation.feature 
b/tests/browser/features/special_content_translation.feature
index 31a473b..1457d2d 100644
--- a/tests/browser/features/special_content_translation.feature
+++ b/tests/browser/features/special_content_translation.feature
@@ -12,10 +12,10 @@
 
   Scenario: Anonymous user cannot use Content translation.
     When I am on the content translation page in a wiki in English, 
translating the page "Bratislava" to Danish
-    Then I see the message "You must be logged in to translate in this page."
       And I don't see the source column
       And I don't see the translation column
       And I don't see a "Publish Translation" button
+    Then I see the message "You must be logged in to translate in this page."
 
   Scenario: Logged in user viewing the special page for translation.
     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 152cfdb..9937ab7 100644
--- 
a/tests/browser/features/step_definitions/special_content_translation_steps.rb
+++ 
b/tests/browser/features/step_definitions/special_content_translation_steps.rb
@@ -52,7 +52,7 @@
 end
 
 Then(/^I see the message "You must be logged in to translate in this 
page\."$/) do
-       pending # express the regexp above with the code you wish you had
+       on(ContentTranslationPage).content.should == "You must be logged in to 
translate this page"
 end
 
 Then(/^I see the title "(.*?)" at the top of the source column$/) do 
|source_page_title|
diff --git a/tests/browser/features/support/pages/content_translation_page.rb 
b/tests/browser/features/support/pages/content_translation_page.rb
index 0a5224d..cc2aec8 100644
--- a/tests/browser/features/support/pages/content_translation_page.rb
+++ b/tests/browser/features/support/pages/content_translation_page.rb
@@ -9,8 +9,10 @@
 
        div(:progress_bar, class: "ct-progress-bar")
 
+       div(:content, class: "content")
+
        def column(column_type)
-               @browser.div(class: ".ct-column.#{column_type}")
+               @browser.div(class: "#{column_type}")
        end
 
        def language_label(column_type)

-- 
To view, visit https://gerrit.wikimedia.org/r/106708
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia2c2479f461baf8cc06b85520c63b15fc4e74874
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Divec <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to