waitForToast
This commit is contained in:
parent
3fbced85bb
commit
fba9151bc8
|
@ -97,6 +97,11 @@ async function navigateToRoom(room) {
|
||||||
await expect(element(by.id(`room-view-title-${ room }`))).toBeVisible();
|
await expect(element(by.id(`room-view-title-${ room }`))).toBeVisible();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: it should be only temp... we need to figure a better way
|
||||||
|
async function waitForToast() {
|
||||||
|
await sleep(5000);
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
navigateToWorkspace,
|
navigateToWorkspace,
|
||||||
navigateToLogin,
|
navigateToLogin,
|
||||||
|
@ -107,5 +112,6 @@ module.exports = {
|
||||||
tapBack,
|
tapBack,
|
||||||
sleep,
|
sleep,
|
||||||
searchRoom,
|
searchRoom,
|
||||||
navigateToRoom
|
navigateToRoom,
|
||||||
|
waitForToast
|
||||||
};
|
};
|
|
@ -1,19 +1,11 @@
|
||||||
const {
|
const {
|
||||||
device, expect, element, by, waitFor
|
device, expect, element, by, waitFor
|
||||||
} = require('detox');
|
} = require('detox');
|
||||||
const { logout, navigateToLogin, login, sleep } = require('../../helpers/app');
|
const { logout, navigateToLogin, login, sleep, waitForToast } = require('../../helpers/app');
|
||||||
const data = require('../../data');
|
const data = require('../../data');
|
||||||
|
|
||||||
const scrollDown = 200;
|
const scrollDown = 200;
|
||||||
|
|
||||||
async function waitForToast() {
|
|
||||||
// await waitFor(element(by.id('toast'))).toBeVisible().withTimeout(10000);
|
|
||||||
// await expect(element(by.id('toast'))).toBeVisible();
|
|
||||||
// await waitFor(element(by.id('toast'))).toBeNotVisible().withTimeout(10000);
|
|
||||||
// await expect(element(by.id('toast'))).toBeNotVisible();
|
|
||||||
await sleep(5000);
|
|
||||||
}
|
|
||||||
|
|
||||||
describe('Profile screen', () => {
|
describe('Profile screen', () => {
|
||||||
before(async() => {
|
before(async() => {
|
||||||
await device.launchApp({ permissions: { notifications: 'YES' }, delete: true });
|
await device.launchApp({ permissions: { notifications: 'YES' }, delete: true });
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
const {
|
const {
|
||||||
expect, element, by, waitFor
|
expect, element, by, waitFor
|
||||||
} = require('detox');
|
} = require('detox');
|
||||||
const { sleep } = require('../../helpers/app');
|
const { sleep, waitForToast } = require('../../helpers/app');
|
||||||
|
|
||||||
async function waitForToast() {
|
|
||||||
await sleep(5000);
|
|
||||||
}
|
|
||||||
|
|
||||||
describe('Status screen', () => {
|
describe('Status screen', () => {
|
||||||
before(async() => {
|
before(async() => {
|
||||||
|
|
|
@ -12,7 +12,7 @@ async function mockMessage(message) {
|
||||||
await expect(element(by.label(`${ data.random }${ message }`)).atIndex(0)).toBeVisible();
|
await expect(element(by.label(`${ data.random }${ message }`)).atIndex(0)).toBeVisible();
|
||||||
};
|
};
|
||||||
|
|
||||||
describe.only('Room screen', () => {
|
describe('Room screen', () => {
|
||||||
const mainRoom = `private${ data.random }`;
|
const mainRoom = `private${ data.random }`;
|
||||||
|
|
||||||
before(async() => {
|
before(async() => {
|
||||||
|
|
|
@ -2,7 +2,7 @@ const {
|
||||||
device, expect, element, by, waitFor
|
device, expect, element, by, waitFor
|
||||||
} = require('detox');
|
} = require('detox');
|
||||||
const data = require('../../data');
|
const data = require('../../data');
|
||||||
const { tapBack, sleep, navigateToRoom } = require('../../helpers/app');
|
const { tapBack, sleep, navigateToRoom, waitForToast } = require('../../helpers/app');
|
||||||
|
|
||||||
async function navigateToRoomInfo(type) {
|
async function navigateToRoomInfo(type) {
|
||||||
let room;
|
let room;
|
||||||
|
@ -20,14 +20,6 @@ async function navigateToRoomInfo(type) {
|
||||||
await waitFor(element(by.id('room-info-view'))).toBeVisible().withTimeout(2000);
|
await waitFor(element(by.id('room-info-view'))).toBeVisible().withTimeout(2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function waitForToast() {
|
|
||||||
// await waitFor(element(by.id('toast'))).toBeVisible().withTimeout(10000);
|
|
||||||
// await expect(element(by.id('toast'))).toBeVisible();
|
|
||||||
// await waitFor(element(by.id('toast'))).toBeNotVisible().withTimeout(10000);
|
|
||||||
// await expect(element(by.id('toast'))).toBeNotVisible();
|
|
||||||
await sleep(5000);
|
|
||||||
}
|
|
||||||
|
|
||||||
describe('Room info screen', () => {
|
describe('Room info screen', () => {
|
||||||
describe('Direct', async() => {
|
describe('Direct', async() => {
|
||||||
before(async() => {
|
before(async() => {
|
||||||
|
|
Loading…
Reference in New Issue