deleteComment() {
   let scrollToEle = element.all(by.css('.comment-container')).get(0);
   let trashIcon = element.all(by.css('.fa.fa-trash-o')).get(0);
   browser.actions().mouseMove(scrollToEle).perform().then(() => waitForElementVisibility(trashIcon))
   .then(() => element.all(by.css('.fa.fa-trash-o')).get(0).click());
 }
Exemple #2
0
 it('allows ng1 routes', function () {
   browser.get('/index-divide-routes.html#/villain');
   expect(element(by.css('h2')).getText()).toBe('Mr. Nice - No More Mr. Nice Guy');
 });
Exemple #3
0
 it('bootstraps as expected', function () {
   expect(element(by.css('#message')).getText()).toEqual('Hello world');
 });
Exemple #4
0
 it('has outputs', function () {
   element.all(by.buttonText('Delete')).first().click();
   expect(element.all(by.css('h2')).first().getText()).toEqual('Ex-Windstorm details!');
 });
Exemple #5
0
 it('can be projected into', function () {
   expect(element(by.css('hero-detail')).getText()).toContain('Specific powers of controlling winds');
 });
Exemple #6
0
 it('first li should show hero name with *ngFor', function () {
   const allLis = element.all(by.tagName('li'));
   expect(allLis.get(0).getText()).toEqual('Mr. Nice');
 });
Exemple #7
0
 it('should have only one "Hip!" (the other is erased)', function () {
   const paragraph = element.all(by.cssContainingText('p', 'Hip!'));
   expect(paragraph.count()).toEqual(1);
 });
Exemple #8
0
 it(`selects ${targetHero.name} from hero list`, function () {
   let hero = element(by.cssContainingText('li span.badge', targetHero.id.toString()));
   hero.click();
   // Nothing specific to expect other than lack of exceptions.
 });
		it('"Getting Started" button should route to /help', () => {
			element(by.buttonText('Getting Started')).click();
			expect(browser.getCurrentUrl()).toContain('/help');
		});
Exemple #10
0
function addToHeroName(text: string): promise.Promise<void> {
  let input = element(by.css('input'));
  return input.sendKeys(text);
}