refactor: replace moment.js with date-fns

This commit is contained in:
2023-07-26 16:20:03 +02:00
parent 38fb7a398d
commit 9e26fa7a1a
92 changed files with 765 additions and 846 deletions

View File

@@ -30,14 +30,14 @@ describe('ical', function () {
cy.get('ion-app > ion-modal').within(() => {
cy.get('ion-footer > ion-toolbar > ion-button').should('have.attr', 'disabled');
cy.contains('ion-item', /19\.\s+Januar\s+2059,\s+\d{2}:00\s+-\s+\d{2}:00/).click();
cy.contains('ion-item', /1\s+Stunde\s+Sonntag,\s+19\.\s+Januar\s+2059\s+um\s+\d{2}:00/).click();
cy.get('ion-footer > ion-toolbar > ion-button').should('not.have.attr', 'disabled');
cy.get('ion-footer > ion-toolbar > ion-button').click();
});
cy.get('add-event-review-modal').within(() => {
cy.get('ion-item-group').should('contain', 'UNIcert (Test)');
cy.contains('ion-item-group', /19\.\s+Jan\.\s+2059,\s+\d{2}:00/);
cy.contains('ion-item-group', /19\.\s+Januar\s+2059\s+um\s+\d{2}:00/);
});
});
});

View File

@@ -25,7 +25,7 @@ describe('schedule', function () {
it('should respect the url', function () {
cy.visit('/schedule/calendar/2022-01-19');
cy.get('#date-select-button0').should('contain', '19.01.22');
cy.get('#date-select-button0').should('contain', '19.01.2022');
});
it('should navigate a full page', function () {
@@ -66,13 +66,13 @@ describe('schedule', function () {
it('should navigate to a specific date', function () {
cy.visit('/schedule/calendar/2059-01-19');
cy.contains('#date-select-button0', '19.01.59').click();
cy.contains('#date-select-button0', '19.01.2059').click();
cy.wait(2000);
cy.get('button[data-day=1][data-month=1][data-year=2059]', {
includeShadowDom: true,
}).click();
cy.wait(2000);
cy.contains('#date-select-button0', '01.01.59').click();
cy.contains('#date-select-button0', '01.01.2059').click();
});
// TODO: Reenable and stabilize tests