mirror of
https://github.com/mattermost/mattermost-mobile.git
synced 2026-11-14 15:10:17 +00:00
fix(e2e): stabilize Detox and Maestro test suite Restore main features, and harden the E2E harness against flaky UI, network, retry, synchronization, and classification-lock failures. Stabilize channel creation, saved messages, bookmarks, search, deep links, keyboard dismissal, and post verification. Bound network, transport, health-check, synchronization, and lock retries by elapsed time. Fix iOS and Android Maestro/Detox races and flaky interaction flows. Restore Session Attributes and deep-link fixes lost during merge. Improve test isolation, global-setting cleanup, and Jest/TSIO reporting. Enforce Maestro flow-header validation in local and CI checks.
41 lines
1.2 KiB
TypeScript
41 lines
1.2 KiB
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {NavigationHeader} from '@support/ui/component';
|
|
import {tapNativeBackButton, timeouts} from '@support/utils';
|
|
import {expect, waitFor} from 'detox';
|
|
|
|
class TableScreen {
|
|
testID = {
|
|
tableScreen: 'table.screen',
|
|
tableScrollView: 'table.scroll_view',
|
|
backButton: 'navigation.header.back',
|
|
};
|
|
|
|
tableScreen = element(by.id(this.testID.tableScreen));
|
|
tableScrollView = element(by.id(this.testID.tableScrollView));
|
|
backButton = element(by.id(this.testID.backButton));
|
|
|
|
toBeVisible = async () => {
|
|
await waitFor(this.tableScreen).toExist().withTimeout(timeouts.TEN_SEC);
|
|
|
|
return this.tableScreen;
|
|
};
|
|
|
|
back = async () => {
|
|
try {
|
|
await NavigationHeader.tapBackButton(1);
|
|
} catch {
|
|
try {
|
|
await NavigationHeader.tapBackButton(0);
|
|
} catch {
|
|
await tapNativeBackButton();
|
|
}
|
|
}
|
|
await expect(this.tableScreen).not.toBeVisible();
|
|
};
|
|
}
|
|
|
|
const tableScreen = new TableScreen();
|
|
export default tableScreen;
|