chore: colocate tests (#758)
This commit is contained in:
commit
7f12b6d72c
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
recursive: true
|
||||
require:
|
||||
- mochaSetup.mjs
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ test-install:
|
|||
|
||||
test-run:
|
||||
# GitHub Actions fails badly on the default timeout of 2000ms
|
||||
npx mocha -t 10000
|
||||
npx mocha tests --recursive -t 10000
|
||||
|
||||
find-flakey-tests:
|
||||
echo "Running test-run infinately"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.provision "shell", inline: "mkdir /etc/OliveTin && chmod o+w /etc/OliveTin/ && mkdir -p /opt/OliveTin-configs/ && chmod 0777 /opt/OliveTin-configs", privileged: true
|
||||
config.vm.provision "file", source: "configs/.", destination: "/opt/OliveTin-configs/"
|
||||
config.vm.provision "file", source: "tests/.", destination: "/tmp/test-configs/"
|
||||
config.vm.provision "shell", inline: "for dir in /tmp/test-configs/*/; do if [ -f \"$dir/config.yaml\" ]; then cp -r \"$dir\" /opt/OliveTin-configs/$(basename \"$dir\")/; fi; done", privileged: true
|
||||
|
||||
config.vm.provider :libvirt do |libvirt|
|
||||
libvirt.management_network_device = 'virbr0'
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class OliveTinTestRunnerStartLocalProcess extends OliveTinTestRunner {
|
|||
|
||||
console.log(" OliveTin starting local process...")
|
||||
|
||||
this.ot = spawn('./../service/OliveTin', ['-configdir', 'configs/' + cfg + '/'])
|
||||
this.ot = spawn('./../service/OliveTin', ['-configdir', 'tests/' + cfg + '/'])
|
||||
|
||||
let logStdout = false
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { By, until } from 'selenium-webdriver'
|
|||
import {
|
||||
getRootAndWait,
|
||||
takeScreenshotOnFailure,
|
||||
} from '../lib/elements.js'
|
||||
} from '../../lib/elements.js'
|
||||
|
||||
describe('config: authRequireGuestsToLogin', function () {
|
||||
this.timeout(30000)
|
||||
|
|
@ -8,7 +8,7 @@ import {
|
|||
openSidebar,
|
||||
getNavigationLinks,
|
||||
takeScreenshotOnFailure,
|
||||
} from '../lib/elements.js'
|
||||
} from '../../lib/elements.js'
|
||||
|
||||
describe('config: dashboards with basic fieldsets', function () {
|
||||
before(async function () {
|
||||
|
|
@ -5,7 +5,7 @@ import {
|
|||
getRootAndWait,
|
||||
getActionButton,
|
||||
takeScreenshotOnFailure,
|
||||
} from '../lib/elements.js'
|
||||
} from '../../lib/elements.js'
|
||||
|
||||
describe('config: datetime', function () {
|
||||
before(async function () {
|
||||
|
|
@ -7,7 +7,7 @@ import {
|
|||
openSidebar,
|
||||
getNavigationLinks,
|
||||
takeScreenshotOnFailure,
|
||||
} from '../lib/elements.js'
|
||||
} from '../../lib/elements.js'
|
||||
|
||||
describe('config: empty dashboards are hidden', function () {
|
||||
before(async function () {
|
||||
|
|
@ -5,7 +5,7 @@ import {
|
|||
getRootAndWait,
|
||||
takeScreenshot,
|
||||
takeScreenshotOnFailure,
|
||||
} from '../lib/elements.js'
|
||||
} from '../../lib/elements.js'
|
||||
|
||||
describe('config: entities', function () {
|
||||
before(async function () {
|
||||
|
|
@ -6,7 +6,7 @@ import {
|
|||
getRootAndWait,
|
||||
getActionButtons,
|
||||
takeScreenshotOnFailure,
|
||||
} from '../lib/elements.js'
|
||||
} from '../../lib/elements.js'
|
||||
|
||||
describe('config: entities', function () {
|
||||
before(async function () {
|
||||
|
|
@ -7,7 +7,7 @@ import {
|
|||
getActionButtons,
|
||||
takeScreenshotOnFailure,
|
||||
openSidebar,
|
||||
} from '../lib/elements.js'
|
||||
} from '../../lib/elements.js'
|
||||
|
||||
describe('config: general', function () {
|
||||
before(async function () {
|
||||
|
|
@ -6,7 +6,7 @@ import {
|
|||
getRootAndWait,
|
||||
getActionButtons,
|
||||
takeScreenshotOnFailure,
|
||||
} from '../lib/elements.js'
|
||||
} from '../../lib/elements.js'
|
||||
|
||||
describe('config: hiddenFooter', function () {
|
||||
before(async function () {
|
||||
|
|
@ -4,7 +4,7 @@ import {
|
|||
getRootAndWait,
|
||||
getActionButtons,
|
||||
takeScreenshotOnFailure,
|
||||
} from '../lib/elements.js'
|
||||
} from '../../lib/elements.js'
|
||||
|
||||
|
||||
describe('config: hiddenNav', function () {
|
||||
|
|
@ -5,7 +5,7 @@ import {
|
|||
getRootAndWait,
|
||||
getActionButtons,
|
||||
takeScreenshotOnFailure,
|
||||
} from '../lib/elements.js'
|
||||
} from '../../lib/elements.js'
|
||||
|
||||
describe('config: include', function () {
|
||||
this.timeout(30000)
|
||||
|
|
@ -4,7 +4,7 @@ import { By, until, Condition } from 'selenium-webdriver'
|
|||
import {
|
||||
getRootAndWait,
|
||||
takeScreenshotOnFailure,
|
||||
} from '../lib/elements.js'
|
||||
} from '../../lib/elements.js'
|
||||
|
||||
describe('config: localAuth', function () {
|
||||
this.timeout(30000) // Increase timeout to 30 seconds
|
||||
|
|
@ -5,7 +5,7 @@ import {
|
|||
getRootAndWait,
|
||||
getActionButtons,
|
||||
takeScreenshotOnFailure,
|
||||
} from '../lib/elements.js'
|
||||
} from '../../lib/elements.js'
|
||||
|
||||
|
||||
describe('config: multipleDropdowns', function () {
|
||||
|
|
@ -8,7 +8,7 @@ import {
|
|||
openSidebar,
|
||||
closeSidebar,
|
||||
takeScreenshotOnFailure,
|
||||
} from '../lib/elements.js'
|
||||
} from '../../lib/elements.js'
|
||||
|
||||
describe('config: onlyDashboards', function () {
|
||||
before(async function () {
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import {
|
||||
getRootAndWait,
|
||||
takeScreenshotOnFailure,
|
||||
} from '../lib/elements.js'
|
||||
} from '../../lib/elements.js'
|
||||
|
||||
import { By } from 'selenium-webdriver'
|
||||
import { expect } from 'chai'
|
||||
|
|
@ -4,7 +4,7 @@ import { expect } from 'chai'
|
|||
import { By } from 'selenium-webdriver'
|
||||
import {
|
||||
takeScreenshotOnFailure,
|
||||
} from '../lib/elements.js'
|
||||
} from '../../lib/elements.js'
|
||||
|
||||
let metrics = [
|
||||
{'name': 'olivetin_actions_requested_count', 'type': 'counter', 'desc': 'The actions requested count'},
|
||||
|
|
@ -9,7 +9,7 @@ import {
|
|||
requireExecutionDialogStatus,
|
||||
getRootAndWait,
|
||||
getActionButton
|
||||
} from '../lib/elements.js'
|
||||
} from '../../lib/elements.js'
|
||||
|
||||
describe('config: sleep', function () {
|
||||
before(async function () {
|
||||
|
|
@ -2,7 +2,7 @@ import { expect } from 'chai'
|
|||
import {
|
||||
getRootAndWait,
|
||||
takeScreenshotOnFailure,
|
||||
} from '../lib/elements.js'
|
||||
} from '../../lib/elements.js'
|
||||
|
||||
describe('config: trustedHeader', function () {
|
||||
before(async function () {
|
||||
Loading…
Reference in New Issue