lbathina commented on a change in pull request #3748: Add initial origins and 
users TP tests
URL: https://github.com/apache/trafficcontrol/pull/3748#discussion_r309824763
 
 

 ##########
 File path: traffic_portal/test/end_to_end/physLocations/phys-locations-spec.js
 ##########
 @@ -31,30 +31,32 @@ describe('Traffic Portal Phys Locations Test Suite', 
function() {
                zip: '12345'
        };
 
-       it('should go to the phys locations page', function() {
+       it('should go to the phys locations page', async () => {
                console.log("Go to the phys locations page");
-               browser.setLocation("phys-locations");
+               await browser.setLocation("phys-locations");
                
expect(browser.getCurrentUrl().then(commonFunctions.urlPath)).toEqual(commonFunctions.urlPath(browser.baseUrl)+"#!/phys-locations");
        });
 
-       it('should open new phys locations form page', function() {
+       it('should open new phys locations form page', async () => {
                console.log("Open new phys location form page");
-               
browser.driver.findElement(by.name('createPhysLocationButton')).click();
+               await pageData.createPhysLocationButton.click();
                
expect(browser.getCurrentUrl().then(commonFunctions.urlPath)).toEqual(commonFunctions.urlPath(browser.baseUrl)+"#!/phys-locations/new");
        });
 
-       it('should fill out form, create button is enabled and submit', 
function () {
+       it('should fill out form, create button is enabled and submit', async 
() => {
                console.log("Filling out form, check create button is enabled 
and submit");
                expect(pageData.createButton.isEnabled()).toBe(false);
-               pageData.name.sendKeys(myNewPhysLoc.name);
-               pageData.shortName.sendKeys(myNewPhysLoc.name);
-               pageData.address.sendKeys(myNewPhysLoc.address);
-               pageData.city.sendKeys(myNewPhysLoc.city);
-               pageData.state.sendKeys(myNewPhysLoc.state);
-               pageData.zip.sendKeys(myNewPhysLoc.zip);
-               commonFunctions.selectDropdownbyNum(pageData.region, 1);
+               await pageData.name.sendKeys(myNewPhysLoc.name);
+               await pageData.shortName.sendKeys(myNewPhysLoc.name);
+               await pageData.address.sendKeys(myNewPhysLoc.address);
+               await pageData.city.sendKeys(myNewPhysLoc.city);
+               await pageData.state.sendKeys(myNewPhysLoc.state);
+               await pageData.zip.sendKeys(myNewPhysLoc.zip);
+               await commonFunctions.selectDropdownByNum(pageData.region, 1);
 
 Review comment:
   select by label /text

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to