Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
expect(text).toEqual("4");
});
})
.then(() => {
element(by.css('div[row="2"] div[colid="cube')).getText().then((text) => {
expect(text).toEqual("8");
});
})
.then(() => {
element(by.css('div[row="2"] div[colid="params')).getText().then((text) => {
expect(text).toEqual("Field: row, Value: Row 2");
});
});
});
it('Basic Editor Component Example Tests', function () {
element(by.linkText('Cell Editor Component Example'))
.click()
// first row
.then(() => {
element(by.css('div[row="0"] div[colid="name')).getText().then((text) => {
expect(text).toEqual("Bob");
});
})
.then(() => {
element(by.css('div[row="0"] div[colid="mood"] img')).getAttribute("src").then((src) => {
expect(src).toEqual("http://localhost:8080/images/smiley.png");
});
})
.then(() => {
element(by.css('div[row="0"] div[colid="mood')).sendKeys(protractor.Key.ENTER)
.then(() => {
});
it(`should display all expected ${expectedTabTitles.length} Tab Titles`, function () {
element.all(by.css('li[role=presentation] a')).map((anchor) => {
return anchor.getText()
}).then((linkTexts) => {
linkTexts.forEach((linkText:string) => {
let index: number = expectedTabTitles.indexOf(linkText);
if (index === -1) {
fail(`${linkText} not in the list of expected titles`);
}
})
})
});
it('Dynamic Components Example should have first two rows expected results', function () {
element(by.linkText('Dynamic Angular Component Example'))
.click()
// first row
.then(() => {
element(by.css('div[row="0"] div[colid="row')).getText().then((text) => {
expect(text).toEqual("Row 0");
});
})
.then(() => {
element(by.css('div[row="0"] div[colid="square')).getText().then((text) => {
expect(text).toEqual("0");
});
})
.then(() => {
element(by.css('div[row="0"] div[colid="cube')).getText().then((text) => {
expect(text).toEqual("0");
});
it(`should display all expected ${expectedTabTitles.length} Tab Titles`, function () {
element.all(by.css('li[role=presentation] a')).map((anchor) => {
return anchor.getText()
}).then((linkTexts) => {
linkTexts.forEach((linkText:string) => {
let index: number = expectedTabTitles.indexOf(linkText);
if (index === -1) {
fail(`${linkText} not in the list of expected titles`);
}
})
})
});
it('Dynamic Components Example should have first two rows expected results', function () {
element(by.linkText('Dynamic Angular Component Example'))
.click()
// first row
.then(() => {
element(by.css('div[row="0"] div[colid="row')).getText().then((text) => {
expect(text).toEqual("Row 0");
});
})
.then(() => {
element(by.css('div[row="0"] div[colid="square')).getText().then((text) => {
expect(text).toEqual("0");
});
})
.then(() => {
element(by.css('div[row="0"] div[colid="cube')).getText().then((text) => {
expect(text).toEqual("0");
expect(text).toEqual("4");
});
})
.then(() => {
element(by.css('div[row="2"] div[colid="cube')).getText().then((text) => {
expect(text).toEqual("8");
});
})
.then(() => {
element(by.css('div[row="2"] div[colid="params')).getText().then((text) => {
expect(text).toEqual("Field: row, Value: Row 2");
});
});
});
it('Basic Editor Component Example Tests', function () {
element(by.linkText('Cell Editor Component Example'))
.click()
// first row
.then(() => {
element(by.css('div[row="0"] div[colid="name')).getText().then((text) => {
expect(text).toEqual("Bob");
});
})
.then(() => {
element(by.css('div[row="0"] div[colid="mood"] img')).getAttribute("src").then((src) => {
expect(src).toEqual("http://localhost:8080/images/smiley.png");
});
})
.then(() => {
element(by.css('div[row="0"] div[colid="mood')).sendKeys(protractor.Key.ENTER)
.then(() => {