I should find the Directive tile-mini and invoke the function within ng-click. How can I do?
HTML:
<tile-mini data="tableTile" ng-click="addDenuncia()" id="add-denuncia-tile"></tile-mini>
spec.js:
it('Inserimento DU', function() {
browser.get('/#/valoritalia/admin/denunce-uva/inserimentoDU/all');
element(by.model('autodichiarazione.viticoltore')).sendKeys('erbaluna 034').sendKeys(protractor.Key.ENTER);
element(by.css(".button-next")).click();
element(by.directive("tile-mini")).click();
browser.pause();
expect(browser.getTitle()).toBe('Inserimento DU DIONISO');
});
I tried with:
element(by.id("add-complaint-tile")).click ();
element(by.css('[ng-click = "addDenuncia()"]')).click()
directive.element(by.<something>); // Failed: Object [object Object] has no method 'directive'
None of these works ..
Aucun commentaire:
Enregistrer un commentaire