MCPcopy Create free account
hub / github.com/decaporg/decap-cms / validateListFields

Function validateListFields

cypress/utils/steps.js:480–501  ·  view source on GitHub ↗
({ name, description })

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 6

assertNotificationFunction · 0.85
assertFieldErrorStatusFunction · 0.85
assertColorOnFunction · 0.85
flushClockAndSaveFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected