Room Actions
This commit is contained in:
parent
bf73aed144
commit
b4b9192ba0
|
@ -128,6 +128,7 @@ async function pinMessage(message: string) {
|
|||
const { textMatcher } = platformTypes[deviceType];
|
||||
const messageLabel = `${data.random}${message}`;
|
||||
await waitFor(element(by[textMatcher](messageLabel)).atIndex(0)).toExist();
|
||||
await element(by[textMatcher](messageLabel)).atIndex(0).tap();
|
||||
await element(by[textMatcher](messageLabel)).atIndex(0).longPress();
|
||||
await expect(element(by.id('action-sheet'))).toExist();
|
||||
await expect(element(by.id('action-sheet-handle'))).toBeVisible();
|
||||
|
@ -190,8 +191,8 @@ async function tryTapping(
|
|||
}
|
||||
|
||||
async function tapAndWaitFor(
|
||||
elementToTap: Detox.IndexableNativeElement,
|
||||
elementToWaitFor: Detox.IndexableNativeElement,
|
||||
elementToTap: Detox.IndexableNativeElement | Detox.NativeElement,
|
||||
elementToWaitFor: Detox.IndexableNativeElement | Detox.NativeElement,
|
||||
timeout: number
|
||||
) {
|
||||
try {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
module.exports = {
|
||||
rootDir: '..',
|
||||
testSequencer: '<rootDir>/e2e/testSequencer.js',
|
||||
testMatch: ['<rootDir>/e2e/tests/onboarding/*.spec.ts', '<rootDir>/e2e/tests/assorted/*.spec.ts'],
|
||||
testMatch: ['<rootDir>/e2e/tests/**/*.spec.ts'],
|
||||
testTimeout: 120000,
|
||||
maxWorkers: 1,
|
||||
globalSetup: '<rootDir>/e2e/globalSetup.ts',
|
||||
|
|
|
@ -11,7 +11,8 @@ import {
|
|||
starMessage,
|
||||
pinMessage,
|
||||
platformTypes,
|
||||
TTextMatcher
|
||||
TTextMatcher,
|
||||
tapAndWaitFor
|
||||
} from '../../helpers/app';
|
||||
|
||||
const { sendMessage } = require('../../helpers/data_setup');
|
||||
|
@ -396,10 +397,7 @@ describe('Room actions screen', () => {
|
|||
await waitFor(element(by.id('room-actions-members')))
|
||||
.toExist()
|
||||
.withTimeout(2000);
|
||||
await element(by.id('room-actions-members')).tap();
|
||||
await waitFor(element(by.id('room-members-view')))
|
||||
.toExist()
|
||||
.withTimeout(2000);
|
||||
await tapAndWaitFor(element(by.id('room-actions-members')), element(by.id('room-members-view')), 2000);
|
||||
});
|
||||
|
||||
const openActionSheet = async (username: string) => {
|
||||
|
@ -591,10 +589,11 @@ describe('Room actions screen', () => {
|
|||
await waitFor(element(by[textMatcher]('Message ignored. Tap to display it.')).atIndex(0))
|
||||
.toExist()
|
||||
.withTimeout(60000);
|
||||
await element(by[textMatcher]('Message ignored. Tap to display it.')).atIndex(0).tap();
|
||||
await waitFor(element(by[textMatcher](message)).atIndex(0))
|
||||
.toExist()
|
||||
.withTimeout(60000);
|
||||
await tapAndWaitFor(
|
||||
element(by[textMatcher]('Message ignored. Tap to display it.')).atIndex(0),
|
||||
element(by[textMatcher](message)).atIndex(0),
|
||||
2000
|
||||
);
|
||||
await element(by[textMatcher](message)).atIndex(0).tap();
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue