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

Function publishEntry

cypress/utils/steps.js:316–338  ·  view source on GitHub ↗
({ createNew = false, duplicate = false } = {})

Source from the content-addressed store, hash-verified

314}
315
316function publishEntry({ createNew = false, duplicate = false } = {}) {
317 cy.then(() => {
318 const clock = cy.state('clock');
319
320 // some input fields are de-bounced thus require advancing the clock
321 advanceClock(clock);
322
323 if (createNew) {
324 advanceClock(clock);
325 selectDropdownItem('Publish', publishTypes.publishAndCreateNew);
326 advanceClock(clock);
327 } else if (duplicate) {
328 advanceClock(clock);
329 selectDropdownItem('Publish', publishTypes.publishAndDuplicate);
330 advanceClock(clock);
331 } else {
332 selectDropdownItem('Publish', publishTypes.publishNow);
333 }
334
335 // eslint-disable-next-line cypress/no-unnecessary-waiting
336 cy.wait(500);
337 });
338}
339
340function createPostAndPublish(entry) {
341 newPost();

Calls 2

advanceClockFunction · 0.85
selectDropdownItemFunction · 0.85

Tested by

no test coverage detected