diff --git a/appium/tests/helpers/index.js b/appium/tests/helpers/index.js index 5e2332603..582c599fe 100644 --- a/appium/tests/helpers/index.js +++ b/appium/tests/helpers/index.js @@ -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') { diff --git a/appium/tests/helpers/login.js b/appium/tests/helpers/login.js index ba776298c..2b56db436 100644 --- a/appium/tests/helpers/login.js +++ b/appium/tests/helpers/login.js @@ -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 }; diff --git a/appium/tests/specs/011-onboarding.e2e.js b/appium/tests/specs/011-onboarding.e2e.js index 86beb32cb..354faba7f 100644 --- a/appium/tests/specs/011-onboarding.e2e.js +++ b/appium/tests/specs/011-onboarding.e2e.js @@ -1,4 +1,4 @@ -const { launchApp, equal } = require('../helpers'); +const { launchApp, equal, getText } = require('../helpers'); const { login, logout } = require('../helpers/login'); describe('Onboarding', () => {