Skip to content

Commit

Permalink
Merge pull request #3764 from StanislavLiv/Stas_fix_WV_142
Browse files Browse the repository at this point in the history
Code refactoring after WV-143 bug report was fixed
  • Loading branch information
DaleMcGrew authored Nov 1, 2023
2 parents 222e19d + d1de6d6 commit 77e7f40
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
7 changes: 3 additions & 4 deletions tests/browserstack_automation/page_objects/terms.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ class TermsPage extends Page {
await super.rerender();
}

// Terms_001 -- link not clickable. BUG REPORT # WV-142
// get getGitHubLink () {
// return $('???');
// }
get getGitHubLink () {
return $('#wevoteGitHub');
}

get getPrivacyLinkElement () {
return $('#privacyPolicy');
Expand Down
2 changes: 1 addition & 1 deletion tests/browserstack_automation/specs/ReadyPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe('ReadyPage', () => {
it('verifyPrivacyLinkRedirected', async () => {
await ReadyPage.load();
await ReadyPage.findPrivacyLink.click();
await expect(driver).toHaveUrlContaining('more/privacy');
await expect(driver).toHaveUrlContaining('/privacy');
await expect(PrivacyPage.pageContentTitleText).toHaveText('WeVote.US Privacy Policy');
});

Expand Down
8 changes: 8 additions & 0 deletions tests/browserstack_automation/specs/TermsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ import PrivacyPage from '../page_objects/privacy.page';
import TermsPage from '../page_objects/terms.page';

describe('TermsPage', () => {
// Terms_001
it.only ('verifyGitHubLinkRedirected', async () => {
await ReadyPage.load();
await ReadyPage.getTermsLinkElement.findAndClick();;
await TermsPage.getGitHubLink.click();
driver.switchWindow('https://github.com/WeVote');
await expect(driver).toHaveTitle('We Vote · GitHub');
});

//Terms_002
it('verifyPrivacyPolicyLinkRedirected', async () => {
Expand Down

0 comments on commit 77e7f40

Please sign in to comment.