basic login on android
This commit is contained in:
parent
0c0d9b8946
commit
680796fef3
|
@ -10,9 +10,7 @@ export const equal = async (value, text) => expect(value).to.equal(prop);
|
|||
|
||||
export const click = async tag => await $(`~${tag}`).click();
|
||||
|
||||
export const clickById = async tag => await $(`#${tag}`).click();
|
||||
|
||||
export const scrollToBottom = async () => await driver.execute('mobile: scroll', { direction: 'down' });
|
||||
export const clickById = async tag => await $(`id=${tag}`).click();
|
||||
|
||||
export const setValueAndEnter = async (tag, value) => {
|
||||
if (driver.capabilities.platformName === 'Android') {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { click, clickById, scrollToBottom, setValue, setValueAndEnter } from '.';
|
||||
import data from '../../../e2e/data';
|
||||
import { swipeDown } from './gestures';
|
||||
// import data from '../../../e2e/data';
|
||||
|
||||
export const login = async () => {
|
||||
await setValueAndEnter('new-server-view-input', 'mobile');
|
||||
|
@ -11,9 +12,7 @@ export const login = async () => {
|
|||
export const logout = async () => {
|
||||
await $('//android.view.ViewGroup[@content-desc="rooms-list-view-sidebar"]/android.widget.TextView').click(); //TEMP
|
||||
await click('sidebar-settings');
|
||||
await click('sidebar-settings');
|
||||
// await scrollToBottom();
|
||||
await swipeDown(20);
|
||||
await click('settings-logout');
|
||||
await click('settings-logout');
|
||||
await clickById('android:id/button1');
|
||||
await clickById('android:id/button1'); // alert
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const { launchApp, equal } = require('../helpers');
|
||||
const { launchApp, equal, getText } = require('../helpers');
|
||||
const { login, logout } = require('../helpers/login');
|
||||
|
||||
describe('Onboarding', () => {
|
||||
|
|
Loading…
Reference in New Issue