Lint fix
This commit is contained in:
parent
4cc3d8a26b
commit
047d4e5889
|
@ -62,20 +62,20 @@ async function mockMessage(message, isThread = false) {
|
||||||
await waitFor(element(by.text(`${ data.random }${ message }`))).toExist().withTimeout(60000);
|
await waitFor(element(by.text(`${ data.random }${ message }`))).toExist().withTimeout(60000);
|
||||||
await expect(element(by.text(`${ data.random }${ message }`))).toExist();
|
await expect(element(by.text(`${ data.random }${ message }`))).toExist();
|
||||||
await element(by.text(`${ data.random }${ message }`)).atIndex(0).tap();
|
await element(by.text(`${ data.random }${ message }`)).atIndex(0).tap();
|
||||||
};
|
}
|
||||||
|
|
||||||
async function starMessage(message) {
|
async function starMessage(message) {
|
||||||
const messageLabel = `${ data.random }${ message }`
|
const messageLabel = `${ data.random }${ message }`;
|
||||||
await element(by.text(messageLabel)).atIndex(0).longPress();
|
await element(by.text(messageLabel)).atIndex(0).longPress();
|
||||||
await expect(element(by.id('action-sheet'))).toExist();
|
await expect(element(by.id('action-sheet'))).toExist();
|
||||||
await expect(element(by.id('action-sheet-handle'))).toBeVisible();
|
await expect(element(by.id('action-sheet-handle'))).toBeVisible();
|
||||||
await element(by.id('action-sheet-handle')).swipe('up', 'fast', 0.5);
|
await element(by.id('action-sheet-handle')).swipe('up', 'fast', 0.5);
|
||||||
await element(by.text('Star')).atIndex(0).tap();
|
await element(by.text('Star')).atIndex(0).tap();
|
||||||
await waitFor(element(by.id('action-sheet'))).not.toExist().withTimeout(5000);
|
await waitFor(element(by.id('action-sheet'))).not.toExist().withTimeout(5000);
|
||||||
};
|
}
|
||||||
|
|
||||||
async function pinMessage(message) {
|
async function pinMessage(message) {
|
||||||
const messageLabel = `${ data.random }${ message }`
|
const messageLabel = `${ data.random }${ message }`;
|
||||||
await waitFor(element(by.text(messageLabel)).atIndex(0)).toExist();
|
await waitFor(element(by.text(messageLabel)).atIndex(0)).toExist();
|
||||||
await element(by.text(messageLabel)).atIndex(0).longPress();
|
await element(by.text(messageLabel)).atIndex(0).longPress();
|
||||||
await expect(element(by.id('action-sheet'))).toExist();
|
await expect(element(by.id('action-sheet'))).toExist();
|
||||||
|
@ -93,7 +93,7 @@ async function dismissReviewNag(){
|
||||||
}
|
}
|
||||||
|
|
||||||
async function mockMessageWithNag(message, isThread = false) {
|
async function mockMessageWithNag(message, isThread = false) {
|
||||||
let input = isThread ? 'messagebox-input-thread' : 'messagebox-input';
|
const input = isThread ? 'messagebox-input-thread' : 'messagebox-input';
|
||||||
await element(by.id(input)).tap();
|
await element(by.id(input)).tap();
|
||||||
await element(by.id(input)).typeText(`${ data.random }${ message }`);
|
await element(by.id(input)).typeText(`${ data.random }${ message }`);
|
||||||
await element(by.id('messagebox-send-message')).tap();
|
await element(by.id('messagebox-send-message')).tap();
|
||||||
|
@ -101,7 +101,7 @@ async function mockMessageWithNag(message, isThread = false) {
|
||||||
await waitFor(element(by.text(`${ data.random }${ message }`))).toExist().withTimeout(60000);
|
await waitFor(element(by.text(`${ data.random }${ message }`))).toExist().withTimeout(60000);
|
||||||
await expect(element(by.text(`${ data.random }${ message }`))).toExist();
|
await expect(element(by.text(`${ data.random }${ message }`))).toExist();
|
||||||
await element(by.text(`${ data.random }${ message }`)).atIndex(0).tap();
|
await element(by.text(`${ data.random }${ message }`)).atIndex(0).tap();
|
||||||
};
|
}
|
||||||
|
|
||||||
async function tapBack() {
|
async function tapBack() {
|
||||||
await element(by.id('header-back')).atIndex(0).tap();
|
await element(by.id('header-back')).atIndex(0).tap();
|
||||||
|
@ -145,9 +145,10 @@ const checkServer = async(server) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
async function closeKeyboard() {
|
async function closeKeyboard() {
|
||||||
if(device.getPlatform() === 'android')
|
if (device.getPlatform() === 'android') {
|
||||||
await device.goBack();
|
await device.goBack();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
navigateToWorkspace,
|
navigateToWorkspace,
|
||||||
|
|
|
@ -7,38 +7,35 @@ const defaultLaunchArgs = { permissions: { notifications: 'YES' } };
|
||||||
function runCommand(command) {
|
function runCommand(command) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
exec(command, (error, stdout, stderr) => {
|
exec(command, (error, stdout, stderr) => {
|
||||||
if(error)
|
if (error) {
|
||||||
{
|
|
||||||
reject(new Error(`exec error: ${ stderr }`));
|
reject(new Error(`exec error: ${ stderr }`));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
resolve();
|
resolve();
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// The Spell Checker and the autofill service introduce additional flakiness, and appear over other elements.
|
// The Spell Checker and the autofill service introduce additional flakiness, and appear over other elements.
|
||||||
// So, we disable them before running the tests.
|
// So, we disable them before running the tests.
|
||||||
exports.prepareAndroid = async() => {
|
exports.prepareAndroid = async() => {
|
||||||
if(device.getPlatform() !== 'android') return;
|
if (device.getPlatform() !== 'android') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
await runCommand('adb shell settings put secure spell_checker_enabled 0');
|
await runCommand('adb shell settings put secure spell_checker_enabled 0');
|
||||||
await runCommand('adb shell settings put secure autofill_service null');
|
await runCommand('adb shell settings put secure autofill_service null');
|
||||||
}
|
};
|
||||||
|
|
||||||
exports.launchWithLanguage = async (language, countryCode="US", launchArgs=defaultLaunchArgs) => {
|
exports.launchWithLanguage = async(language, countryCode = 'US', launchArgs = defaultLaunchArgs) => {
|
||||||
if(device.id === undefined)
|
if (device.id === undefined) {
|
||||||
{
|
|
||||||
await device.launchApp(launchArgs);
|
await device.launchApp(launchArgs);
|
||||||
}
|
}
|
||||||
if(device.getPlatform() === 'android')
|
if (device.getPlatform() === 'android') {
|
||||||
{
|
|
||||||
await runCommand('adb root');
|
await runCommand('adb root');
|
||||||
await runCommand(`adb shell "setprop persist.sys.locale ${ language }-${ countryCode }; setprop ctl.restart zygote"`);
|
await runCommand(`adb shell "setprop persist.sys.locale ${ language }-${ countryCode }; setprop ctl.restart zygote"`);
|
||||||
await sleep(20000);
|
await sleep(20000);
|
||||||
await device.launchApp(launchArgs);
|
await device.launchApp(launchArgs);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
const langLocale = typeof countryCode === 'string' ? `${ language }-${ countryCode }` : language;
|
const langLocale = typeof countryCode === 'string' ? `${ language }-${ countryCode }` : language;
|
||||||
await device.launchApp({
|
await device.launchApp({
|
||||||
...launchArgs,
|
...launchArgs,
|
||||||
|
@ -48,8 +45,8 @@ exports.launchWithLanguage = async (language, countryCode="US", launchArgs=defau
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
exports.closeKeyboardAndroid = async() => {
|
exports.closeKeyboardAndroid = async() => {
|
||||||
await device.pressBack(); // Android-only
|
await device.pressBack(); // Android-only
|
||||||
}
|
};
|
||||||
|
|
|
@ -2,7 +2,7 @@ exports.android = {
|
||||||
// Android types
|
// Android types
|
||||||
alertButtonType: 'android.widget.Button',
|
alertButtonType: 'android.widget.Button',
|
||||||
scrollViewType: 'android.widget.ScrollView',
|
scrollViewType: 'android.widget.ScrollView',
|
||||||
textInputType: 'android.widget.EditText',
|
textInputType: 'android.widget.EditText'
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.ios = {
|
exports.ios = {
|
||||||
|
|
|
@ -20,7 +20,7 @@ const checkServer = async(server) => {
|
||||||
|
|
||||||
const checkBanner = async() => {
|
const checkBanner = async() => {
|
||||||
await waitFor(element(by.id('listheader-encryption').withDescendant(by.text('Save Your Encryption Password')))).toBeVisible().withTimeout(10000);
|
await waitFor(element(by.id('listheader-encryption').withDescendant(by.text('Save Your Encryption Password')))).toBeVisible().withTimeout(10000);
|
||||||
}
|
};
|
||||||
|
|
||||||
async function navigateToRoom(roomName) {
|
async function navigateToRoom(roomName) {
|
||||||
await searchRoom(`${ roomName }`);
|
await searchRoom(`${ roomName }`);
|
||||||
|
@ -46,7 +46,8 @@ async function navigateSecurityPrivacy() {
|
||||||
describe('E2E Encryption', () => {
|
describe('E2E Encryption', () => {
|
||||||
const room = `encrypted${ data.random }`;
|
const room = `encrypted${ data.random }`;
|
||||||
const newPassword = 'abc';
|
const newPassword = 'abc';
|
||||||
let alertButtonType, scrollViewType;
|
let alertButtonType;
|
||||||
|
let scrollViewType;
|
||||||
|
|
||||||
before(async() => {
|
before(async() => {
|
||||||
await device.launchApp({ permissions: { notifications: 'YES' }, delete: true });
|
await device.launchApp({ permissions: { notifications: 'YES' }, delete: true });
|
||||||
|
@ -206,7 +207,7 @@ describe('E2E Encryption', () => {
|
||||||
await waitFor(element(by.id('login-view'))).toBeVisible().withTimeout(2000);
|
await waitFor(element(by.id('login-view'))).toBeVisible().withTimeout(2000);
|
||||||
await login(testuser.username, testuser.password);
|
await login(testuser.username, testuser.password);
|
||||||
await waitFor(element(by.id('listheader-encryption').withDescendant(by.text('Save Your Encryption Password')))).toBeVisible().withTimeout(2000);
|
await waitFor(element(by.id('listheader-encryption').withDescendant(by.text('Save Your Encryption Password')))).toBeVisible().withTimeout(2000);
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,8 @@ async function waitForToast() {
|
||||||
}
|
}
|
||||||
|
|
||||||
describe('Profile screen', () => {
|
describe('Profile screen', () => {
|
||||||
let textInputType, scrollViewType;
|
let textInputType;
|
||||||
|
let scrollViewType;
|
||||||
|
|
||||||
before(async() => {
|
before(async() => {
|
||||||
await device.launchApp({ permissions: { notifications: 'YES' }, delete: true });
|
await device.launchApp({ permissions: { notifications: 'YES' }, delete: true });
|
||||||
|
@ -94,7 +95,9 @@ describe('Profile screen', () => {
|
||||||
await element(by.id('profile-view-submit')).tap();
|
await element(by.id('profile-view-submit')).tap();
|
||||||
await element(by.type(textInputType)).typeText(`${ profileChangeUser.password }\n`);
|
await element(by.type(textInputType)).typeText(`${ profileChangeUser.password }\n`);
|
||||||
// TODO: Check if this is fine on iOS
|
// TODO: Check if this is fine on iOS
|
||||||
if(device.getPlatform() === 'android') await element(by.text('SAVE')).tap();
|
if (device.getPlatform() === 'android') {
|
||||||
|
await element(by.text('SAVE')).tap();
|
||||||
|
}
|
||||||
await waitForToast();
|
await waitForToast();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
const data = require('../../data');
|
const data = require('../../data');
|
||||||
const { navigateToLogin, login, mockMessage, searchRoom } = require('../../helpers/app');
|
const {
|
||||||
|
navigateToLogin, login, mockMessage, searchRoom
|
||||||
|
} = require('../../helpers/app');
|
||||||
const { prepareAndroid } = require('../../helpers/platformFunctions');
|
const { prepareAndroid } = require('../../helpers/platformFunctions');
|
||||||
|
|
||||||
const testuser = data.users.regular;
|
const testuser = data.users.regular;
|
||||||
|
|
|
@ -7,7 +7,8 @@ const platformTypes = require('../../helpers/platformTypes');
|
||||||
const { prepareAndroid } = require('../../helpers/platformFunctions');
|
const { prepareAndroid } = require('../../helpers/platformFunctions');
|
||||||
|
|
||||||
describe('Delete server', () => {
|
describe('Delete server', () => {
|
||||||
let scrollViewType, alertButtonType;
|
let scrollViewType;
|
||||||
|
let alertButtonType;
|
||||||
before(async() => {
|
before(async() => {
|
||||||
await device.launchApp({ permissions: { notifications: 'YES' }, delete: true });
|
await device.launchApp({ permissions: { notifications: 'YES' }, delete: true });
|
||||||
await prepareAndroid();
|
await prepareAndroid();
|
||||||
|
|
|
@ -17,11 +17,13 @@ const getDeepLink = (method, server, params) => {
|
||||||
describe('Deep linking', () => {
|
describe('Deep linking', () => {
|
||||||
let userId;
|
let userId;
|
||||||
let authToken;
|
let authToken;
|
||||||
|
let scrollViewType;
|
||||||
|
|
||||||
before(async() => {
|
before(async() => {
|
||||||
const loginResult = await login(data.users.regular.username, data.users.regular.password);
|
const loginResult = await login(data.users.regular.username, data.users.regular.password);
|
||||||
({ userId, authToken } = loginResult);
|
({ userId, authToken } = loginResult);
|
||||||
const deviceType = device.getPlatform();
|
const deviceType = device.getPlatform();
|
||||||
amp = deviceType == 'android' ? '\\&' : '&';
|
amp = deviceType === 'android' ? '\\&' : '&';
|
||||||
({ scrollViewType } = platformTypes[deviceType]);
|
({ scrollViewType } = platformTypes[deviceType]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -30,7 +32,7 @@ describe('Deep linking', () => {
|
||||||
await device.launchApp({
|
await device.launchApp({
|
||||||
permissions: { notifications: 'YES' },
|
permissions: { notifications: 'YES' },
|
||||||
delete: true,
|
delete: true,
|
||||||
url: getDeepLink(DEEPLINK_METHODS.AUTH, data.server, `userId=123${amp}token=abc`),
|
url: getDeepLink(DEEPLINK_METHODS.AUTH, data.server, `userId=123${ amp }token=abc`)
|
||||||
});
|
});
|
||||||
await prepareAndroid();
|
await prepareAndroid();
|
||||||
await waitFor(element(by.text('You\'ve been logged out by the server. Please log in again.'))).toExist().withTimeout(10000); // TODO: we need to improve this message
|
await waitFor(element(by.text('You\'ve been logged out by the server. Please log in again.'))).toExist().withTimeout(10000); // TODO: we need to improve this message
|
||||||
|
@ -40,7 +42,7 @@ describe('Deep linking', () => {
|
||||||
await device.launchApp({
|
await device.launchApp({
|
||||||
permissions: { notifications: 'YES' },
|
permissions: { notifications: 'YES' },
|
||||||
newInstance: true,
|
newInstance: true,
|
||||||
url: getDeepLink(DEEPLINK_METHODS.AUTH, data.server, `userId=${ userId }${amp}token=${ authToken }${amp}path=group/${ data.groups.private.name }`),
|
url: getDeepLink(DEEPLINK_METHODS.AUTH, data.server, `userId=${ userId }${ amp }token=${ authToken }${ amp }path=group/${ data.groups.private.name }`)
|
||||||
});
|
});
|
||||||
await waitFor(element(by.id(`room-view-title-${ data.groups.private.name }`))).toExist().withTimeout(30000);
|
await waitFor(element(by.id(`room-view-title-${ data.groups.private.name }`))).toExist().withTimeout(30000);
|
||||||
await tapBack();
|
await tapBack();
|
||||||
|
@ -74,7 +76,7 @@ describe('Deep linking', () => {
|
||||||
await device.launchApp({
|
await device.launchApp({
|
||||||
permissions: { notifications: 'YES' },
|
permissions: { notifications: 'YES' },
|
||||||
newInstance: true,
|
newInstance: true,
|
||||||
url: getDeepLink(DEEPLINK_METHODS.ROOM, data.server, `path=group/${ data.groups.private.name }`),
|
url: getDeepLink(DEEPLINK_METHODS.ROOM, data.server, `path=group/${ data.groups.private.name }`)
|
||||||
|
|
||||||
});
|
});
|
||||||
await waitFor(element(by.id(`room-view-title-${ data.groups.private.name }`))).toExist().withTimeout(10000);
|
await waitFor(element(by.id(`room-view-title-${ data.groups.private.name }`))).toExist().withTimeout(10000);
|
||||||
|
@ -85,7 +87,7 @@ describe('Deep linking', () => {
|
||||||
await device.launchApp({
|
await device.launchApp({
|
||||||
permissions: { notifications: 'YES' },
|
permissions: { notifications: 'YES' },
|
||||||
newInstance: true,
|
newInstance: true,
|
||||||
url: getDeepLink(DEEPLINK_METHODS.ROOM, data.server, `rid=${ roomResult.data.group._id }`),
|
url: getDeepLink(DEEPLINK_METHODS.ROOM, data.server, `rid=${ roomResult.data.group._id }`)
|
||||||
|
|
||||||
});
|
});
|
||||||
await waitFor(element(by.id(`room-view-title-${ data.groups.private.name }`))).toExist().withTimeout(15000);
|
await waitFor(element(by.id(`room-view-title-${ data.groups.private.name }`))).toExist().withTimeout(15000);
|
||||||
|
@ -104,7 +106,7 @@ describe('Deep linking', () => {
|
||||||
await device.launchApp({
|
await device.launchApp({
|
||||||
permissions: { notifications: 'YES' },
|
permissions: { notifications: 'YES' },
|
||||||
newInstance: true,
|
newInstance: true,
|
||||||
url: getDeepLink(DEEPLINK_METHODS.ROOM, data.server, `path=group/${ data.groups.private.name }`),
|
url: getDeepLink(DEEPLINK_METHODS.ROOM, data.server, `path=group/${ data.groups.private.name }`)
|
||||||
|
|
||||||
});
|
});
|
||||||
await waitFor(element(by.id(`room-view-title-${ data.groups.private.name }`))).toExist().withTimeout(10000);
|
await waitFor(element(by.id(`room-view-title-${ data.groups.private.name }`))).toExist().withTimeout(10000);
|
||||||
|
@ -114,7 +116,7 @@ describe('Deep linking', () => {
|
||||||
await device.launchApp({
|
await device.launchApp({
|
||||||
permissions: { notifications: 'YES' },
|
permissions: { notifications: 'YES' },
|
||||||
newInstance: true,
|
newInstance: true,
|
||||||
url: getDeepLink(DEEPLINK_METHODS.ROOM, 'https://google.com'),
|
url: getDeepLink(DEEPLINK_METHODS.ROOM, 'https://google.com')
|
||||||
|
|
||||||
});
|
});
|
||||||
await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(10000);
|
await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(10000);
|
||||||
|
|
|
@ -25,7 +25,9 @@ describe('i18n', () => {
|
||||||
|
|
||||||
describe('OS language', () => {
|
describe('OS language', () => {
|
||||||
it('OS set to \'en\' and proper translate to \'en\'', async() => {
|
it('OS set to \'en\' and proper translate to \'en\'', async() => {
|
||||||
if(device.getPlatform() === "android") return; // Not run on android
|
if (device.getPlatform() === 'android') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
await device.launchApp({
|
await device.launchApp({
|
||||||
...defaultLaunchArgs,
|
...defaultLaunchArgs,
|
||||||
languageAndLocale: {
|
languageAndLocale: {
|
||||||
|
@ -40,7 +42,9 @@ describe('i18n', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('OS set to unavailable language and fallback to \'en\'', async() => {
|
it('OS set to unavailable language and fallback to \'en\'', async() => {
|
||||||
if(device.getPlatform() === "android") return; // Not run on android
|
if (device.getPlatform() === 'android') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
await device.launchApp({
|
await device.launchApp({
|
||||||
...defaultLaunchArgs,
|
...defaultLaunchArgs,
|
||||||
languageAndLocale: {
|
languageAndLocale: {
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
const {
|
const {
|
||||||
device, expect, element, by, waitFor
|
device, expect, element, by, waitFor
|
||||||
} = require('detox');
|
} = require('detox');
|
||||||
const { login, navigateToLogin, logout, tapBack, searchRoom } = require('../../helpers/app');
|
const {
|
||||||
|
login, navigateToLogin, logout, tapBack, searchRoom
|
||||||
|
} = require('../../helpers/app');
|
||||||
const { prepareAndroid } = require('../../helpers/platformFunctions');
|
const { prepareAndroid } = require('../../helpers/platformFunctions');
|
||||||
const data = require('../../data');
|
const data = require('../../data');
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
const {
|
const {
|
||||||
device, expect, element, by, waitFor
|
device, expect, element, by, waitFor
|
||||||
} = require('detox');
|
} = require('detox');
|
||||||
const { login, navigateToLogin, logout, tapBack } = require('../../helpers/app');
|
const {
|
||||||
|
login, navigateToLogin, logout, tapBack
|
||||||
|
} = require('../../helpers/app');
|
||||||
const { prepareAndroid } = require('../../helpers/platformFunctions');
|
const { prepareAndroid } = require('../../helpers/platformFunctions');
|
||||||
const data = require('../../data');
|
const data = require('../../data');
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
const data = require('../../data');
|
const data = require('../../data');
|
||||||
const { tapBack, navigateToLogin, login, tryTapping } = require('../../helpers/app');
|
const {
|
||||||
|
tapBack, navigateToLogin, login, tryTapping
|
||||||
|
} = require('../../helpers/app');
|
||||||
const { prepareAndroid } = require('../../helpers/platformFunctions');
|
const { prepareAndroid } = require('../../helpers/platformFunctions');
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
const data = require('../../data');
|
const data = require('../../data');
|
||||||
const { navigateToLogin, login, tapBack, sleep, searchRoom, mockMessage, starMessage, pinMessage } = require('../../helpers/app');
|
const {
|
||||||
|
navigateToLogin, login, tapBack, sleep, searchRoom, mockMessage, starMessage, pinMessage
|
||||||
|
} = require('../../helpers/app');
|
||||||
const { prepareAndroid } = require('../../helpers/platformFunctions');
|
const { prepareAndroid } = require('../../helpers/platformFunctions');
|
||||||
const { sendMessage } = require('../../helpers/data_setup')
|
const { sendMessage } = require('../../helpers/data_setup');
|
||||||
|
|
||||||
const platformTypes = require('../../helpers/platformTypes');
|
const platformTypes = require('../../helpers/platformTypes');
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ describe('Discussion', () => {
|
||||||
const discussionName = `${ data.random }message`;
|
const discussionName = `${ data.random }message`;
|
||||||
await element(by.text(discussionName)).atIndex(0).longPress();
|
await element(by.text(discussionName)).atIndex(0).longPress();
|
||||||
await waitFor(element(by.id('action-sheet'))).toExist().withTimeout(2000);
|
await waitFor(element(by.id('action-sheet'))).toExist().withTimeout(2000);
|
||||||
await element(by.text(`Start a Discussion`)).atIndex(0).tap();
|
await element(by.text('Start a Discussion')).atIndex(0).tap();
|
||||||
await waitFor(element(by.id('create-discussion-view'))).toExist().withTimeout(2000);
|
await waitFor(element(by.id('create-discussion-view'))).toExist().withTimeout(2000);
|
||||||
await element(by.id('create-discussion-submit')).tap();
|
await element(by.id('create-discussion-submit')).tap();
|
||||||
await waitFor(element(by.id('room-view'))).toExist().withTimeout(10000);
|
await waitFor(element(by.id('room-view'))).toExist().withTimeout(10000);
|
||||||
|
|
|
@ -3,7 +3,7 @@ const {
|
||||||
navigateToLogin, login, searchRoom, sleep
|
navigateToLogin, login, searchRoom, sleep
|
||||||
} = require('../../helpers/app');
|
} = require('../../helpers/app');
|
||||||
const { prepareAndroid } = require('../../helpers/platformFunctions');
|
const { prepareAndroid } = require('../../helpers/platformFunctions');
|
||||||
const { sendMessage } = require('../../helpers/data_setup')
|
const { sendMessage } = require('../../helpers/data_setup');
|
||||||
|
|
||||||
async function navigateToRoom(user) {
|
async function navigateToRoom(user) {
|
||||||
await searchRoom(`${ user }`);
|
await searchRoom(`${ user }`);
|
||||||
|
|
Loading…
Reference in New Issue