dpham692 commented on a change in pull request #6232:
URL: https://github.com/apache/trafficcontrol/pull/6232#discussion_r718906562



##########
File path: traffic_portal/test/integration/specs/Profiles.spec.ts
##########
@@ -94,12 +94,9 @@ profiles.tests.forEach(async profilesData => {
         });
     });
 });
-
 describe('Clean up API for Profiles', () => {
-    afterAll(async function () {
-        it('Cleanup', async () => {
-            await api.UseAPI(profiles.cleanup);
-        });
-    })
+    it('Cleanup', async () => {
+        await api.UseAPI(profiles.cleanup);
+    });

Review comment:
       After couple test and research. The afterAll can only be use one in a 
spec file regardless how many describe you put it in. So with this afterAll, 
the clean up API will not work.

##########
File path: traffic_portal/test/integration/specs/Types.spec.ts
##########
@@ -36,39 +36,50 @@ describe('Setup API for Types Test', () => {
 types.tests.forEach(async typesData => {
     typesData.logins.forEach(login => {
         describe(`Traffic Portal - Types - ${login.description}`, () => {
+            afterEach(async function () {
+                await typesPage.OpenTypesPage();
+            });
+            afterAll(async function () {
+                expect(await topNavigation.Logout()).toBe(true);
+            })
             it('can login', async () => {
                 browser.get(browser.params.baseUrl);
                 await loginPage.Login(login);
-                expect(await loginPage.CheckUserName(login)).toBeTruthy();
-            });
-            it('can open types page', async () => {
+                expect(await loginPage.CheckUserName(login)).toBe(true);
                 await typesPage.OpenConfigureMenu();
-                await typesPage.OpenTypesPage();
             });
-
+            typesData.toggle.forEach(toggle => {
+                it(toggle.description, async () => {
+                    if(toggle.description.includes('hide')){
+                        expect(await 
typesPage.ToggleTableColumn(toggle.Name)).toBe(true);
+                    }else{
+                        expect(await 
typesPage.ToggleTableColumn(toggle.Name)).toBe(true);
+                    }

Review comment:
       Fixed the check. Apparently, the function check was not cap.




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


Reply via email to