From 81b8a77aa12249087cc33a871ee8698ce97d0eab Mon Sep 17 00:00:00 2001 From: lavishaGit Date: Tue, 28 Jan 2025 10:27:13 -0800 Subject: [PATCH 1/3] wdio file changed --- .../config/wdio.config.js | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/tests/browserstack_automation/config/wdio.config.js b/tests/browserstack_automation/config/wdio.config.js index de5f293dc..ea83cd9f9 100644 --- a/tests/browserstack_automation/config/wdio.config.js +++ b/tests/browserstack_automation/config/wdio.config.js @@ -13,8 +13,8 @@ try { // Run `npm run wdio:setup` } -const capabilities = [...browserCapabilities, ...mobileCapabilities]; - +//const capabilities = [...browserCapabilities, ...mobileCapabilities]; +const capabilities =[...browserCapabilities]; const date = new Date(); const dateForDisplay = date.toDateString(); @@ -37,37 +37,37 @@ module.exports.config = { ], ], specs: [ - '../specs/DiscussPage.js', + // '../specs/DiscussPage.js', '../specs/FAQPage.js', - '../specs/PrivacyPage.js', - '../specs/ReadyPage.js', - '../specs/TermsPage.js', - '../specs/TopNavigation.js', - '../specs/TopicsPage.js', - '../specs/HowItWorks.js', - '../specs/FooterLinks.js', - '../specs/SignInPage.js', + // '../specs/PrivacyPage.js', + // '../specs/ReadyPage.js', + // '../specs/TermsPage.js', + // '../specs/TopNavigation.js', + // '../specs/TopicsPage.js', + // '../specs/HowItWorks.js', + // '../specs/FooterLinks.js', + // '../specs/SignInPage.js', - '../specs/BallotPage.js', - '../specs/CandidatesPage.js', + // '../specs/BallotPage.js', + // '../specs/CandidatesPage.js', - '../specs/WhosRunningForOffice.js', + // '../specs/WhosRunningForOffice.js', ], capabilities, commonCapabilities: { - 'bstack:options': { - buildName, - debug: 'true', - // geoLocation is only available under Enterprise plans - // geoLocation: 'US-CA', - // gpsLocation is only available under Paid plans - // Oakland, CA, USA - gpsLocation: '37.804363,-122.271111', - maskCommands: 'setValues, getValues, setCookies, getCookies', - video: 'true', - }, + // 'bstack:options': { + // buildName, + // debug: 'true', + // // geoLocation is only available under Enterprise plans + // // geoLocation: 'US-CA', + // // gpsLocation is only available under Paid plans + // // Oakland, CA, USA + // gpsLocation: '37.804363,-122.271111', + // maskCommands: 'setValues, getValues, setCookies, getCookies', + // video: 'true', + // }, }, maxInstances: 1, exclude: [], From 3bb59b0a80320b340355ff361f3b0485d52fdb5d Mon Sep 17 00:00:00 2001 From: lavishaGit Date: Tue, 28 Jan 2025 14:08:09 -0800 Subject: [PATCH 2/3] FAQPage Fix --- .../page_objects/ready.page.js | 261 +++++++++++------- .../browserstack_automation/specs/FAQPage.js | 56 +--- 2 files changed, 172 insertions(+), 145 deletions(-) diff --git a/tests/browserstack_automation/page_objects/ready.page.js b/tests/browserstack_automation/page_objects/ready.page.js index 82db3c70c..7cc43eb70 100644 --- a/tests/browserstack_automation/page_objects/ready.page.js +++ b/tests/browserstack_automation/page_objects/ready.page.js @@ -2,90 +2,90 @@ import { $, $$, expect, driver, browser } from '@wdio/globals'; import Page from './page'; class ReadyPage extends Page { - constructor () { + constructor() { super().title = 'Ready to Vote? - WeVote'; } - get avatar () { + get avatar() { return super.avatar; } - get electionCountDownTitle () { + get electionCountDownTitle() { return $('//*[contains(@id, "electionCountDownTitle")]'); } - get wevoteLogo () { + get wevoteLogo() { return $('//*[contains(@id, "HeaderLogoImage")]'); } - get wevoteLogoRedirectReadyPage () { + get wevoteLogoRedirectReadyPage() { return $('#logoHeaderBar'); } - get ballotTitle () { + get ballotTitle() { return $('//*[contains(@id, "ballotTitleHeader")]'); } - get ballotAddress () { + get ballotAddress() { return $('#ballotTitleBallotAddress'); // return $('//span[@class ="u-cursor--pointer u-link-color u-link-underline-on-hover"]'); } - get ballotAddressInput () { + get ballotAddressInput() { return $('#entryBox'); } - get saveBallotAddressButton () { + get saveBallotAddressButton() { return $('#addressBoxModalSaveButton'); } - get viewUpcomingBallotButton () { + get viewUpcomingBallotButton() { return $('//*[contains(@id, "viewUpcomingBallot")]'); } - get unfurlIssuesButton () { + get unfurlIssuesButton() { return $('//*[contains(@id, "showMoreReadyPageValuesList")]'); } - get toggleIntroductionButton () { + get toggleIntroductionButton() { return $('#toggleContentButton-showMoreReadyIntroductionCompressed'); // return $('#showmorelink'); } - get introductionStepText () { + get introductionStepText() { return $$('//*[contains(@id, "readyIntroductionStepText")]'); } - get getIntroText () { + get getIntroText() { return $('.StepText-sc-lvvjo6-11 kIDCci'); } - get toggleFinePrintButton () { + get toggleFinePrintButton() { return $('#toggleContentButton-showMoreReadyFinePrintCompressed'); // return $('#showmorelink'); } - get finePrintStepText () { + get finePrintStepText() { return $$('//*[contains(@id, "readyFinePrintStepText")]'); } - get finePrintStepHeaderText1 () { + get finePrintStepHeaderText1() { return $("(//div[@class='StepTitle-sc-lvvjo6-10 iKrjzD'][normalize-space()='You cannot cast your vote electronically'])[1]"); } - get finePrintStepHeaderText2 () { + get finePrintStepHeaderText2() { return $('//div[text() = "WeVote does not represent a government entity"]'); } - get finePrintStepHeaderText3 () { + get finePrintStepHeaderText3() { return $('//div[text() = "Please make sure you are registered to vote"]'); } - get finePrintStepHeaderText4 () { + get finePrintStepHeaderText4() { return $('//div[text() = "How your data is used & protected"]'); } - async checkFinePrintHeaders () { + async checkFinePrintHeaders() { const text1 = (await this.finePrintStepHeaderText1); console.log(`text1: ${text1}`); const text2 = (await this.finePrintStepHeaderText2); @@ -101,233 +101,289 @@ class ReadyPage extends Page { await expect(text4).toHaveText('How your data is used & protected'); } - get followIssueButtons () { + get followIssueButtons() { return $$('//*[contains(@id, "issueFollowButton")]'); } - get toggleFollowMenuButtons () { + get toggleFollowMenuButtons() { return $$('//*[contains(@id, "toggleFollowMenuButton")]'); } - get unfollowIssueButtons () { + get unfollowIssueButtons() { return $$('//*[contains(@id, "issueUnfollowButton")]'); } - get getFollowPopularTopicsElement () { + get getFollowPopularTopicsElement() { return $('#PopularTopicsHeader'); } - get selectAddress () { + get selectAddress() { return $('(//div[@class = "pac-item"])[1]'); } - get howItWorksLink () { + get howItWorksLink() { return $('#footerLinkHowItWorks'); } - get howItWorksTitle () { + get howItWorksTitle() { // return $('div>h3[class~="gNNNpeadyFinePrintStepTextX"]'); return $('//h3[text()="1. Choose your interests"]'); } - get howItWorksCloseIcon () { + get howItWorksCloseIcon() { return $('[data-testid = "CloseIcon"] > path'); } - get findPrivacyLink () { + get findPrivacyLink() { return $('#footerLinkPrivacy'); } - get findNextButtonHowItWorksWindow () { + get findNextButtonHowItWorksWindow() { // return $('.kMeOcV'); return $('//*[contains(@id, "Next")]'); } - get findBackButtonHowItWorksWindow () { + get findBackButtonHowItWorksWindow() { return $('//*[contains(@id, "Back")]'); } - get getStartedButton () { + get getStartedButton() { return $('#howItWorksGetStartedDesktopButton'); } - get ballotForAddress () { + get ballotForAddress() { return $('(span[class~="u-link-underline-on-hover"])'); } - get getTeamPageTitleElement () { + get getTeamPageTitleElement() { return $("//h1[normalize-space()='About WeVote']"); } - get getCreditsAndThanksElement () { + get getCreditsAndThanksElement() { return $('#footerLinkCredits'); } - get getCreditsAndThanksPageTitleElement () { + get getCreditsAndThanksPageTitleElement() { return $("//h1[normalize-space()='Credits & Thanks']"); } - get getDonateLinkLocator () { + get getDonateLinkLocator() { return $('[href = "/donate"]'); } - get getDonateLinkHeader () { + get getDonateLinkHeader() { return $('#donateTabHeaderBar'); } - get getDonateLinkFooter () { + get getDonateLinkFooter() { return $('#footerMainLinkDonate'); } - get getSignInElement () { + + get getSignInElement() { return $('#signIn'); } - get getMobilePhoneNumberElement () { + + get getMobilePhoneNumberElement() { return $('#enterVoterPhone'); } - get getSendCodeElement () { + + get getSendCodeElement() { return $('#desktopSmsSendCode'); } - get getCodeVerificationDigit1Element () { + + get getCodeVerificationDigit1Element() { return $('#digit1'); } - get getCodeVerificationDigit2Element () { + + get getCodeVerificationDigit2Element() { return $('#digit2'); } - get getCodeVerificationDigit3Element () { + + get getCodeVerificationDigit3Element() { return $('#digit3'); } - get getCodeVerificationDigit4Element () { + + get getCodeVerificationDigit4Element() { return $('#digit4'); } - get getCodeVerificationDigit5Element () { + + get getCodeVerificationDigit5Element() { return $('#digit5'); } - get getCodeVerificationDigit6Element () { + + get getCodeVerificationDigit6Element() { return $('#digit6'); } - get getVerifyButtonElement () { + + get getVerifyButtonElement() { return $('#emailVerifyButton'); } - get getProChoiceLinkElement () { + + get getProChoiceLinkElement() { return $('a[href="/value/pro-choice"]'); } - get getDemocraticClubsLinkElement () { + + get getDemocraticClubsLinkElement() { return $('a[href="/value/democratic_clubs"]'); - } - get getProfileIconElement () { + } + + get getProfileIconElement() { return $('#profileAvatarHeaderBar'); } + get getClimateChangeLinkElement() { - return $('a[href="/value/climate_change"]') + return $('a[href="/value/climate_change"]'); } + get getProLifeLinkElement() { - return $('a[href="/value/pro-life"]') + return $('a[href="/value/pro-life"]'); } + get getRepublicanClubsLinkElement() { - return $('a[href="/value/republican_clubs"]') + return $('a[href="/value/republican_clubs"]'); } + get getLGBTQLinkElement() { - return $('a[href="/value/lgbtq"]') + return $('a[href="/value/lgbtq"]'); } + get getShowMoreLinkElement() { - return $('#showMoreLink') + return $('#showMoreLink'); } + get getDemocraticPartyPoliticiansLinkElement() { - return $('a[href="/value/democratic_party_politicians"]') + return $('a[href="/value/democratic_party_politicians"]'); } + get getRepublicanPartyPoliticiansLinkElement() { - return $('a[href="/value/republican_party_politicians"]') + return $('a[href="/value/republican_party_politicians"]'); } + get getProgressiveValuesLinkElement() { - return $('a[href="/value/progressive_values"]') + return $('a[href="/value/progressive_values"]'); } + get getConservativeValuesLinkElement() { - return $('a[href="/value/conservative_values"]') + return $('a[href="/value/conservative_values"]'); } + get getCommonSenseGunReformLinkElement() { - return $('a[href="/value/common_sense_gun_reform"]') + return $('a[href="/value/common_sense_gun_reform"]'); } + get getGun2ndAmendmentRightsLinkElement() { - return $('a[href="/value/gun__2nd_amendment_rights"]') + return $('a[href="/value/gun__2nd_amendment_rights"]'); } + get getAffordableHousingLinkElement() { - return $('a[href="/value/affordable_housing"]') + return $('a[href="/value/affordable_housing"]'); } + get getVotingRightsAndEducationLinkElement() { - return $('a[href="/value/voting_rights__education"]') + return $('a[href="/value/voting_rights__education"]'); } + get getCommunitiesOfColorLinkElement() { - return $('a[href="/value/communities_of_color"]') + return $('a[href="/value/communities_of_color"]'); } + get getAnimalsAndWildlifeLinkElement() { - return $('a[href="/value/animals__wildlife"]') + return $('a[href="/value/animals__wildlife"]'); } + get getImmigrationRightsLinkElement() { - return $('a[href="/value/immigration_rights"]') + return $('a[href="/value/immigration_rights"]'); } + get getCriminalJusticeReformLinkElement() { - return $('a[href="/value/criminal_justice_reform"]') + return $('a[href="/value/criminal_justice_reform"]'); } + get getReducingMoneyInPoliticsLinkElement() { - return $('a[href="/value/reducing_money_in_politics"]') + return $('a[href="/value/reducing_money_in_politics"]'); } + get getSocialSecurityAndMedicareLinkElement() { - return $('a[href="/value/social_security__medicare"]') + return $('a[href="/value/social_security__medicare"]'); } + get getReducingStudentDebtLinkElement() { - return $('a[href="/value/reducing_student_debt"]') + return $('a[href="/value/reducing_student_debt"]'); } + get getMarijuanaLegalizationLinkElement() { - return $('a[href="/value/marijuana_legalization"]') + return $('a[href="/value/marijuana_legalization"]'); } + get getLowIncomeAndUnemploymentLinkElement() { - return $('a[href="/value/low_income__unemployment"]') + return $('a[href="/value/low_income__unemployment"]'); } + get getHomelessWellBeingLinkElement() { - return $('a[href="/value/homeless_well-being"]') + return $('a[href="/value/homeless_well-being"]'); } + get getBicyclingLinkElement() { - return $('a[href="/value/bicycling"]') + return $('a[href="/value/bicycling"]'); } + get getSecuringOurBordersLinkElement() { - return $('a[href="/value/securing_our_borders"]') - } + return $('a[href="/value/securing_our_borders"]'); + } + get getWomensEqualityLinkElement() { - return $("a[href='/value/women\\'s_equality']") + return $("a[href='/value/women\\'s_equality']"); } + get getGreenPartyClubsLinkElement() { - return $('a[href="/value/green_party_clubs"]') + return $('a[href="/value/green_party_clubs"]'); } + get getLibertarianClubsLinkElement() { - return $('a[href="/value/libertarian_clubs"]') + return $('a[href="/value/libertarian_clubs"]'); } + get getProPublicSchoolsLinkElement() { - return $('a[href="/value/pro_public_schools"]') + return $('a[href="/value/pro_public_schools"]'); } + get getPubliclyFundedHealthcareLinkElement() { - return $('a[href="/value/publicly_funded_healthcare"]') + return $('a[href="/value/publicly_funded_healthcare"]'); } + get getGreenPartyPoliticiansLinkElement() { - return $('a[href="/value/green_party_politicians"]') + return $('a[href="/value/green_party_politicians"]'); } + get getLibertarianPartyPoliticiansLinkElement() { - return $('a[href="/value/libertarian_party_politicians"]') + return $('a[href="/value/libertarian_party_politicians"]'); } + get getIndependentPoliticiansLinkElement() { - return $('a[href="/value/independent_politicians"]') + return $('a[href="/value/independent_politicians"]'); } + get getProSchoolChoiceLinkElement() { - return $('a[href="/value/pro_school_choice"]') + return $('a[href="/value/pro_school_choice"]'); } + get getMakeAmericaGreatAgainLinkElement() { - return $('a[href="/value/make_america_great_again_\\(maga\\)"]') + return $('a[href="/value/make_america_great_again_\\(maga\\)"]'); + } + + get getAboutLinkElement() { + return $('//a[text() = "About & FAQ"]'); } + async waitAboutLinkAndClick() { + await this.getAboutLinkElement.waitForDisplayed({ timeout: 15000 }); + await this.getAboutLinkElement.click(); + } - async login () { + async login() { const waitTime = 5000; await this.load(); await driver.pause(waitTime); @@ -362,23 +418,23 @@ class ReadyPage extends Page { await this.getVerifyButtonElement.click(); } - async load () { + async load() { await super.open('/ready'); } - async signIn () { + async signIn() { await super.signIn(); } - async openBallotModal () { + async openBallotModal() { await this.ballotTitle.findAndClick(); } - async openBallotcount () { + async openBallotcount() { await this.electionCountDownTitle.findAndClick(); } - async updateBallotAddress (ballotAddress) { + async updateBallotAddress(ballotAddress) { await this.ballotAddress.findAndClick(); await this.ballotAddressInput.setValue(ballotAddress); @@ -386,29 +442,30 @@ class ReadyPage extends Page { await this.saveBallotAddressButton.findAndClick(); } - async followFirstIssue () { + async followFirstIssue() { await this.followIssueButtons[0].findAndClick(); } - async unfollowFirstIssue () { + async unfollowFirstIssue() { await this.toggleFollowMenuButtons[0].findAndClick(); await this.unfollowIssueButtons[0].findAndClick(); } - async unfurlIssues () { + async unfurlIssues() { await this.unfurlIssuesButton.findAndClick(); } - async toggleIntroduction () { + async toggleIntroduction() { await this.toggleIntroductionButton.findAndClick(); } - async toggleIntroStepText () { + async toggleIntroStepText() { await this.introductionStepText.findAndClick(); } - async toggleFinePrint () { + async toggleFinePrint() { await this.toggleFinePrintButton.findAndClick(); } } export default new ReadyPage(); + diff --git a/tests/browserstack_automation/specs/FAQPage.js b/tests/browserstack_automation/specs/FAQPage.js index 30bb326eb..d4dc4d00b 100644 --- a/tests/browserstack_automation/specs/FAQPage.js +++ b/tests/browserstack_automation/specs/FAQPage.js @@ -1,56 +1,34 @@ import { driver, expect } from '@wdio/globals'; import ReadyPage from '../page_objects/ready.page'; import FAQPage from '../page_objects/faq.page'; -//import { optionGroupClasses } from '@mui/material/node_modules/@mui/base'; -const assert = require('assert'); const { describe, it } = require('mocha'); + const waitTime = 10000; -let originalWindowHandle; beforeEach(async () => { - - await ReadyPage.load(); await driver.maximizeWindow(); await driver.pause(waitTime); - originalWindowHandle = await driver.getWindowHandle(); - //Ensure you are focused on the Ready page if it opens in a new tab - const allWindowHandles = await driver.getWindowHandles(); - - // Iterate through all windows to ensure you are on the correct one - for (let handle of allWindowHandles) { - await driver.switchToWindow(handle); - const currentUrl = await driver.getUrl(); - if (currentUrl.includes('https://quality.wevote.us/ready')) { - // If it's the Ready page, break out of the loop - break; - } - //await driver.switchWindow('https://quality.wevote.us/ready'); - } await ReadyPage.waitAboutLinkAndClick(); - //await driver.refresh(); // Refresh the page between tests + }); -describe('FAQPage', () => { +describe('FAQ Page', () => { // FAQ_001 it('verifyAboutLinkRedirected', async () => { - - await expect(await FAQPage.getFAQPageTitleElement).toHaveText('Frequently Asked Questions'); - + await expect(FAQPage.getFAQPageTitleElement).toHaveText('Frequently Asked Questions'); }); // FAQ_003 it('verifyFacebookIconRedirected', async () => { - - await (await FAQPage.getFacebookIconElement).waitForClickable(); + await (await FAQPage.getFacebookIconElement).waitForClickable({ timeout: 15000 }); await FAQPage.getFacebookIconElement.click(); await FAQPage.waitForURL('https://www.facebook.com/WeVoteUSA'); await expect(driver).toHaveTitle('We Vote | Facebook'); - }); // FAQ_005 @@ -66,7 +44,6 @@ describe('FAQPage', () => { // FAQ_006 it('verifyGitHubIconAndLinksRedirected', async () => { - await FAQPage.getGitHubIconElement; await expect(await FAQPage.getGitHubIconElement).toBeElementsArrayOfSize(3); const actualResultArray = await FAQPage.clickGitHubIconAndLinks(); @@ -78,16 +55,14 @@ describe('FAQPage', () => { // FAQ_007 it('verifyBlogIconRedirected', async () => { - await (await FAQPage.getBlogIconElement).waitForClickable(); await FAQPage.getBlogIconElement.click(); await FAQPage.waitForURL('https://blog.wevote.us/'); - await expect(driver).toHaveTitle('We Vote – View your ballot. Learn from friends. Share your Vision.'); + await expect(driver).toHaveTitle(expect.stringContaining('Share your Vision')); }); // FAQ_009 it('verifyEducationLinkRedirected', async () => { - await (await FAQPage.getWeVoteEducationWebsiteElement).waitForClickable(); await FAQPage.getWeVoteEducationWebsiteElement.click(); await FAQPage.waitForURL('https://www.wevoteeducation.org/'); @@ -96,7 +71,6 @@ describe('FAQPage', () => { // FAQ_010 it('verifyWeVoteUSALinkRedirected', async () => { - await (await FAQPage.getWeVoteUSAWebsiteElement).waitForClickable(); await FAQPage.getWeVoteUSAWebsiteElement.click(); await FAQPage.waitForURL('https://www.wevoteusa.org/'); @@ -105,16 +79,14 @@ describe('FAQPage', () => { // FAQ_011 it('verifyVolunteerOpeningsLinkRedirected', async () => { - const volunteerElements = await FAQPage.getWeVoteVolunteerElements; // await volunteerElements[0].waitForClickable(); await expect(volunteerElements).toBeElementsArrayOfSize(2); const actualResultArray = await FAQPage.clickVolunteerOpeningsLinks(); for (let i = 0; i < actualResultArray.length; i++) { const actualResult = actualResultArray[i]; - //assert.equal(actualResult, 'WeVote - Career Page'); + // assert.equal(actualResult, 'WeVote - Career Page'); await expect(actualResult).toHaveTitle('WeVote - Career Page'); - } }); // it('verifyTeamLinkRedirected', async () => { @@ -128,7 +100,6 @@ describe('FAQPage', () => { // }); // // FAQ_012 it('verifyTeamLinkRedirected', async () => { - await (await FAQPage.getAboutPageTitleElement).waitForClickable(); await FAQPage.getAboutPageTitleElement.click(); await FAQPage.waitForURL('https://quality.wevote.us/more/about'); @@ -137,17 +108,15 @@ describe('FAQPage', () => { // FAQ_013 it('verifyContactUsRedirected', async () => { - await (await FAQPage.getWeVoteContactUsFormElement).waitForClickable(); await FAQPage.getWeVoteContactUsFormElement.click(); await FAQPage.waitForURL('https://help.wevote.us/hc/en-us/requests/new'); - //await FAQPage.getWeVoteUSAWebsiteElement.click + // await FAQPage.getWeVoteUSAWebsiteElement.click await expect(driver).toHaveTitle('Submit a request – We Vote'); }); // FAQ_014 it('verifyAppStoreRedirected', async () => { - await (await FAQPage.getWeVoteIPhoneLinkElement).waitForClickable(); await FAQPage.getWeVoteIPhoneLinkElement.click(); await FAQPage.waitForURL('https://apps.apple.com/us/app/we-vote-ballot-guide-wevote/id1347335726'); @@ -155,8 +124,7 @@ describe('FAQPage', () => { }); // FAQ_015 - it('verifyGooglePlayRedirected', async () => { - + it.only('verifyGooglePlayRedirected', async () => { await (await FAQPage.getWeVoteAndroidLinkElement).waitForClickable(); await FAQPage.getWeVoteAndroidLinkElement.click(); await FAQPage.waitForURL('https://play.google.com/store/apps/details?id=org.wevote.cordova&hl=en_US'); @@ -165,14 +133,13 @@ describe('FAQPage', () => { // FAQ_016 it('verifyDonateLinkRedirected', async () => { - await (await FAQPage.getPleaseDonateElement).waitForClickable(); await FAQPage.getPleaseDonateElement.click(); await expect(driver).toHaveTitle('Donate - WeVote'); }); - // FAQ_017 + /// FAQ_017 it('verifyLetsGetStartedLinkRedirected', async () => { await (await FAQPage.getLetsGetStartedElement).waitForClickable(); await FAQPage.getLetsGetStartedElement.click(); @@ -187,3 +154,6 @@ describe('FAQPage', () => { await expect(ReadyPage.getFollowPopularTopicsElement).toHaveText('Follow Popular Topics'); }); }); + + + From 88688eb5490f685b66eff53b75727b9fd74eb9f4 Mon Sep 17 00:00:00 2001 From: lavishaGit <97263933+lavishaGit@users.noreply.github.com> Date: Tue, 28 Jan 2025 14:52:36 -0800 Subject: [PATCH 3/3] wdio.config.js --- .../config/wdio.config.js | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/tests/browserstack_automation/config/wdio.config.js b/tests/browserstack_automation/config/wdio.config.js index ea83cd9f9..de5f293dc 100644 --- a/tests/browserstack_automation/config/wdio.config.js +++ b/tests/browserstack_automation/config/wdio.config.js @@ -13,8 +13,8 @@ try { // Run `npm run wdio:setup` } -//const capabilities = [...browserCapabilities, ...mobileCapabilities]; -const capabilities =[...browserCapabilities]; +const capabilities = [...browserCapabilities, ...mobileCapabilities]; + const date = new Date(); const dateForDisplay = date.toDateString(); @@ -37,37 +37,37 @@ module.exports.config = { ], ], specs: [ - // '../specs/DiscussPage.js', + '../specs/DiscussPage.js', '../specs/FAQPage.js', - // '../specs/PrivacyPage.js', - // '../specs/ReadyPage.js', - // '../specs/TermsPage.js', - // '../specs/TopNavigation.js', - // '../specs/TopicsPage.js', - // '../specs/HowItWorks.js', - // '../specs/FooterLinks.js', - // '../specs/SignInPage.js', + '../specs/PrivacyPage.js', + '../specs/ReadyPage.js', + '../specs/TermsPage.js', + '../specs/TopNavigation.js', + '../specs/TopicsPage.js', + '../specs/HowItWorks.js', + '../specs/FooterLinks.js', + '../specs/SignInPage.js', - // '../specs/BallotPage.js', - // '../specs/CandidatesPage.js', + '../specs/BallotPage.js', + '../specs/CandidatesPage.js', - // '../specs/WhosRunningForOffice.js', + '../specs/WhosRunningForOffice.js', ], capabilities, commonCapabilities: { - // 'bstack:options': { - // buildName, - // debug: 'true', - // // geoLocation is only available under Enterprise plans - // // geoLocation: 'US-CA', - // // gpsLocation is only available under Paid plans - // // Oakland, CA, USA - // gpsLocation: '37.804363,-122.271111', - // maskCommands: 'setValues, getValues, setCookies, getCookies', - // video: 'true', - // }, + 'bstack:options': { + buildName, + debug: 'true', + // geoLocation is only available under Enterprise plans + // geoLocation: 'US-CA', + // gpsLocation is only available under Paid plans + // Oakland, CA, USA + gpsLocation: '37.804363,-122.271111', + maskCommands: 'setValues, getValues, setCookies, getCookies', + video: 'true', + }, }, maxInstances: 1, exclude: [],