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 }}
|
||||
run: npm run test-e2e-chrome
|
||||
|
||||
- name: End-to-end tests on Edge (Linux)
|
||||
env:
|
||||
GITHUB_ACTION: ${{ github.event_name }}
|
||||
run: npm run test-e2e-edge
|
||||
# Disabling Edge tests for now, as they are very flaky on Linux, but pass fine on Windows
|
||||
# - name: End-to-end tests on Edge (Linux)
|
||||
# env:
|
||||
# GITHUB_ACTION: ${{ github.event_name }}
|
||||
# run: npm run test-e2e-edge
|
||||
|
||||
- name: End-to-end tests on Firefox (Linux)
|
||||
env:
|
||||
|
@ -12,7 +12,7 @@ const capabilities = {
|
||||
osVersion: 'Mojave',
|
||||
browserVersion: '60.0',
|
||||
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,
|
||||
localIdentifier: process.env.BROWSERSTACK_LOCAL_IDENTIFIER,
|
||||
userName: process.env.BROWSERSTACK_USERNAME,
|
||||
|
@ -9,7 +9,7 @@ const capabilities = {
|
||||
osVersion: '10',
|
||||
browserVersion: '70.0',
|
||||
projectName: 'BStack Project Name: Kiwix JS e2e tests',
|
||||
buildName: 'BStack Build Name: Firefox 61',
|
||||
buildName: 'BStack Build Name: Firefox 70',
|
||||
local: true,
|
||||
localIdentifier: process.env.BROWSERSTACK_LOCAL_IDENTIFIER,
|
||||
userName: process.env.BROWSERSTACK_USERNAME,
|
||||
@ -33,5 +33,5 @@ async function loadFirefoxDriver () {
|
||||
const driver_gutenberg_fx = await loadFirefoxDriver();
|
||||
|
||||
// Run test in SW mode only
|
||||
console.log('Running tests in Service Worker mode only for this browser version');
|
||||
await gutenbergRo.runTests(driver_gutenberg_fx);
|
||||
console.log('Running Gutenberg tests in ServiceWorker mode only for this browser version');
|
||||
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
|
||||
it('Load Modern zim file', async function () {
|
||||
if (!serviceWorkerAPI) {
|
||||
console.log('\x1b[33m%s\x1b[0m', ' Test skipped.');
|
||||
console.log('\x1b[33m%s\x1b[0m', ' Following test skipped:');
|
||||
return;
|
||||
}
|
||||
// Wait until files have loaded
|
||||
@ -219,7 +219,7 @@ function runTests (driver, modes) {
|
||||
|
||||
it('Sorting books by popularity', async function () {
|
||||
if (isJqueryMode) {
|
||||
console.log('\x1b[33m%s\x1b[0m', ' Test skipped.');
|
||||
console.log('\x1b[33m%s\x1b[0m', ' Following test skipped:');
|
||||
return;
|
||||
}
|
||||
await driver.switchTo().frame('articleContent');
|
||||
@ -233,7 +233,7 @@ function runTests (driver, modes) {
|
||||
|
||||
it('Sorting books by name', async function () {
|
||||
if (isJqueryMode) {
|
||||
console.log('\x1b[33m%s\x1b[0m', ' Test skipped.');
|
||||
console.log('\x1b[33m%s\x1b[0m', ' Following test skipped:');
|
||||
return;
|
||||
}
|
||||
// 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 () {
|
||||
if (isJqueryMode) {
|
||||
console.log('\x1b[33m%s\x1b[0m', ' Test skipped.');
|
||||
console.log('\x1b[33m%s\x1b[0m', ' Following test skipped:');
|
||||
return;
|
||||
}
|
||||
// click on the language dropdown and select option French
|
||||
@ -325,7 +325,7 @@ function runTests (driver, modes) {
|
||||
|
||||
it('Author search Autocomplete', async function () {
|
||||
if (isJqueryMode) {
|
||||
console.log('\x1b[33m%s\x1b[0m', ' Test skipped.');
|
||||
console.log('\x1b[33m%s\x1b[0m', ' Following test skipped:');
|
||||
return;
|
||||
}
|
||||
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 () {
|
||||
if (isJqueryMode) {
|
||||
console.log('\x1b[33m%s\x1b[0m', ' Test skipped.');
|
||||
console.log('\x1b[33m%s\x1b[0m', ' Following test skipped:');
|
||||
return;
|
||||
}
|
||||
// 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 () {
|
||||
if (!serviceWorkerAPI) {
|
||||
console.log('\x1b[33m%s\x1b[0m', ' Test skipped.');
|
||||
console.log('\x1b[33m%s\x1b[0m', ' Following test skipped:');
|
||||
return;
|
||||
}
|
||||
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 () {
|
||||
if (!serviceWorkerAPI) {
|
||||
console.log('\x1b[33m%s\x1b[0m', ' Test skipped.');
|
||||
console.log('\x1b[33m%s\x1b[0m', ' Following test skipped:');
|
||||
return;
|
||||
}
|
||||
// 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 () {
|
||||
if (!serviceWorkerAPI) {
|
||||
console.log('\x1b[33m%s\x1b[0m', ' Test skipped.');
|
||||
console.log('\x1b[33m%s\x1b[0m', ' Following test skipped:');
|
||||
return;
|
||||
}
|
||||
await driver.switchTo().defaultContent();
|
||||
|
Loading…
x
Reference in New Issue
Block a user