You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2021/05/20 21:43:09 UTC
[GitHub] [trafficcontrol] dpham692 commented on a change in pull request #5845: Migrate cache group test from E2E to integration test
dpham692 commented on a change in pull request #5845:
URL: https://github.com/apache/trafficcontrol/pull/5845#discussion_r636491669
##########
File path: traffic_portal/test/integration/PageObjects/CacheGroup.po.ts
##########
@@ -117,16 +116,15 @@ export class CacheGroupPage extends BasePage {
if (cachegroup.Type == "EDGE_LOC") {
const name = cachegroup.FailoverCG + this.randomize;
await this.txtFailoverCG.click();
- if(await browser.isElementPresent(element(by.xpath(`//select[@name="fallbackOptions"]//option[@label="`+ name + `"]`)))){
- await element(by.xpath(`//select[@name="fallbackOptions"]//option[@label="`+ name + `"]`)).click();
- }else{
+ if (await browser.isElementPresent(element(by.xpath(`//select[@name="fallbackOptions"]//option[@label="` + name + `"]`)))) {
Review comment:
Fixed.
##########
File path: traffic_portal/test/integration/PageObjects/CacheGroup.po.ts
##########
@@ -117,16 +116,15 @@ export class CacheGroupPage extends BasePage {
if (cachegroup.Type == "EDGE_LOC") {
const name = cachegroup.FailoverCG + this.randomize;
await this.txtFailoverCG.click();
- if(await browser.isElementPresent(element(by.xpath(`//select[@name="fallbackOptions"]//option[@label="`+ name + `"]`)))){
- await element(by.xpath(`//select[@name="fallbackOptions"]//option[@label="`+ name + `"]`)).click();
- }else{
+ if (await browser.isElementPresent(element(by.xpath(`//select[@name="fallbackOptions"]//option[@label="` + name + `"]`)))) {
+ await element(by.xpath(`//select[@name="fallbackOptions"]//option[@label="` + name + `"]`)).click();
+ } else {
result = undefined;
}
}
await this.txtType.sendKeys(cachegroup.Type);
await snp.ClickUpdate();
- if(result != undefined)
- {
+ if (result != undefined) {
Review comment:
Fixed.
##########
File path: traffic_portal/test/integration/PageObjects/CacheGroup.po.ts
##########
@@ -158,6 +156,31 @@ export class CacheGroupPage extends BasePage {
await snp.NavigateToCacheGroupsPage();
return result;
}
+ public async CheckCSV(name: string): Promise<boolean> {
+ let linkName = name;
+ let result = false;
+ if (await browser.isElementPresent(element(by.xpath("//span[text()='" + linkName + "']"))) == true) {
+ result = true;
+ }
+ return result;
+ }
Review comment:
Fixed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org