2020-05-20 16:33:40 +00:00
|
|
|
const { navigateToRegister, navigateToLogin } = require('../../helpers/app');
|
2021-06-23 21:00:26 +00:00
|
|
|
const { prepareAndroid } = require('../../helpers/platformFunctions');
|
2020-05-20 16:33:40 +00:00
|
|
|
|
|
|
|
describe('Legal screen', () => {
|
2020-07-22 16:32:21 +00:00
|
|
|
describe('From Login', () => {
|
|
|
|
before(async() => {
|
|
|
|
await device.launchApp({ permissions: { notifications: 'YES' }, delete: true });
|
2021-06-27 20:47:57 +00:00
|
|
|
await prepareAndroid();
|
2020-07-22 16:32:21 +00:00
|
|
|
await navigateToLogin();
|
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
|
|
|
it('should have legal button on login', async() => {
|
2020-07-22 16:32:21 +00:00
|
|
|
await waitFor(element(by.id('login-view-more'))).toBeVisible().withTimeout(60000);
|
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2020-07-22 16:32:21 +00:00
|
|
|
it('should navigate to legal from login', async() => {
|
|
|
|
await expect(element(by.id('login-view-more'))).toBeVisible();
|
|
|
|
await element(by.id('login-view-more')).tap();
|
2021-07-02 17:39:39 +00:00
|
|
|
await waitFor(element(by.id('legal-view'))).toBeVisible().withTimeout(4000);
|
2020-07-22 16:32:21 +00:00
|
|
|
});
|
2020-05-20 16:33:40 +00:00
|
|
|
});
|
|
|
|
|
2020-07-22 16:32:21 +00:00
|
|
|
describe('From Register', () => {
|
|
|
|
before(async() => {
|
|
|
|
await device.launchApp({ permissions: { notifications: 'YES' }, delete: true });
|
|
|
|
await navigateToRegister();
|
|
|
|
});
|
2020-05-20 16:33:40 +00:00
|
|
|
|
2021-07-02 17:39:39 +00:00
|
|
|
it('should have legal button on register', async() => {
|
2020-07-22 16:32:21 +00:00
|
|
|
await waitFor(element(by.id('register-view-more'))).toBeVisible().withTimeout(60000);
|
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2020-07-22 16:32:21 +00:00
|
|
|
it('should navigate to legal from register', async() => {
|
|
|
|
await expect(element(by.id('register-view-more'))).toBeVisible();
|
|
|
|
await element(by.id('register-view-more')).tap();
|
|
|
|
await waitFor(element(by.id('legal-view'))).toBeVisible().withTimeout(4000);
|
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2020-07-22 16:32:21 +00:00
|
|
|
it('should have terms of service button', async() => {
|
|
|
|
await expect(element(by.id('legal-terms-button'))).toBeVisible();
|
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2020-07-22 16:32:21 +00:00
|
|
|
it('should have privacy policy button', async() => {
|
|
|
|
await expect(element(by.id('legal-privacy-button'))).toBeVisible();
|
|
|
|
});
|
|
|
|
|
|
|
|
// We can't simulate how webview behaves, so I had to disable :(
|
2021-07-02 17:39:39 +00:00
|
|
|
/*
|
2020-07-22 16:32:21 +00:00
|
|
|
it('should navigate to terms', async() => {
|
|
|
|
await element(by.id('legal-terms-button')).tap();
|
|
|
|
await waitFor(element(by.id('terms-view'))).toBeVisible().withTimeout(2000);
|
|
|
|
await expect(element(by.id('terms-view'))).toBeVisible();
|
|
|
|
});
|
2021-07-02 17:39:39 +00:00
|
|
|
|
2020-07-22 16:32:21 +00:00
|
|
|
it('should navigate to privacy', async() => {
|
|
|
|
await tapBack();
|
|
|
|
await element(by.id('legal-privacy-button')).tap();
|
|
|
|
await waitFor(element(by.id('privacy-view'))).toBeVisible().withTimeout(2000);
|
|
|
|
await expect(element(by.id('privacy-view'))).toBeVisible();
|
|
|
|
});
|
|
|
|
*/
|
|
|
|
});
|
2020-05-20 16:33:40 +00:00
|
|
|
});
|