Files
mattermost-mobile/detox/e2e/init.js
Joseph Baylon b87cf8358b MM-41854 Detox/E2E: Setup detox infrastructure in Gekidou (#5979)
* MM-41854 Detox/E2E: Setup detox infrastructure in Gekidou

* Fix lint issues

* Fix lint issues

* Update API to include baseUrl for multiple servers

* Update init.js to have default siteUrl as baseUrl

* Update init.js to have default siteUrl as baseUrl

* Update import of testConfig

* Update import of testConfig

* Update postMessageAs signature

* Update detox/webhook_server.js

Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>
2022-03-01 07:20:59 -08:00

26 lines
811 B
JavaScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {Plugin, System, User} from '@support/server_api';
import testConfig from '@support/test_config';
beforeAll(async () => {
// Login as sysadmin and reset server configuration
const baseUrl = testConfig.siteUrl;
await System.apiCheckSystemHealth(baseUrl);
await User.apiAdminLogin(baseUrl);
await System.apiUpdateConfig(baseUrl);
await Plugin.apiDisableNonPrepackagedPlugins(baseUrl);
await device.launchApp({
newInstance: false,
launchArgs: {detoxPrintBusyIdleResources: 'YES'},
permissions: {
notifications: 'YES',
camera: 'YES',
medialibrary: 'YES',
photos: 'YES',
},
});
});