rimashah25 commented on a change in pull request #6012: URL: https://github.com/apache/trafficcontrol/pull/6012#discussion_r670797507
########## File path: traffic_portal/test/integration/PageObjects/Jobs.po.ts ########## @@ -0,0 +1,63 @@ +/* + * 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 { by, element } from 'protractor'; +import { randomize } from '../config'; +import { BasePage } from './BasePage.po'; +import { SideNavigationPage } from './SideNavigationPage.po'; + +interface Job { + DeliveryService: string; + Regex: string; + Ttl: string; + validationMessage: string; +} +export class JobsPage extends BasePage { + private moreBtn=element(by.name('moreBtn')); + private createJobMenuItem=element(by.name('createJobMenuItem')); + private txtRegex=element(by.name('regex')); + private txtTtl=element(by.name('ttl')); + private txtDeliveryservice=element(by.name('deliveryservice')); + private randomize = randomize; + + public async OpenJobsPage(){ + let snp = new SideNavigationPage(); + await snp.NavigateToJobsPage(); + } + + public async OpenToolsMenu(){ + let snp = new SideNavigationPage(); + await snp.ClickToolsMenu(); + } + + public async CreateJobs(jobs: Job): Promise<boolean> { + let result = false; + let basePage = new BasePage(); + let snp = new SideNavigationPage(); Review comment: nit: `snp` should be a constant since it is never re-assigned. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
