feat: mobile workspaces (#1093)

This commit is contained in:
Vardan Hakobyan
2022-06-21 15:42:43 +04:00
committed by GitHub
parent 1f903f17d1
commit 7d60dfee73
71 changed files with 599 additions and 317 deletions

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const faker = require('faker')
import { by, device, element, expect, waitFor } from 'detox'
@@ -13,14 +12,10 @@ export const expectToBeVisible = async (testedElement: Detox.IndexableNativeElem
const checkAfterReinstall = async () => {
if (device.getPlatform() === 'ios') {
const alertElement = element(
by.label('Delete Local Data').and(by.type('_UIAlertControllerActionView'))
)
const alertElement = element(by.label('Delete Local Data').and(by.type('_UIAlertControllerActionView')))
const alertVisible = await expectToBeVisible(alertElement)
if (alertVisible) {
await element(
by.label('Delete Local Data').and(by.type('_UIAlertControllerActionView'))
).tap()
await element(by.label('Delete Local Data').and(by.type('_UIAlertControllerActionView'))).tap()
}
}
}

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const helpers = require('../../Helpers')
import { by, device, element, expect, waitFor } from 'detox'
import { openSettingsScreen } from '../../Helpers'
@@ -45,9 +44,7 @@ fdescribe('Account section', () => {
await element(by.id('passwordField')).typeText(helpers.randomCredentials.password)
await element(by.id('otherOptionsButton')).tap()
await element(by.id('syncServerField')).clearText()
await element(by.id('syncServerField')).typeText(
helpers.randomCredentials.syncServerUrl + '\n'
)
await element(by.id('syncServerField')).typeText(helpers.randomCredentials.syncServerUrl + '\n')
// wait for buttons to be visible after closing keyboard on smaller devices
await waitFor(element(by.id('registerButton')))
.toBeVisible()
@@ -90,9 +87,7 @@ fdescribe('Account section', () => {
await element(by.id('passwordField')).typeText(helpers.randomCredentials.password)
await element(by.id('otherOptionsButton')).tap()
await element(by.id('syncServerField')).clearText()
await element(by.id('syncServerField')).typeText(
helpers.randomCredentials.syncServerUrl + '\n'
)
await element(by.id('syncServerField')).typeText(helpers.randomCredentials.syncServerUrl + '\n')
// wait for button to be visible after keyboard close
await waitFor(element(by.id('signInButton')))
.toBeVisible()

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const helpers = require('../../Helpers')
import { by, device, element, expect } from 'detox'