Fix e2ee
This commit is contained in:
parent
2ef69a80db
commit
579af558f4
|
@ -1,5 +1,3 @@
|
||||||
import { exec } from 'child_process';
|
|
||||||
|
|
||||||
import { by, expect, element } from 'detox';
|
import { by, expect, element } from 'detox';
|
||||||
|
|
||||||
import data from '../data';
|
import data from '../data';
|
||||||
|
@ -157,12 +155,7 @@ async function searchRoom(room: string) {
|
||||||
await waitFor(element(by.id('rooms-list-view')))
|
await waitFor(element(by.id('rooms-list-view')))
|
||||||
.toBeVisible()
|
.toBeVisible()
|
||||||
.withTimeout(30000);
|
.withTimeout(30000);
|
||||||
await element(by.id('rooms-list-view-search')).tap();
|
await tapAndWaitFor(element(by.id('rooms-list-view-search')), element(by.id('rooms-list-view-search-input')), 5000);
|
||||||
await waitFor(element(by.id('rooms-list-view-search-input')))
|
|
||||||
.toExist()
|
|
||||||
.withTimeout(5000);
|
|
||||||
await expect(element(by.id('rooms-list-view-search-input'))).toExist();
|
|
||||||
await sleep(300);
|
|
||||||
await element(by.id('rooms-list-view-search-input')).typeText(room);
|
await element(by.id('rooms-list-view-search-input')).typeText(room);
|
||||||
await sleep(300);
|
await sleep(300);
|
||||||
await waitFor(element(by.id(`rooms-list-view-item-${room}`)))
|
await waitFor(element(by.id(`rooms-list-view-item-${room}`)))
|
||||||
|
@ -170,7 +163,6 @@ async function searchRoom(room: string) {
|
||||||
.withTimeout(60000);
|
.withTimeout(60000);
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line no-undef
|
|
||||||
async function tryTapping(theElement: Detox.IndexableNativeElement, timeout: number, longtap = false) {
|
async function tryTapping(theElement: Detox.IndexableNativeElement, timeout: number, longtap = false) {
|
||||||
try {
|
try {
|
||||||
if (longtap) {
|
if (longtap) {
|
||||||
|
|
|
@ -9,7 +9,8 @@ import {
|
||||||
searchRoom,
|
searchRoom,
|
||||||
logout,
|
logout,
|
||||||
platformTypes,
|
platformTypes,
|
||||||
TTextMatcher
|
TTextMatcher,
|
||||||
|
tapAndWaitFor
|
||||||
} from '../../helpers/app';
|
} from '../../helpers/app';
|
||||||
import data from '../../data';
|
import data from '../../data';
|
||||||
|
|
||||||
|
@ -261,10 +262,7 @@ describe('E2E Encryption', () => {
|
||||||
await waitFor(element(by.id('listheader-encryption')))
|
await waitFor(element(by.id('listheader-encryption')))
|
||||||
.toBeVisible()
|
.toBeVisible()
|
||||||
.withTimeout(2000);
|
.withTimeout(2000);
|
||||||
await element(by.id('listheader-encryption')).tap();
|
await tapAndWaitFor(element(by.id('listheader-encryption')), element(by.id('e2e-enter-your-password-view')), 2000);
|
||||||
await waitFor(element(by.id('e2e-enter-your-password-view')))
|
|
||||||
.toBeVisible()
|
|
||||||
.withTimeout(2000);
|
|
||||||
await element(by.id('e2e-enter-your-password-view-password')).typeText(newPassword);
|
await element(by.id('e2e-enter-your-password-view-password')).typeText(newPassword);
|
||||||
await element(by.id('e2e-enter-your-password-view-confirm')).tap();
|
await element(by.id('e2e-enter-your-password-view-confirm')).tap();
|
||||||
await waitFor(element(by.id('listheader-encryption')))
|
await waitFor(element(by.id('listheader-encryption')))
|
||||||
|
|
Loading…
Reference in New Issue