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

Function assertEntryDeleted

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

Source from the content-addressed store, hash-verified

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