mattermost-mobile/detox/e2e/support/ui/screen/table.js
Elias Nahum 8137241f12
[V1] update deps (#6666)
* v1 update dependencies

* fix eslint

* update ci node version

* Fix detox and jest expect imports

* update gradle memory settings

* QA feedback

* android executor xlarge

Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>
2022-10-13 08:40:43 -03:00

30 lines
821 B
JavaScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {expect} from 'detox';
class TableScreen {
testID = {
tableScreen: 'table.screen',
tableScrollView: 'table.scroll_view',
backButton: 'screen.back.button',
};
tableScreen = element(by.id(this.testID.tableScreen));
tableScrollView = element(by.id(this.testID.tableScrollView));
backButton = element(by.id(this.testID.backButton));
toBeVisible = async () => {
await expect(this.tableScreen).toBeVisible();
return this.tableScreen;
};
back = async () => {
await this.backButton.tap();
await expect(this.tableScreen).not.toBeVisible();
};
}
const tableScreen = new TableScreen();
export default tableScreen;