jenkins-bot has submitted this change and it was merged.

Change subject: Merge useful scenarios from dialog.feature to 
red_link_dialog.feature
......................................................................


Merge useful scenarios from dialog.feature to red_link_dialog.feature

Change-Id: Ia4f152a6bf6a7ee14666aca91008db63f15a99a4
---
D tests/browser/features/dialog.feature
M tests/browser/features/red_link_dialog.feature
M tests/browser/features/red_link_logged_in.feature
3 files changed, 16 insertions(+), 53 deletions(-)

Approvals:
  Zfilipin: Looks good to me, approved
  jenkins-bot: Verified

Objections:
  Nikerabbit: There's a problem with this change, please improve



diff --git a/tests/browser/features/dialog.feature 
b/tests/browser/features/dialog.feature
deleted file mode 100644
index e06e46c..0000000
--- a/tests/browser/features/dialog.feature
+++ /dev/null
@@ -1,53 +0,0 @@
-@firefox @login
-Feature: "New Page" dialog
-
-  As a wiki editor
-  I can see a dialog when I click on the red link in the list of interlanguage 
links on the content page,
-  so that I can see the option to create the translation of the content from 
scratch
-
-  Design:
-  - http://pauginer.github.io/prototype-uls/#mies
-
-  Backgroud:
-    Given I am logged in
-      And I am on the English article of "Ludwig Mies van der Rohe"
-      And I have reset my preferences
-      And I set "Nederlands" as the interface language
-    When I click on the red link to "Nederlands" on the list of interlanguage 
links
-    Then I see a "New Page" dialog
-
-  Scenario: Clicking on the "New Page" dialog gives an option to start a 
translation from scratch
-    Then I see a input box to write the title of the content in target 
language in the dialog
-      And I see a "Create from scratch" button in the dialog
-      And I see a "Translate from English" button in the dialog
-
-  Scenario: Clicking on the "Translate from" button opens the Universal 
Language Selector
-    Given I see a "Translate from" split button in the dialog
-    When I click on the second part of the "Translate from" button
-    Then I see the Universal Language Selector
-
-  Scenario: Clicking on the "Translate from" button helps the user to change 
the source language
-    Given I see a "Translate from" split button in the dialog
-      And I click on the second part of the "Translate from" button
-      And I see the Universal Language Selector
-    When I select "Malayalam" from the Universal Language Selector
-    Then I see a "Translate from Malayalam" button in the dialog
-      And I do not see the Universal Language Selector anymore
-
-  Scenario: Clicking on the "Create from scratch" button takes the user to 
Special:ContentTranslation
-    Given I see a input box to write the title of the content in target 
language in the dialog
-      And I see a "Create from scratch" button in the dialog
-    When I enter the title "Ludwig Mies van der Rohe" in the input box
-      And I click the "Create from scratch" button in the dialog
-    Then I see the page Special:ContentTranslation
-      And I see the source pane title as "Ludwig Mies van der Rohe"
-      And I see the translation pane title as "Ludwig Mies van der Rohe"
-
-  Scenario: Keeping the the input box blank makes the title of the translation 
pane same as the source pane
-    Given I see a input box to write the title of the content in the target 
language in the dialog
-      And I see a "Create from scratch" button in the dialog
-    When I keep the input box blank
-      And I click on the "Create from Scratch" button in the dialog
-    Then I see the page Special:ContentTranslation
-      And I see the source pane title as "Ludwig Mies van der Rohe"
-      And I see the translation pane title as "Ludwig Mies van der Rohe"
diff --git a/tests/browser/features/red_link_dialog.feature 
b/tests/browser/features/red_link_dialog.feature
index 4fe39d6..769e3a6 100644
--- a/tests/browser/features/red_link_dialog.feature
+++ b/tests/browser/features/red_link_dialog.feature
@@ -41,6 +41,7 @@
     When I write "Translated title" in the input box in the red link dialog
       And I click the "Translate from English" button
     Then the Content translation page should open
+      And the language code of the source column should be "en"
       And the language code of the translation column should be "nl"
       And the name of the page should appear in the source column
       And the title in the translation column should be "Translated title"
@@ -58,3 +59,17 @@
     Then the page creation page should open
       And the name "Translated title" should appear in the main title
       And the language of the editing area should be "nl"
+
+  Scenario: Selecting a different language to translate from
+    When I click on the second part of the "Translate from" button
+      And I select "da" as my source language
+    Then in the dialog for creating a page in "Nederlands" I should see a 
"Translate from Dansk" button
+      And I do not see the ULS panel for selecting the source language
+
+  Scenario: Selecting a different language to translate from
+    When I click on the second part of the "Translate from" button
+      And I select "da" as my source language
+      And in the dialog for creating a page in "Nederlands" I click the 
"Translate from Dansk" button
+    Then the Content translation page should open
+      And the language code of the source column should be "da"
+      And the language code of the translation column should be "nl"
diff --git a/tests/browser/features/red_link_logged_in.feature 
b/tests/browser/features/red_link_logged_in.feature
index e17ea86..f79625c 100644
--- a/tests/browser/features/red_link_logged_in.feature
+++ b/tests/browser/features/red_link_logged_in.feature
@@ -41,5 +41,6 @@
       And I am on a page without interlanguage links
     When I click on the red link to "Nederlands" in the list of the 
interlanguage links
     Then I should see a dialog for creating a page in "Nederlands"
+      And in the dialog for creating a page in "Nederlands" I should see a 
"Translate from English" button
       And the heading of the dialog for creating a page should include "This 
page does not exist in Nederlands yet"
       And the label of the input box in the dialog for creating a page should 
be "Title for the new page in Nederlands:"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia4f152a6bf6a7ee14666aca91008db63f15a99a4
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Amire80 <[email protected]>
Gerrit-Reviewer: Amire80 <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Zfilipin <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to