UNPKG

umbraco-cypress-testhelpers

Version:

Test helpers for making Cypress tests for Umbraco solutions

13 lines (11 loc) 554 B
import CommandBase from './commandBase'; export default class UmbracoRefreshContentTree extends CommandBase { _commandName = 'umbracoRefreshContentTree'; method() { // Refresh to update the tree cy.get('li .umb-tree-root:contains("Content")').should('be.visible').rightclick(); cy.umbracoContextMenuAction('action-refreshNode').click(); // We have to wait in case the execution is slow, otherwise we'll try and click the item before it appears in the UI cy.get('.umb-tree-item__inner').should('exist', { timeout: 10000 }); } }