diff --git a/appium/config/wdio.conf.js b/appium/config/wdio.conf.js index 94a3fce5a..767d996ee 100644 --- a/appium/config/wdio.conf.js +++ b/appium/config/wdio.conf.js @@ -119,12 +119,12 @@ exports.config = { ui: 'bdd', timeout: 60000 }, - specs: ['./tests/specs/**/*.js'], - beforeSuite() { - const { setup } = require('../../e2e/helpers/data_setup'); + specs: ['./tests/specs/**/*.js'] + // beforeSuite() { + // const { setup } = require('../../e2e/helpers/data_setup'); - before(async () => { - await setup(); - }); - } + // before(async () => { + // await setup(); + // }); + // } }; diff --git a/appium/tests/specs/01-onboarding.spec.js b/appium/tests/specs/01-onboarding.spec.js new file mode 100644 index 000000000..08339af4e --- /dev/null +++ b/appium/tests/specs/01-onboarding.spec.js @@ -0,0 +1,55 @@ +const data = require('../../../e2e/data'); +// const { platformTypes } = require('../../../e2e/helpers/app'); + +describe('Onboarding', () => { + // let alertButtonType; + // let textMatcher; + before(async () => { + await driver.closeApp(); + await driver.launchApp(); + // await $('~new-server-view').toExis + // await waitFor(element(by.id('new-server-view'))) + // .toBeVisible() + // .withTimeout(20000); + }); + + // describe('Render', () => { + // it('should have onboarding screen', async () => { + // await expect(element(by.id('new-server-view'))).toBeVisible(); + // }); + + // it('should have "Join our open workspace"', async () => { + // await expect(element(by.id('new-server-view-open'))).toBeVisible(); + // }); + // }); + + describe('Usage', () => { + it('should enter an invalid server and get error', async () => { + await $('~new-server-view-input').addValue('invalidtest'); + // await $('new-server-view-input'). + // await waitFor(element(by[textMatcher]('Oops!'))) + // .toExist() + // .withTimeout(10000); + // await element(by[textMatcher]('OK').and(by.type(alertButtonType))).tap(); + }); + + // it('should tap on "Join our open workspace" and navigate', async () => { + // await element(by.id('new-server-view-open')).tap(); + // await waitFor(element(by.id('workspace-view'))) + // .toBeVisible() + // .withTimeout(60000); + // }); + + // it('should enter a valid server without login services and navigate to login', async () => { + // await device.launchApp({ newInstance: true }); + // await waitFor(element(by.id('new-server-view'))) + // .toBeVisible() + // .withTimeout(5000); + // await element(by.id('new-server-view-input')).replaceText(data.server); + // await element(by.id('new-server-view-input')).tapReturnKey(); + // await waitFor(element(by.id('workspace-view'))) + // .toBeVisible() + // .withTimeout(60000); + // }); + }); +}); diff --git a/appium/tests/specs/initial-app-sreen.e2e.js b/appium/tests/specs/initial-app-sreen.e2e.js_ similarity index 69% rename from appium/tests/specs/initial-app-sreen.e2e.js rename to appium/tests/specs/initial-app-sreen.e2e.js_ index 5bf468c20..1743cc164 100644 --- a/appium/tests/specs/initial-app-sreen.e2e.js +++ b/appium/tests/specs/initial-app-sreen.e2e.js_ @@ -1,4 +1,4 @@ -const { expect } = require('chai'); +// const { expect } = require('chai'); describe('Verify initial app screen', () => { beforeEach(() => { @@ -14,7 +14,7 @@ describe('Verify initial app screen', () => { it('set workspace url and login', async () => { await $('~new-server-view-input').setValue('mobile'); await $('~new-server-view-button').click(); - const register = await $('//android.widget.TextView[@content-desc="Create an account"]').getText(); - expect(register).to.equal('Create an account'); + // const register = await $('//android.widget.TextView[@content-desc="Create an account"]').getText(); + // expect(register).to.equal('Create an account'); }); });