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

Function duplicatePostAndPublish

cypress/utils/steps.js:401–413  ·  view source on GitHub ↗
(entry1)

Source from the content-addressed store, hash-verified

399}
400
401function duplicatePostAndPublish(entry1) {
402 goToEntry(entry1);
403 cy.contains('button', 'Delete entry');
404 selectDropdownItem('Published', 'Duplicate');
405 publishEntry();
406
407 cy.url().should(
408 'eq',
409 `http://localhost:8080/#/collections/posts/entries/1970-01-01-${entry1.title
410 .toLowerCase()
411 .replace(/\s/, '-')}-1`,
412 );
413}
414
415function updateExistingPostAndExit(fromEntry, toEntry) {
416 goToWorkflow();

Calls 4

goToEntryFunction · 0.85
selectDropdownItemFunction · 0.85
publishEntryFunction · 0.85
replaceMethod · 0.80

Tested by

no test coverage detected