mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-17 19:21:39 +00:00
ff687da5c2
Remove some Ruby code which was causing lots of confusion. Bug: T237290 Change-Id: I2c0ae965e4ee094c1b4edc3817c1bf66dc3fa694
53 lines
1.5 KiB
JavaScript
53 lines
1.5 KiB
JavaScript
const { iClickOnTheCategoryButton,
|
|
iShouldSeeTheCategoriesOverlay,
|
|
iShouldSeeAListOfCategories
|
|
} = require( '../features/step_definitions/category_steps' ),
|
|
path = require( 'path' ),
|
|
{
|
|
iAmInAWikiThatHasCategories
|
|
} = require( '../features/step_definitions/create_page_api_steps' ),
|
|
{
|
|
iAmUsingTheMobileSite,
|
|
iAmOnPage, iAmInBetaMode
|
|
} = require( '../features/step_definitions/common_steps' );
|
|
|
|
// Feature: Categories
|
|
describe( 'Categories', function () {
|
|
before( function () {
|
|
const config = require( path.resolve( `${__dirname}../../../../skin.json` ) ).config;
|
|
|
|
// See https://danielkorn.io/post/skipping-tests-in-mochajs/
|
|
// if categories is not enabled by default we won't test this feature.
|
|
// This test will thus need to be run manually
|
|
// or become valid when and if the feature is pushed.
|
|
if ( !config.MinervaShowCategoriesButton.stable ) {
|
|
this.skip();
|
|
}
|
|
} );
|
|
|
|
// Scenario: I can view categories
|
|
it( 'I can view categories', function () {
|
|
|
|
const title = 'Selenium categories test page';
|
|
// Given I am in a wiki that has categories
|
|
iAmInAWikiThatHasCategories( title );
|
|
|
|
// And I am using the mobile site
|
|
iAmUsingTheMobileSite();
|
|
|
|
// And I am in beta mode
|
|
iAmInBetaMode();
|
|
|
|
// And I am on the "Selenium categories test page" page
|
|
iAmOnPage( title );
|
|
|
|
// When I click on the category button
|
|
iClickOnTheCategoryButton();
|
|
|
|
// Then I should see the categories overlay
|
|
iShouldSeeTheCategoriesOverlay();
|
|
|
|
iShouldSeeAListOfCategories();
|
|
} );
|
|
} );
|