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

Function duplicateEntry

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

Source from the content-addressed store, hash-verified

430}
431
432function duplicateEntry(entry) {
433 selectDropdownItem('Published', 'Duplicate');
434 cy.url().should('contain', '/#/collections/posts/new');
435 flushClockAndSave();
436 updateWorkflowStatusInEditor(editorStatus.ready);
437 publishEntryInEditor(publishTypes.publishNow);
438 exitEditor();
439 cy.get('a h2').should($h2s => {
440 expect($h2s.eq(0)).to.contain(entry.title);
441 expect($h2s.eq(1)).to.contain(entry.title);
442 });
443}
444
445function validateObjectFields({ limit, author }) {
446 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