-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.test.js
86 lines (80 loc) · 2.54 KB
/
index.test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*
-------------- HEADER TESTERS --------------
*/
let {helpMenuButtonTest} = require('./tests/header/helpButtonWorks');
let {helpMenuItemsTest} = require('./tests/header/helpMenuItemsWork');
let {notificationsWork} = require('./tests/header/notificationsWork');
let {toggleSideMenu} = require('./tests/header/toggleSideMenu');
let {signOut} = require('./tests/header/signOut');
let {userMenuWorks} = require('./tests/header/userMenuWorks');
let {testHomeButton} = require('./tests/header/homeButtonWorks');
/*
-------------- NAVIGATION TESTERS --------------
*/
let {testNavigation} = require('./tests/navigation/testNavigation');
/*
-------------- DASHBOARD TESTERS --------------
*/
let {createSandbox} = require('./tests/dashboard/createSandbox');
let {testSandboxSelection} = require('./tests/dashboard/selectSandbox');
/*
-------------- APPS TESTERS --------------
*/
let {testAppCreation} = require('./tests/apps/testAppCreation');
/*
-------------- SETTINGS TESTERS --------------
*/
let {deleteSandbox} = require('./tests/settings/deleteSandbox');
const ACTIONS = {
helpMenuButtonTest, helpMenuItemsTest, createSandbox, deleteSandbox, notificationsWork, userMenuWorks, signOut, toggleSideMenu, testSandboxSelection, testNavigation, testHomeButton, testAppCreation
};
const UTILS = require('./tests/utils');
const TEST_SUITE = [
// {
// title: 'Test the header bar',
// tests: [
// 'helpMenuButtonTest', 'notificationsWork', 'userMenuWorks', '__helpMenuItemsTest'
// ]
// },
{
title: 'Test dashboard functionality',
tests: [
'createSandbox', 'testHomeButton', 'testSandboxSelection'
]
},
// {
// title: 'Test the side menu and navigation',
// tests: [
// 'toggleSideMenu', 'testNavigation'
// ]
// },
// {
// title: 'Test apps screen functionality',
// tests: [
// 'testAppCreation'
// ]
// },
{
title: 'Cleanup after the testing',
tests: [
'deleteSandbox', 'signOut'
]
}
];
//Initialize the app
describe('Initialize', function () {
require('./tests/Init/init');
require('./tests/Init/login');
});
TEST_SUITE.map(testCase => {
describe(testCase.title, function () {
testCase.tests.map(test => {
test.indexOf('__') !== 0 && ACTIONS[test]();
});
});
});
describe('Finish the testing', function () {
it('should close the browser and finish the tests', async () => {
// await UTILS.closeTab();
});
});