mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-15 03:34:25 +00:00
ce77018b7c
[Visual changes] This should result in 9 visual regression failures relating to increased height of search results and loading bar [More details about change] - Migrate search app from Vue 2 to Vue 3; update tests accordingly - Remove dependence on WVUI and use Codex instead, via the special `@wikimedia/codex-search` package - Update search app to use CdxTypeaheadSearch, which no longer takes in props related to the search client or fetch start/end instrumentation. Instead, directly use the restSearchClient and call fetch start/end events in the search app. - Handle hideDirection in the search app/API response formatting code, not within the TypeaheadSearch component - Handle showing/hiding the search button in the app - Move the WVUI URL generator into Vector - Update server-rendered search box styles to match design updates included with CdxTypeaheadSearch - Replace references to WVUI with references to Codex - Update values of various LESS variables to match Codex, and update searchBox styling to prevent jankiness when the searchBox is replaced with the Codex TypeaheadSearch component The VectorWvuiSearchOptions config variable has been maintained and will be updated to a code-agnostic name in a future patch. Bug: T300573 Bug: T302137 Bug: T303558 Bug: T309722 Bug: T310525 Co-Authored-By: Anne Tomasevich <atomasevich@wikimedia.org> Change-Id: I59fa3a006d988b14ebd8020cbd58e8d7bedbfe01
72 lines
1.8 KiB
JavaScript
72 lines
1.8 KiB
JavaScript
// @ts-nocheck
|
|
const path = require( 'path' );
|
|
|
|
const testData = {
|
|
baseUrl: process.env.MW_SERVER,
|
|
pageUrl: '/wiki/Polar_bear?useskin=vector-2022&tableofcontents=1',
|
|
loginUser: process.env.MEDIAWIKI_USER,
|
|
loginPassword: process.env.MEDIAWIKI_PASSWORD
|
|
};
|
|
|
|
module.exports = {
|
|
// LOG_DIR set in CI, used to make report files available in Jenkins
|
|
reportDir: process.env.LOG_DIR || path.join( process.cwd(), 'a11y/' ),
|
|
namespace: 'Vector',
|
|
defaults: {
|
|
viewport: {
|
|
width: 1200,
|
|
height: 1080
|
|
},
|
|
runners: [
|
|
'axe',
|
|
'htmlcs'
|
|
],
|
|
includeWarnings: true,
|
|
includeNotices: true,
|
|
hideElements: '#bodyContent, #siteNotice, #mwe-pt-toolbar, #centralnotice, #centralnotice_testbanner',
|
|
chromeLaunchConfig: {
|
|
headless: true,
|
|
args: [
|
|
'--no-sandbox',
|
|
'--disable-setuid-sandbox'
|
|
]
|
|
}
|
|
},
|
|
tests: [
|
|
{
|
|
name: 'default',
|
|
url: testData.baseUrl + testData.pageUrl,
|
|
actions: [
|
|
'check field #mw-sidebar-checkbox' // Open main menu
|
|
]
|
|
},
|
|
{
|
|
name: 'logged_in',
|
|
url: testData.baseUrl + testData.pageUrl,
|
|
wait: '500',
|
|
actions: [
|
|
'click #p-personal-checkbox',
|
|
'wait for .vector-user-menu-login a to be visible',
|
|
'click .vector-user-menu-login a',
|
|
'wait for #wpName1 to be visible',
|
|
'set field #wpName1 to ' + testData.loginUser,
|
|
'set field #wpPassword1 to ' + testData.loginPassword,
|
|
'click #wpLoginAttempt',
|
|
'wait for #pt-userpage-2 to be visible', // Confirm login was successful
|
|
'check field #mw-sidebar-checkbox' // Open main menu
|
|
]
|
|
},
|
|
{
|
|
name: 'search',
|
|
url: testData.baseUrl + testData.pageUrl,
|
|
rootElement: '#p-search',
|
|
wait: '500',
|
|
actions: [
|
|
'click #searchInput',
|
|
'wait for .cdx-text-input__input to be added',
|
|
'set field .cdx-text-input__input to Test'
|
|
]
|
|
}
|
|
]
|
|
};
|