({ name, description })
| 479 | } |
| 480 | |
| 481 | function validateListFields({ name, description }) { |
| 482 | cy.get('a[href^="#/collections/settings"]').click(); |
| 483 | cy.get('a[href^="#/collections/settings/entries/authors"]').click(); |
| 484 | cy.contains('button', 'Add').click(); |
| 485 | cy.contains('button', 'Save').click(); |
| 486 | assertNotification(notifications.error.missingField); |
| 487 | assertFieldErrorStatus('Authors', colorError); |
| 488 | cy.get('div[class*=SortableListItem]').eq(2).as('listControl'); |
| 489 | assertFieldErrorStatus('Name', colorError, { scope: cy.get('@listControl') }); |
| 490 | assertColorOn('background-color', colorError, { |
| 491 | type: 'label', |
| 492 | label: 'Description', |
| 493 | scope: cy.get('@listControl'), |
| 494 | isMarkdown: true, |
| 495 | }); |
| 496 | assertListControlErrorStatus([colorError, colorError], '@listControl'); |
| 497 | cy.get('input').eq(2).type(name); |
| 498 | cy.getMarkdownEditor().eq(2).type(description); |
| 499 | flushClockAndSave(); |
| 500 | assertNotification(notifications.saved); |
| 501 | assertFieldErrorStatus('Authors', colorNormal); |
| 502 | } |
| 503 | |
| 504 | function validateNestedListFields() { |
| 505 | cy.get('a[href^="#/collections/settings"]').click(); |
no test coverage detected