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

Function duplicateEntry

cypress/utils/steps.js:433–444  ·  view source on GitHub ↗
(entry)

Source from the content-addressed store, hash-verified

431}
432
433function duplicateEntry(entry) {
434 selectDropdownItem('Published', 'Duplicate');
435 cy.url().should('contain', '/#/collections/posts/new');
436 flushClockAndSave();
437 updateWorkflowStatusInEditor(editorStatus.ready);
438 publishEntryInEditor(publishTypes.publishNow);
439 exitEditor();
440 cy.get('a h2').should($h2s => {
441 expect($h2s.eq(0)).to.contain(entry.title);
442 expect($h2s.eq(1)).to.contain(entry.title);
443 });
444}
445
446function validateObjectFields({ limit, author }) {
447 cy.get('a[href^="#/collections/settings"]').click();

Calls 6

selectDropdownItemFunction · 0.85
flushClockAndSaveFunction · 0.85
publishEntryInEditorFunction · 0.85
exitEditorFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected