mattermost-mobile-upstream/detox/e2e/support/ui/screen/table.ts
yasser khan f3af9dbe99
Fix/detox hittest cluster (#10023)
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.
2026-08-27 08:58:03 +05:30

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;