removed cypress

This commit is contained in:
Timo Bejan 2022-01-18 12:11:53 +02:00
parent 3f00ec4e48
commit dd2f0c4eca
15 changed files with 39 additions and 1116 deletions

View File

@ -1,13 +0,0 @@
{
"reporter": "junit",
"baseUrl": "http://localhost:4200",
"env": {
"api_url": "https://timo-redaction-dev.iqser.cloud",
"auth_base_url": "https://redkc-staging.iqser.cloud/auth",
"auth_realm": "redaction",
"auth_client_id": "redaction"
},
"reporterOptions": {
"mochaFile": "cypress/test-reports/test-[hash].xml"
}
}

View File

@ -1,13 +0,0 @@
{
"reporter": "junit",
"baseUrl": "https://app-ui-automated.iqser.cloud",
"env": {
"api_url": "https://api-ui-automated.iqser.cloud",
"auth_base_url": "https://keycloak-ui-automated.iqser.cloud/auth",
"auth_realm": "redaction",
"auth_client_id": "redaction"
},
"reporterOptions": {
"mochaFile": "cypress/test-reports/test-[hash].xml"
}
}

4
cypress/.gitignore vendored
View File

@ -1,4 +0,0 @@
/videos
/screenshots
/results
/test-reports

View File

@ -1,4 +0,0 @@
{
"username": "manager",
"password": "OsloImWinter"
}

View File

@ -1,4 +0,0 @@
{
"username": "user",
"password": "OsloImWinter"
}

View File

@ -1,18 +0,0 @@
/// <reference types="cypress" />
/// <reference path="../../support/index.d.ts" />
describe('it should only test login/logout flow', () => {
before(() => {
// cy.init('user');
});
after(() => {
// cy.cleanup();
});
it('it should land on homepage with no projects', () => {
console.log('no-op');
// cy.visit('/main/projects');
// cy.get('redaction-project-listing-empty', { timeout: 30000 });
});
});

View File

@ -1,20 +0,0 @@
/// <reference types="cypress" />
// ***********************************************************
// This example plugins/index.js can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/plugins-guide
// ***********************************************************
// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)
/**
* @type {Cypress.PluginConfig}
*/
module.exports = (on, config) => {
return config;
};

View File

@ -1,43 +0,0 @@
import 'cypress-localstorage-commands';
import 'cypress-file-upload';
import 'cypress-keycloak-commands';
Cypress.Commands.add('cleanup', () => {
localStorage.clear();
cy.clearLocalStorageSnapshot();
cy.kcLogout();
});
Cypress.Commands.add('init', (user) => {
cy.kcLogin('manager').as('tokens');
cy.deleteAllProjects();
cy.kcLogout();
cy.kcLogin(user).as('tokens');
});
Cypress.Commands.add('deleteAllProjects', () => {
cy.get('@tokens').then((tokens) => {
const projectListRequest = {
method: 'GET',
url: Cypress.env('api_url') + '/project',
headers: {
Authorization: 'bearer ' + tokens.access_token
}
};
cy.request(projectListRequest).then((projects) => {
projects.body.forEach((project) => {
const deleteProjectRequest = {
method: 'DELETE',
url: Cypress.env('api_url') + '/project/' + project.projectId,
headers: {
Authorization: 'bearer ' + tokens.access_token
}
};
cy.request(deleteProjectRequest).then((response) => {
console.log('Project Deleted', project.projectId, response);
});
});
});
});
});

View File

@ -1,20 +0,0 @@
/// <reference types="cypress" />
declare namespace Cypress {
interface Chainable {
/**
* Should run before each spec!
*/
init(user?: string): Chainable<Element>;
/**
* Should run after each spec!
*/
cleanup(): Chainable<Element>;
/**
* Deletes user uploads before tests
*/
deleteAllProjects(): Chainable<Element>;
}
}

View File

@ -1,20 +0,0 @@
// ***********************************************************
// This example support/index.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************
// Import commands.js using ES2015 syntax:
import './commands';
// Alternatively you can use CommonJS syntax:
// require('./commands')

View File

@ -1,8 +0,0 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["es5", "dom"],
"types": ["cypress"]
},
"include": ["**/*.ts"]
}

View File

@ -1,4 +0,0 @@
FROM cypress/included:5.6.0
COPY package.json yarn.lock ./
RUN yarn install
COPY . .

View File

@ -39,8 +39,7 @@
"generators": {
"@nrwl/angular:application": {
"linter": "eslint",
"unitTestRunner": "jest",
"e2eTestRunner": "cypress"
"unitTestRunner": "jest"
},
"@nrwl/angular:library": {
"linter": "eslint",

View File

@ -71,24 +71,18 @@
"@angular/language-service": "13.1.2",
"@bartholomej/ngx-translate-extract": "^8.0.2",
"@nrwl/cli": "13.4.5",
"@nrwl/cypress": "13.4.5",
"@nrwl/eslint-plugin-nx": "13.4.5",
"@nrwl/jest": "13.4.5",
"@nrwl/linter": "13.4.5",
"@nrwl/tao": "13.4.5",
"@nrwl/workspace": "13.4.5",
"@types/cypress": "^1.1.3",
"@types/jest": "27.4.0",
"@types/lodash": "^4.14.178",
"@types/node": "17.0.9",
"@types/puppeteer": "^5.4.4",
"@typescript-eslint/eslint-plugin": "5.9.1",
"@typescript-eslint/parser": "5.3.1",
"axios": "^0.24.0",
"cypress": "^6.9.1",
"cypress-file-upload": "^5.0.8",
"cypress-keycloak": "^1.7.0",
"cypress-keycloak-commands": "^1.2.0",
"cypress-localstorage-commands": "^1.5.0",
"dotenv": "10.0.0",
"eslint": "8.7.0",
"eslint-config-airbnb-base": "^15.0.0",

973
yarn.lock

File diff suppressed because it is too large Load Diff