mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-23 14:36:51 +00:00
Merge "Move Cypress tests under tests/ directory"
This commit is contained in:
commit
5041bb598b
8
.gitignore
vendored
8
.gitignore
vendored
|
@ -24,8 +24,8 @@ sublime-*
|
|||
sftp-config.json
|
||||
.eslintcache
|
||||
|
||||
/cypress/.cache
|
||||
/cypress/videos
|
||||
/cypress/screenshots
|
||||
/cypress/downloads
|
||||
/tests/cypress/.cache
|
||||
/tests/cypress/videos
|
||||
/tests/cypress/screenshots
|
||||
/tests/cypress/downloads
|
||||
/docs/js
|
||||
|
|
2
.npmrc
2
.npmrc
|
@ -1,2 +1,2 @@
|
|||
# Controls where the cypress binary is downloaded during `npm install`
|
||||
CYPRESS_CACHE_FOLDER=./cypress/.cache
|
||||
CYPRESS_CACHE_FOLDER=./tests/cypress/.cache
|
||||
|
|
|
@ -22,7 +22,7 @@ module.exports = function ( grunt ) {
|
|||
all: [
|
||||
'**/*.{js,json}',
|
||||
'!{docs,vendor,node_modules}/**',
|
||||
'!cypress/screenshots/**/*.js'
|
||||
'!tests/cypress/screenshots/**/*.js'
|
||||
]
|
||||
},
|
||||
banana: conf.MessagesDirs,
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
"private": true,
|
||||
"scripts": {
|
||||
"selenium-daily": "npm run selenium-test",
|
||||
"selenium-test": "CYPRESS_CACHE_FOLDER=./cypress/.cache cypress run",
|
||||
"cypress:open": "CYPRESS_CACHE_FOLDER=./cypress/.cache cypress open",
|
||||
"selenium-test": "CYPRESS_CACHE_FOLDER=./tests/cypress/.cache cypress run --config-file tests/cypress/cypress.config.js",
|
||||
"cypress:open": "CYPRESS_CACHE_FOLDER=./tests/cypress/.cache cypress open --config-file tests/cypress/cypress.config.js",
|
||||
"doc": "jsdoc -c jsdoc.json",
|
||||
"test": "grunt test",
|
||||
"lint:fix": "grunt test --fix"
|
||||
|
|
|
@ -1,25 +1,23 @@
|
|||
'use strict';
|
||||
|
||||
/* eslint-env node */
|
||||
const { defineConfig } = require( 'cypress' );
|
||||
// const { mwApiCommands } = require( './cypress/support/MwApiPlugin.js' );
|
||||
// const { mwApiCommands } = require( './tests/cypress/support/MwApiPlugin.js' );
|
||||
|
||||
const envLogDir = process.env.LOG_DIR ? process.env.LOG_DIR + '/Cite' : null;
|
||||
|
||||
module.exports = defineConfig( {
|
||||
e2e: {
|
||||
supportFile: false,
|
||||
specPattern: 'tests/cypress/e2e/**/*.cy.js',
|
||||
baseUrl: process.env.MW_SERVER + process.env.MW_SCRIPT_PATH,
|
||||
mediawikiAdminUsername: process.env.MEDIAWIKI_USER,
|
||||
mediawikiAdminPassword: process.env.MEDIAWIKI_PASSWORD
|
||||
|
||||
},
|
||||
|
||||
retries: 2,
|
||||
defaultCommandTimeout: 5000, // ms; default is 4000ms
|
||||
|
||||
screenshotsFolder: envLogDir || 'cypress/screenshots',
|
||||
screenshotsFolder: envLogDir || 'tests/cypress/screenshots',
|
||||
video: true,
|
||||
videosFolder: envLogDir || 'cypress/videos',
|
||||
downloadsFolder: envLogDir || 'cypress/downloads'
|
||||
videosFolder: envLogDir || 'tests/cypress/videos',
|
||||
downloadsFolder: envLogDir || 'tests/cypress/downloads'
|
||||
} );
|
|
@ -57,7 +57,8 @@ describe( 'Re-using refs in Visual Editor', () => {
|
|||
// ARTICLE SECTION
|
||||
// Ref has been added to article, there are now 4 refs in the article
|
||||
helpers.getRefsFromArticleSection().should( 'have.length', 4 );
|
||||
// Ref #2 now appears twice in the article with corresponding IDs matching the backlinks in the references section
|
||||
// Ref #2 now appears twice in the article with corresponding IDs matching the backlinks in
|
||||
// the references section
|
||||
helpers.backlinksIdShouldMatchFootnoteId( 2, 0, 2 );
|
||||
helpers.backlinksIdShouldMatchFootnoteId( 3, 1, 2 );
|
||||
|
Loading…
Reference in a new issue