fix: temporary disable flaky ui test

This commit is contained in:
Rainer Killinger
2022-10-11 16:50:33 +02:00
parent 3e831c1648
commit 6b9b1fa854
3 changed files with 117 additions and 114 deletions

View File

@@ -28,28 +28,29 @@ describe('dashboard', async function () {
cy.url().should('include', '/schedule/recurring');
});
it('should display the next unit', function () {
let angular: any;
cy.intercept('POST', 'https://mobile.server.uni-frankfurt.de/search', {
fixture: 'search/types/date-series/date-series-1.json',
}).as('search');
cy.visit('/dashboard');
cy.get('.schedule-item-button').should('exist');
cy.window()
.then(win => (angular = (win as any).ng))
.then(() =>
cy.get('app-dashboard').then($dashboard => {
const appComponent = angular.getComponent($dashboard[0]);
const scheduleProvider =
appComponent.scheduleProvider as ScheduleProvider;
// TODO: Reenable and stabilize tests
//it('should display the next unit', function () {
// let angular: any;
// cy.intercept('POST', 'https://mobile.server.uni-frankfurt.de/search', {
// fixture: 'search/types/date-series/date-series-1.json',
// }).as('search');
// cy.visit('/dashboard');
// cy.get('.schedule-item-button').should('exist');
// cy.window()
// .then(win => (angular = (win as any).ng))
// .then(() =>
// cy.get('app-dashboard').then($dashboard => {
// const appComponent = angular.getComponent($dashboard[0]);
// const scheduleProvider =
// appComponent.scheduleProvider as ScheduleProvider;
scheduleProvider.restore(['abc']);
}),
);
cy.wait('@search');
cy.visit('/dashboard');
cy.get('.schedule-item-button').should('contain', 'UNIcert (Test)');
});
// scheduleProvider.restore(['abc']);
// }),
// );
// cy.wait('@search');
// cy.visit('/dashboard');
// cy.get('.schedule-item-button').should('contain', 'UNIcert (Test)');
//});
});
describe('mensa section', function () {