mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-09 19:22:51 +00:00
test: increase ui test coverage
This commit is contained in:
48
cypress/integration/catalog.spec.ts
Normal file
48
cypress/integration/catalog.spec.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
describe('catalog', function () {
|
||||
it('should have path', function () {
|
||||
cy.visit('/data-detail/ae3cf884-4dc4-526b-9213-6850135591ab');
|
||||
cy.intercept('POST', 'https://mobile.server.uni-frankfurt.de/search', {
|
||||
fixture: 'search/types/catalog/catalog-1.json',
|
||||
});
|
||||
|
||||
cy.get('stapps-data-path').within(() => {
|
||||
cy.get('ion-breadcrumb')
|
||||
.first()
|
||||
.should('contain', 'FB 1 - Rechtswissenschaft');
|
||||
cy.get('ion-breadcrumb')
|
||||
.last()
|
||||
.should('contain', 'Studium der Pflichtfächer (1. bis 5. Semester)');
|
||||
});
|
||||
});
|
||||
|
||||
it('should have default back nav', function () {
|
||||
cy.visit('/data-detail/ae3cf884-4dc4-526b-9213-6850135591ab');
|
||||
cy.intercept('POST', 'https://mobile.server.uni-frankfurt.de/search', {
|
||||
fixture: 'search/types/catalog/catalog-1.json',
|
||||
});
|
||||
cy.get('h1').should(
|
||||
'contain',
|
||||
'Studium der Pflichtfächer (1. bis 5. Semester)',
|
||||
);
|
||||
|
||||
cy.intercept('POST', 'https://mobile.server.uni-frankfurt.de/search', {
|
||||
fixture: 'search/types/catalog/catalog-2.json',
|
||||
});
|
||||
cy.get('.show-back-button').click();
|
||||
cy.get('h1').should('contain', 'FB 1 - Rechtswissenschaft');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user