Skip to content

Commit

Permalink
Merge pull request #4073 from fdiazq/develop
Browse files Browse the repository at this point in the history
WV-560 Reduced height and adjusted centering of text of TIP chip, WV-417 Added additonal test case top navigation TEAM REVIEW
  • Loading branch information
DaleMcGrew authored Oct 2, 2024
2 parents 4fec551 + e47a568 commit e0a3aa2
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,9 @@ const InvitedFriendsWrapper = styled('div')`
const StyledChip = styled(Chip)`
background-color: ${DesignTokenColors.confirmation700};
color: ${DesignTokenColors.whiteUI};
height: 20px;
align-items: center;
justify-content: center;
`;

export default withStyles(commonMuiStyles)(ChallengeInviteFriends);
9 changes: 9 additions & 0 deletions tests/browserstack_automation/page_objects/topnavigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ class TopNavigation extends Page {
return $('#candidatesTabHeaderBar');
}

get getChallengesTabLocator () {
return $('#challengesTabHeaderBar');
}

get getDonateTabLocator () {
return $('#donateTabHeaderBar');
}
Expand All @@ -32,6 +36,11 @@ class TopNavigation extends Page {
await this.getCandidatesTabLocator.findAndClick();
}

async toggleChallengesTab () {
await this.getChallengesTabLocator.findAndClick();
}


async toggleDonateTab () {
await this.getDonateTabLocator.findAndClick();
}
Expand Down
18 changes: 18 additions & 0 deletions tests/browserstack_automation/specs/TopNavigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,22 @@ describe('TopNavigation', () => {
// await driver.switchWindow('Democracy Squads - WeVote');
// await expect(driver).not.toHaveUrl(expect.stringContaining('ready'));
// });

// TopNavigation_011
it('openChallengesTab', async () => {
await ReadyPage.load();
await driver.pause(waitTime);
await TopNavigation.toggleChallengesTab();
await driver.waitUntil(async () => {
// Add condition to check for the expected URL
const currentUrl = await driver.getUrl();
console.log(currentUrl);
return currentUrl.includes('challenges');
}, {
timeout: 10000,
timeoutMsg: 'Expected URL to contain "challenges" not found, timeout after 10000ms',
});
await driver.pause(waitTime);
await expect(driver).not.toHaveUrl(expect.stringContaining('ready'));
});
});

0 comments on commit e0a3aa2

Please sign in to comment.