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/11/16 02:08:40 UTC

[GitHub] [trafficcontrol] ocket8888 commented on a change in pull request #6352: Migrate Delivery Service Request from E2E to integrated

ocket8888 commented on a change in pull request #6352:
URL: https://github.com/apache/trafficcontrol/pull/6352#discussion_r749842684



##########
File path: traffic_portal/test/integration/PageObjects/DeliveryServiceRequestPage.po.ts
##########
@@ -0,0 +1,149 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import {  browser, by, element} from 'protractor';
+import { BasePage } from './BasePage.po';
+import { SideNavigationPage } from '../PageObjects/SideNavigationPage.po';
+import { randomize } from '../config';
+
+
+interface CreateDeliveryServiceRequest{
+  description: string;
+  XmlId: string;
+  DisplayName: string;
+  Active: string;
+  ContentRoutingType: string;
+  Tenant: string;
+  CDN: string;
+  RawText: string;
+  validationMessage:string;
+}
+interface SearchDeliveryServiceRequest{
+  XmlId: string;
+}
+interface FullfillDeliveryServiceRequest{
+  XmlId: string;
+  FullfillMessage: string;
+}
+interface CompleteDeliveryServiceRequest{
+  XmlId: string;
+  CompleteMessage: string;
+}
+interface DeleteDeliveryServiceRequest{
+  XmlId: string;
+  DeleteMessage: string;
+}
+interface UpdateDeliveryServiceRequest{
+  XmlId: string;
+  UpdateMessage: string;
+}
+
+export class DeliveryServicesRequestPage extends BasePage {
+  private btnFullfillRequest = element(by.buttonText("Fulfill Request"))
+  private btnCompleteRequest = element(by.buttonText("Complete Request"))
+  private btnDeleteRequest = element(by.buttonText("Delete Request"))
+  private btnUpdateRequest = element(by.buttonText("Update Request"))
+  private btnYes = element(by.buttonText("Yes"))
+  private btnMore = element(by.name("moreBtn"))
+  private btnCreateDS = element(by.linkText("Create Delivery Service"));
+  private formDropDown = element(by.name("selectFormDropdown"))
+  private txtXmlId = element(by.id("xmlId"));
+  private txtDisplayName = element(by.id("displayName"));
+  private txtActive = element(by.id("active"));
+  private txtContentRoutingType = element(by.id("type"));
+  private txtTenant = element(by.id("tenantId"));
+  private txtCDN = element(by.id("cdn"));
+  private txtRawRemapText = element(by.id("remapText"));
+  private txtRequestStatus = element(by.name("requestStatus"))
+  private txtComment = element(by.name("comment"))
+  private txtQuickSearch = element(by.id("quickSearch"))
+  private txtConfirmInput = element(by.name("confirmWithNameInput"))
+  private randomize = randomize;
+  public async OpenDeliveryServiceRequestPage(){
+    const snp = new SideNavigationPage();
+    await snp.NavigateToDeliveryServicesRequestsPage();
+  }
+  public async OpenServicesMenu(){
+    const snp = new SideNavigationPage();
+    await snp.ClickServicesMenu();
+  }
+  public async OpenDeliveryServicePage(){
+    const snp = new SideNavigationPage();
+    await snp.NavigateToDeliveryServicesPage();
+  }
+  public async CreateDeliveryServiceRequest(deliveryservicerequest: CreateDeliveryServiceRequest): Promise<boolean>{
+    const basePage = new BasePage();
+    const outPutMessage = deliveryservicerequest.validationMessage.replace(deliveryservicerequest.XmlId,deliveryservicerequest.XmlId+this.randomize)
+    await this.btnMore.click();
+    await this.btnCreateDS.click();
+    await this.formDropDown.sendKeys("ANY_MAP");
+    await basePage.ClickSubmit();
+    await this.txtXmlId.sendKeys(deliveryservicerequest.XmlId + this.randomize);
+    await this.txtDisplayName.sendKeys(deliveryservicerequest.DisplayName + this.randomize);
+    await this.txtActive.sendKeys(deliveryservicerequest.Active);
+    await this.txtContentRoutingType.sendKeys(deliveryservicerequest.ContentRoutingType);
+    await this.txtTenant.sendKeys(deliveryservicerequest.Tenant);
+    await this.txtCDN.sendKeys(deliveryservicerequest.CDN);
+    await this.txtRawRemapText.sendKeys(deliveryservicerequest.RawText);
+    await basePage.ClickCreate();
+    await this.txtRequestStatus.sendKeys("Submit Request for Review and Deployment");
+    await this.txtComment.sendKeys("test");
+    await basePage.ClickSubmit();
+    return await basePage.GetOutputMessage().then(value => outPutMessage === value);
+  }
+  public async SearchDeliveryServiceRequest(deliveryservicerequest: SearchDeliveryServiceRequest){
+    const name = deliveryservicerequest.XmlId+this.randomize;
+    await this.txtQuickSearch.clear();
+    await this.txtQuickSearch.sendKeys(name)
+    await browser.actions().click(element(by.cssContainingText("span", name))).perform();
+  }
+  public async FullFillDeliveryServiceRequest(deliveryservicerequest: FullfillDeliveryServiceRequest): Promise<boolean>{
+    const basePage = new BasePage();
+    const outPutMessage = deliveryservicerequest.FullfillMessage.replace(deliveryservicerequest.XmlId,deliveryservicerequest.XmlId+this.randomize)
+    await this.btnFullfillRequest.click();
+    await this.btnYes.click();
+    return await basePage.GetOutputMessage().then(value => outPutMessage === value);

Review comment:
       Same as above RE: `await` in a `return`

##########
File path: traffic_portal/test/integration/PageObjects/DeliveryServiceRequestPage.po.ts
##########
@@ -0,0 +1,149 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import {  browser, by, element} from 'protractor';
+import { BasePage } from './BasePage.po';
+import { SideNavigationPage } from '../PageObjects/SideNavigationPage.po';
+import { randomize } from '../config';
+
+
+interface CreateDeliveryServiceRequest{
+  description: string;
+  XmlId: string;
+  DisplayName: string;
+  Active: string;
+  ContentRoutingType: string;
+  Tenant: string;
+  CDN: string;
+  RawText: string;
+  validationMessage:string;
+}
+interface SearchDeliveryServiceRequest{
+  XmlId: string;
+}
+interface FullfillDeliveryServiceRequest{
+  XmlId: string;
+  FullfillMessage: string;
+}
+interface CompleteDeliveryServiceRequest{
+  XmlId: string;
+  CompleteMessage: string;
+}
+interface DeleteDeliveryServiceRequest{
+  XmlId: string;
+  DeleteMessage: string;
+}
+interface UpdateDeliveryServiceRequest{
+  XmlId: string;
+  UpdateMessage: string;
+}
+
+export class DeliveryServicesRequestPage extends BasePage {
+  private btnFullfillRequest = element(by.buttonText("Fulfill Request"))
+  private btnCompleteRequest = element(by.buttonText("Complete Request"))
+  private btnDeleteRequest = element(by.buttonText("Delete Request"))
+  private btnUpdateRequest = element(by.buttonText("Update Request"))
+  private btnYes = element(by.buttonText("Yes"))
+  private btnMore = element(by.name("moreBtn"))
+  private btnCreateDS = element(by.linkText("Create Delivery Service"));
+  private formDropDown = element(by.name("selectFormDropdown"))
+  private txtXmlId = element(by.id("xmlId"));
+  private txtDisplayName = element(by.id("displayName"));
+  private txtActive = element(by.id("active"));
+  private txtContentRoutingType = element(by.id("type"));
+  private txtTenant = element(by.id("tenantId"));
+  private txtCDN = element(by.id("cdn"));
+  private txtRawRemapText = element(by.id("remapText"));
+  private txtRequestStatus = element(by.name("requestStatus"))
+  private txtComment = element(by.name("comment"))
+  private txtQuickSearch = element(by.id("quickSearch"))
+  private txtConfirmInput = element(by.name("confirmWithNameInput"))
+  private randomize = randomize;
+  public async OpenDeliveryServiceRequestPage(){
+    const snp = new SideNavigationPage();
+    await snp.NavigateToDeliveryServicesRequestsPage();
+  }
+  public async OpenServicesMenu(){
+    const snp = new SideNavigationPage();
+    await snp.ClickServicesMenu();
+  }
+  public async OpenDeliveryServicePage(){
+    const snp = new SideNavigationPage();
+    await snp.NavigateToDeliveryServicesPage();
+  }
+  public async CreateDeliveryServiceRequest(deliveryservicerequest: CreateDeliveryServiceRequest): Promise<boolean>{
+    const basePage = new BasePage();
+    const outPutMessage = deliveryservicerequest.validationMessage.replace(deliveryservicerequest.XmlId,deliveryservicerequest.XmlId+this.randomize)
+    await this.btnMore.click();
+    await this.btnCreateDS.click();
+    await this.formDropDown.sendKeys("ANY_MAP");
+    await basePage.ClickSubmit();
+    await this.txtXmlId.sendKeys(deliveryservicerequest.XmlId + this.randomize);
+    await this.txtDisplayName.sendKeys(deliveryservicerequest.DisplayName + this.randomize);
+    await this.txtActive.sendKeys(deliveryservicerequest.Active);
+    await this.txtContentRoutingType.sendKeys(deliveryservicerequest.ContentRoutingType);
+    await this.txtTenant.sendKeys(deliveryservicerequest.Tenant);
+    await this.txtCDN.sendKeys(deliveryservicerequest.CDN);
+    await this.txtRawRemapText.sendKeys(deliveryservicerequest.RawText);

Review comment:
       nit but the order in which these are done isn't important, which means it can more efficiently be written using actual asynchronous calls, rather than awaiting them all sequentially, like:
   ```typescript
   await Promise.all([
   	this.txtXmlId.sendKeys(deliveryservicerequest.XmlId + this.randomize),
   	this.txtDisplayName.sendKeys(deliveryservicerequest.DisplayName + this.randomize),
   	this.txtActive.sendKeys(deliveryservicerequest.Active),
   	this.txtContentRoutingType.sendKeys(deliveryservicerequest.ContentRoutingType),
   	this.txtTenant.sendKeys(deliveryservicerequest.Tenant),
   	this.txtCDN.sendKeys(deliveryservicerequest.CDN),
   	this.txtRawRemapText.sendKeys(deliveryservicerequest.RawText)
   )];
   ```

##########
File path: traffic_portal/test/integration/PageObjects/DeliveryServiceRequestPage.po.ts
##########
@@ -0,0 +1,149 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import {  browser, by, element} from 'protractor';
+import { BasePage } from './BasePage.po';
+import { SideNavigationPage } from '../PageObjects/SideNavigationPage.po';
+import { randomize } from '../config';
+
+
+interface CreateDeliveryServiceRequest{
+  description: string;
+  XmlId: string;
+  DisplayName: string;
+  Active: string;
+  ContentRoutingType: string;
+  Tenant: string;
+  CDN: string;
+  RawText: string;
+  validationMessage:string;
+}
+interface SearchDeliveryServiceRequest{
+  XmlId: string;
+}
+interface FullfillDeliveryServiceRequest{
+  XmlId: string;
+  FullfillMessage: string;
+}
+interface CompleteDeliveryServiceRequest{
+  XmlId: string;
+  CompleteMessage: string;
+}
+interface DeleteDeliveryServiceRequest{
+  XmlId: string;
+  DeleteMessage: string;
+}
+interface UpdateDeliveryServiceRequest{
+  XmlId: string;
+  UpdateMessage: string;
+}
+
+export class DeliveryServicesRequestPage extends BasePage {
+  private btnFullfillRequest = element(by.buttonText("Fulfill Request"))
+  private btnCompleteRequest = element(by.buttonText("Complete Request"))
+  private btnDeleteRequest = element(by.buttonText("Delete Request"))
+  private btnUpdateRequest = element(by.buttonText("Update Request"))
+  private btnYes = element(by.buttonText("Yes"))
+  private btnMore = element(by.name("moreBtn"))
+  private btnCreateDS = element(by.linkText("Create Delivery Service"));
+  private formDropDown = element(by.name("selectFormDropdown"))
+  private txtXmlId = element(by.id("xmlId"));
+  private txtDisplayName = element(by.id("displayName"));
+  private txtActive = element(by.id("active"));
+  private txtContentRoutingType = element(by.id("type"));
+  private txtTenant = element(by.id("tenantId"));
+  private txtCDN = element(by.id("cdn"));
+  private txtRawRemapText = element(by.id("remapText"));
+  private txtRequestStatus = element(by.name("requestStatus"))
+  private txtComment = element(by.name("comment"))
+  private txtQuickSearch = element(by.id("quickSearch"))
+  private txtConfirmInput = element(by.name("confirmWithNameInput"))
+  private randomize = randomize;
+  public async OpenDeliveryServiceRequestPage(){
+    const snp = new SideNavigationPage();
+    await snp.NavigateToDeliveryServicesRequestsPage();
+  }
+  public async OpenServicesMenu(){
+    const snp = new SideNavigationPage();
+    await snp.ClickServicesMenu();
+  }
+  public async OpenDeliveryServicePage(){
+    const snp = new SideNavigationPage();
+    await snp.NavigateToDeliveryServicesPage();
+  }
+  public async CreateDeliveryServiceRequest(deliveryservicerequest: CreateDeliveryServiceRequest): Promise<boolean>{
+    const basePage = new BasePage();
+    const outPutMessage = deliveryservicerequest.validationMessage.replace(deliveryservicerequest.XmlId,deliveryservicerequest.XmlId+this.randomize)
+    await this.btnMore.click();
+    await this.btnCreateDS.click();
+    await this.formDropDown.sendKeys("ANY_MAP");
+    await basePage.ClickSubmit();
+    await this.txtXmlId.sendKeys(deliveryservicerequest.XmlId + this.randomize);
+    await this.txtDisplayName.sendKeys(deliveryservicerequest.DisplayName + this.randomize);
+    await this.txtActive.sendKeys(deliveryservicerequest.Active);
+    await this.txtContentRoutingType.sendKeys(deliveryservicerequest.ContentRoutingType);
+    await this.txtTenant.sendKeys(deliveryservicerequest.Tenant);
+    await this.txtCDN.sendKeys(deliveryservicerequest.CDN);
+    await this.txtRawRemapText.sendKeys(deliveryservicerequest.RawText);
+    await basePage.ClickCreate();
+    await this.txtRequestStatus.sendKeys("Submit Request for Review and Deployment");
+    await this.txtComment.sendKeys("test");
+    await basePage.ClickSubmit();
+    return await basePage.GetOutputMessage().then(value => outPutMessage === value);
+  }
+  public async SearchDeliveryServiceRequest(deliveryservicerequest: SearchDeliveryServiceRequest){
+    const name = deliveryservicerequest.XmlId+this.randomize;
+    await this.txtQuickSearch.clear();
+    await this.txtQuickSearch.sendKeys(name)
+    await browser.actions().click(element(by.cssContainingText("span", name))).perform();
+  }
+  public async FullFillDeliveryServiceRequest(deliveryservicerequest: FullfillDeliveryServiceRequest): Promise<boolean>{
+    const basePage = new BasePage();
+    const outPutMessage = deliveryservicerequest.FullfillMessage.replace(deliveryservicerequest.XmlId,deliveryservicerequest.XmlId+this.randomize)
+    await this.btnFullfillRequest.click();
+    await this.btnYes.click();
+    return await basePage.GetOutputMessage().then(value => outPutMessage === value);
+  }
+  public async CompleteDeliveryServiceRequest(deliveryservicerequest: CompleteDeliveryServiceRequest): Promise<boolean>{
+    const basePage = new BasePage();
+    await this.btnCompleteRequest.click();
+    await this.btnYes.click();
+    return await basePage.GetOutputMessage().then(value => deliveryservicerequest.CompleteMessage === value);

Review comment:
       Same as above RE: `await` in a `return`

##########
File path: traffic_portal/test/integration/PageObjects/DeliveryServiceRequestPage.po.ts
##########
@@ -0,0 +1,149 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import {  browser, by, element} from 'protractor';
+import { BasePage } from './BasePage.po';
+import { SideNavigationPage } from '../PageObjects/SideNavigationPage.po';
+import { randomize } from '../config';
+
+
+interface CreateDeliveryServiceRequest{
+  description: string;
+  XmlId: string;
+  DisplayName: string;
+  Active: string;
+  ContentRoutingType: string;
+  Tenant: string;
+  CDN: string;
+  RawText: string;
+  validationMessage:string;
+}
+interface SearchDeliveryServiceRequest{
+  XmlId: string;
+}
+interface FullfillDeliveryServiceRequest{
+  XmlId: string;
+  FullfillMessage: string;
+}
+interface CompleteDeliveryServiceRequest{
+  XmlId: string;
+  CompleteMessage: string;
+}
+interface DeleteDeliveryServiceRequest{
+  XmlId: string;
+  DeleteMessage: string;
+}
+interface UpdateDeliveryServiceRequest{
+  XmlId: string;
+  UpdateMessage: string;
+}
+
+export class DeliveryServicesRequestPage extends BasePage {
+  private btnFullfillRequest = element(by.buttonText("Fulfill Request"))
+  private btnCompleteRequest = element(by.buttonText("Complete Request"))
+  private btnDeleteRequest = element(by.buttonText("Delete Request"))
+  private btnUpdateRequest = element(by.buttonText("Update Request"))
+  private btnYes = element(by.buttonText("Yes"))
+  private btnMore = element(by.name("moreBtn"))
+  private btnCreateDS = element(by.linkText("Create Delivery Service"));
+  private formDropDown = element(by.name("selectFormDropdown"))
+  private txtXmlId = element(by.id("xmlId"));
+  private txtDisplayName = element(by.id("displayName"));
+  private txtActive = element(by.id("active"));
+  private txtContentRoutingType = element(by.id("type"));
+  private txtTenant = element(by.id("tenantId"));
+  private txtCDN = element(by.id("cdn"));
+  private txtRawRemapText = element(by.id("remapText"));
+  private txtRequestStatus = element(by.name("requestStatus"))
+  private txtComment = element(by.name("comment"))
+  private txtQuickSearch = element(by.id("quickSearch"))
+  private txtConfirmInput = element(by.name("confirmWithNameInput"))
+  private randomize = randomize;
+  public async OpenDeliveryServiceRequestPage(){
+    const snp = new SideNavigationPage();
+    await snp.NavigateToDeliveryServicesRequestsPage();
+  }
+  public async OpenServicesMenu(){
+    const snp = new SideNavigationPage();
+    await snp.ClickServicesMenu();
+  }
+  public async OpenDeliveryServicePage(){
+    const snp = new SideNavigationPage();
+    await snp.NavigateToDeliveryServicesPage();
+  }
+  public async CreateDeliveryServiceRequest(deliveryservicerequest: CreateDeliveryServiceRequest): Promise<boolean>{
+    const basePage = new BasePage();
+    const outPutMessage = deliveryservicerequest.validationMessage.replace(deliveryservicerequest.XmlId,deliveryservicerequest.XmlId+this.randomize)
+    await this.btnMore.click();
+    await this.btnCreateDS.click();
+    await this.formDropDown.sendKeys("ANY_MAP");
+    await basePage.ClickSubmit();
+    await this.txtXmlId.sendKeys(deliveryservicerequest.XmlId + this.randomize);
+    await this.txtDisplayName.sendKeys(deliveryservicerequest.DisplayName + this.randomize);
+    await this.txtActive.sendKeys(deliveryservicerequest.Active);
+    await this.txtContentRoutingType.sendKeys(deliveryservicerequest.ContentRoutingType);
+    await this.txtTenant.sendKeys(deliveryservicerequest.Tenant);
+    await this.txtCDN.sendKeys(deliveryservicerequest.CDN);
+    await this.txtRawRemapText.sendKeys(deliveryservicerequest.RawText);
+    await basePage.ClickCreate();
+    await this.txtRequestStatus.sendKeys("Submit Request for Review and Deployment");
+    await this.txtComment.sendKeys("test");
+    await basePage.ClickSubmit();
+    return await basePage.GetOutputMessage().then(value => outPutMessage === value);
+  }
+  public async SearchDeliveryServiceRequest(deliveryservicerequest: SearchDeliveryServiceRequest){
+    const name = deliveryservicerequest.XmlId+this.randomize;
+    await this.txtQuickSearch.clear();
+    await this.txtQuickSearch.sendKeys(name)
+    await browser.actions().click(element(by.cssContainingText("span", name))).perform();
+  }
+  public async FullFillDeliveryServiceRequest(deliveryservicerequest: FullfillDeliveryServiceRequest): Promise<boolean>{
+    const basePage = new BasePage();
+    const outPutMessage = deliveryservicerequest.FullfillMessage.replace(deliveryservicerequest.XmlId,deliveryservicerequest.XmlId+this.randomize)
+    await this.btnFullfillRequest.click();
+    await this.btnYes.click();
+    return await basePage.GetOutputMessage().then(value => outPutMessage === value);
+  }
+  public async CompleteDeliveryServiceRequest(deliveryservicerequest: CompleteDeliveryServiceRequest): Promise<boolean>{
+    const basePage = new BasePage();
+    await this.btnCompleteRequest.click();
+    await this.btnYes.click();
+    return await basePage.GetOutputMessage().then(value => deliveryservicerequest.CompleteMessage === value);
+
+  }
+  public async DeleteDeliveryServiceRequest(deliveryservicerequest: DeleteDeliveryServiceRequest): Promise<boolean>{
+    const basePage = new BasePage();
+    await this.btnDeleteRequest.click();
+    await this.txtConfirmInput.sendKeys(deliveryservicerequest.XmlId+this.randomize+" request");
+    await basePage.ClickDeletePermanently();
+    return await basePage.GetOutputMessage().then(value=>deliveryservicerequest.DeleteMessage === value);
+  }
+  public async UpdateDeliveryServiceRequest(deliveryservicerequest: UpdateDeliveryServiceRequest): Promise<boolean>{
+    const basePage = new BasePage();
+    const outPutMessage = deliveryservicerequest.UpdateMessage.replace(deliveryservicerequest.XmlId,deliveryservicerequest.XmlId+this.randomize)
+    await this.txtRawRemapText.clear();
+    await this.txtRawRemapText.sendKeys("change");
+    await this.btnUpdateRequest.click();
+    await this.txtRequestStatus.sendKeys("Submit for Review / Deployment")
+    await this.txtComment.sendKeys("test");
+    await basePage.ClickSubmit();
+    return await basePage.GetOutputMessage().then(value => outPutMessage === value);

Review comment:
       Same as above RE: `await` in a `return`

##########
File path: traffic_portal/test/integration/specs/DeliveryServiceRequest.spec.ts
##########
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { browser } from 'protractor'
+import { LoginPage } from '../PageObjects/LoginPage.po'
+import { DeliveryServicesRequestPage } from '../PageObjects/DeliveryServiceRequestPage.po';
+import { TopNavigationPage } from '../PageObjects/TopNavigationPage.po';
+import { deliveryservicerequest } from '../Data/deliveryservicerequest';
+
+
+const loginPage = new LoginPage();
+const topNavigation = new TopNavigationPage();
+const deliveryServiceRequestPage = new DeliveryServicesRequestPage();
+
+
+
+deliveryservicerequest.tests.forEach(deliveryServiceRequestData => {
+    deliveryServiceRequestData.logins.forEach(login => {
+        describe(`Traffic Portal - Delivery Service Request - ${login.description}`, () => {
+            afterEach(async function () {
+                await deliveryServiceRequestPage.OpenDeliveryServiceRequestPage();
+            });
+            afterAll(async function () {
+                expect(await topNavigation.Logout()).toBeTruthy();
+            })
+            xit('can login', async function(){
+                browser.get(browser.params.baseUrl);
+                await loginPage.Login(login);
+                expect(await loginPage.CheckUserName(login)).toBeTruthy();
+                await deliveryServiceRequestPage.OpenServicesMenu();
+            })
+            deliveryServiceRequestData.create.forEach(create => {
+                xit(create.description, async () => {
+                    await deliveryServiceRequestPage.OpenDeliveryServicePage();
+                    expect(await deliveryServiceRequestPage.CreateDeliveryServiceRequest(create)).toBe(true);
+                    await deliveryServiceRequestPage.OpenDeliveryServiceRequestPage();
+                    await deliveryServiceRequestPage.SearchDeliveryServiceRequest(create);
+                    expect(await deliveryServiceRequestPage.FullFillDeliveryServiceRequest(create)).toBe(true);
+                    await deliveryServiceRequestPage.OpenDeliveryServiceRequestPage();
+                    await deliveryServiceRequestPage.SearchDeliveryServiceRequest(create);
+                    expect(await deliveryServiceRequestPage.CompleteDeliveryServiceRequest(create)).toBe(true);
+
+                });
+            });
+            deliveryServiceRequestData.remove.forEach(remove =>{
+                xit(remove.description, async () =>{
+                    await deliveryServiceRequestPage.OpenDeliveryServicePage();
+                    expect(await deliveryServiceRequestPage.CreateDeliveryServiceRequest(remove)).toBe(true);
+                    await deliveryServiceRequestPage.OpenDeliveryServiceRequestPage();
+                    await deliveryServiceRequestPage.SearchDeliveryServiceRequest(remove);
+                    expect(await deliveryServiceRequestPage.DeleteDeliveryServiceRequest(remove)).toBe(true);
+                })
+            })
+            deliveryServiceRequestData.update.forEach(update=>{
+                xit(update.description, async () =>{
+                    await deliveryServiceRequestPage.OpenDeliveryServicePage();
+                    expect(await deliveryServiceRequestPage.CreateDeliveryServiceRequest(update)).toBe(true);
+                    await deliveryServiceRequestPage.OpenDeliveryServiceRequestPage();
+                    await deliveryServiceRequestPage.SearchDeliveryServiceRequest(update);
+                    expect(await deliveryServiceRequestPage.UpdateDeliveryServiceRequest(update)).toBe(true);
+                    expect(await deliveryServiceRequestPage.FullFillDeliveryServiceRequest(update)).toBe(true);
+                    await deliveryServiceRequestPage.OpenDeliveryServiceRequestPage();
+                    await deliveryServiceRequestPage.SearchDeliveryServiceRequest(update);
+                    expect(await deliveryServiceRequestPage.CompleteDeliveryServiceRequest(update)).toBe(true);
+                })
+            })
+        });
+    });
+});

Review comment:
       None of these `xit` blocks will ever be run. That's meant to aid in debugging - why are we adding tests that never run when the testing suite is run? In any case, since every single `it` has the `x` prefix in this describe, it may be better to use `xdescribe` to ignore the whole thing in one fell swoop.

##########
File path: traffic_portal/test/integration/PageObjects/DeliveryServiceRequestPage.po.ts
##########
@@ -0,0 +1,149 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import {  browser, by, element} from 'protractor';
+import { BasePage } from './BasePage.po';
+import { SideNavigationPage } from '../PageObjects/SideNavigationPage.po';
+import { randomize } from '../config';
+
+
+interface CreateDeliveryServiceRequest{
+  description: string;
+  XmlId: string;
+  DisplayName: string;
+  Active: string;
+  ContentRoutingType: string;
+  Tenant: string;
+  CDN: string;
+  RawText: string;
+  validationMessage:string;
+}
+interface SearchDeliveryServiceRequest{
+  XmlId: string;
+}
+interface FullfillDeliveryServiceRequest{
+  XmlId: string;
+  FullfillMessage: string;
+}
+interface CompleteDeliveryServiceRequest{
+  XmlId: string;
+  CompleteMessage: string;
+}
+interface DeleteDeliveryServiceRequest{
+  XmlId: string;
+  DeleteMessage: string;
+}
+interface UpdateDeliveryServiceRequest{
+  XmlId: string;
+  UpdateMessage: string;
+}
+
+export class DeliveryServicesRequestPage extends BasePage {
+  private btnFullfillRequest = element(by.buttonText("Fulfill Request"))
+  private btnCompleteRequest = element(by.buttonText("Complete Request"))
+  private btnDeleteRequest = element(by.buttonText("Delete Request"))
+  private btnUpdateRequest = element(by.buttonText("Update Request"))
+  private btnYes = element(by.buttonText("Yes"))
+  private btnMore = element(by.name("moreBtn"))
+  private btnCreateDS = element(by.linkText("Create Delivery Service"));
+  private formDropDown = element(by.name("selectFormDropdown"))
+  private txtXmlId = element(by.id("xmlId"));
+  private txtDisplayName = element(by.id("displayName"));
+  private txtActive = element(by.id("active"));
+  private txtContentRoutingType = element(by.id("type"));
+  private txtTenant = element(by.id("tenantId"));
+  private txtCDN = element(by.id("cdn"));
+  private txtRawRemapText = element(by.id("remapText"));
+  private txtRequestStatus = element(by.name("requestStatus"))
+  private txtComment = element(by.name("comment"))
+  private txtQuickSearch = element(by.id("quickSearch"))
+  private txtConfirmInput = element(by.name("confirmWithNameInput"))
+  private randomize = randomize;
+  public async OpenDeliveryServiceRequestPage(){
+    const snp = new SideNavigationPage();
+    await snp.NavigateToDeliveryServicesRequestsPage();
+  }
+  public async OpenServicesMenu(){
+    const snp = new SideNavigationPage();
+    await snp.ClickServicesMenu();
+  }
+  public async OpenDeliveryServicePage(){
+    const snp = new SideNavigationPage();
+    await snp.NavigateToDeliveryServicesPage();
+  }
+  public async CreateDeliveryServiceRequest(deliveryservicerequest: CreateDeliveryServiceRequest): Promise<boolean>{
+    const basePage = new BasePage();
+    const outPutMessage = deliveryservicerequest.validationMessage.replace(deliveryservicerequest.XmlId,deliveryservicerequest.XmlId+this.randomize)
+    await this.btnMore.click();
+    await this.btnCreateDS.click();
+    await this.formDropDown.sendKeys("ANY_MAP");
+    await basePage.ClickSubmit();
+    await this.txtXmlId.sendKeys(deliveryservicerequest.XmlId + this.randomize);
+    await this.txtDisplayName.sendKeys(deliveryservicerequest.DisplayName + this.randomize);
+    await this.txtActive.sendKeys(deliveryservicerequest.Active);
+    await this.txtContentRoutingType.sendKeys(deliveryservicerequest.ContentRoutingType);
+    await this.txtTenant.sendKeys(deliveryservicerequest.Tenant);
+    await this.txtCDN.sendKeys(deliveryservicerequest.CDN);
+    await this.txtRawRemapText.sendKeys(deliveryservicerequest.RawText);
+    await basePage.ClickCreate();
+    await this.txtRequestStatus.sendKeys("Submit Request for Review and Deployment");
+    await this.txtComment.sendKeys("test");
+    await basePage.ClickSubmit();
+    return await basePage.GetOutputMessage().then(value => outPutMessage === value);

Review comment:
       `await` is unnecessary in a `return` statement of an `async` function.

##########
File path: traffic_portal/test/integration/PageObjects/DeliveryServiceRequestPage.po.ts
##########
@@ -0,0 +1,149 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import {  browser, by, element} from 'protractor';
+import { BasePage } from './BasePage.po';
+import { SideNavigationPage } from '../PageObjects/SideNavigationPage.po';
+import { randomize } from '../config';
+
+
+interface CreateDeliveryServiceRequest{
+  description: string;
+  XmlId: string;
+  DisplayName: string;
+  Active: string;
+  ContentRoutingType: string;
+  Tenant: string;
+  CDN: string;
+  RawText: string;
+  validationMessage:string;
+}
+interface SearchDeliveryServiceRequest{
+  XmlId: string;
+}
+interface FullfillDeliveryServiceRequest{
+  XmlId: string;
+  FullfillMessage: string;
+}
+interface CompleteDeliveryServiceRequest{
+  XmlId: string;
+  CompleteMessage: string;
+}
+interface DeleteDeliveryServiceRequest{
+  XmlId: string;
+  DeleteMessage: string;
+}
+interface UpdateDeliveryServiceRequest{
+  XmlId: string;
+  UpdateMessage: string;
+}
+
+export class DeliveryServicesRequestPage extends BasePage {
+  private btnFullfillRequest = element(by.buttonText("Fulfill Request"))
+  private btnCompleteRequest = element(by.buttonText("Complete Request"))
+  private btnDeleteRequest = element(by.buttonText("Delete Request"))
+  private btnUpdateRequest = element(by.buttonText("Update Request"))
+  private btnYes = element(by.buttonText("Yes"))
+  private btnMore = element(by.name("moreBtn"))
+  private btnCreateDS = element(by.linkText("Create Delivery Service"));
+  private formDropDown = element(by.name("selectFormDropdown"))
+  private txtXmlId = element(by.id("xmlId"));
+  private txtDisplayName = element(by.id("displayName"));
+  private txtActive = element(by.id("active"));
+  private txtContentRoutingType = element(by.id("type"));
+  private txtTenant = element(by.id("tenantId"));
+  private txtCDN = element(by.id("cdn"));
+  private txtRawRemapText = element(by.id("remapText"));
+  private txtRequestStatus = element(by.name("requestStatus"))
+  private txtComment = element(by.name("comment"))
+  private txtQuickSearch = element(by.id("quickSearch"))
+  private txtConfirmInput = element(by.name("confirmWithNameInput"))
+  private randomize = randomize;
+  public async OpenDeliveryServiceRequestPage(){
+    const snp = new SideNavigationPage();
+    await snp.NavigateToDeliveryServicesRequestsPage();
+  }
+  public async OpenServicesMenu(){
+    const snp = new SideNavigationPage();
+    await snp.ClickServicesMenu();
+  }
+  public async OpenDeliveryServicePage(){
+    const snp = new SideNavigationPage();
+    await snp.NavigateToDeliveryServicesPage();
+  }
+  public async CreateDeliveryServiceRequest(deliveryservicerequest: CreateDeliveryServiceRequest): Promise<boolean>{
+    const basePage = new BasePage();
+    const outPutMessage = deliveryservicerequest.validationMessage.replace(deliveryservicerequest.XmlId,deliveryservicerequest.XmlId+this.randomize)
+    await this.btnMore.click();
+    await this.btnCreateDS.click();
+    await this.formDropDown.sendKeys("ANY_MAP");
+    await basePage.ClickSubmit();
+    await this.txtXmlId.sendKeys(deliveryservicerequest.XmlId + this.randomize);
+    await this.txtDisplayName.sendKeys(deliveryservicerequest.DisplayName + this.randomize);
+    await this.txtActive.sendKeys(deliveryservicerequest.Active);
+    await this.txtContentRoutingType.sendKeys(deliveryservicerequest.ContentRoutingType);
+    await this.txtTenant.sendKeys(deliveryservicerequest.Tenant);
+    await this.txtCDN.sendKeys(deliveryservicerequest.CDN);
+    await this.txtRawRemapText.sendKeys(deliveryservicerequest.RawText);
+    await basePage.ClickCreate();
+    await this.txtRequestStatus.sendKeys("Submit Request for Review and Deployment");
+    await this.txtComment.sendKeys("test");
+    await basePage.ClickSubmit();
+    return await basePage.GetOutputMessage().then(value => outPutMessage === value);
+  }
+  public async SearchDeliveryServiceRequest(deliveryservicerequest: SearchDeliveryServiceRequest){
+    const name = deliveryservicerequest.XmlId+this.randomize;
+    await this.txtQuickSearch.clear();
+    await this.txtQuickSearch.sendKeys(name)
+    await browser.actions().click(element(by.cssContainingText("span", name))).perform();
+  }
+  public async FullFillDeliveryServiceRequest(deliveryservicerequest: FullfillDeliveryServiceRequest): Promise<boolean>{
+    const basePage = new BasePage();
+    const outPutMessage = deliveryservicerequest.FullfillMessage.replace(deliveryservicerequest.XmlId,deliveryservicerequest.XmlId+this.randomize)
+    await this.btnFullfillRequest.click();
+    await this.btnYes.click();
+    return await basePage.GetOutputMessage().then(value => outPutMessage === value);
+  }
+  public async CompleteDeliveryServiceRequest(deliveryservicerequest: CompleteDeliveryServiceRequest): Promise<boolean>{
+    const basePage = new BasePage();
+    await this.btnCompleteRequest.click();
+    await this.btnYes.click();
+    return await basePage.GetOutputMessage().then(value => deliveryservicerequest.CompleteMessage === value);
+
+  }
+  public async DeleteDeliveryServiceRequest(deliveryservicerequest: DeleteDeliveryServiceRequest): Promise<boolean>{
+    const basePage = new BasePage();
+    await this.btnDeleteRequest.click();
+    await this.txtConfirmInput.sendKeys(deliveryservicerequest.XmlId+this.randomize+" request");
+    await basePage.ClickDeletePermanently();
+    return await basePage.GetOutputMessage().then(value=>deliveryservicerequest.DeleteMessage === value);

Review comment:
       Same as above RE: `await` in a `return`

##########
File path: traffic_portal/test/integration/PageObjects/DeliveryServiceRequestPage.po.ts
##########
@@ -0,0 +1,149 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import {  browser, by, element} from 'protractor';
+import { BasePage } from './BasePage.po';
+import { SideNavigationPage } from '../PageObjects/SideNavigationPage.po';
+import { randomize } from '../config';
+
+
+interface CreateDeliveryServiceRequest{
+  description: string;
+  XmlId: string;
+  DisplayName: string;
+  Active: string;
+  ContentRoutingType: string;
+  Tenant: string;
+  CDN: string;
+  RawText: string;
+  validationMessage:string;
+}
+interface SearchDeliveryServiceRequest{
+  XmlId: string;
+}
+interface FullfillDeliveryServiceRequest{
+  XmlId: string;
+  FullfillMessage: string;
+}
+interface CompleteDeliveryServiceRequest{
+  XmlId: string;
+  CompleteMessage: string;
+}
+interface DeleteDeliveryServiceRequest{
+  XmlId: string;
+  DeleteMessage: string;
+}
+interface UpdateDeliveryServiceRequest{
+  XmlId: string;
+  UpdateMessage: string;
+}

Review comment:
       These interfaces are only used as arguments to functions, where their properties are accessed individually and directly. They also don't group a lot of properties. Surely it would be much simpler to just use one or two function parameters that pass the necessary information?




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org