mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-23 01:53:00 +00:00
feat: improved e2e tests
This commit is contained in:
@@ -15,9 +15,16 @@
|
||||
|
||||
describe('news', function () {
|
||||
beforeEach(function () {
|
||||
cy.intercept('POST', 'https://mobile.server.uni-frankfurt.de/search', {
|
||||
fixture: 'search/types/message/message-1.json',
|
||||
}).as('search');
|
||||
cy.interceptSearch({
|
||||
extends: 'news/all',
|
||||
fixture: 'news/all',
|
||||
alias: 'search',
|
||||
});
|
||||
cy.interceptGet({
|
||||
uid: 'message',
|
||||
fixture: 'news/message',
|
||||
alias: 'detail',
|
||||
});
|
||||
});
|
||||
|
||||
it('should show all articles by default', function () {
|
||||
@@ -33,10 +40,8 @@ describe('news', function () {
|
||||
});
|
||||
|
||||
it('should have an external link indicator on detail pages', function () {
|
||||
cy.intercept('POST', 'https://mobile.server.uni-frankfurt.de/search', {
|
||||
fixture: 'search/types/message/single-message.json',
|
||||
}).as('search');
|
||||
cy.visit('/data-detail/c90c7d30-410f-5aea-a67b-ea1f98929b93');
|
||||
cy.visit('/data-detail/message');
|
||||
cy.wait('@detail');
|
||||
cy.contains('ion-card', 'Ursprünglicher Link').find('ion-icon[name="open_in_browser"]').should('exist');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user