From a0913afe38ecee48345783aa6e23f3bdaec27cd7 Mon Sep 17 00:00:00 2001 From: "Luiz R. Rodrigues" Date: Tue, 31 Aug 2021 07:27:17 -0300 Subject: [PATCH] AST: Fix profile test data --- .../config/automation-config-beta.json | 54 +++++++++---------- .../config/automation-config-prod.json | 54 +++++++++---------- .../config/automation-config-staging.json | 54 +++++++++---------- .../member-profile.helper.ts | 42 ++++++++------- 4 files changed, 103 insertions(+), 101 deletions(-) diff --git a/automated-smoke-test/config/automation-config-beta.json b/automated-smoke-test/config/automation-config-beta.json index a5d3762c17..769a2a1598 100644 --- a/automated-smoke-test/config/automation-config-beta.json +++ b/automated-smoke-test/config/automation-config-beta.json @@ -122,61 +122,61 @@ "memberProfile": { "url": "https://beta-community-app.topcoder.com/members", "profileInfo": { - "handle": "iamtong", - "numberOfCollapsedSkills": 10, - "verifiedSkill": "HTML5", - "noneVerifiedSkill": "Marvel - Design", - "country": "THAILAND", - "memberSince": "MEMBER SINCE MAY, 2009", - "tracks": ["COPILOT", "DEVELOP", "DESIGN"], - "quote": "I'm a designer focusing on designing mobile/ web applications and user experience.", - "forumLink": "https://apps.topcoder.com/forums/?module=History&userID=22781893" + "handle": "oton", + "numberOfCollapsedSkills": 4, + "verifiedSkill": "Geometry", + "noneVerifiedSkill": "User Experience (Ux)", + "country": "INDONESIA", + "memberSince": "MEMBER SINCE MAY, 2006", + "tracks": ["COPILOT", "DEVELOP", "DESIGN", "DATA_SCIENCE"], + "quote": "Indonesian. Dad of two. IA. WordPress/WooCommerce. Rails.", + "forumLink": "https://apps.topcoder.com/forums/?module=History&userID=22076237" }, "memberHaveWebSectionInfo": { "handle": "oton", "webLink": "HTTPS://ARIFWIDIANTO.COM" }, "copilotProfile": { - "handle": "iamtong", + "handle": "oton", "trackName": "COPILOT", "fullfillmentInfo": { "name": "COPILOT", - "info": "100%", + "info": "92.31%", "infoTitle": "FULFILLMENT", - "link": "https://beta-community-app.topcoder.com/members/iamtong/details/?track=COPILOT&subTrack=COPILOT" + "link": "https://beta-community-app.topcoder.com/members/oton/details/?track=COPILOT&subTrack=COPILOT" } }, "designProfile": { - "handle": "iamtong", + "handle": "oton", "trackName": "DESIGN", - "numberOfSubtracks": 11, + "numberOfSubtracks": 8, "winInfo": { "name": "WEB DESIGNS", - "info": "268", + "info": "4", "infoTitle": "WINS", - "link": "https://beta-community-app.topcoder.com/members/iamtong/details/?track=DESIGN&subTrack=WEB_DESIGNS" + "link": "https://beta-community-app.topcoder.com/members/oton/details/?track=DESIGN&subTrack=WEB_DESIGNS" } }, "developmentProfile": { - "handle": "iamtong", + "handle": "oton", "trackName": "DEVELOP", - "numberOfSubtracks": 7, + "numberOfSubtracks": 2, "winInfo": { - "name": "FIRST2FINISH", - "info": "61", - "infoTitle": "WINS", - "link": "https://beta-community-app.topcoder.com/members/iamtong/details/?track=DEVELOP&subTrack=FIRST_2_FINISH" + "name": "UI PROTOTYPE COMPETITION", + "info": "908", + "infoTitle": "RATING", + "link": "https://beta-community-app.topcoder.com/members/oton/details/?track=DEVELOP&subTrack=UI_PROTOTYPE_COMPETITION" } }, "dataScienceProfile": { - "handle": "FireIce", + "handle": "oton", "trackName": "DATA_SCIENCE", - "numberOfSubtracks": 2, + "numberOfSubtracks": 1, "ratingInfo": { - "name": "MARATHON MATCH", - "info": "999", + "name": "SRM", + "info": "952", "infoTitle": "RATING", - "link": "https://beta-community-app.topcoder.com/members/FireIce/details/?track=DATA_SCIENCE&subTrack=MARATHON_MATCH" + "link": "https://beta-community-app.topcoder.com/members/oton/details/?track=DATA_SCIENCE&subTrack=SRM" } } } diff --git a/automated-smoke-test/config/automation-config-prod.json b/automated-smoke-test/config/automation-config-prod.json index 6c1f60df05..ed2fc420de 100644 --- a/automated-smoke-test/config/automation-config-prod.json +++ b/automated-smoke-test/config/automation-config-prod.json @@ -118,61 +118,61 @@ "memberProfile": { "url": "https://www.topcoder.com/members", "profileInfo": { - "handle": "iamtong", - "numberOfCollapsedSkills": 10, - "verifiedSkill": "HTML5", - "noneVerifiedSkill": "Marvel - Design", - "country": "THAILAND", - "memberSince": "MEMBER SINCE MAY, 2009", - "tracks": ["COPILOT", "DEVELOP", "DESIGN"], - "quote": "I'm a designer focusing on designing mobile/ web applications and user experience.", - "forumLink": "https://apps.topcoder.com/forums/?module=History&userID=22781893" + "handle": "oton", + "numberOfCollapsedSkills": 4, + "verifiedSkill": "Geometry", + "noneVerifiedSkill": "User Experience (Ux)", + "country": "INDONESIA", + "memberSince": "MEMBER SINCE MAY, 2006", + "tracks": ["COPILOT", "DEVELOP", "DESIGN", "DATA_SCIENCE"], + "quote": "Indonesian. Dad of two. IA. WordPress/WooCommerce. Rails.", + "forumLink": "https://apps.topcoder.com/forums/?module=History&userID=22076237" }, "memberHaveWebSectionInfo": { "handle": "oton", "webLink": "HTTPS://ARIFWIDIANTO.COM" }, "copilotProfile": { - "handle": "iamtong", + "handle": "oton", "trackName": "COPILOT", "fullfillmentInfo": { "name": "COPILOT", - "info": "100%", + "info": "92.31%", "infoTitle": "FULFILLMENT", - "link": "https://www.topcoder.com/members/iamtong/details/?track=COPILOT&subTrack=COPILOT" + "link": "https://www.topcoder.com/members/oton/details/?track=COPILOT&subTrack=COPILOT" } }, "designProfile": { - "handle": "iamtong", + "handle": "oton", "trackName": "DESIGN", - "numberOfSubtracks": 11, + "numberOfSubtracks": 8, "winInfo": { "name": "WEB DESIGNS", - "info": "268", + "info": "4", "infoTitle": "WINS", - "link": "https://www.topcoder.com/members/iamtong/details/?track=DESIGN&subTrack=WEB_DESIGNS" + "link": "https://www.topcoder.com/members/oton/details/?track=DESIGN&subTrack=WEB_DESIGNS" } }, "developmentProfile": { - "handle": "iamtong", + "handle": "oton", "trackName": "DEVELOP", - "numberOfSubtracks": 7, + "numberOfSubtracks": 2, "winInfo": { - "name": "FIRST2FINISH", - "info": "61", - "infoTitle": "WINS", - "link": "https://www.topcoder.com/members/iamtong/details/?track=DEVELOP&subTrack=FIRST_2_FINISH" + "name": "UI PROTOTYPE COMPETITION", + "info": "908", + "infoTitle": "RATING", + "link": "https://www.topcoder.com/members/oton/details/?track=DEVELOP&subTrack=UI_PROTOTYPE_COMPETITION" } }, "dataScienceProfile": { - "handle": "FireIce", + "handle": "oton", "trackName": "DATA_SCIENCE", - "numberOfSubtracks": 2, + "numberOfSubtracks": 1, "ratingInfo": { - "name": "MARATHON MATCH", - "info": "999", + "name": "SRM", + "info": "952", "infoTitle": "RATING", - "link": "https://www.topcoder.com/members/FireIce/details/?track=DATA_SCIENCE&subTrack=MARATHON_MATCH" + "link": "https://www.topcoder.com/members/oton/details/?track=DATA_SCIENCE&subTrack=SRM" } } } diff --git a/automated-smoke-test/config/automation-config-staging.json b/automated-smoke-test/config/automation-config-staging.json index e75c937db5..67d47f8f24 100644 --- a/automated-smoke-test/config/automation-config-staging.json +++ b/automated-smoke-test/config/automation-config-staging.json @@ -123,61 +123,61 @@ "memberProfile": { "url": "https://staging-community-app.topcoder.com/members", "profileInfo": { - "handle": "iamtong", - "numberOfCollapsedSkills": 10, - "verifiedSkill": "HTML5", - "noneVerifiedSkill": "Marvel - Design", - "country": "THAILAND", - "memberSince": "MEMBER SINCE MAY, 2009", - "tracks": ["COPILOT", "DEVELOP", "DESIGN"], - "quote": "I'm a designer focusing on designing mobile/ web applications and user experience.", - "forumLink": "https://apps.topcoder.com/forums/?module=History&userID=22781893" + "handle": "oton", + "numberOfCollapsedSkills": 4, + "verifiedSkill": "Geometry", + "noneVerifiedSkill": "User Experience (Ux)", + "country": "INDONESIA", + "memberSince": "MEMBER SINCE MAY, 2006", + "tracks": ["COPILOT", "DEVELOP", "DESIGN", "DATA_SCIENCE"], + "quote": "Indonesian. Dad of two. IA. WordPress/WooCommerce. Rails.", + "forumLink": "https://apps.topcoder.com/forums/?module=History&userID=22076237" }, "memberHaveWebSectionInfo": { "handle": "oton", "webLink": "HTTPS://ARIFWIDIANTO.COM" }, "copilotProfile": { - "handle": "iamtong", + "handle": "oton", "trackName": "COPILOT", "fullfillmentInfo": { "name": "COPILOT", - "info": "100%", + "info": "92.31%", "infoTitle": "FULFILLMENT", - "link": "https://staging-community-app.topcoder.com/members/iamtong/details/?track=COPILOT&subTrack=COPILOT" + "link": "https://staging-community-app.topcoder.com/members/oton/details/?track=COPILOT&subTrack=COPILOT" } }, "designProfile": { - "handle": "iamtong", + "handle": "oton", "trackName": "DESIGN", - "numberOfSubtracks": 11, + "numberOfSubtracks": 8, "winInfo": { "name": "WEB DESIGNS", - "info": "268", + "info": "4", "infoTitle": "WINS", - "link": "https://staging-community-app.topcoder.com/members/iamtong/details/?track=DESIGN&subTrack=WEB_DESIGNS" + "link": "https://staging-community-app.topcoder.com/members/oton/details/?track=DESIGN&subTrack=WEB_DESIGNS" } }, "developmentProfile": { - "handle": "iamtong", + "handle": "oton", "trackName": "DEVELOP", - "numberOfSubtracks": 7, + "numberOfSubtracks": 2, "winInfo": { - "name": "FIRST2FINISH", - "info": "61", - "infoTitle": "WINS", - "link": "https://staging-community-app.topcoder.com/members/iamtong/details/?track=DEVELOP&subTrack=FIRST_2_FINISH" + "name": "UI PROTOTYPE COMPETITION", + "info": "908", + "infoTitle": "RATING", + "link": "https://staging-community-app.topcoder.com/members/oton/details/?track=DEVELOP&subTrack=UI_PROTOTYPE_COMPETITION" } }, "dataScienceProfile": { - "handle": "FireIce", + "handle": "oton", "trackName": "DATA_SCIENCE", - "numberOfSubtracks": 2, + "numberOfSubtracks": 1, "ratingInfo": { - "name": "MARATHON MATCH", - "info": "999", + "name": "SRM", + "info": "952", "infoTitle": "RATING", - "link": "https://staging-community-app.topcoder.com/members/FireIce/details/?track=DATA_SCIENCE&subTrack=MARATHON_MATCH" + "link": "https://staging-community-app.topcoder.com/members/oton/details/?track=DATA_SCIENCE&subTrack=SRM" } } } diff --git a/automated-smoke-test/page-objects/pages/topcoder/member-profile-page/member-profile.helper.ts b/automated-smoke-test/page-objects/pages/topcoder/member-profile-page/member-profile.helper.ts index bc7193768e..3cd4e1ba86 100644 --- a/automated-smoke-test/page-objects/pages/topcoder/member-profile-page/member-profile.helper.ts +++ b/automated-smoke-test/page-objects/pages/topcoder/member-profile-page/member-profile.helper.ts @@ -114,28 +114,30 @@ export class MemberProfilePageHelper { }) ).toBe(true, 'Unverified skill should not be displayed with a check mark'); const numberOfCollapsedSkills = skills.length; - await CommonHelper.findElementByText('button', 'VIEW ALL').click(); - await CommonHelper.waitUntilVisibilityOf( - () => CommonHelper.findElementByText('button', 'VIEW LESS'), - 'Wait for view less button', - false - ); skills = await MemberProfilePageObject.getAllSkills(); const numberOfAllSkills = skills.length; - expect(numberOfCollapsedSkills <= numberOfAllSkills).toBe( - true, - 'Button View All does not work as expected' - ); - await CommonHelper.findElementByText('button', 'VIEW LESS').click(); - await CommonHelper.waitUntilVisibilityOf( - () => CommonHelper.findElementByText('button', 'VIEW ALL'), - 'Wait for view less button', - false - ); - expect(skills.length <= numberOfAllSkills).toBe( - true, - 'Button View Less does not work as expected' - ); + if (numberOfCollapsedSkills !== numberOfAllSkills) { + await CommonHelper.findElementByText('button', 'VIEW ALL').click(); + await CommonHelper.waitUntilVisibilityOf( + () => CommonHelper.findElementByText('button', 'VIEW LESS'), + 'Wait for view less button', + false + ); + expect(numberOfCollapsedSkills <= numberOfAllSkills).toBe( + true, + 'Button View All does not work as expected' + ); + await CommonHelper.findElementByText('button', 'VIEW LESS').click(); + await CommonHelper.waitUntilVisibilityOf( + () => CommonHelper.findElementByText('button', 'VIEW ALL'), + 'Wait for view less button', + false + ); + expect(skills.length <= numberOfAllSkills).toBe( + true, + 'Button View Less does not work as expected' + ); + } } /**