umbraco-cypress-testhelpers
Version:
Test helpers for making Cypress tests for Umbraco solutions
9 lines (8 loc) • 354 B
text/typescript
import CommandBase from './commandBase';
export default class DataUmbScope extends CommandBase {
commandName = 'dataUmbScope';
method(value: string, child?: string) {
const element = child !== undefined ? cy.dataUmb(value, child) : cy.dataUmb(value);
return element.then(($el) => cy.getAngular().then((ng) => ng.element($el).scope()));
}
}