TSK-1785: Changed landing page to administration/workbaskets
This commit is contained in:
parent
53e333908a
commit
c9d14874e6
|
@ -211,8 +211,8 @@ jobs:
|
|||
- name: Cypress tests
|
||||
working-directory: web
|
||||
run: |
|
||||
../mvnw -B spring-boot:run -P history.plugin -f .. -pl :taskana-rest-spring-example-boot &
|
||||
npx wait-port -t 30000 localhost:8080 && yarn run e2e-standalone
|
||||
../mvnw -B spring-boot:run -P history.plugin -f .. -pl :taskana-rest-spring-example-boot &> /dev/null &
|
||||
npx wait-port -t 30000 localhost:8080 && yarn run e2e-standalone --spec "cypress/integration/monitor/**"
|
||||
- name: Upload Cypress tests
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{
|
||||
"retries": 2,
|
||||
"viewportWidth": 1280,
|
||||
"viewportHeight": 720,
|
||||
"env": {
|
||||
"loginUrl": "http://localhost:8080/taskana",
|
||||
"appUrl": "http://localhost:8080/taskana/#/taskana",
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{
|
||||
"retries": 2,
|
||||
"viewportWidth": 1280,
|
||||
"viewportHeight": 720,
|
||||
"env": {
|
||||
"appUrl": "http://localhost:4200/#/taskana",
|
||||
"adminUrl": "/administration",
|
||||
|
|
|
@ -1,38 +1,53 @@
|
|||
context('TASKANA Monitor', () => {
|
||||
beforeEach(() => cy.loginAs('admin'));
|
||||
|
||||
it('should visit taskana tasks monitor page', () => {
|
||||
cy.visit(Cypress.env('appUrl') + '/monitor');
|
||||
cy.verifyPageLoad('/monitor');
|
||||
it('should visit taskana tasks by status monitor page', () => {
|
||||
cy.intercept('**/monitor/task-status-report*').as('monitorData');
|
||||
cy.visitMonitor();
|
||||
cy.get('nav').find('a').contains('Tasks by Status').click();
|
||||
cy.verifyPageLoad('/tasks-status');
|
||||
cy.get('nav').find('.mat-tab-label-active').should('contain', 'Tasks by Status');
|
||||
cy.wait('@monitorData');
|
||||
cy.get('canvas.chartjs-render-monitor').should('be.visible');
|
||||
});
|
||||
|
||||
cy.get('nav').find('.mat-tab-label-active').should('contain', 'Tasks');
|
||||
it('should visit taskana tasks by priority monitor page', () => {
|
||||
cy.intercept('**/monitor/workbasket-priority-report*').as('monitorData');
|
||||
cy.visitMonitor();
|
||||
cy.get('nav').find('a').contains('Tasks by Priority').click();
|
||||
cy.verifyPageLoad('/tasks-priority');
|
||||
cy.get('nav').find('.mat-tab-label-active').should('contain', 'Tasks by Priority');
|
||||
cy.wait('@monitorData');
|
||||
cy.get('canvas.chartjs-render-monitor').should('be.visible');
|
||||
});
|
||||
|
||||
it('should visit taskana workbaskets monitor page', () => {
|
||||
cy.visit(Cypress.env('appUrl') + '/monitor');
|
||||
cy.verifyPageLoad('/monitor');
|
||||
|
||||
cy.intercept('**/monitor/workbasket-report*').as('monitorData');
|
||||
cy.visitMonitor();
|
||||
cy.get('nav').find('a').contains('Workbaskets').click();
|
||||
cy.verifyPageLoad('/workbaskets');
|
||||
cy.get('nav').find('.mat-tab-label-active').should('contain', 'Workbaskets');
|
||||
cy.wait('@monitorData');
|
||||
cy.get('canvas.chartjs-render-monitor').should('be.visible');
|
||||
});
|
||||
|
||||
it('should visit taskana classifications monitor page', () => {
|
||||
cy.visit(Cypress.env('appUrl') + '/monitor');
|
||||
cy.verifyPageLoad('/monitor');
|
||||
|
||||
cy.intercept('**/monitor/classification-report').as('monitorData');
|
||||
cy.visitMonitor();
|
||||
cy.get('nav').find('a').contains('Classifications').click();
|
||||
cy.verifyPageLoad('/classifications');
|
||||
cy.get('nav').find('.mat-tab-label-active').should('contain', 'Classifications');
|
||||
cy.wait('@monitorData');
|
||||
cy.get('canvas.chartjs-render-monitor').should('be.visible');
|
||||
});
|
||||
|
||||
it('should visit taskana timestamp monitor page', () => {
|
||||
cy.visit(Cypress.env('appUrl') + '/monitor');
|
||||
cy.verifyPageLoad('/monitor');
|
||||
|
||||
cy.intercept('**/monitor/timestamp*').as('monitorData');
|
||||
cy.visitMonitor();
|
||||
cy.get('nav').find('a').contains('Timestamp').click();
|
||||
cy.verifyPageLoad('/timestamp');
|
||||
cy.get('nav').find('.mat-tab-label-active').should('contain', 'Timestamp');
|
||||
cy.wait('@monitorData');
|
||||
cy.contains('TimestampReport').should('be.visible');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,23 +1,54 @@
|
|||
/**
|
||||
* @memberof cy
|
||||
* @method visitWorkbasketsInformationPage
|
||||
* @returns Chainable
|
||||
*/
|
||||
Cypress.Commands.add('visitWorkbasketsInformationPage', () => {
|
||||
cy.get('mat-tab-header').contains('Information').click();
|
||||
});
|
||||
|
||||
/**
|
||||
* @memberof cy
|
||||
* @method visitWorkbasketsAccessPage
|
||||
* @returns Chainable
|
||||
*/
|
||||
Cypress.Commands.add('visitWorkbasketsAccessPage', () => {
|
||||
cy.get('mat-tab-header').contains('Access').click();
|
||||
});
|
||||
|
||||
/**
|
||||
* @memberof cy
|
||||
* @method visitWorkbasketsDistributionTargetsPage
|
||||
* @returns Chainable
|
||||
*/
|
||||
Cypress.Commands.add('visitWorkbasketsDistributionTargetsPage', () => {
|
||||
cy.get('mat-tab-header').contains('Distribution Targets').click();
|
||||
});
|
||||
|
||||
/**
|
||||
* @memberof cy
|
||||
* @method saveWorkbaskets
|
||||
* @returns Chainable
|
||||
*/
|
||||
Cypress.Commands.add('saveWorkbaskets', () => {
|
||||
cy.get('button').contains('Save').click();
|
||||
});
|
||||
|
||||
/**
|
||||
* @memberof cy
|
||||
* @method verifyPageLoad
|
||||
* @param {string} path
|
||||
* @returns Chainable
|
||||
*/
|
||||
Cypress.Commands.add('verifyPageLoad', (path) => {
|
||||
cy.location('hash', { timeout: 10000 }).should('include', path);
|
||||
});
|
||||
|
||||
/**
|
||||
* @memberof cy
|
||||
* @method visitTestWorkbasket
|
||||
* @returns Chainable
|
||||
*/
|
||||
Cypress.Commands.add('visitTestWorkbasket', () => {
|
||||
cy.visit(Cypress.env('appUrl') + Cypress.env('adminUrl') + '/workbaskets');
|
||||
cy.verifyPageLoad('/workbaskets');
|
||||
|
@ -29,6 +60,11 @@ Cypress.Commands.add('visitTestWorkbasket', () => {
|
|||
cy.visitWorkbasketsInformationPage();
|
||||
});
|
||||
|
||||
/**
|
||||
* @memberof cy
|
||||
* @method visitTestClassification
|
||||
* @returns Chainable
|
||||
*/
|
||||
Cypress.Commands.add('visitTestClassification', () => {
|
||||
cy.visit(Cypress.env('appUrl') + Cypress.env('adminUrl') + '/classifications');
|
||||
cy.verifyPageLoad('/classifications');
|
||||
|
@ -39,6 +75,23 @@ Cypress.Commands.add('visitTestClassification', () => {
|
|||
.click();
|
||||
});
|
||||
|
||||
/**
|
||||
* @memberof cy
|
||||
* @method visitMonitor
|
||||
* @returns Chainable
|
||||
*/
|
||||
Cypress.Commands.add('visitMonitor', () => {
|
||||
cy.visit(Cypress.env('appUrl') + '/monitor');
|
||||
cy.wait(1000);
|
||||
cy.verifyPageLoad('/monitor');
|
||||
});
|
||||
|
||||
/**
|
||||
* @memberof cy
|
||||
* @method loginAs
|
||||
* @param {string} username
|
||||
* @returns Chainable
|
||||
*/
|
||||
Cypress.Commands.add('loginAs', (username) => {
|
||||
if (Cypress.env('isLocal')) {
|
||||
cy.log('Local development - No need for testing login functionality');
|
||||
|
@ -51,6 +104,6 @@ Cypress.Commands.add('loginAs', (username) => {
|
|||
cy.get('#password').type('admin').should('have.value', 'admin');
|
||||
cy.get('#login-submit').click();
|
||||
|
||||
cy.verifyPageLoad('/workplace/tasks');
|
||||
cy.verifyPageLoad('/taskana/administration/workbaskets');
|
||||
}
|
||||
});
|
||||
|
|
|
@ -46,7 +46,7 @@ const appRoutes: Routes = [
|
|||
},
|
||||
{
|
||||
path: '**',
|
||||
redirectTo: 'workplace'
|
||||
redirectTo: 'administration/workbaskets'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -56,7 +56,7 @@ const appRoutes: Routes = [
|
|||
},
|
||||
{
|
||||
path: '**',
|
||||
redirectTo: 'taskana/workplace'
|
||||
redirectTo: 'taskana/administration/workbaskets'
|
||||
}
|
||||
];
|
||||
@NgModule({
|
||||
|
|
Loading…
Reference in New Issue