Rework test suite for CI.

main
Kruchinin 5 years ago
parent eb3feebbcd
commit 57833e2030

@ -9,5 +9,5 @@
"email": "admin@localhost.company", "email": "admin@localhost.company",
"password": "12qwaszx" "password": "12qwaszx"
}, },
"testFiles": ["auth_page.js", "actions_tasks_objects/*", "actions_users/*", "remove_users_tasks.js"] "testFiles": ["auth_page.js", "actions_tasks_objects/*", "actions_users/**/*", "remove_users_tasks.js"]
} }

@ -13,7 +13,7 @@ const randomString = (isPassword) => {
return isPassword ? `${result}${Math.floor(Math.random() * 10)}` : result; return isPassword ? `${result}${Math.floor(Math.random() * 10)}` : result;
}; };
context('Register user, change password, login with new password', { browser: 'chrome' }, () => { context('Register user, change password, login with new password', () => {
const caseId = '2'; const caseId = '2';
const firstName = `${randomString()}`; const firstName = `${randomString()}`;
const lastName = `${randomString()}`; const lastName = `${randomString()}`;

@ -4,7 +4,7 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
context('Multiple users. Assign task, job.', { browser: 'chrome' }, () => { context('Multiple users. Assign task, job.', () => {
const caseId = '4'; const caseId = '4';
const labelName = `Case ${caseId}`; const labelName = `Case ${caseId}`;
const taskName = `New annotation task for ${labelName}`; const taskName = `New annotation task for ${labelName}`;

@ -4,13 +4,12 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
context('Issue 1599 (Chinese alphabet).', { browser: 'chrome' }, () => { context('Issue 1599 (Chinese alphabet).', () => {
const firstName = '测试者';
const firstName = '测试者' const lastName = '测试';
const lastName = '测试' const userName = 'Testuser_ch';
const userName = 'Testuser_ch' const email = 'Testuser_ch@local.local';
const email = 'Testuser_ch@local.local' const password = 'Qwerty123!';
const password = 'Qwerty123!'
before(() => { before(() => {
cy.visit('auth/register'); cy.visit('auth/register');

@ -4,13 +4,12 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
context('Issue 1599 (Polish alphabet).', { browser: 'chrome' }, () => { context('Issue 1599 (Polish alphabet).', () => {
const firstName = 'Świętobor';
const firstName = 'Świętobor' const lastName = 'Сzcić';
const lastName = 'Сzcić' const userName = 'Testuser_pl';
const userName = 'Testuser_pl' const email = 'Testuser_pl@local.local';
const email = 'Testuser_pl@local.local' const password = 'Qwerty123!';
const password = 'Qwerty123!'
before(() => { before(() => {
cy.visit('auth/register'); cy.visit('auth/register');

@ -13,7 +13,7 @@ const randomString = (isPassword) => {
return isPassword ? `${result}${Math.floor(Math.random() * 10)}` : result; return isPassword ? `${result}${Math.floor(Math.random() * 10)}` : result;
}; };
context('Check email verification system', { browser: 'firefox' }, () => { context('Check email verification system', () => {
const caseId = 'Email verification system'; const caseId = 'Email verification system';
const firstName = `${randomString()}`; const firstName = `${randomString()}`;
const lastName = `${randomString()}`; const lastName = `${randomString()}`;
@ -31,8 +31,8 @@ context('Check email verification system', { browser: 'firefox' }, () => {
cy.server().route('POST', '/api/v1/auth/register').as('userRegister'); cy.server().route('POST', '/api/v1/auth/register').as('userRegister');
cy.userRegistration(firstName, lastName, userName, emailAddr, password); cy.userRegistration(firstName, lastName, userName, emailAddr, password);
cy.get('.ant-notification-topRight') cy.get('.ant-notification-topRight')
.contains(`We have sent an email with a confirmation link to ${emailAddr}.`) .contains(`We have sent an email with a confirmation link to ${emailAddr}.`)
.should('exist') .should('exist');
cy.wait('@userRegister').its('status').should('eq', 201); cy.wait('@userRegister').its('status').should('eq', 201);
}); });
}); });

@ -0,0 +1,13 @@
{
"video": false,
"baseUrl": "http://localhost:8080",
"viewportWidth": 1300,
"viewportHeight": 960,
"defaultCommandTimeout": 25000,
"env": {
"user": "admin",
"email": "admin@localhost.company",
"password": "12qwaszx"
},
"testFiles": ["auth_page.js", "actions_tasks_objects/*", "actions_users/*", "email_system/*", "remove_users_tasks.js"]
}

@ -1,7 +1,7 @@
{ {
"scripts": { "scripts": {
"cypress:run:chrome": "cypress run --env coverage=false --headless --browser chrome", "cypress:run:chrome": "cypress run --env coverage=false --headless --browser chrome",
"cypress:run:firefox": "cypress run --env coverage=false --headless --browser firefox" "cypress:run:firefox": "cypress run --env coverage=false --headless --browser firefox --config-file cypress_cron_type.json"
}, },
"devDependencies": { "devDependencies": {
"@cypress/code-coverage": "^3.8.1", "@cypress/code-coverage": "^3.8.1",

Loading…
Cancel
Save