Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⬆️ Update e2e packages #3762

Merged
merged 9 commits into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tests/e2e/custom-jest-setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// @ts-ignore
global.url = "http://127.0.0.1:9081/";

// @ts-ignore
global.apiVersion = "v0/";

// @ts-ignore
global.ourTimeout = 40000;
12 changes: 5 additions & 7 deletions tests/e2e/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
module.exports = {
const config = {
preset: "jest-puppeteer",
verbose: true,
collectCoverage: true,
coverageReporters: ["lcov", "text"],
globals: {
url: "http://127.0.0.1:9081/",
apiVersion: 'v0/',
ourTimeout: 40000,
}
}
setupFiles: ['<rootDir>/custom-jest-setup.ts'],
};

module.exports = config;
15,231 changes: 7,396 additions & 7,835 deletions tests/e2e/package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions tests/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
"test": "tests"
},
"dependencies": {
"jest": "^24.9.0",
"jest-puppeteer": "^4.4.0",
"jest": "^29.3.1",
"jest-puppeteer": "^6.2.0",
"log-timestamp": "^0.3.0",
"log4js": "^6.4.0",
"node-fetch": "^2.6.1",
"puppeteer": "^2.1.1"
"log4js": "^6.7.1",
"node-fetch": "^3.3.0",
"puppeteer": "^19.5.2"
},
"scripts": {
"test": "jest --debug --runInBand --colors",
Expand Down
11 changes: 10 additions & 1 deletion tests/e2e/s4l/sim4life-lite.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
// node sim4life-lite.js [url] [user] [password] [timeout] [--demo]
// node sim4life-lite.js url
// [--user user]
// [--pass pass]
// [--n_users nUsers]
// [--user_prefix userPrefix]
// [--user_suffix userSuffix]
// [--start_timeout startTimeout]
// [--basicauth_user basicauthUsername]
// [--basicauth_pass basicauthPassword]
// [--demo]

const utils = require('../utils/utils');
const tutorialBase = require('../tutorials/tutorialBase');
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/tests/register.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,5 @@ test('Register and Log Out', async () => {
await auto.register(page, user, pass);
page.on('response', secondHandler);
await auto.logOut(page);
await page.waitFor(5000);
await utils.sleep(5000);
}, ourTimeout);
2 changes: 1 addition & 1 deletion tests/e2e/tests/startupCalls.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('Calls after logging in', () => {
beforeAll(async () => {
await page.goto(url);
await auto.register(page, user, pass);
await page.waitFor(1000);
await utils.sleep(1000);
}, ourTimeout);

afterAll(async () => {
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/utils/auto.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ async function dashboardOpenFirstTemplate(page, templateName) {
if (templateName) {
// Show flat list
await utils.waitAndClick(page, '[osparc-test-id="groupByButton"]', 1000);
await utils.sleep(1000);
await utils.waitAndClick(page, '[osparc-test-id="groupByNone"]', 1000);
await utils.sleep(1000);

await utils.sleep(2000);

await utils.takeScreenshot(page, "type filter text");
await __filterTemplatesByText(page, templateName);
Expand Down