Zfilipin has submitted this change and it was merged. Change subject: Feature: Print/export section expand and collapse ......................................................................
Feature: Print/export section expand and collapse Tests are failing because expanding and collapsing Print/export section does not work sometimes. Bug: 48225 Change-Id: Ib9d6b087b54edbf06ec87d94d231eeaf7ff51c99 --- A features/print_export_menu_readonly.feature A features/step_definitions/print_export_menu_steps.rb M features/support/pages/random_page.rb 3 files changed, 34 insertions(+), 0 deletions(-) Approvals: Karim.rayani: Looks good to me, but someone else must approve Zfilipin: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/features/print_export_menu_readonly.feature b/features/print_export_menu_readonly.feature new file mode 100644 index 0000000..a564734 --- /dev/null +++ b/features/print_export_menu_readonly.feature @@ -0,0 +1,12 @@ +# Feature files that end with "_readonly.feature" should be read only, so they could be run at en.wikipedia.org [email protected] @en.wikipedia.org @test2.wikipedia.org +Feature: Print/Export menu Expand and Collapse + + Scenario: Check for Print/export section Collapsed + Given I am at random page + Then Print/export section should be collapsed + + Scenario: Check for Print/export section Expanded + Given I am at random page + When I click Print/export + Then Print/export section should be expanded diff --git a/features/step_definitions/print_export_menu_steps.rb b/features/step_definitions/print_export_menu_steps.rb new file mode 100644 index 0000000..863f4af --- /dev/null +++ b/features/step_definitions/print_export_menu_steps.rb @@ -0,0 +1,19 @@ +Then(/^Print\/export section should be collapsed$/) do + on(RandomPage) do |page| + page.create_a_book_element.should_not be_visible + page.download_as_pdf_element.should_not be_visible + page.printable_version_element.should_not be_visible + end +end + +Then(/^Print\/export section should be expanded$/) do + on(RandomPage) do |page| + page.create_a_book_element.should be_visible + page.download_as_pdf_element.should be_visible + page.printable_version_element.should be_visible + end +end + +When(/^I click Print\/export$/) do + on(RandomPage).print_export +end diff --git a/features/support/pages/random_page.rb b/features/support/pages/random_page.rb index 375a2f3..d4ae3f8 100644 --- a/features/support/pages/random_page.rb +++ b/features/support/pages/random_page.rb @@ -4,10 +4,13 @@ include URL page_url URL.url('Special:Random') + a(:create_a_book, text: 'Create a book') li(:main_page, id: 'n-mainpage-description') a(:download_as_pdf, text: 'Download as PDF') a(:download_the_file, text: 'Download the file') + a(:print_export, text: 'Print/export') a(:uls_trigger, class: 'uls-trigger') + a(:printable_version, text: 'Printable version') div(:search, id: 'search') text_field(:search_input, id: 'searchInput') button(:search_button, id: 'searchButton') -- To view, visit https://gerrit.wikimedia.org/r/63277 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib9d6b087b54edbf06ec87d94d231eeaf7ff51c99 Gerrit-PatchSet: 2 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Karim.rayani <[email protected]> Gerrit-Reviewer: Cmcmahon <[email protected]> Gerrit-Reviewer: Karim.rayani <[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
