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

Function assertEntryDeleted

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

Source from the content-addressed store, hash-verified

203}
204
205function assertEntryDeleted(entry) {
206 cy.get('body').then($body => {
207 const entriesHeaders = $body.find('a h2');
208 if (entriesHeaders.length > 0) {
209 if (Array.isArray(entry)) {
210 const titles = entry.map(e => e.title);
211 cy.get('a h2').each(el => {
212 expect(titles).not.to.include(el.text());
213 });
214 } else {
215 cy.get('a h2').each(el => {
216 expect(entry.title).not.to.equal(el.text());
217 });
218 }
219 }
220 });
221}
222
223function assertWorkflowStatus({ title }, status) {
224 cy.contains('h2', status).parent().contains('a', title);

Calls 3

getMethod · 0.80
findMethod · 0.80
mapMethod · 0.80

Tested by

no test coverage detected