diff --git a/src/main/resources/templates/fragments/exam-number-input.html b/src/main/resources/templates/fragments/exam-number-input.html
index 121b2d732..0b51dbe83 100644
--- a/src/main/resources/templates/fragments/exam-number-input.html
+++ b/src/main/resources/templates/fragments/exam-number-input.html
@@ -4,8 +4,8 @@
diff --git a/src/test/e2e/cypress/e2e/search.cy.js b/src/test/e2e/cypress/e2e/search.cy.js
index 07b45404d..1910068fc 100644
--- a/src/test/e2e/cypress/e2e/search.cy.js
+++ b/src/test/e2e/cypress/e2e/search.cy.js
@@ -36,7 +36,7 @@ it('should display error when no exams were found', () => {
});
it('should display error when exam number is invalid', () => {
- cy.get('input[type="text"]').type('abc');
+ cy.get('input[type="text"]').type('123');
cy.get('button').click();
cy.contains('Prüfungsnummer muss 5 Ziffern lang sein');
});
@@ -81,3 +81,12 @@ it('should rename files to subject-folder they are inside of after downloading',
}
cy.expect(i).to.equal(3)
});
+
+
+it('should not be able to input more than 5 characters', () => {
+ cy.get('input[type="text"]').type('110000').should('have.value', '11000');
+});
+
+it('should not be able to input other characters', () => {
+ cy.get('input[type="text"]').type('a2c').should('have.value', '2');
+});
\ No newline at end of file