mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-22 09:32:41 +00:00
test: rework ui tests for new layout
This commit is contained in:
committed by
Rainer Killinger
parent
0bce9e5452
commit
de10654675
@@ -15,13 +15,17 @@
|
||||
|
||||
describe('favorites', function () {
|
||||
it('should add a favorite', function () {
|
||||
cy.intercept('POST', 'https://mobile.server.uni-frankfurt.de/search', {
|
||||
fixture: 'search/test.json',
|
||||
}).as('search');
|
||||
|
||||
cy.visit('/search');
|
||||
cy.get('ion-searchbar').type('test');
|
||||
let text!: string;
|
||||
cy.get('stapps-data-list-item')
|
||||
.first()
|
||||
.within(() => {
|
||||
cy.get('h2')
|
||||
cy.get('.title')
|
||||
.invoke('text')
|
||||
.then(it => {
|
||||
text = it;
|
||||
@@ -30,7 +34,7 @@ describe('favorites', function () {
|
||||
});
|
||||
cy.visit('/favorites');
|
||||
cy.get('stapps-data-list-item').within(() => {
|
||||
cy.get('h2').should('contain', text);
|
||||
cy.get('.title').should('contain', text);
|
||||
cy.get('stapps-favorite-button').click();
|
||||
});
|
||||
cy.get('stapps-data-list').contains('Keine Ergebnisse');
|
||||
|
||||
Reference in New Issue
Block a user