Tried to fix the tests.
This commit is contained in:
parent
17afa92bfe
commit
f8c3ee964d
6 changed files with 246 additions and 18 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { ConvFriedliInfoPage } from './app.po';
|
||||
import {ConvFriedliInfoPage} from "./app.po";
|
||||
|
||||
describe('conv.friedli.info App', () => {
|
||||
let page: ConvFriedliInfoPage;
|
||||
|
|
@ -9,6 +9,6 @@ describe('conv.friedli.info App', () => {
|
|||
|
||||
it('should display message saying app works', () => {
|
||||
page.navigateTo();
|
||||
expect(page.getParagraphText()).toEqual('app works!');
|
||||
expect(page.getInputfieldContent(0)).toEqual('');
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,11 +1,25 @@
|
|||
import { browser, element, by } from 'protractor';
|
||||
import {browser, by, element} from "protractor";
|
||||
|
||||
export class ConvFriedliInfoPage {
|
||||
navigateTo() {
|
||||
return browser.get('/');
|
||||
}
|
||||
|
||||
getParagraphText() {
|
||||
return element(by.css('app-root h1')).getText();
|
||||
public foo() {
|
||||
return "bar";
|
||||
}
|
||||
|
||||
public getInputfieldContent(index: number): Promise<any> {
|
||||
let css1 = by.css('app-root div.inputwrapper');
|
||||
console.log(css1);
|
||||
let el1 = element.all(css1)[index];
|
||||
console.log(el1);
|
||||
let css2 = by.css('.textwrapper textarea');
|
||||
console.log(css2);
|
||||
let el2 = el1.findElement(css2);
|
||||
console.log(el2);
|
||||
let t = el2.getText();
|
||||
console.log(t);
|
||||
return t;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue