mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-24 22:25:27 +00:00
Merge "Add History icon and Article/Talk tabs to default loggedin experience"
This commit is contained in:
commit
2220f6a87c
|
@ -39,7 +39,7 @@
|
|||
"MinervaTalkAtTop": {
|
||||
"base": false,
|
||||
"beta": false,
|
||||
"amc": true
|
||||
"loggedin": true
|
||||
},
|
||||
"MinervaAdvancedMainMenu": {
|
||||
"base": false,
|
||||
|
@ -54,7 +54,7 @@
|
|||
"MinervaHistoryInPageActions": {
|
||||
"base": false,
|
||||
"beta": false,
|
||||
"amc": true
|
||||
"loggedin": true
|
||||
},
|
||||
"MinervaOverflowInPageActions": {
|
||||
"base": false,
|
||||
|
|
|
@ -54,12 +54,17 @@ const iShouldSeeTheTopicInTheListOfTopics = ( subject ) => {
|
|||
);
|
||||
};
|
||||
|
||||
const thereShouldBeATalkTab = () => {
|
||||
assert.strictEqual( ArticlePage.talk_tab_element.isVisible(), true );
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
iAddATopic,
|
||||
iSeeTheTalkOverlay,
|
||||
thereShouldBeASaveDiscussionButton,
|
||||
noTopicIsPresent,
|
||||
thereShouldBeAnAddDiscussionButton,
|
||||
thereShouldBeATalkTab,
|
||||
thereShouldBeATalkButton,
|
||||
thereShouldBeNoTalkButton,
|
||||
iShouldSeeTheTopicInTheListOfTopics,
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
const MinervaPage = require( './minerva_page' );
|
||||
|
||||
class ArticlePage extends MinervaPage {
|
||||
|
||||
get watch_element() { return $( '#ca-watch' ); }
|
||||
get talk_tab_element() { return $( '.minerva__tab-container a[rel="discussion"]' ); }
|
||||
get talk_element() { return $( '.talk ' ); }
|
||||
get talk_add_element() { return $( '.minerva-talk-add-button' ); }
|
||||
get first_section_element() {
|
||||
|
@ -28,7 +28,7 @@ class ArticlePage extends MinervaPage {
|
|||
get notification_element() { return $( '.mw-notification-area .mw-notification' ); }
|
||||
get overlay_heading_element() { return $( '.overlay-title h2' ); }
|
||||
get overlay_category_topic_item_element() { return $( '.topic-title-list li' ); }
|
||||
get red_link_element() { return $( 'a.new' ); }
|
||||
get red_link_element() { return $( '#mw-content-text a.new' ); }
|
||||
get is_authenticated_element() { return $( 'body.is-authenticated' ); }
|
||||
get last_modified_bar_history_link_element() { return $( 'a.last-modified-bar__text[href*=\'Special:History\']' ); }
|
||||
}
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @test2.m.wikipedia.org @vagrant
|
||||
Feature: Talk
|
||||
|
||||
Background:
|
||||
Given I am using the mobile site
|
||||
|
||||
Scenario: Talk button not visible as logged out user
|
||||
Given the page "Selenium talk test" exists
|
||||
And I am on the "Selenium talk test" page
|
||||
Then there should be no talk button
|
||||
|
||||
@login
|
||||
Scenario: Talk button visible as logged in user
|
||||
Given the page "Selenium talk test" exists
|
||||
And I am logged into the mobile website
|
||||
And I am on the "Selenium talk test" page
|
||||
Then there should be a talk button
|
||||
|
||||
@login
|
||||
Scenario: Talk on a page that doesn't exist (bug 64268)
|
||||
Given I am logged into the mobile website
|
||||
And I am on a page that does not exist
|
||||
Then there should be a talk button
|
||||
|
||||
@smoke @login
|
||||
Scenario: Add discussion button shows on talk pages for logged in users
|
||||
Given the page "Talk:Selenium talk test" exists
|
||||
And I am logged into the mobile website
|
||||
And I am on the "Talk:Selenium talk test" page
|
||||
Then there should be an add discussion button
|
||||
|
||||
@smoke @login
|
||||
Scenario: Add discussion for talk page possible as logged in user
|
||||
Given the page "Talk:Selenium talk test" exists
|
||||
And I am logged into the mobile website
|
||||
And I am on the "Talk:Selenium talk test" page
|
||||
When I click the add talk button
|
||||
Then there should be a save discussion button
|
||||
|
||||
Scenario: A newly created topic appears in the list of topics
|
||||
Given I am logged into the mobile website
|
||||
And I am on a talk page with no talk topics
|
||||
And no topic is present
|
||||
When I click the talk button
|
||||
And I see the talk overlay
|
||||
And I add a topic called "New topic"
|
||||
Then I should see the topic called "New topic" in the list of topics
|
|
@ -12,7 +12,7 @@ const { iAmOnATalkPageWithNoTalkTopics } = require( '../features/step_definition
|
|||
thereShouldBeASaveDiscussionButton,
|
||||
noTopicIsPresent,
|
||||
thereShouldBeAnAddDiscussionButton,
|
||||
thereShouldBeATalkButton,
|
||||
thereShouldBeATalkTab,
|
||||
thereShouldBeNoTalkButton,
|
||||
iShouldSeeTheTopicInTheListOfTopics
|
||||
} = require( '../features/step_definitions/talk_steps' );
|
||||
|
@ -35,17 +35,17 @@ describe( 'Talk', () => {
|
|||
} );
|
||||
|
||||
// @login
|
||||
it( 'Talk button visible as logged in user', () => {
|
||||
it( 'Talk tab visible as logged in user', () => {
|
||||
iAmLoggedIntoTheMobileWebsite();
|
||||
iAmOnPage( 'Selenium talk test' );
|
||||
thereShouldBeATalkButton();
|
||||
thereShouldBeATalkTab();
|
||||
} );
|
||||
|
||||
// @login
|
||||
it( 'Talk on a page that doesn\'t exist (bug 64268)', () => {
|
||||
iAmLoggedIntoTheMobileWebsite();
|
||||
iAmOnAPageThatDoesNotExist();
|
||||
thereShouldBeATalkButton();
|
||||
thereShouldBeATalkTab();
|
||||
} );
|
||||
|
||||
// @smoke @login
|
||||
|
|
Loading…
Reference in a new issue