mattermost-mobile/detox/e2e/support/ui/screen/about.js
Elias Nahum 5ea470a235
V1 dependencies and bump to RN 0.67.2 (#5908)
* update dependencies

* eslint fixes

* Upgrade to RN 67

* update other deps

* Update to RN 0.67.2

* fix Android build (mmkv)

* Fix crash when root message is deleted from the thread screen

* Fix gif emoji playing at high speed on iOS ProMotion capable devices
2022-02-02 15:28:57 -03:00

79 lines
3.4 KiB
JavaScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {GeneralSettingsScreen} from '@support/ui/screen';
class AboutScreen {
testID = {
aboutScreen: 'about.screen',
aboutScrollView: 'about.scroll_view',
backButton: 'screen.back.button',
aboutAppVersion: 'about.app_version',
aboutBuildDateTitle: 'about.build_date.title',
aboutBuildDateValue: 'about.build_date.value',
aboutBuildHashEnterpriseTitle: 'about.build_hash_enterprise.title',
aboutBuildHashEnterpriseValue: 'about.build_hash_enterprise.value',
aboutBuildHashTitle: 'about.build_hash.title',
aboutBuildHashValue: 'about.build_hash.value',
aboutCopyRight: 'about.copyright',
aboutDatabase: 'about.database',
aboutNoticeText: 'about.notice_text',
aboutLearnMore: 'about.learn_more',
aboutLearnMoreUrl: 'about.learn_more.url',
aboutLicensee: 'about.licensee',
aboutLogo: 'about.logo',
aboutPoweredBy: 'about.powered_by',
aboutPrivacyPolicy: 'about.privacy_policy',
aboutServerVersion: 'about.server_version',
aboutSiteName: 'about.site_name',
aboutSubtitle: 'about.subtitle',
aboutTermsOfService: 'about.terms_of_service',
aboutTitle: 'about.title',
};
aboutScreen = element(by.id(this.testID.aboutScreen));
aboutScrollView = element(by.id(this.testID.aboutScrollView));
backButton = element(by.id(this.testID.backButton));
aboutAppVersion = element(by.id(this.testID.aboutAppVersion));
aboutBuildDateTitle = element(by.id(this.testID.aboutBuildDateTitle));
aboutBuildDateValue = element(by.id(this.testID.aboutBuildDateValue));
aboutBuildHashEnterpriseTitle = element(by.id(this.testID.aboutBuildHashEnterpriseTitle));
aboutBuildHashEnterpriseValue = element(by.id(this.testID.aboutBuildHashEnterpriseValue));
aboutBuildHashTitle = element(by.id(this.testID.aboutBuildHashTitle));
aboutBuildHashValue = element(by.id(this.testID.aboutBuildHashValue));
aboutCopyRight = element(by.id(this.testID.aboutCopyRight));
aboutDatabase = element(by.id(this.testID.aboutDatabase));
aboutNoticeText = element(by.id(this.testID.aboutNoticeText));
aboutLearnMore = element(by.id(this.testID.aboutLearnMore));
aboutLearnMoreUrl = element(by.id(this.testID.aboutLearnMoreUrl));
aboutLicensee = element(by.id(this.testID.aboutLicensee));
aboutLogo = element(by.id(this.testID.aboutLogo));
aboutPoweredBy = element(by.id(this.testID.aboutPoweredBy));
aboutPrivacyPolicy = element(by.id(this.testID.aboutPrivacyPolicy));
aboutServerVersion = element(by.id(this.testID.aboutServerVersion));
aboutSiteName = element(by.id(this.testID.aboutSiteName));
aboutSubtitle = element(by.id(this.testID.aboutSubtitle));
aboutTermsOfService = element(by.id(this.testID.aboutTermsOfService));
aboutTitle = element(by.id(this.testID.aboutTitle));
toBeVisible = async () => {
await expect(this.aboutScreen).toBeVisible();
return this.aboutScreen;
};
open = async () => {
// # Open about screen
await GeneralSettingsScreen.aboutAction.tap();
return this.toBeVisible();
};
back = async () => {
await this.backButton.tap();
await expect(this.aboutScreen).not.toBeVisible();
};
}
const aboutScreen = new AboutScreen();
export default aboutScreen;