mirror of
https://github.com/kiwix/kiwix-js.git
synced 2025-09-22 12:01:15 -04:00
parent
11d1e64590
commit
870eba1497
9
.github/workflows/CI.yml
vendored
9
.github/workflows/CI.yml
vendored
@ -68,10 +68,11 @@ jobs:
|
|||||||
GITHUB_ACTION: ${{ github.event_name }}
|
GITHUB_ACTION: ${{ github.event_name }}
|
||||||
run: npm run test-e2e-chrome
|
run: npm run test-e2e-chrome
|
||||||
|
|
||||||
- name: End-to-end tests on Edge (Linux)
|
# Disabling Edge tests for now, as they are very flaky on Linux, but pass fine on Windows
|
||||||
env:
|
# - name: End-to-end tests on Edge (Linux)
|
||||||
GITHUB_ACTION: ${{ github.event_name }}
|
# env:
|
||||||
run: npm run test-e2e-edge
|
# GITHUB_ACTION: ${{ github.event_name }}
|
||||||
|
# run: npm run test-e2e-edge
|
||||||
|
|
||||||
- name: End-to-end tests on Firefox (Linux)
|
- name: End-to-end tests on Firefox (Linux)
|
||||||
env:
|
env:
|
||||||
|
@ -12,7 +12,7 @@ const capabilities = {
|
|||||||
osVersion: 'Mojave',
|
osVersion: 'Mojave',
|
||||||
browserVersion: '60.0',
|
browserVersion: '60.0',
|
||||||
projectName: 'BStack Project Name: Kiwix JS e2e tests',
|
projectName: 'BStack Project Name: Kiwix JS e2e tests',
|
||||||
buildName: 'BStack Build Name: Chrome 58 on Mojave',
|
buildName: 'BStack Build Name: Chrome 60 on Mojave',
|
||||||
local: true,
|
local: true,
|
||||||
localIdentifier: process.env.BROWSERSTACK_LOCAL_IDENTIFIER,
|
localIdentifier: process.env.BROWSERSTACK_LOCAL_IDENTIFIER,
|
||||||
userName: process.env.BROWSERSTACK_USERNAME,
|
userName: process.env.BROWSERSTACK_USERNAME,
|
||||||
|
@ -9,7 +9,7 @@ const capabilities = {
|
|||||||
osVersion: '10',
|
osVersion: '10',
|
||||||
browserVersion: '70.0',
|
browserVersion: '70.0',
|
||||||
projectName: 'BStack Project Name: Kiwix JS e2e tests',
|
projectName: 'BStack Project Name: Kiwix JS e2e tests',
|
||||||
buildName: 'BStack Build Name: Firefox 61',
|
buildName: 'BStack Build Name: Firefox 70',
|
||||||
local: true,
|
local: true,
|
||||||
localIdentifier: process.env.BROWSERSTACK_LOCAL_IDENTIFIER,
|
localIdentifier: process.env.BROWSERSTACK_LOCAL_IDENTIFIER,
|
||||||
userName: process.env.BROWSERSTACK_USERNAME,
|
userName: process.env.BROWSERSTACK_USERNAME,
|
||||||
@ -33,5 +33,5 @@ async function loadFirefoxDriver () {
|
|||||||
const driver_gutenberg_fx = await loadFirefoxDriver();
|
const driver_gutenberg_fx = await loadFirefoxDriver();
|
||||||
|
|
||||||
// Run test in SW mode only
|
// Run test in SW mode only
|
||||||
console.log('Running tests in Service Worker mode only for this browser version');
|
console.log('Running Gutenberg tests in ServiceWorker mode only for this browser version');
|
||||||
await gutenbergRo.runTests(driver_gutenberg_fx);
|
await gutenbergRo.runTests(driver_gutenberg_fx, ['serviceworker']);
|
||||||
|
@ -178,7 +178,7 @@ function runTests (driver, modes) {
|
|||||||
// Loads the ZIM archive for the mode if the mode is not skipped
|
// Loads the ZIM archive for the mode if the mode is not skipped
|
||||||
it('Load Modern zim file', async function () {
|
it('Load Modern zim file', async function () {
|
||||||
if (!serviceWorkerAPI) {
|
if (!serviceWorkerAPI) {
|
||||||
console.log('\x1b[33m%s\x1b[0m', ' Test skipped.');
|
console.log('\x1b[33m%s\x1b[0m', ' Following test skipped:');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Wait until files have loaded
|
// Wait until files have loaded
|
||||||
@ -219,7 +219,7 @@ function runTests (driver, modes) {
|
|||||||
|
|
||||||
it('Sorting books by popularity', async function () {
|
it('Sorting books by popularity', async function () {
|
||||||
if (isJqueryMode) {
|
if (isJqueryMode) {
|
||||||
console.log('\x1b[33m%s\x1b[0m', ' Test skipped.');
|
console.log('\x1b[33m%s\x1b[0m', ' Following test skipped:');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await driver.switchTo().frame('articleContent');
|
await driver.switchTo().frame('articleContent');
|
||||||
@ -233,7 +233,7 @@ function runTests (driver, modes) {
|
|||||||
|
|
||||||
it('Sorting books by name', async function () {
|
it('Sorting books by name', async function () {
|
||||||
if (isJqueryMode) {
|
if (isJqueryMode) {
|
||||||
console.log('\x1b[33m%s\x1b[0m', ' Test skipped.');
|
console.log('\x1b[33m%s\x1b[0m', ' Following test skipped:');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// We switch to default Content and back to Iframe because the If we are retrying the test
|
// We switch to default Content and back to Iframe because the If we are retrying the test
|
||||||
@ -252,7 +252,7 @@ function runTests (driver, modes) {
|
|||||||
|
|
||||||
it('Change Language', async function () {
|
it('Change Language', async function () {
|
||||||
if (isJqueryMode) {
|
if (isJqueryMode) {
|
||||||
console.log('\x1b[33m%s\x1b[0m', ' Test skipped.');
|
console.log('\x1b[33m%s\x1b[0m', ' Following test skipped:');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// click on the language dropdown and select option French
|
// click on the language dropdown and select option French
|
||||||
@ -325,7 +325,7 @@ function runTests (driver, modes) {
|
|||||||
|
|
||||||
it('Author search Autocomplete', async function () {
|
it('Author search Autocomplete', async function () {
|
||||||
if (isJqueryMode) {
|
if (isJqueryMode) {
|
||||||
console.log('\x1b[33m%s\x1b[0m', ' Test skipped.');
|
console.log('\x1b[33m%s\x1b[0m', ' Following test skipped:');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const filter = await driver.wait(until.elementIsVisible(driver.findElement(By.id('author_filter'))), 1500);
|
const filter = await driver.wait(until.elementIsVisible(driver.findElement(By.id('author_filter'))), 1500);
|
||||||
@ -336,7 +336,7 @@ function runTests (driver, modes) {
|
|||||||
|
|
||||||
it('Author search Results', async function () {
|
it('Author search Results', async function () {
|
||||||
if (isJqueryMode) {
|
if (isJqueryMode) {
|
||||||
console.log('\x1b[33m%s\x1b[0m', ' Test skipped.');
|
console.log('\x1b[33m%s\x1b[0m', ' Following test skipped:');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// search by author name and press enter to apply the filter
|
// search by author name and press enter to apply the filter
|
||||||
|
@ -192,7 +192,7 @@ function runTests (driver, modes) {
|
|||||||
|
|
||||||
it('Load legacy Ray Charles and check index contains specified article', async function () {
|
it('Load legacy Ray Charles and check index contains specified article', async function () {
|
||||||
if (!serviceWorkerAPI) {
|
if (!serviceWorkerAPI) {
|
||||||
console.log('\x1b[33m%s\x1b[0m', ' Test skipped.');
|
console.log('\x1b[33m%s\x1b[0m', ' Following test skipped:');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const archiveFiles = await driver.findElement(By.id('archiveFiles'));
|
const archiveFiles = await driver.findElement(By.id('archiveFiles'));
|
||||||
@ -221,7 +221,7 @@ function runTests (driver, modes) {
|
|||||||
|
|
||||||
it('Navigate to "This Little Girl of Mine"', async function () {
|
it('Navigate to "This Little Girl of Mine"', async function () {
|
||||||
if (!serviceWorkerAPI) {
|
if (!serviceWorkerAPI) {
|
||||||
console.log('\x1b[33m%s\x1b[0m', ' Test skipped.');
|
console.log('\x1b[33m%s\x1b[0m', ' Following test skipped:');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// console.log('FilesLength outer: ' + filesLength);
|
// console.log('FilesLength outer: ' + filesLength);
|
||||||
@ -259,7 +259,7 @@ function runTests (driver, modes) {
|
|||||||
|
|
||||||
it('Search for Ray Charles in title index and go to article', async function () {
|
it('Search for Ray Charles in title index and go to article', async function () {
|
||||||
if (!serviceWorkerAPI) {
|
if (!serviceWorkerAPI) {
|
||||||
console.log('\x1b[33m%s\x1b[0m', ' Test skipped.');
|
console.log('\x1b[33m%s\x1b[0m', ' Following test skipped:');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await driver.switchTo().defaultContent();
|
await driver.switchTo().defaultContent();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user