-
Notifications
You must be signed in to change notification settings - Fork 36
/
onboardingConnectHWPageAssert.ts
47 lines (39 loc) · 1.88 KB
/
onboardingConnectHWPageAssert.ts
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
44
45
46
47
import OnboardingConnectHardwareWalletPage from '../../elements/onboarding/connectHardwareWalletPage';
import { t } from '../../utils/translationService';
import { expect } from 'chai';
import OnboardingCommonAssert from './onboardingCommonAssert';
class OnboardingConnectHardwareWalletPageAssert extends OnboardingCommonAssert {
async assertSeeConnectHardwareWalletPageSubTitle() {
await OnboardingConnectHardwareWalletPage.subTitle.waitForDisplayed();
expect(await OnboardingConnectHardwareWalletPage.subTitle.getText()).to.equal(
await t('core.walletSetupConnectHardwareWalletStep.subTitle')
);
}
async assertSeeSupportedDevicesText() {
await OnboardingConnectHardwareWalletPage.supportedDevices.waitForDisplayed();
expect(await OnboardingConnectHardwareWalletPage.supportedDevices.getText()).to.equal(
await t('core.walletSetupConnectHardwareWalletStep.supportedDevices')
);
}
async assertSeeLedgerButtonDisplayed() {
await OnboardingConnectHardwareWalletPage.ledgerButton.waitForDisplayed();
}
async assertSeeConnectDeviceText() {
await OnboardingConnectHardwareWalletPage.connectDevice.waitForDisplayed();
expect(await OnboardingConnectHardwareWalletPage.connectDevice.getText()).to.equal(
await t('core.walletSetupConnectHardwareWalletStep.connectDevice')
);
}
async assertSeeConnectHardwareWalletPage() {
await this.assertSeeStepTitle(await t('core.walletSetupConnectHardwareWalletStep.title'));
await this.assertSeeConnectHardwareWalletPageSubTitle();
await this.assertSeeSupportedDevicesText();
await this.assertSeeLedgerButtonDisplayed();
await this.assertSeeConnectDeviceText();
await this.assertSeeBackButton();
await this.assertSeeNextButton();
await this.assertSeeLegalLinks();
await this.assertSeeHelpAndSupportButton();
}
}
export default new OnboardingConnectHardwareWalletPageAssert();