-
Notifications
You must be signed in to change notification settings - Fork 28
extracted constants to separate file #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Delta456
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @macnev2013, thanks for making a PR. I will shortly review
| const PROCESS_ENVIRONMENT = process.env; | ||
| const BASE_URL = 'https://api.lambdatest.com/api/v1'; | ||
| const MOBILE_BASE_URL = | ||
| 'https://mobile-api.lambdatest.com/mobile-automation/api/v1'; | ||
| const AUTOMATION_BASE_URL = 'https://api.lambdatest.com/automation/api/v1'; | ||
| const AUTOMATION_DASHBOARD_URL = 'https://automation.lambdatest.com'; | ||
| const AUTOMATION_HUB_URL = process.env.LT_GRID_URL || 'hub.lambdatest.com'; | ||
| const MOBILE_AUTOMATION_HUB_URL = | ||
| process.env.LT_MOBILE_GRID_URL || 'beta-hub.lambdatest.com'; | ||
| const LT_AUTH_ERROR = | ||
| 'Authentication failed. Please assign the correct username and access key to the LT_USERNAME and LT_ACCESS_KEY environment variables.'; | ||
| const LT_TUNNEL_NUMBER = process.env.LT_TUNNEL_NUMBER || 1; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only these need to be moved to a separate const file.
| // Platform constants | ||
| const PLATFORM_ANDROID = 'android'; | ||
| const PLATFORM_IOS = 'ios'; | ||
| const PLATFORM_ANY = 'any'; | ||
|
|
||
| // Browser constants | ||
| const BROWSER_CHROME = 'chrome'; | ||
| const BROWSER_SAFARI = 'safari'; | ||
| const BROWSER_FIREFOX = 'firefox'; | ||
|
|
||
| // Device type constants | ||
| const DEVICE_TYPE_REAL = 'real'; | ||
| const DEVICE_TYPE_IS_REAL = 'isReal'; | ||
|
|
||
| // Version constants | ||
| const VERSION_ANY = 'any'; | ||
| const FIREFOX_CUSTOM_TRANSLATION_MIN_VERSION = 47; | ||
| const SAFARI_CUSTOM_TRANSLATION_MIN_VERSION = 11; | ||
|
|
||
| // HTTP constants | ||
| const HTTP_METHOD_PATCH = 'PATCH'; | ||
| const CONTENT_TYPE_JSON = 'application/json'; | ||
| const ENCODING_BASE64 = 'base64'; | ||
| const ENCODING_UTF8 = 'utf8'; | ||
|
|
||
| // Status constants | ||
| const JOB_STATUS_PASSED = 'passed'; | ||
| const JOB_STATUS_FAILED = 'failed'; | ||
| const SESSION_ABORTED_MESSAGE = 'Session aborted'; | ||
| const TESTS_FAILED_MESSAGE_SUFFIX = ' tests failed'; | ||
|
|
||
| // Tunnel constants | ||
| const DEFAULT_TUNNEL_LOG_FILE = 'lambdaTunnelLog.log'; | ||
| const TUNNEL_CONTROLLER = 'testcafe'; | ||
| const TUNNEL_NAME_PREFIX = 'TestCafe'; | ||
| const TUNNEL_WAIT_INTERVAL = 5000; | ||
|
|
||
| // Client identifier | ||
| const CLIENT_TESTCAFE = 'testcafe'; | ||
|
|
||
| // W3C constants | ||
| const W3C_PREFIX_APPIUM = 'appium'; | ||
|
|
||
| // Capability keys | ||
| const CAPABILITY_KEY_LT_OPTIONS = 'LT:Options'; | ||
| const CAPABILITY_KEY_LT_OPTIONS_LOWERCASE = 'lt:options'; | ||
| const CAPABILITY_KEY_SAFARI_COOKIES = 'safari.cookies'; | ||
| const CAPABILITY_KEY_SAFARI_POPUPS = 'safari.popups'; | ||
| const CAPABILITY_KEY_SELENIUM_VERSION = 'selenium_version'; | ||
| const CAPABILITY_KEY_BROWSER_VERSION = 'browserVersion'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need these many constants. Please revert to the original.
|
Hi @macnev2013, could you update the PR as per above requested changes and resolve the conflicts |
|
@macnev2013 any updates on this PR? |
Description
This PR fixes #76 for
hacktoberfest.Changes
consts.jsNote: I'm not able to add tags to this PR. Can you please add
hacktoberfesttag here?