forked from wevote/WebApp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TermsPage.js
43 lines (38 loc) · 1.4 KB
/
TermsPage.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { driver, expect } from '@wdio/globals';
import ReadyPage from '../page_objects/ready.page';
import PrivacyPage from '../page_objects/privacy.page';
import TermsPage from '../page_objects/terms.page';
const { describe, it } = require('mocha');
const waitTime = 10000;
describe('TermsPage', () => {
// Terms_001
it.only('verifyGitHubLinkRedirected', async () => {
await ReadyPage.load();
await driver.pause(waitTime);
await ReadyPage.getTermsLinkElement.click();
await driver.pause(waitTime);
await TermsPage.getGitHubLink.click();
await driver.pause(waitTime);
driver.switchWindow('https://github.com/WeVote');
await driver.pause(waitTime);
await expect(driver).toHaveTitle('We Vote · GitHub');
});
// Terms_002
it('verifyPrivacyPolicyLinkRedirected', async () => {
await ReadyPage.load();
await driver.pause(waitTime);
await ReadyPage.getTermsLinkElement.click();
await driver.pause(waitTime);
await TermsPage.getPrivacyLinkElement.click();
await driver.pause(waitTime);
await expect(PrivacyPage.pageContentTitleText).toHaveText('WeVote.US Privacy Policy');
});
// Terms_003
it('verifyEmailLink', async () => {
await ReadyPage.load();
await driver.pause(waitTime);
await ReadyPage.getTermsLinkElement.findAndClick();
await driver.pause(waitTime);
await expect(TermsPage.emailLink).toHaveText('[email protected]');
});
});