Merge 4.16.2 into single-server (#3095)
* [FIX] RoomItem using deprecated animated event signature (#2771)
* [FIX] Server autocomplete text breaking line (#2774)
* [FIX] ServerDropdown flashing bigger server icon (#2775)
* [FIX] ServerDropdown flashing bigger server icon
* Remove unused logo and update image path where needed
* Minor tweak
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Rooms list not being updated on some cases (#2765)
* Request subscriptions on RoomsListView.constructor
* Removes opened rooms from last message persisting
* Change server reducer
* Prevent undefined ids causing query error
* [FIX] Share Extension hitting memory limit on iOS (#2788)
* [FIX] Disallow swipe to dismiss on share extension
* Limit query to 20 and clean up props
* Remove rn-extension-share branch pointer
* Test new branch
* Remove branch
* [IMPROVEMENT] Threads layout tweaks (#2686)
* improvement: Thread Details
* fix: re-render Thread Messages Item
* fix: update snapshots
* improve: thread details component
* fix: cast replies length
* improvement: format date of threads
* improvement: thread details styles
* fix: wrap text
* tests: update snapshot
* improvement: use same date format for all dates
* Icon size 24
* Remove date
* Remove prop drill
* Badge position
* Badge container tweak
* Fix inline style
* Move ThreadDetails to containers
* Update stories
* Fix lint
* Remove wrong prop
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Remove some migrations (#2792)
* Remove force rooms refresh
* Remove MMKV migration
* Bump version to 4.14.0 (#2797)
* [FIX] Messagebox tracking lost on pop gesture navigation (#2799)
* Use setTimeout instead of InteractionManager
* Update tracking lib
* [FIX] Back button closing activity when on root stack screen (#2804)
* Make hardware back button to behave as home button on root screens
* Remove unnecessary code
* Remove handleBackPress from OnboardingView
* Fix lint
* [i18n] Add missing German strings (#2715)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [NEW] Encrypted Discussions (#2813)
* I18n key fix
* Add encrypted switch
* Remove unused i18n keys
* Add enabled to encryption reducer
* Show encrypted option on CreateDiscussionView only when e2e encryption is properly set
* Add localSearch and use it on search
* Use encrypted from parent channel
* Fix method calls as rest api with 2fa enabled
* Fix logout after reset keys
* Use encryption reducer instead of lib directly to check render
* Check for room type logic to display encryption option on create discussion
* Check toggle-room-e2e-encryption permission on RoomActionsView
* Check for encryption status instead of setting on server
* Fix
* Disable switch instead of hide it
* Fix spotlight for DMs
* Fix server test
* [FIX] Messagebox missing style for text color (#2786)
* Changing auxilaryTintColor
* Changed Placeholder color to BodyText color
* added color prop
* eslint changes
* used array for styles
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [I18N] Update arabic (#2696)
* Update ar.js
* Update ar.js
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Workspace input without i18n (#2689)
* [FIX] Translation of strings in Login page
* Strings are added for translation.
fixes: #2620
* Add pt-BR
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Spotlight returning duplicated entries (#2805)
* Update rocketchat.js
* Updated search function
* Minor improvements
* Remove atIndex
* Add remove logic to remove duplicate data from response
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Refactor ServerItem (#2778)
* Updated ServerDropdown and ServerItem
* Added ServerItem stories
* Update ServerDropdown.js
* Updated ServerItem stories
* Updated ServerItem stories and ServerItem component
* Updated SelectServerView, ServerItem and ServerItem stories
* Updated ServerItem stories
* Updated ServerItem stories
* Update tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [DOCS] Updated Quick Start docs link in e2e/readme (#2802)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [I18N] Add Turkish (#2793)
* Turkish language support added
* Update tr.js
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Lint on #2793 (#2818)
* [I18N] Add missing german strings (#2689) (#2820)
* [I18N] Add missing italian strings (#2817)
* [FIX] Server version becoming null on server change (#2821)
* [FIX] Wrong styling on E2E encryption banner (#2767)
* [FIX] Wrong styling on E2E encryption banner
* [FIX] Wrong styling on E2E encryption banner
* [FIX] Wrong styling on E2E encryption banner
* [FIX] Wrong styling on E2E encryption banner (#2767)
* Updated SortDropdown, ListHeader, ListItem and added stories for List.Item
* Updated SortDropdown
* Removed unused component
* Updated List.Item and stories
* Reverted unnecessary changes and updated ListItem stories
* Fix minor indentation
* Stop breaking Touch's default underlay color
* Fix indentation
* Remove falsy comparison from render
* Fix left icon
* Use List.Item on OmnichannelStatus
* Add missing separator
* Lint
* Fix sort dropdown
* Remove unnecessary styles
* Fix detox
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App Store using Experimental's app id (#2826)
* [FIX] Wrong username on push notifications (#2825)
* [FIX] Share extension memory issues on iOS (#2845)
* Remove unnecessary class prop
* Stop rendering servers when there's only one
* Map and alloc only necessary columns from query
* Fetch servers count instead of all servers records
* Fetch only needed servers
* Separators
* Remove renderContent
* Minor fix
* Refactor query
* Smaller avatars in memory
* Fix getItemLayout
* Add topic
* Load less pods
* tests
* Import only used functions from lodash
* Fix pods
* Import only used functions from semver
* Fix media sharing
* Update pods
* Disables preview and thumb on iOS
* Update expo-video-thumbnail
* Unnecessary change
* [FIX] Logout from other locations not prompting confirmation option (#2854)
* Fixed logout toast bug for the iOS
* Removing callToAction and replacing with confirmationText
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Bump version to 4.14.1 (#2859)
* [IMPROVEMENT] Check for focused rooms on in-app notifications (#2857)
* Update InAppNotification and room reducer
* Update InAppNotification
This reverts commit 60330a1e04cfe8d2e5aa311f367083d831682c49.
* Stop subscribing to threads
* Remove ref
* Fix prop-types
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Real name being ignored in SearchMessagesView (#2838)
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Remove unnecessary share reducer calls (#2861)
* Remove unnecesary share reducer calls
* Update Avatar
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Breadcrumbs exceeding characters limit (#2862)
* [FIX] breadcrumbs exceeding
* fix.breadcrumbs-exceeding-change-events
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App compressing videos on iOS (#2915)
* Update index.js
* Update index.js
* [FIX] Real name setting ignored on reply preview (#2908)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Reply component sending unused prop to Description (#2900)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] BackdropOpacity based on themes (#2863)
* Added backdropOpacity based on theme
* Updated ActionSheet, ReactionsModal, ReactionPicker and Sidebar
* Updated MultiSelect
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Webview not falling back to default auth challenge when no cert is provided (#2918)
* [FIX] Android - fallback to default auth challenge handling when no cert is provided
* If a certificate auth challenge is requested on Android the webview will hang if no certificate is loaded.
To prevent this, fallback to default Android behavior and cancel the challenge with request.cancel()
* No client certificate case defaults to super implementation
* Update react-native-webview
* Downgrade to previous dependency version
Co-authored-by: Diego Mello <diegolmello@gmail.com>
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Jan Garaj <jan.garaj@gmail.com>
* [FIX] Support Jitsi_URL_Room_Hash (#2905)
* [FIX] Temp attachment files not being flushed after saved to gallery (#2871)
* Update AttachmentView.js
* Update AttachmentView.js
* Update AttachmentView.js
* Update AttachmentView.js
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Update iOS profiles for Experimental app (#2933)
* [IMPROVE] Deleted thread reply redirects to thread (#2840)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Thread showing typing indicator from main room (#2869)
* [FIX] Remove typing indicator from thread's header
* remove unnecessary props and change usersTyping condition
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] DM rooms show typing status from last group room (#2878)
* [FIX] DM rooms show typing status from last group room
* Undo changes
* Check if current typing is from focused room before dispatching to redux
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Can't copy or edit media's description (#2885)
* [FIX] Image descriptions issues
* shorten the condition string
* fix selectedMessage state
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] RightButtonsContainer re-render check not returning default value (#2899)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Remove InteractionManager blocks (#2906)
* [FIX] Remove InteractionManager blocks
* Minor fix
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App not sending second argument for EventEmitter.removeListener on some places (#2909)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Temp message ignoring real name (#2919)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] System message of e2e encryption is missing (#2888)
* [FIX] System message of e2e encryption missing
* add new encryption string
* add to stories
* Add pt-BR
* Move stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Add permissions to Redux (#2914)
* [FIX] Add permissions to Redux store
* add only permissions being used in the app
* add clear permissions reducer
* call RocketChat.hasPermission from reducer
* add server version comparison on getPermissions
* refactor hasPermission function
* refactor hasPermission function
* remove uncomment code
* use Q.experimentalSortBy()
* add coerce function
* Change Rocketchat.hasPermission
* Apply on isReadOnly
* Apply to RoomInfoEditView
* Apply to RoomInfoView and RoomInfoEditView
* canAutoTranslate
* Unnecessary clear permissions
* Revert getUpdatedSince
* Naming fix
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Add hold step for ios and android build experimental (#2943)
* [CHORE] Add hold step for ios-build-experimental and android-build-experimental
* Android hold step
* add ios hold step
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [IMPROVEMENT] Remove lodash.isEqual (#2893)
* Added dequal and react-fast-compare as substitutes to lodash.isEqual
* Update ReplyPreview.js
* Remove react-fast-compare
* Removed deep-equal and upgrade babel-eslint dev dependency
* Fix avatar
* Fix Messagebox
* Fix CreateDiscussionView
* ModalBlockView
* NewMessageView
* ProfileView
* RoomInfoEditView
* ServerDropdown
* Return local search as object instead of observable
* SelectedUsersView
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [I18N] Add missing Russian strings (#2946)
* [i18n] Add missing Russian strings
* Couple fixes
* Fix Direct_message
Translate Direct_message as already has been translated
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Use shortcut syntax for get collections (#2932)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Use List.Separator in all places (#2931)
* [FIX] Use List.Separator in all places
* add List.Separator
* change List.Separator
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Limit new message list query size to 50 (#2947)
* Limit query to 50
* Remove observable
* [FIX] Support chats order for older versions of the server (#2934)
* Update mergeSubscriptionsRooms.js
* Update mergeSubscriptionsRooms.js
* Update mergeSubscriptionsRooms.js
* Minor refactor
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Reactions modal's backdrop color too light (#2949)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Bump version to 4.15.0 (#2950)
* [FIX] Share extension not working correctly on Official app (#2963)
* [FIX] Cannot read property 'some' of undefined on hasPermission (#2966)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Deep linking and other connectivity issues (#2894)
* Navigate from push notification only if necessary
* Use JS SDK branch
* Stop reconnecting if it's already connected
* Fix RoomsListView forever loading after tapping push notification of another server
* Execute fewer operations on app/index
* Remove roomsRequest call from onForeground
* Apply check and reopen
* Stop opening in-app notification when the app is on backgorund
* Connecting tweaks
* Fix deep linking not working if the app is on background
* Force reset yarn cache
* Upgrade JS SDK
* Remove listener on unmount
* Fix resume on Android after back button is pressed
* Fix local authentication resume
* Fix back button android
* Change JS SDK branch
* [FIX] Messagebox's placeholder color is too bright (#2968)
* [IMPROVEMENT] Message attachment colors (#2860)
* Added convertStrToHex function and updated Reply component
* Removed convertStrtToHex function and added attachmentBackground
* Added color2k, removed transparent view and applied transparentize to backgroundColor
* Added stories
* Update Reply stories
* Update Reply stories
* Fix lint
* Update Reply stories
* Fix props
* Move tests to Message stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] App forgetting workspace when server is not finished added (#2798)
* [FIX] App forgetting workspace
* Added e2e tests
* Update login.js
* Update logout.js
* Reverted changes on login and share, updated init
* Update 08-persistantworkspace.spec.js
* Revert unnecessary changes
* Revert line change
* Update share.js
* Tweak tests
* Use wm shorthand
* Remove irrelevant calls to RocketChat.TOKEN_KEY
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to draft message (#2960)
* [E2E TEST] Draft message
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to group DM (#2961)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to directory (#2964)
* [E2E TEST] Directory
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Simplify server version comparison (#2922)
* Simplify server version where needed
* Added lte and gte functions and updated imports
* Updated functions names
* Update util functions
* Update util function and added methods
* Remove lt and coerce from getPermissions and mergeSubscriptionsRooms
* Fix comparison
* Update getPermissions.js
* Remove unused import
* Fix lint
* Fix lint
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to discussions (#2970)
* [E2E TEST] Discussions
* fix error Cannot find UI elemen
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Attachment not rendering markdown (#2924)
* [FIX] Render markdown in Fields content
* Added stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add e2e tests for mark message as unread (#2953)
* [E2E TEST] Add e2e tests for mark message as unread
* fixed test for draft message
* change test name
* move test to other file
* Remove unnecessary tests
* Rename file
* Update jest tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Add E2E tests to delete server (#2954)
* [E2E TEST] Delete server
* fixed test for delete server
* fix tests
* minor changes
* Rename file
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Refactor RoomActionsView permissions (#2872)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [CHORE] Add status and teams icons (#2989)
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
* [FIX] SSO not working with 2FA (TOTP) (#2978)
* Update AuthenticationWebView.js
* Updated loginTOTP
* Added validation
* Update rocketchat.js
* Update rocketchat.js
* Update rocketchat.js
* Update rocketchat.js
* Fix resolve
* Remove incognito
* Fix totp being requested on webview
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [IMPROVEMENT] User status icons (#2991)
* Add status and teams
* Update icons, icon size and getUsersPresence
* Minor changes
* Refactor RoomTypeIcon
* Minor tweaks
* Update unit tests
* Minor fixes
* Fix styles
* Small refactor
* Update jest
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [REGRESSION] Auth via deep linking not working (#3015)
* Update rocketchat and add e2e test for deep linking
* Update rocketchat and add e2e test for deep linking
* Update deeplinking e2e
* fix deep linking auth
* Test deep linking auth
* Fix deeplink to rid and add tests
* Small refactor
* Add non existing server test
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Create discussion request being sent with null value on encryption param (#3033)
* [CHORE] Use JSON files for i18n (#3011)
* [IMPROVEMENT] Load only i18n files needed (#3014)
* Use json
* Load only i18n files needed
* [REGRESSION] Clear local server cache not loading rooms (#3007)
* Fix clear cache
* Write e2e tests
* Fix lint
* Fix isRTL
* [FIX] Custom OAuth and iframe login attempts being called multiple times (#3020)
* [FIX] App crashing when attachment color is an invalid HEX (#3021)
* [IMPROVEMENT] Add "Message" option to Room Info (#3029)
* [CHORE] Go to room from hashtag
* Layout tweaks
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Can't change status (#3018)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Search input not using the whole header space (#3012)
* [FIX] Search input not using the whole space
* Fix on getHeaderTitlePosition
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] E2EE password hiding automatically (#2972)
* [FIX] E2EE password hiding automatically
* add e2e test
* fixed hiding banner
* move e2e tests to 01-e2eencryption
* remove console.log
* Fix tests
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [TESTS] Move threads tests to its own file (#2965)
* [E2E TEST] Move threads test to another file
* changed descirbe title
* Rearrange files
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Regex typo on markdown (#2928)
* [FIX] Fix Regex Typo
* Add story for testing
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Make attachment validation compatible with web client (#2927)
* [FIX] Make attachment validation compatible with web client
* Added stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Non-reply attachments displaying time (#2902)
* Remove time if no message_link
* Fix message stories for replies
* Final stories fix
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] i18n not being applied on login/register labels (#2930)
* Use I18n translate in login text input label
* Add to register and add missing strings
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Revert "[FIX] Make attachment validation compatible with web client (#2927)" (#3036)
This reverts commit d6200745c0
.
* Bump version to 4.16.0 (#3037)
* [NEW] Basic support to Teams (#3016)
* Database migration
* RoomItem icon
* Team icons
* Teams group
* Small tweak on RoomTypeIcon
* RoomView Header
* Add team's channels to RoomView header
* Starting TeamChannelsView
* Icon size
* o data found
* Update TeamChannelsView, add teams subscriptions and send params to TeamChannelsView
* Use teams.ListRooms endpoint, render rooms list, remove unused functions
* Show team main on TeamChannelsView
* Disable swipe
* Pagination working
* Fix blinking no data found
* Search working
* Refactor to use BackgroundContainer while loading
* Go to room
* Cleanup
* Go to actions
* Events
* Lint
* Add debounce to go room
* Fix for tablet
* i18n
* Small fix
* Minor refactor
* Use local data when it exists
* Show last message
* Force teams migration
* Add stories to BackgroundContainer
* Remove unused component
* Move RoomViewHeader into containers folder
* Refactoring
* Testing RoomHeader
* i18n
* Fix server endpoint version
* Fix events
Co-authored-by: Gerzon Z <gerzonzcanario@gmail.com>
* [CHORE] Refactor mention tracking logic (#2997)
* [Improvement] Improve mentions
This PR focuses on improving command, emoji, channel and user mentions.
* [Tests] Added e2e tests for mention improvement
* [Improvement] Modify slash command mention logic.
Added slash command with argument preview
Slash command should show only if the message bigins with /
* Return data on search for empty text
* Minor fixes
* Update e2e tests
* Minor fix
* [FIX] allow command mentioning in between text
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Status text not being updated on sidebar (#3041)
* Update StatusView.js
* Minor tweak
* Minor tweaks
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Unable to search non-latin alphabet names on members list (#3039)
* Add search by name in members list
* Update RoomMembersView search
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Search stops working after some time (#3044)
* Bump version to 4.17.0 (#3058)
* [CHORE] Add job to upload Experimental to Google Play production (#3050)
* [REGRESSION] SAML stopped working after #2978 (#3060)
* [REGRESSION] Room actions not loading on tablet (#3061)
* Bump version to 4.16.1 (#3063)
* [REGRESSION] Fallback language stopped working (#3072)
* [CHORE] Update Detox to 18.10.0 (#3052)
* Updated detox and 5 tests
* Update e2e cases for Detox v18, update setUserStatus and added SET_STATUS_FAIL
* Downgrade mocha
* Exclude arm64 from building and update tests cases
* Update more tests cases, add registeringUser4
* Update more test files and add room-actions-scrollview testID
* Update package.json
* Remove unused username from test file and update 08-roominfo test file
* Fixing
* Mark as unread
* Fixing flaky tests
* Minor fixes
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* [FIX] Message author touchable taking whole space available (#3048)
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
* [CHORE] Improve stories (#3028)
* [CHORE] Improve stories
* Refactor Avatar and UIKitModal
* fixed undefined 'name'
* Remove commented stories
* Remove Markdown from stories/index, update Markdown test file and remove markdown stories from Message stories
* Remove StoriesSeparator
* Refactor Markdown
* Remove commented lines of code
* Small refactor
* Re-add stories
Co-authored-by: Gerzon Z <gerzonzcanario@gmail.com>
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
* Bump version to 4.17.0 (#3083)
* [REGRESSION] Fallback not working when device's language is available (#3091)
* Always add 'en' i18n
* Add tests
* Bump version to 4.16.2 (#3092)
Co-authored-by: Gerzon Z <gerzonzcanario@gmail.com>
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Djorkaeff Alexandre <djorkaeff.unb@gmail.com>
Co-authored-by: phriedrich <info@phriedrich.de>
Co-authored-by: yash-rajpal <58601732+yash-rajpal@users.noreply.github.com>
Co-authored-by: Fazil Boudjelal <fazildiablou@hotmail.fr>
Co-authored-by: Sumukha Hegde <SUMUKHA214@GMAIL.COM>
Co-authored-by: Hakan YILMAZ <mukerrem.yilmaz@hotmail.com>
Co-authored-by: Vincenzo Esposito <aenon.esposito@gmail.com>
Co-authored-by: Arkadyuti Bandyopadhyay <bandyopadhyayarkadyuti@gmail.com>
Co-authored-by: Anant Bhasin <38764067+aKn1ghtOut@users.noreply.github.com>
Co-authored-by: Gung Wah <41157464+kresnaputra@users.noreply.github.com>
Co-authored-by: Billy Newman <newmanw10@gmail.com>
Co-authored-by: Jan Garaj <jan.garaj@gmail.com>
Co-authored-by: ankar84 <ankar84@gmail.com>
Co-authored-by: sadegh <sadeghmohamadnia@yahoo.com>
This commit is contained in:
parent
133df70675
commit
ec32b31e64
|
@ -46,6 +46,7 @@ module.exports = {
|
||||||
"react/forbid-prop-types": 0,
|
"react/forbid-prop-types": 0,
|
||||||
"jsx-quotes": [2, "prefer-single"],
|
"jsx-quotes": [2, "prefer-single"],
|
||||||
"jsx-a11y/href-no-hash": 0,
|
"jsx-a11y/href-no-hash": 0,
|
||||||
|
"jsx-a11y/aria-role": 0,
|
||||||
"import/prefer-default-export": 0,
|
"import/prefer-default-export": 0,
|
||||||
"import/no-cycle": 0,
|
"import/no-cycle": 0,
|
||||||
"camelcase": 0,
|
"camelcase": 0,
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -144,7 +144,7 @@ android {
|
||||||
minSdkVersion rootProject.ext.minSdkVersion
|
minSdkVersion rootProject.ext.minSdkVersion
|
||||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||||
versionCode VERSIONCODE as Integer
|
versionCode VERSIONCODE as Integer
|
||||||
versionName "4.16.1"
|
versionName "4.16.2"
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
if (!isFoss) {
|
if (!isFoss) {
|
||||||
manifestPlaceholders = [BugsnagAPIKey: BugsnagAPIKey as String]
|
manifestPlaceholders = [BugsnagAPIKey: BugsnagAPIKey as String]
|
||||||
|
|
|
@ -876,7 +876,7 @@ class MessageBox extends Component {
|
||||||
recording, showEmojiKeyboard, showSend, mentions, trackingType, commandPreview, showCommandPreview
|
recording, showEmojiKeyboard, showSend, mentions, trackingType, commandPreview, showCommandPreview
|
||||||
} = this.state;
|
} = this.state;
|
||||||
const {
|
const {
|
||||||
editing, message, replying, replyCancel, user, getCustomEmoji, theme, Message_AudioRecorderEnabled, children, isActionsEnabled
|
editing, message, replying, replyCancel, user, getCustomEmoji, theme, Message_AudioRecorderEnabled, children, isActionsEnabled, tmid
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
const isAndroidTablet = isTablet && isAndroid ? {
|
const isAndroidTablet = isTablet && isAndroid ? {
|
||||||
|
@ -936,7 +936,7 @@ class MessageBox extends Component {
|
||||||
underlineColorAndroid='transparent'
|
underlineColorAndroid='transparent'
|
||||||
defaultValue=''
|
defaultValue=''
|
||||||
multiline
|
multiline
|
||||||
testID='messagebox-input'
|
testID={`messagebox-input${ tmid ? '-thread' : '' }`}
|
||||||
theme={theme}
|
theme={theme}
|
||||||
{...isAndroidTablet}
|
{...isAndroidTablet}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -18,6 +18,7 @@ const styles = StyleSheet.create({
|
||||||
container: {
|
container: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
|
justifyContent: 'space-between',
|
||||||
alignItems: 'center'
|
alignItems: 'center'
|
||||||
},
|
},
|
||||||
username: {
|
username: {
|
||||||
|
@ -30,7 +31,7 @@ const styles = StyleSheet.create({
|
||||||
...sharedStyles.textMedium
|
...sharedStyles.textMedium
|
||||||
},
|
},
|
||||||
titleContainer: {
|
titleContainer: {
|
||||||
flex: 1,
|
flexShrink: 1,
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
alignItems: 'center'
|
alignItems: 'center'
|
||||||
},
|
},
|
||||||
|
|
|
@ -95,6 +95,7 @@ export const setLanguage = (l) => {
|
||||||
moment.locale(toMomentLocale(locale));
|
moment.locale(toMomentLocale(locale));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
i18n.translations = { en: translations.en?.() };
|
||||||
const defaultLanguage = { languageTag: 'en', isRTL: false };
|
const defaultLanguage = { languageTag: 'en', isRTL: false };
|
||||||
const availableLanguages = Object.keys(translations);
|
const availableLanguages = Object.keys(translations);
|
||||||
const { languageTag } = RNLocalize.findBestAvailableLanguage(availableLanguages) || defaultLanguage;
|
const { languageTag } = RNLocalize.findBestAvailableLanguage(availableLanguages) || defaultLanguage;
|
||||||
|
|
|
@ -123,7 +123,6 @@
|
||||||
"creating_invite": "uitnodiging maken",
|
"creating_invite": "uitnodiging maken",
|
||||||
"Channel_Name": "Kanaal Name",
|
"Channel_Name": "Kanaal Name",
|
||||||
"Channels": "Kanalen",
|
"Channels": "Kanalen",
|
||||||
"Chats": "Chats",
|
|
||||||
"Call_already_ended": "Gesprek al beeïndigd!",
|
"Call_already_ended": "Gesprek al beeïndigd!",
|
||||||
"Click_to_join": "Klik om lid te worden!",
|
"Click_to_join": "Klik om lid te worden!",
|
||||||
"Close": "Sluiten",
|
"Close": "Sluiten",
|
||||||
|
|
|
@ -51,6 +51,7 @@ export default {
|
||||||
STATUS_F: 'status_f',
|
STATUS_F: 'status_f',
|
||||||
STATUS_CUSTOM: 'status_custom',
|
STATUS_CUSTOM: 'status_custom',
|
||||||
STATUS_CUSTOM_F: 'status_custom_f',
|
STATUS_CUSTOM_F: 'status_custom_f',
|
||||||
|
SET_STATUS_FAIL: 'set_status_fail',
|
||||||
|
|
||||||
// ROOMS LIST VIEW
|
// ROOMS LIST VIEW
|
||||||
RL_TOGGLE_SERVER_DROPDOWN: 'rl_toggle_server_dropdown',
|
RL_TOGGLE_SERVER_DROPDOWN: 'rl_toggle_server_dropdown',
|
||||||
|
|
|
@ -595,7 +595,7 @@ class RoomActionsView extends React.Component {
|
||||||
return (
|
return (
|
||||||
<SafeAreaView testID='room-actions-view'>
|
<SafeAreaView testID='room-actions-view'>
|
||||||
<StatusBar />
|
<StatusBar />
|
||||||
<List.Container>
|
<List.Container testID='room-actions-scrollview'>
|
||||||
{this.renderRoomInfo()}
|
{this.renderRoomInfo()}
|
||||||
{this.renderJitsi()}
|
{this.renderJitsi()}
|
||||||
{this.renderE2EEncryption()}
|
{this.renderE2EEncryption()}
|
||||||
|
|
|
@ -91,7 +91,7 @@ class StatusView extends React.Component {
|
||||||
const { statusText } = this.state;
|
const { statusText } = this.state;
|
||||||
const { user } = this.props;
|
const { user } = this.props;
|
||||||
if (statusText !== user.statusText) {
|
if (statusText !== user.statusText) {
|
||||||
await this.setCustomStatus();
|
await this.setCustomStatus(statusText);
|
||||||
}
|
}
|
||||||
this.close();
|
this.close();
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,6 +57,11 @@ const data = {
|
||||||
password: `passwordthree${ value }`,
|
password: `passwordthree${ value }`,
|
||||||
email: `mobile+registeringthree${ value }@rocket.chat`
|
email: `mobile+registeringthree${ value }@rocket.chat`
|
||||||
},
|
},
|
||||||
|
registeringUser4: {
|
||||||
|
username: `newuserfour${ value }`,
|
||||||
|
password: `passwordfour${ value }`,
|
||||||
|
email: `mobile+registeringfour${ value }@rocket.chat`
|
||||||
|
},
|
||||||
random: value
|
random: value
|
||||||
}
|
}
|
||||||
module.exports = data;
|
module.exports = data;
|
||||||
|
|
|
@ -7,8 +7,7 @@ async function navigateToWorkspace(server = data.server) {
|
||||||
await waitFor(element(by.id('onboarding-view'))).toBeVisible().withTimeout(10000);
|
await waitFor(element(by.id('onboarding-view'))).toBeVisible().withTimeout(10000);
|
||||||
await element(by.id('join-workspace')).tap();
|
await element(by.id('join-workspace')).tap();
|
||||||
await waitFor(element(by.id('new-server-view'))).toBeVisible().withTimeout(60000);
|
await waitFor(element(by.id('new-server-view'))).toBeVisible().withTimeout(60000);
|
||||||
await element(by.id('new-server-view-input')).replaceText(server);
|
await element(by.id('new-server-view-input')).typeText(`${server}\n`);
|
||||||
await element(by.id('new-server-view-button')).tap();
|
|
||||||
await waitFor(element(by.id('workspace-view'))).toBeVisible().withTimeout(60000);
|
await waitFor(element(by.id('workspace-view'))).toBeVisible().withTimeout(60000);
|
||||||
await expect(element(by.id('workspace-view'))).toBeVisible();
|
await expect(element(by.id('workspace-view'))).toBeVisible();
|
||||||
}
|
}
|
||||||
|
@ -33,7 +32,7 @@ async function login(username, password) {
|
||||||
await element(by.id('login-view-email')).replaceText(username);
|
await element(by.id('login-view-email')).replaceText(username);
|
||||||
await element(by.id('login-view-password')).replaceText(password);
|
await element(by.id('login-view-password')).replaceText(password);
|
||||||
await element(by.id('login-view-submit')).tap();
|
await element(by.id('login-view-submit')).tap();
|
||||||
await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(10000);
|
await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(30000);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function logout() {
|
async function logout() {
|
||||||
|
@ -52,24 +51,24 @@ async function logout() {
|
||||||
await expect(element(by.id('onboarding-view'))).toBeVisible();
|
await expect(element(by.id('onboarding-view'))).toBeVisible();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function mockMessage(message) {
|
async function mockMessage(message, isThread = false) {
|
||||||
await element(by.id('messagebox-input')).atIndex(0).tap();
|
let input = isThread ? 'messagebox-input-thread' : 'messagebox-input';
|
||||||
await element(by.id('messagebox-input')).atIndex(0).typeText(`${ data.random }${ message }`);
|
await element(by.id(input)).tap();
|
||||||
await element(by.id('messagebox-send-message')).atIndex(0).tap();
|
await element(by.id(input)).typeText(`${ data.random }${ message }`);
|
||||||
await waitFor(element(by.label(`${ data.random }${ message }`)).atIndex(0)).toExist().withTimeout(60000);
|
await element(by.id('messagebox-send-message')).tap();
|
||||||
await expect(element(by.label(`${ data.random }${ message }`)).atIndex(0)).toExist();
|
await waitFor(element(by.label(`${ data.random }${ message }`))).toExist().withTimeout(60000);
|
||||||
|
await expect(element(by.label(`${ data.random }${ message }`))).toExist();
|
||||||
await element(by.label(`${ data.random }${ message }`)).atIndex(0).tap();
|
await element(by.label(`${ data.random }${ message }`)).atIndex(0).tap();
|
||||||
};
|
};
|
||||||
|
|
||||||
async function starMessage(message){
|
async function starMessage(message){
|
||||||
const messageLabel = `${ data.random }${ message }`
|
const messageLabel = `${ data.random }${ message }`
|
||||||
await waitFor(element(by.label(messageLabel))).toBeVisible().withTimeout(5000);
|
|
||||||
await element(by.label(messageLabel)).atIndex(0).longPress();
|
await element(by.label(messageLabel)).atIndex(0).longPress();
|
||||||
await expect(element(by.id('action-sheet'))).toExist();
|
await expect(element(by.id('action-sheet'))).toExist();
|
||||||
await expect(element(by.id('action-sheet-handle'))).toBeVisible();
|
await expect(element(by.id('action-sheet-handle'))).toBeVisible();
|
||||||
await element(by.id('action-sheet-handle')).swipe('up', 'fast', 0.5);
|
await element(by.id('action-sheet-handle')).swipe('up', 'fast', 0.5);
|
||||||
await element(by.label('Star')).tap();
|
await element(by.label('Star')).tap();
|
||||||
await waitFor(element(by.id('action-sheet'))).toNotExist().withTimeout(5000);
|
await waitFor(element(by.id('action-sheet'))).not.toExist().withTimeout(5000);
|
||||||
};
|
};
|
||||||
|
|
||||||
async function pinMessage(message){
|
async function pinMessage(message){
|
||||||
|
@ -80,7 +79,7 @@ async function pinMessage(message){
|
||||||
await expect(element(by.id('action-sheet-handle'))).toBeVisible();
|
await expect(element(by.id('action-sheet-handle'))).toBeVisible();
|
||||||
await element(by.id('action-sheet-handle')).swipe('up', 'fast', 0.5);
|
await element(by.id('action-sheet-handle')).swipe('up', 'fast', 0.5);
|
||||||
await element(by.label('Pin')).tap();
|
await element(by.label('Pin')).tap();
|
||||||
await waitFor(element(by.id('action-sheet'))).toNotExist().withTimeout(5000);
|
await waitFor(element(by.id('action-sheet'))).not.toExist().withTimeout(5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function dismissReviewNag(){
|
async function dismissReviewNag(){
|
||||||
|
|
|
@ -20,6 +20,7 @@ const login = async (username, password) => {
|
||||||
const authToken = response.data.data.authToken
|
const authToken = response.data.data.authToken
|
||||||
rocketchat.defaults.headers.common['X-User-Id'] = userId
|
rocketchat.defaults.headers.common['X-User-Id'] = userId
|
||||||
rocketchat.defaults.headers.common['X-Auth-Token'] = authToken
|
rocketchat.defaults.headers.common['X-Auth-Token'] = authToken
|
||||||
|
return { authToken, userId };
|
||||||
}
|
}
|
||||||
|
|
||||||
const createUser = async (username, password, name, email) => {
|
const createUser = async (username, password, name, email) => {
|
||||||
|
@ -91,11 +92,11 @@ const changeChannelJoinCode = async (roomId, joinCode) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const sendMessage = async (user, groupname, msg) => {
|
const sendMessage = async (user, channel, msg) => {
|
||||||
console.log(`Sending message to ${groupname}`)
|
console.log(`Sending message to ${channel}`)
|
||||||
try {
|
try {
|
||||||
await login(user.username, user.password);
|
await login(user.username, user.password);
|
||||||
await rocketchat.post('chat.postMessage', { channel: `#${groupname}`, msg });
|
await rocketchat.post('chat.postMessage', { channel, msg });
|
||||||
} catch (infoError) {
|
} catch (infoError) {
|
||||||
console.log(JSON.stringify(infoError))
|
console.log(JSON.stringify(infoError))
|
||||||
throw "Failed to find or create private group"
|
throw "Failed to find or create private group"
|
||||||
|
@ -146,5 +147,5 @@ const post = (endpoint, body) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
setup, sendMessage, get, post
|
setup, sendMessage, get, post, login
|
||||||
}
|
}
|
|
@ -166,7 +166,7 @@ describe('E2E Encryption', () => {
|
||||||
await navigateToLogin();
|
await navigateToLogin();
|
||||||
await login(testuser.username, testuser.password);
|
await login(testuser.username, testuser.password);
|
||||||
await navigateToRoom(room);
|
await navigateToRoom(room);
|
||||||
await waitFor(element(by.label(`${ data.random }message`)).atIndex(0)).toNotExist().withTimeout(2000);
|
await waitFor(element(by.label(`${ data.random }message`)).atIndex(0)).not.toExist().withTimeout(2000);
|
||||||
await expect(element(by.label('Encrypted message')).atIndex(0)).toExist();
|
await expect(element(by.label('Encrypted message')).atIndex(0)).toExist();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ describe('E2E Encryption', () => {
|
||||||
await waitFor(element(by.id('e2e-enter-your-password-view'))).toBeVisible().withTimeout(2000);
|
await waitFor(element(by.id('e2e-enter-your-password-view'))).toBeVisible().withTimeout(2000);
|
||||||
await element(by.id('e2e-enter-your-password-view-password')).typeText(newPassword);
|
await element(by.id('e2e-enter-your-password-view-password')).typeText(newPassword);
|
||||||
await element(by.id('e2e-enter-your-password-view-confirm')).tap();
|
await element(by.id('e2e-enter-your-password-view-confirm')).tap();
|
||||||
await waitFor(element(by.id('listheader-encryption'))).toNotExist().withTimeout(10000);
|
await waitFor(element(by.id('listheader-encryption'))).not.toExist().withTimeout(10000);
|
||||||
await navigateToRoom(room);
|
await navigateToRoom(room);
|
||||||
await waitFor(element(by.label(`${ data.random }message`)).atIndex(0)).toExist().withTimeout(2000);
|
await waitFor(element(by.label(`${ data.random }message`)).atIndex(0)).toExist().withTimeout(2000);
|
||||||
});
|
});
|
||||||
|
@ -221,8 +221,7 @@ describe('E2E Encryption', () => {
|
||||||
|
|
||||||
// TODO: refactor
|
// TODO: refactor
|
||||||
await waitFor(element(by.id('new-server-view'))).toBeVisible().withTimeout(60000);
|
await waitFor(element(by.id('new-server-view'))).toBeVisible().withTimeout(60000);
|
||||||
await element(by.id('new-server-view-input')).replaceText(data.alternateServer);
|
await element(by.id('new-server-view-input')).typeText(`${data.alternateServer}\n`);
|
||||||
await element(by.id('new-server-view-button')).tap();
|
|
||||||
await waitFor(element(by.id('workspace-view'))).toBeVisible().withTimeout(60000);
|
await waitFor(element(by.id('workspace-view'))).toBeVisible().withTimeout(60000);
|
||||||
await element(by.id('workspace-view-register')).tap();
|
await element(by.id('workspace-view-register')).tap();
|
||||||
await waitFor(element(by.id('register-view'))).toBeVisible().withTimeout(2000);
|
await waitFor(element(by.id('register-view'))).toBeVisible().withTimeout(2000);
|
||||||
|
@ -231,7 +230,7 @@ describe('E2E Encryption', () => {
|
||||||
await element(by.id('register-view-name')).replaceText(data.registeringUser.username);
|
await element(by.id('register-view-name')).replaceText(data.registeringUser.username);
|
||||||
await element(by.id('register-view-username')).replaceText(data.registeringUser.username);
|
await element(by.id('register-view-username')).replaceText(data.registeringUser.username);
|
||||||
await element(by.id('register-view-email')).replaceText(data.registeringUser.email);
|
await element(by.id('register-view-email')).replaceText(data.registeringUser.email);
|
||||||
await element(by.id('register-view-password')).replaceText(data.registeringUser.password);
|
await element(by.id('register-view-password')).typeText(data.registeringUser.password);
|
||||||
await element(by.id('register-view-submit')).tap();
|
await element(by.id('register-view-submit')).tap();
|
||||||
await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(60000);
|
await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(60000);
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ describe('Broadcast room', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should have the message created earlier', async() => {
|
it('should have the message created earlier', async() => {
|
||||||
await waitFor(element(by.label(`${ data.random }message`)).atIndex(0)).toBeVisible().withTimeout(60000);
|
await waitFor(element(by.label(`${ data.random }message`))).toExist().withTimeout(60000);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should have reply button', async() => {
|
it('should have reply button', async() => {
|
||||||
|
|
|
@ -9,10 +9,10 @@ const profileChangeUser = data.users.profileChanges
|
||||||
const scrollDown = 200;
|
const scrollDown = 200;
|
||||||
|
|
||||||
async function waitForToast() {
|
async function waitForToast() {
|
||||||
// await waitFor(element(by.id('toast'))).toBeVisible().withTimeout(10000);
|
// await waitFor(element(by.id('toast'))).toBeVisible().withTimeout(1000);
|
||||||
// await expect(element(by.id('toast'))).toBeVisible();
|
// await expect(element(by.id('toast'))).toBeVisible();
|
||||||
// await waitFor(element(by.id('toast'))).toBeNotVisible().withTimeout(10000);
|
// await waitFor(element(by.id('toast'))).not.toBeNotVisible().withTimeout(1000);
|
||||||
// await expect(element(by.id('toast'))).toBeNotVisible();
|
// await expect(element(by.id('toast'))).not.toBeVisible();
|
||||||
await sleep(300);
|
await sleep(300);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,9 +76,8 @@ describe('Profile screen', () => {
|
||||||
|
|
||||||
describe('Usage', async() => {
|
describe('Usage', async() => {
|
||||||
it('should change name and username', async() => {
|
it('should change name and username', async() => {
|
||||||
await element(by.type('UIScrollView')).atIndex(1).swipe('down');
|
|
||||||
await element(by.id('profile-view-name')).replaceText(`${ profileChangeUser.username }new`);
|
await element(by.id('profile-view-name')).replaceText(`${ profileChangeUser.username }new`);
|
||||||
await element(by.id('profile-view-username')).replaceText(`${ profileChangeUser.username }new`);
|
await element(by.id('profile-view-username')).typeText(`${ profileChangeUser.username }new`);
|
||||||
await element(by.type('UIScrollView')).atIndex(1).swipe('up');
|
await element(by.type('UIScrollView')).atIndex(1).swipe('up');
|
||||||
await element(by.id('profile-view-submit')).tap();
|
await element(by.id('profile-view-submit')).tap();
|
||||||
await waitForToast();
|
await waitForToast();
|
||||||
|
@ -88,9 +87,7 @@ describe('Profile screen', () => {
|
||||||
await element(by.id('profile-view-email')).replaceText(`mobile+profileChangesNew${ data.random }@rocket.chat`);
|
await element(by.id('profile-view-email')).replaceText(`mobile+profileChangesNew${ data.random }@rocket.chat`);
|
||||||
await element(by.id('profile-view-new-password')).replaceText(`${ profileChangeUser.password }new`);
|
await element(by.id('profile-view-new-password')).replaceText(`${ profileChangeUser.password }new`);
|
||||||
await element(by.id('profile-view-submit')).tap();
|
await element(by.id('profile-view-submit')).tap();
|
||||||
await element(by.type('_UIAlertControllerTextField')).replaceText(`${ profileChangeUser.password }`)
|
await element(by.type('_UIAlertControllerTextField')).typeText(`${ profileChangeUser.password }\n`)
|
||||||
// For some reason, replaceText does some type of submit, which submits the alert for us
|
|
||||||
// await element(by.label('Save').and(by.type('_UIAlertControllerActionView'))).tap();
|
|
||||||
await waitForToast();
|
await waitForToast();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -63,31 +63,12 @@ describe('Settings screen', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Usage', async() => {
|
describe('Usage', async() => {
|
||||||
it('should navigate to language view', async() => {
|
|
||||||
await element(by.id('settings-view-language')).tap();
|
|
||||||
await waitFor(element(by.id('language-view'))).toBeVisible().withTimeout(60000);
|
|
||||||
await expect(element(by.id('language-view-zh-CN'))).toExist();
|
|
||||||
await expect(element(by.id('language-view-de'))).toExist();
|
|
||||||
await expect(element(by.id('language-view-en'))).toExist();
|
|
||||||
await expect(element(by.id('language-view-fr'))).toExist();
|
|
||||||
await expect(element(by.id('language-view-pt-BR'))).toExist();
|
|
||||||
await expect(element(by.id('language-view-pt-PT'))).toExist();
|
|
||||||
await expect(element(by.id('language-view-ru'))).toExist();
|
|
||||||
await tapBack();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should tap clear cache and navigate to roomslistview', async() => {
|
it('should tap clear cache and navigate to roomslistview', async() => {
|
||||||
await waitFor(element(by.id('settings-view'))).toBeVisible().withTimeout(2000);
|
await waitFor(element(by.id('settings-view'))).toBeVisible().withTimeout(2000);
|
||||||
await element(by.id('settings-view-clear-cache')).tap();
|
await element(by.id('settings-view-clear-cache')).tap();
|
||||||
await waitFor(element(by.text('This will clear all your offline data.'))).toExist().withTimeout(2000);
|
await waitFor(element(by.text('This will clear all your offline data.'))).toExist().withTimeout(2000);
|
||||||
await element(by.label('Clear').and(by.type('_UIAlertControllerActionView'))).tap();
|
await element(by.label('Clear').and(by.type('_UIAlertControllerActionView'))).tap();
|
||||||
await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(5000);
|
await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(5000);
|
||||||
// Database was cleared, so the room shouldn't be there anymore while it's fetched again from the server
|
|
||||||
/**
|
|
||||||
* FIXME: rooms are fetched to quickly on docker and the test below fails
|
|
||||||
* We need to think on another way to test database being resetted
|
|
||||||
*/
|
|
||||||
// await waitFor(element(by.id(`rooms-list-view-item-${ data.groups.private.name }`))).toNotExist().withTimeout(10000);
|
|
||||||
await waitFor(element(by.id(`rooms-list-view-item-${ data.groups.private.name }`))).toExist().withTimeout(10000);
|
await waitFor(element(by.id(`rooms-list-view-item-${ data.groups.private.name }`))).toExist().withTimeout(10000);
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
|
@ -63,7 +63,7 @@ describe('Join public room', () => {
|
||||||
|
|
||||||
describe('Room Actions', async() => {
|
describe('Room Actions', async() => {
|
||||||
before(async() => {
|
before(async() => {
|
||||||
await navigateToRoomActions('c');
|
await navigateToRoomActions();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should have room actions screen', async() => {
|
it('should have room actions screen', async() => {
|
||||||
|
@ -103,7 +103,6 @@ describe('Join public room', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should have share', async() => {
|
it('should have share', async() => {
|
||||||
await element(by.type('UIScrollView')).atIndex(1).swipe('down');
|
|
||||||
await expect(element(by.id('room-actions-share'))).toBeVisible();
|
await expect(element(by.id('room-actions-share'))).toBeVisible();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -142,7 +141,7 @@ describe('Join public room', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should have disable notifications and leave channel', async() => {
|
it('should have disable notifications and leave channel', async() => {
|
||||||
await navigateToRoomActions('c');
|
await navigateToRoomActions();
|
||||||
await expect(element(by.id('room-actions-view'))).toBeVisible();
|
await expect(element(by.id('room-actions-view'))).toBeVisible();
|
||||||
await expect(element(by.id('room-actions-info'))).toBeVisible();
|
await expect(element(by.id('room-actions-info'))).toBeVisible();
|
||||||
// await expect(element(by.id('room-actions-voice'))).toBeVisible();
|
// await expect(element(by.id('room-actions-voice'))).toBeVisible();
|
||||||
|
@ -165,7 +164,6 @@ describe('Join public room', () => {
|
||||||
await expect(element(by.text('Yes, leave it!'))).toBeVisible();
|
await expect(element(by.text('Yes, leave it!'))).toBeVisible();
|
||||||
await element(by.text('Yes, leave it!')).tap();
|
await element(by.text('Yes, leave it!')).tap();
|
||||||
await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(10000);
|
await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(10000);
|
||||||
// await element(by.id('rooms-list-view-search')).typeText('');
|
|
||||||
await waitFor(element(by.id(`rooms-list-view-item-${ room }`))).toBeNotVisible().withTimeout(60000);
|
await waitFor(element(by.id(`rooms-list-view-item-${ room }`))).toBeNotVisible().withTimeout(60000);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -41,10 +41,10 @@ describe('Status screen', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should change status text', async () => {
|
it('should change status text', async () => {
|
||||||
await element(by.id('status-view-input')).replaceText('status-text-new');
|
await element(by.id('status-view-input')).typeText('status-text-new');
|
||||||
await element(by.id('status-view-submit')).tap();
|
await element(by.id('status-view-submit')).tap();
|
||||||
await waitForToast();
|
await waitForToast();
|
||||||
await waitFor(element(by.label('status-text-new').withAncestor(by.id('sidebar-custom-status')))).toBeVisible().withTimeout(2000);
|
await waitFor(element(by.label('status-text-new').withAncestor(by.id('sidebar-custom-status')))).toExist().withTimeout(2000);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
|
@ -24,9 +24,8 @@ describe('Change server', () => {
|
||||||
await element(by.id('rooms-list-header-server-add')).tap();
|
await element(by.id('rooms-list-header-server-add')).tap();
|
||||||
|
|
||||||
await waitFor(element(by.id('new-server-view'))).toBeVisible().withTimeout(6000);
|
await waitFor(element(by.id('new-server-view'))).toBeVisible().withTimeout(6000);
|
||||||
await element(by.id('new-server-view-input')).replaceText(data.alternateServer);
|
await element(by.id('new-server-view-input')).typeText(`${data.alternateServer}\n`);
|
||||||
await element(by.id('new-server-view-button')).tap();
|
await waitFor(element(by.id('workspace-view'))).toBeVisible().withTimeout(10000);
|
||||||
await waitFor(element(by.id('workspace-view'))).toBeVisible().withTimeout(6000);
|
|
||||||
await reopenAndCheckServer(data.server);
|
await reopenAndCheckServer(data.server);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -14,17 +14,12 @@ async function navigateToRoom() {
|
||||||
await waitFor(element(by.id('room-view'))).toBeVisible().withTimeout(5000);
|
await waitFor(element(by.id('room-view'))).toBeVisible().withTimeout(5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function navigateToRoomActions() {
|
|
||||||
await element(by.id('room-header')).tap();
|
|
||||||
await waitFor(element(by.id('room-actions-view'))).toBeVisible().withTimeout(5000);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function openJoinCode() {
|
async function openJoinCode() {
|
||||||
await element(by.id('room-view-join-button')).tap();
|
await element(by.id('room-view-join-button')).tap();
|
||||||
await waitFor(element(by.id('join-code'))).toBeVisible().withTimeout(5000);
|
await waitFor(element(by.id('join-code'))).toBeVisible().withTimeout(5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
describe('Join public room', () => {
|
describe('Join protected room', () => {
|
||||||
before(async() => {
|
before(async() => {
|
||||||
await device.launchApp({ permissions: { notifications: 'YES' }, delete: true });
|
await device.launchApp({ permissions: { notifications: 'YES' }, delete: true });
|
||||||
await navigateToLogin();
|
await navigateToLogin();
|
||||||
|
|
|
@ -22,8 +22,7 @@ describe('Delete server', () => {
|
||||||
await element(by.id('rooms-list-header-server-add')).tap();
|
await element(by.id('rooms-list-header-server-add')).tap();
|
||||||
|
|
||||||
await waitFor(element(by.id('new-server-view'))).toBeVisible().withTimeout(10000);
|
await waitFor(element(by.id('new-server-view'))).toBeVisible().withTimeout(10000);
|
||||||
await element(by.id('new-server-view-input')).replaceText(data.alternateServer);
|
await element(by.id('new-server-view-input')).typeText(`${data.alternateServer}\n`);
|
||||||
await element(by.id('new-server-view-button')).tap();
|
|
||||||
await waitFor(element(by.id('workspace-view'))).toBeVisible().withTimeout(10000);
|
await waitFor(element(by.id('workspace-view'))).toBeVisible().withTimeout(10000);
|
||||||
await element(by.id('workspace-view-register')).tap();
|
await element(by.id('workspace-view-register')).tap();
|
||||||
await waitFor(element(by.id('register-view'))).toBeVisible().withTimeout(2000);
|
await waitFor(element(by.id('register-view'))).toBeVisible().withTimeout(2000);
|
||||||
|
@ -32,7 +31,7 @@ describe('Delete server', () => {
|
||||||
await element(by.id('register-view-name')).replaceText(data.registeringUser3.username);
|
await element(by.id('register-view-name')).replaceText(data.registeringUser3.username);
|
||||||
await element(by.id('register-view-username')).replaceText(data.registeringUser3.username);
|
await element(by.id('register-view-username')).replaceText(data.registeringUser3.username);
|
||||||
await element(by.id('register-view-email')).replaceText(data.registeringUser3.email);
|
await element(by.id('register-view-email')).replaceText(data.registeringUser3.email);
|
||||||
await element(by.id('register-view-password')).replaceText(data.registeringUser3.password);
|
await element(by.id('register-view-password')).typeText(data.registeringUser3.password);
|
||||||
await element(by.id('register-view-submit')).tap();
|
await element(by.id('register-view-submit')).tap();
|
||||||
await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(60000);
|
await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(60000);
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@ const {
|
||||||
device, element, by, waitFor
|
device, element, by, waitFor
|
||||||
} = require('detox');
|
} = require('detox');
|
||||||
const data = require('../../data');
|
const data = require('../../data');
|
||||||
const { tapBack, checkServer, navigateToRegister, login } = require('../../helpers/app');
|
const { tapBack, checkServer, navigateToRegister } = require('../../helpers/app');
|
||||||
const { post, get } = require('../../helpers/data_setup');
|
const { post, get, login } = require('../../helpers/data_setup');
|
||||||
|
|
||||||
const DEEPLINK_METHODS = { AUTH: 'auth', ROOM: 'room' };
|
const DEEPLINK_METHODS = { AUTH: 'auth', ROOM: 'room' };
|
||||||
const getDeepLink = (method, server, params) => {
|
const getDeepLink = (method, server, params) => {
|
||||||
|
@ -14,35 +14,31 @@ const getDeepLink = (method, server, params) => {
|
||||||
|
|
||||||
describe('Deep linking', () => {
|
describe('Deep linking', () => {
|
||||||
let userId;
|
let userId;
|
||||||
let token;
|
let authToken;
|
||||||
before(async() => {
|
before(async() => {
|
||||||
const loginResult = await post('login', {
|
const loginResult = await login(data.users.regular.username, data.users.regular.password);
|
||||||
user: data.users.regular.username,
|
({ userId, authToken } = loginResult);
|
||||||
password: data.users.regular.password
|
|
||||||
})
|
|
||||||
userId = loginResult.data.data.userId
|
|
||||||
token = loginResult.data.data.authToken
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Authentication', () => {
|
describe('Authentication', () => {
|
||||||
it('should run a deep link to an invalid account and raise error', async() => {
|
it('should run a deep link to an invalid account and raise error', async() => {
|
||||||
await device.launchApp({
|
await device.launchApp({
|
||||||
permissions: { notifications: 'YES' },
|
permissions: { notifications: 'YES' },
|
||||||
newInstance: true,
|
delete: true,
|
||||||
url: getDeepLink(DEEPLINK_METHODS.AUTH, data.server, 'userId=123&token=abc'),
|
url: getDeepLink(DEEPLINK_METHODS.AUTH, data.server, 'userId=123&token=abc'),
|
||||||
sourceApp: 'com.apple.mobilesafari'
|
sourceApp: 'com.apple.mobilesafari'
|
||||||
});
|
});
|
||||||
await waitFor(element(by.text('You\'ve been logged out by the server. Please log in again.'))).toExist().withTimeout(5000); // TODO: we need to improve this message
|
await waitFor(element(by.text('You\'ve been logged out by the server. Please log in again.'))).toExist().withTimeout(10000); // TODO: we need to improve this message
|
||||||
});
|
});
|
||||||
|
|
||||||
const authAndNavigate = async() => {
|
const authAndNavigate = async() => {
|
||||||
await device.launchApp({
|
await device.launchApp({
|
||||||
permissions: { notifications: 'YES' },
|
permissions: { notifications: 'YES' },
|
||||||
newInstance: true,
|
newInstance: true,
|
||||||
url: getDeepLink(DEEPLINK_METHODS.AUTH, data.server, `userId=${ userId }&token=${ token }&path=group/${ data.groups.private.name }`),
|
url: getDeepLink(DEEPLINK_METHODS.AUTH, data.server, `userId=${ userId }&token=${ authToken }&path=group/${ data.groups.private.name }`),
|
||||||
sourceApp: 'com.apple.mobilesafari'
|
sourceApp: 'com.apple.mobilesafari'
|
||||||
});
|
});
|
||||||
await waitFor(element(by.id(`room-view-title-${ data.groups.private.name }`))).toExist().withTimeout(10000);
|
await waitFor(element(by.id(`room-view-title-${ data.groups.private.name }`))).toExist().withTimeout(30000);
|
||||||
await tapBack();
|
await tapBack();
|
||||||
await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(10000);
|
await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(10000);
|
||||||
await checkServer(data.server);
|
await checkServer(data.server);
|
||||||
|
@ -56,10 +52,10 @@ describe('Deep linking', () => {
|
||||||
it('should authenticate while logged in another server', async() => {
|
it('should authenticate while logged in another server', async() => {
|
||||||
await device.launchApp({ permissions: { notifications: 'YES' }, delete: true });
|
await device.launchApp({ permissions: { notifications: 'YES' }, delete: true });
|
||||||
await navigateToRegister(data.alternateServer);
|
await navigateToRegister(data.alternateServer);
|
||||||
await element(by.id('register-view-name')).replaceText(data.registeringUser.username);
|
await element(by.id('register-view-name')).replaceText(data.registeringUser4.username);
|
||||||
await element(by.id('register-view-username')).replaceText(data.registeringUser.username);
|
await element(by.id('register-view-username')).replaceText(data.registeringUser4.username);
|
||||||
await element(by.id('register-view-email')).replaceText(data.registeringUser.email);
|
await element(by.id('register-view-email')).replaceText(data.registeringUser4.email);
|
||||||
await element(by.id('register-view-password')).replaceText(data.registeringUser.password);
|
await element(by.id('register-view-password')).typeText(data.registeringUser4.password);
|
||||||
await element(by.id('register-view-submit')).tap();
|
await element(by.id('register-view-submit')).tap();
|
||||||
await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(10000);
|
await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(10000);
|
||||||
await authAndNavigate();
|
await authAndNavigate();
|
||||||
|
@ -86,7 +82,7 @@ describe('Deep linking', () => {
|
||||||
url: getDeepLink(DEEPLINK_METHODS.ROOM, data.server, `rid=${ roomResult.data.group._id }`),
|
url: getDeepLink(DEEPLINK_METHODS.ROOM, data.server, `rid=${ roomResult.data.group._id }`),
|
||||||
sourceApp: 'com.apple.mobilesafari'
|
sourceApp: 'com.apple.mobilesafari'
|
||||||
});
|
});
|
||||||
await waitFor(element(by.id(`room-view-title-${ data.groups.private.name }`))).toExist().withTimeout(10000);
|
await waitFor(element(by.id(`room-view-title-${ data.groups.private.name }`))).toExist().withTimeout(15000);
|
||||||
await tapBack();
|
await tapBack();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -0,0 +1,114 @@
|
||||||
|
const {
|
||||||
|
device, element, by, waitFor
|
||||||
|
} = require('detox');
|
||||||
|
const { navigateToLogin, login, sleep } = require('../../helpers/app');
|
||||||
|
const { post } = require('../../helpers/data_setup');
|
||||||
|
|
||||||
|
const data = require('../../data');
|
||||||
|
const testuser = data.users.regular
|
||||||
|
const defaultLaunchArgs = { permissions: { notifications: 'YES' } };
|
||||||
|
|
||||||
|
const navToLanguage = async() => {
|
||||||
|
await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(10000);
|
||||||
|
await element(by.id('rooms-list-view-sidebar')).tap();
|
||||||
|
await waitFor(element(by.id('sidebar-view'))).toBeVisible().withTimeout(2000);
|
||||||
|
await waitFor(element(by.id('sidebar-settings'))).toBeVisible().withTimeout(2000);
|
||||||
|
await element(by.id('sidebar-settings')).tap();
|
||||||
|
await waitFor(element(by.id('settings-view'))).toBeVisible().withTimeout(2000);
|
||||||
|
await element(by.id('settings-view-language')).tap();
|
||||||
|
await waitFor(element(by.id('language-view'))).toBeVisible().withTimeout(10000);
|
||||||
|
};
|
||||||
|
|
||||||
|
describe('i18n', () => {
|
||||||
|
describe('OS language', () => {
|
||||||
|
it('OS set to \'en\' and proper translate to \'en\'', async() => {
|
||||||
|
await device.launchApp({
|
||||||
|
...defaultLaunchArgs,
|
||||||
|
languageAndLocale: {
|
||||||
|
language: "en",
|
||||||
|
locale: "en"
|
||||||
|
},
|
||||||
|
delete: true
|
||||||
|
});
|
||||||
|
await waitFor(element(by.id('onboarding-view'))).toBeVisible().withTimeout(20000);
|
||||||
|
await expect(element(by.id('join-workspace').and(by.label('Join a workspace')))).toBeVisible();
|
||||||
|
await expect(element(by.id('create-workspace-button').and(by.label('Create a new workspace')))).toBeVisible();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('OS set to unavailable language and fallback to \'en\'', async() => {
|
||||||
|
await device.launchApp({
|
||||||
|
...defaultLaunchArgs,
|
||||||
|
languageAndLocale: {
|
||||||
|
language: "es-MX",
|
||||||
|
locale: "es-MX"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
await waitFor(element(by.id('onboarding-view'))).toBeVisible().withTimeout(20000);
|
||||||
|
await expect(element(by.id('join-workspace').and(by.label('Join a workspace')))).toBeVisible();
|
||||||
|
await expect(element(by.id('create-workspace-button').and(by.label('Create a new workspace')))).toBeVisible();
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This test might become outdated as soon as we support the language
|
||||||
|
* Although this seems to be a bad approach, that's the intention for having fallback enabled
|
||||||
|
*/
|
||||||
|
it('OS set to available language and fallback to \'en\' on strings missing translation', async() => {
|
||||||
|
await device.launchApp({
|
||||||
|
...defaultLaunchArgs,
|
||||||
|
languageAndLocale: {
|
||||||
|
language: "nl",
|
||||||
|
locale: "nl"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
await waitFor(element(by.id('onboarding-view'))).toBeVisible().withTimeout(20000);
|
||||||
|
await expect(element(by.id('join-workspace').and(by.label('Join a workspace')))).toBeVisible(); // Missing nl translation
|
||||||
|
await expect(element(by.id('create-workspace-button').and(by.label('Een nieuwe workspace maken')))).toBeVisible();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Rocket.Chat language', () => {
|
||||||
|
before(async() => {
|
||||||
|
await device.launchApp(defaultLaunchArgs);
|
||||||
|
await navigateToLogin();
|
||||||
|
await login(testuser.username, testuser.password);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should select \'en\'', async() => {
|
||||||
|
await navToLanguage();
|
||||||
|
await element(by.id('language-view-en')).tap();
|
||||||
|
await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(10000);
|
||||||
|
await element(by.id('rooms-list-view-sidebar')).tap();
|
||||||
|
await waitFor(element(by.id('sidebar-view'))).toBeVisible().withTimeout(2000);
|
||||||
|
await expect(element(by.id('sidebar-chats').withDescendant(by.label('Chats')))).toBeVisible();
|
||||||
|
await expect(element(by.id('sidebar-profile').withDescendant(by.label('Profile')))).toBeVisible();
|
||||||
|
await expect(element(by.id('sidebar-settings').withDescendant(by.label('Settings')))).toBeVisible();
|
||||||
|
await element(by.id('sidebar-close-drawer')).tap();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should select \'nl\' and fallback to \'en\'', async() => {
|
||||||
|
await navToLanguage();
|
||||||
|
await element(by.id('language-view-nl')).tap();
|
||||||
|
await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(10000);
|
||||||
|
await element(by.id('rooms-list-view-sidebar')).tap();
|
||||||
|
await waitFor(element(by.id('sidebar-view'))).toBeVisible().withTimeout(2000);
|
||||||
|
await expect(element(by.id('sidebar-chats').withDescendant(by.label('Chats')))).toBeVisible(); // fallback to en
|
||||||
|
await expect(element(by.id('sidebar-profile').withDescendant(by.label('Profiel')))).toBeVisible();
|
||||||
|
await expect(element(by.id('sidebar-settings').withDescendant(by.label('Instellingen')))).toBeVisible();
|
||||||
|
await element(by.id('sidebar-close-drawer')).tap();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should set unsupported language and fallback to \'en\'', async() => {
|
||||||
|
await post('users.setPreferences', { data: { language: 'eo' } }); // Set language to Esperanto
|
||||||
|
await device.launchApp(defaultLaunchArgs);
|
||||||
|
await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(10000);
|
||||||
|
await element(by.id('rooms-list-view-sidebar')).tap();
|
||||||
|
await waitFor(element(by.id('sidebar-view'))).toBeVisible().withTimeout(2000);
|
||||||
|
// give the app some time to apply new language
|
||||||
|
await sleep(3000);
|
||||||
|
await expect(element(by.id('sidebar-chats').withDescendant(by.label('Chats')))).toBeVisible();
|
||||||
|
await expect(element(by.id('sidebar-profile').withDescendant(by.label('Profile')))).toBeVisible();
|
||||||
|
await expect(element(by.id('sidebar-settings').withDescendant(by.label('Settings')))).toBeVisible();
|
||||||
|
await post('users.setPreferences', { data: { language: 'en' } }); // Set back to english
|
||||||
|
});
|
||||||
|
})
|
||||||
|
});
|
|
@ -34,8 +34,7 @@ describe('Onboarding', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should enter an invalid server and get error', async() => {
|
it('should enter an invalid server and get error', async() => {
|
||||||
await element(by.id('new-server-view-input')).replaceText('invalidtest');
|
await element(by.id('new-server-view-input')).typeText('invalidtest\n');
|
||||||
await element(by.id('new-server-view-button')).tap();
|
|
||||||
const errorText = 'Oops!';
|
const errorText = 'Oops!';
|
||||||
await waitFor(element(by.text(errorText))).toBeVisible().withTimeout(60000);
|
await waitFor(element(by.text(errorText))).toBeVisible().withTimeout(60000);
|
||||||
await element(by.text('OK')).tap();
|
await element(by.text('OK')).tap();
|
||||||
|
@ -51,8 +50,7 @@ describe('Onboarding', () => {
|
||||||
await waitFor(element(by.id('onboarding-view'))).toBeVisible().withTimeout(2000);
|
await waitFor(element(by.id('onboarding-view'))).toBeVisible().withTimeout(2000);
|
||||||
await element(by.id('join-workspace')).tap();
|
await element(by.id('join-workspace')).tap();
|
||||||
await waitFor(element(by.id('new-server-view'))).toBeVisible().withTimeout(60000);
|
await waitFor(element(by.id('new-server-view'))).toBeVisible().withTimeout(60000);
|
||||||
await element(by.id('new-server-view-input')).replaceText(data.server);
|
await element(by.id('new-server-view-input')).typeText(`${data.server}\n`);
|
||||||
await element(by.id('new-server-view-button')).tap();
|
|
||||||
await waitFor(element(by.id('workspace-view'))).toBeVisible().withTimeout(60000);
|
await waitFor(element(by.id('workspace-view'))).toBeVisible().withTimeout(60000);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -30,6 +30,7 @@ describe('Forgot password screen', () => {
|
||||||
it('should reset password and navigate to login', async() => {
|
it('should reset password and navigate to login', async() => {
|
||||||
await element(by.id('forgot-password-view-email')).replaceText(data.users.existing.email);
|
await element(by.id('forgot-password-view-email')).replaceText(data.users.existing.email);
|
||||||
await element(by.id('forgot-password-view-submit')).tap();
|
await element(by.id('forgot-password-view-submit')).tap();
|
||||||
|
await waitFor(element(by.text('OK'))).toExist().withTimeout(10000);
|
||||||
await element(by.text('OK')).tap();
|
await element(by.text('OK')).tap();
|
||||||
await waitFor(element(by.id('login-view'))).toBeVisible().withTimeout(60000);
|
await waitFor(element(by.id('login-view'))).toBeVisible().withTimeout(60000);
|
||||||
});
|
});
|
||||||
|
|
|
@ -25,7 +25,7 @@ describe('Server history', () => {
|
||||||
|
|
||||||
it('should tap on a server history and navigate to login', async() => {
|
it('should tap on a server history and navigate to login', async() => {
|
||||||
await element(by.id(`server-history-${ data.server }`)).tap();
|
await element(by.id(`server-history-${ data.server }`)).tap();
|
||||||
await waitFor(element(by.id('login-view'))).toBeVisible().withTimeout(2000);
|
await waitFor(element(by.id('login-view'))).toBeVisible().withTimeout(5000);
|
||||||
await expect(element(by.id('login-view-email'))).toHaveText(data.users.regular.username);
|
await expect(element(by.id('login-view-email'))).toHaveText(data.users.regular.username);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ describe('Create room screen', () => {
|
||||||
|
|
||||||
describe('Usage', async() => {
|
describe('Usage', async() => {
|
||||||
it('should get invalid room', async() => {
|
it('should get invalid room', async() => {
|
||||||
await element(by.id('create-channel-name')).replaceText('general');
|
await element(by.id('create-channel-name')).typeText('general');
|
||||||
await element(by.id('create-channel-submit')).tap();
|
await element(by.id('create-channel-submit')).tap();
|
||||||
await waitFor(element(by.text(`A channel with name 'general' exists`))).toExist().withTimeout(60000);
|
await waitFor(element(by.text(`A channel with name 'general' exists`))).toExist().withTimeout(60000);
|
||||||
await expect(element(by.text(`A channel with name 'general' exists`))).toExist();
|
await expect(element(by.text(`A channel with name 'general' exists`))).toExist();
|
||||||
|
@ -103,16 +103,17 @@ describe('Create room screen', () => {
|
||||||
|
|
||||||
it('should create public room', async() => {
|
it('should create public room', async() => {
|
||||||
const room = `public${ data.random }`;
|
const room = `public${ data.random }`;
|
||||||
await element(by.id('create-channel-name')).replaceText(room);
|
await element(by.id('create-channel-name')).replaceText('');
|
||||||
|
await element(by.id('create-channel-name')).typeText(room);
|
||||||
await element(by.id('create-channel-type')).tap();
|
await element(by.id('create-channel-type')).tap();
|
||||||
await element(by.id('create-channel-submit')).tap();
|
await element(by.id('create-channel-submit')).tap();
|
||||||
await waitFor(element(by.id('room-view'))).toExist().withTimeout(60000);
|
await waitFor(element(by.id('room-view'))).toExist().withTimeout(6000);
|
||||||
await expect(element(by.id('room-view'))).toExist();
|
await expect(element(by.id('room-view'))).toExist();
|
||||||
await waitFor(element(by.id(`room-view-title-${ room }`))).toExist().withTimeout(60000);
|
await waitFor(element(by.id(`room-view-title-${ room }`))).toExist().withTimeout(6000);
|
||||||
await expect(element(by.id(`room-view-title-${ room }`))).toExist();
|
await expect(element(by.id(`room-view-title-${ room }`))).toExist();
|
||||||
await tapBack();
|
await tapBack();
|
||||||
await waitFor(element(by.id('rooms-list-view'))).toExist().withTimeout(10000);
|
await waitFor(element(by.id('rooms-list-view'))).toExist().withTimeout(10000);
|
||||||
await waitFor(element(by.id(`rooms-list-view-item-${ room }`))).toExist().withTimeout(60000);
|
await waitFor(element(by.id(`rooms-list-view-item-${ room }`))).toExist().withTimeout(6000);
|
||||||
await expect(element(by.id(`rooms-list-view-item-${ room }`))).toExist();
|
await expect(element(by.id(`rooms-list-view-item-${ room }`))).toExist();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -127,7 +128,7 @@ describe('Create room screen', () => {
|
||||||
await waitFor(element(by.id('selected-user-rocket.cat'))).toExist().withTimeout(5000);
|
await waitFor(element(by.id('selected-user-rocket.cat'))).toExist().withTimeout(5000);
|
||||||
await element(by.id('selected-users-view-submit')).tap();
|
await element(by.id('selected-users-view-submit')).tap();
|
||||||
await waitFor(element(by.id('create-channel-view'))).toExist().withTimeout(5000);
|
await waitFor(element(by.id('create-channel-view'))).toExist().withTimeout(5000);
|
||||||
await element(by.id('create-channel-name')).replaceText(room);
|
await element(by.id('create-channel-name')).typeText(room);
|
||||||
await element(by.id('create-channel-submit')).tap();
|
await element(by.id('create-channel-submit')).tap();
|
||||||
await waitFor(element(by.id('room-view'))).toExist().withTimeout(60000);
|
await waitFor(element(by.id('room-view'))).toExist().withTimeout(60000);
|
||||||
await expect(element(by.id('room-view'))).toExist();
|
await expect(element(by.id('room-view'))).toExist();
|
||||||
|
@ -149,7 +150,7 @@ describe('Create room screen', () => {
|
||||||
await waitFor(element(by.id('select-users-view'))).toExist().withTimeout(5000);
|
await waitFor(element(by.id('select-users-view'))).toExist().withTimeout(5000);
|
||||||
await element(by.id('selected-users-view-submit')).tap();
|
await element(by.id('selected-users-view-submit')).tap();
|
||||||
await waitFor(element(by.id('create-channel-view'))).toExist().withTimeout(10000);
|
await waitFor(element(by.id('create-channel-view'))).toExist().withTimeout(10000);
|
||||||
await element(by.id('create-channel-name')).replaceText(room);
|
await element(by.id('create-channel-name')).typeText(room);
|
||||||
await element(by.id('create-channel-submit')).tap();
|
await element(by.id('create-channel-submit')).tap();
|
||||||
await waitFor(element(by.id('room-view'))).toExist().withTimeout(60000);
|
await waitFor(element(by.id('room-view'))).toExist().withTimeout(60000);
|
||||||
await expect(element(by.id('room-view'))).toExist();
|
await expect(element(by.id('room-view'))).toExist();
|
||||||
|
|
|
@ -125,7 +125,6 @@ describe('Room screen', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not show user autocomplete on @ in the middle of a string', async() => {
|
it('should not show user autocomplete on @ in the middle of a string', async() => {
|
||||||
const username = data.users.regular.username
|
|
||||||
await element(by.id('messagebox-input')).tap();
|
await element(by.id('messagebox-input')).tap();
|
||||||
await element(by.id('messagebox-input')).typeText(`email@gmail`);
|
await element(by.id('messagebox-input')).typeText(`email@gmail`);
|
||||||
await waitFor(element(by.id('messagebox-container'))).toNotExist().withTimeout(4000);
|
await waitFor(element(by.id('messagebox-container'))).toNotExist().withTimeout(4000);
|
||||||
|
@ -149,8 +148,8 @@ describe('Room screen', () => {
|
||||||
await element(by.id('messagebox-input')).clearText();
|
await element(by.id('messagebox-input')).clearText();
|
||||||
});
|
});
|
||||||
it('should draft message', async () => {
|
it('should draft message', async () => {
|
||||||
await element(by.id('messagebox-input')).atIndex(0).tap();
|
await element(by.id('messagebox-input')).tap();
|
||||||
await element(by.id('messagebox-input')).atIndex(0).typeText(`${ data.random }draft`);
|
await element(by.id('messagebox-input')).typeText(`${ data.random }draft`);
|
||||||
await tapBack();
|
await tapBack();
|
||||||
|
|
||||||
await navigateToRoom(mainRoom);
|
await navigateToRoom(mainRoom);
|
||||||
|
@ -191,9 +190,9 @@ describe('Room screen', () => {
|
||||||
await element(by.label(`${ data.random }message`)).atIndex(0).longPress();
|
await element(by.label(`${ data.random }message`)).atIndex(0).longPress();
|
||||||
await expect(element(by.id('action-sheet'))).toExist();
|
await expect(element(by.id('action-sheet'))).toExist();
|
||||||
await expect(element(by.id('action-sheet-handle'))).toBeVisible();
|
await expect(element(by.id('action-sheet-handle'))).toBeVisible();
|
||||||
await element(by.id('action-sheet-handle')).swipe('up', 'fast', 0.5);
|
await element(by.id('action-sheet-handle')).swipe('up', 'slow', 0.5);
|
||||||
await waitFor(element(by.label('Unstar'))).toBeVisible().withTimeout(2000);
|
await waitFor(element(by.label('Unstar'))).toBeVisible().withTimeout(6000);
|
||||||
await element(by.id('action-sheet-backdrop')).tap();
|
await element(by.id('action-sheet-handle')).swipe('down', 'fast', 0.8);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should react to message', async() => {
|
it('should react to message', async() => {
|
||||||
|
@ -267,14 +266,14 @@ describe('Room screen', () => {
|
||||||
await mockMessage('pin')
|
await mockMessage('pin')
|
||||||
await pinMessage('pin')
|
await pinMessage('pin')
|
||||||
|
|
||||||
await waitFor(element(by.label(`${ data.random }pin`)).atIndex(0)).toBeVisible().withTimeout(2000);
|
await waitFor(element(by.label(`${ data.random }pin`)).atIndex(0)).toExist().withTimeout(5000);
|
||||||
await waitFor(element(by.label(`${ data.users.regular.username } Message pinned`)).atIndex(0)).toBeVisible().withTimeout(2000);
|
await waitFor(element(by.label(`${ data.users.regular.username } Message pinned`)).atIndex(0)).toExist().withTimeout(5000);
|
||||||
await element(by.label(`${ data.random }pin`)).atIndex(0).longPress();
|
await element(by.label(`${ data.random }pin`)).atIndex(0).longPress();
|
||||||
await waitFor(element(by.id('action-sheet'))).toExist().withTimeout(1000);
|
await waitFor(element(by.id('action-sheet'))).toExist().withTimeout(1000);
|
||||||
await expect(element(by.id('action-sheet-handle'))).toBeVisible();
|
await expect(element(by.id('action-sheet-handle'))).toBeVisible();
|
||||||
await element(by.id('action-sheet-handle')).swipe('up', 'fast', 0.5);
|
await element(by.id('action-sheet-handle')).swipe('up', 'fast', 0.5);
|
||||||
await waitFor(element(by.label('Unpin'))).toBeVisible().withTimeout(2000);
|
await waitFor(element(by.label('Unpin'))).toBeVisible().withTimeout(2000);
|
||||||
await element(by.id('action-sheet-backdrop')).tap();
|
await element(by.id('action-sheet-handle')).swipe('down', 'fast', 0.8);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should delete message', async() => {
|
it('should delete message', async() => {
|
||||||
|
@ -285,6 +284,7 @@ describe('Room screen', () => {
|
||||||
await expect(element(by.id('action-sheet'))).toExist();
|
await expect(element(by.id('action-sheet'))).toExist();
|
||||||
await expect(element(by.id('action-sheet-handle'))).toBeVisible();
|
await expect(element(by.id('action-sheet-handle'))).toBeVisible();
|
||||||
await element(by.id('action-sheet-handle')).swipe('up', 'fast', 0.5);
|
await element(by.id('action-sheet-handle')).swipe('up', 'fast', 0.5);
|
||||||
|
await waitFor(element(by.label('Delete'))).toExist().withTimeout(1000);
|
||||||
await element(by.label('Delete')).tap();
|
await element(by.label('Delete')).tap();
|
||||||
|
|
||||||
const deleteAlertMessage = 'You will not be able to recover this message!';
|
const deleteAlertMessage = 'You will not be able to recover this message!';
|
||||||
|
@ -294,12 +294,5 @@ describe('Room screen', () => {
|
||||||
await waitFor(element(by.label(`${ data.random }delete`)).atIndex(0)).toNotExist().withTimeout(2000);
|
await waitFor(element(by.label(`${ data.random }delete`)).atIndex(0)).toNotExist().withTimeout(2000);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// after(async() => {
|
|
||||||
// await waitFor(element(by.id('room-view'))).toBeVisible().withTimeout(5000);
|
|
||||||
// await tapBack();
|
|
||||||
// await waitFor(element(by.id('rooms-list-view'))).toExist().withTimeout(2000);
|
|
||||||
// await expect(element(by.id('rooms-list-view'))).toExist();
|
|
||||||
// });
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -223,10 +223,10 @@ describe('Room actions screen', () => {
|
||||||
//Go to starred messages
|
//Go to starred messages
|
||||||
await element(by.id('room-actions-starred')).tap();
|
await element(by.id('room-actions-starred')).tap();
|
||||||
await waitFor(element(by.id('starred-messages-view'))).toExist().withTimeout(2000);
|
await waitFor(element(by.id('starred-messages-view'))).toExist().withTimeout(2000);
|
||||||
await waitFor(element(by.label(`${ data.random }messageToStar`).withAncestor(by.id('starred-messages-view')))).toBeVisible().withTimeout(60000);
|
await waitFor(element(by.label(`${ data.random }messageToStar`).withAncestor(by.id('starred-messages-view')))).toExist().withTimeout(60000);
|
||||||
|
|
||||||
//Unstar message
|
//Unstar message
|
||||||
await element(by.label(`${ data.random }messageToStar`).withAncestor(by.id('starred-messages-view'))).longPress();
|
await element(by.label(`${ data.random }messageToStar`)).atIndex(0).longPress();
|
||||||
await expect(element(by.id('action-sheet'))).toExist();
|
await expect(element(by.id('action-sheet'))).toExist();
|
||||||
await expect(element(by.id('action-sheet-handle'))).toBeVisible();
|
await expect(element(by.id('action-sheet-handle'))).toBeVisible();
|
||||||
await element(by.label('Unstar')).tap();
|
await element(by.label('Unstar')).tap();
|
||||||
|
@ -247,18 +247,18 @@ describe('Room actions screen', () => {
|
||||||
//Back into Room Actions
|
//Back into Room Actions
|
||||||
await element(by.id('room-header')).tap();
|
await element(by.id('room-header')).tap();
|
||||||
await waitFor(element(by.id('room-actions-view'))).toExist().withTimeout(5000);
|
await waitFor(element(by.id('room-actions-view'))).toExist().withTimeout(5000);
|
||||||
await element(by.type('UIScrollView')).atIndex(1).scrollTo('bottom');
|
await element(by.id('room-actions-scrollview')).scrollTo('bottom');
|
||||||
await waitFor(element(by.id('room-actions-pinned'))).toExist();
|
await waitFor(element(by.id('room-actions-pinned'))).toExist();
|
||||||
await element(by.id('room-actions-pinned')).tap();
|
await element(by.id('room-actions-pinned')).tap();
|
||||||
await waitFor(element(by.id('pinned-messages-view'))).toExist().withTimeout(2000);
|
await waitFor(element(by.id('pinned-messages-view'))).toExist().withTimeout(2000);
|
||||||
await waitFor(element(by.label(`${ data.random }messageToPin`).withAncestor(by.id('pinned-messages-view')))).toBeVisible().withTimeout(60000);
|
await waitFor(element(by.label(`${ data.random }messageToPin`).withAncestor(by.id('pinned-messages-view')))).toExist().withTimeout(6000);
|
||||||
await element(by.label(`${ data.random }messageToPin`).withAncestor(by.id('pinned-messages-view'))).longPress();
|
await element(by.label(`${ data.random }messageToPin`).withAncestor(by.id('pinned-messages-view'))).atIndex(0).longPress();
|
||||||
|
|
||||||
await expect(element(by.id('action-sheet'))).toExist();
|
await expect(element(by.id('action-sheet'))).toExist();
|
||||||
await expect(element(by.id('action-sheet-handle'))).toBeVisible();
|
await expect(element(by.id('action-sheet-handle'))).toBeVisible();
|
||||||
await element(by.label('Unpin')).tap();
|
await element(by.label('Unpin')).tap();
|
||||||
|
|
||||||
await waitFor(element(by.label(`${ data.random }messageToPin`).withAncestor(by.id('pinned-messages-view')))).toBeNotVisible().withTimeout(60000);
|
await waitFor(element(by.label(`${ data.random }messageToPin`).withAncestor(by.id('pinned-messages-view')))).not.toExist().withTimeout(6000);
|
||||||
await backToActions();
|
await backToActions();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -283,7 +283,7 @@ describe('Room actions screen', () => {
|
||||||
|
|
||||||
describe('Notification', async() => {
|
describe('Notification', async() => {
|
||||||
it('should navigate to notification preference view', async() => {
|
it('should navigate to notification preference view', async() => {
|
||||||
await element(by.type('UIScrollView')).atIndex(1).scrollTo('bottom');
|
await element(by.id('room-actions-scrollview')).scrollTo('bottom');
|
||||||
await waitFor(element(by.id('room-actions-notifications'))).toExist().withTimeout(2000);
|
await waitFor(element(by.id('room-actions-notifications'))).toExist().withTimeout(2000);
|
||||||
await element(by.id('room-actions-notifications')).tap();
|
await element(by.id('room-actions-notifications')).tap();
|
||||||
await waitFor(element(by.id('notification-preference-view'))).toExist().withTimeout(2000);
|
await waitFor(element(by.id('notification-preference-view'))).toExist().withTimeout(2000);
|
||||||
|
@ -311,7 +311,7 @@ describe('Room actions screen', () => {
|
||||||
|
|
||||||
it('should have notification sound option', async() => {
|
it('should have notification sound option', async() => {
|
||||||
// Ugly hack to scroll on detox
|
// Ugly hack to scroll on detox
|
||||||
await element(by.type('UIScrollView')).atIndex(1).scrollTo('bottom');
|
await element(by.id('room-actions-scrollview')).scrollTo('bottom');
|
||||||
await waitFor(element(by.id('notification-preference-view-sound'))).toExist().withTimeout(4000);
|
await waitFor(element(by.id('notification-preference-view-sound'))).toExist().withTimeout(4000);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -335,7 +335,7 @@ describe('Room actions screen', () => {
|
||||||
const user = data.users.alternate
|
const user = data.users.alternate
|
||||||
|
|
||||||
it('should tap on leave channel and raise alert', async() => {
|
it('should tap on leave channel and raise alert', async() => {
|
||||||
await element(by.type('UIScrollView')).atIndex(1).scrollTo('bottom');
|
await element(by.id('room-actions-scrollview')).scrollTo('bottom');
|
||||||
await waitFor(element(by.id('room-actions-leave-channel'))).toExist().withTimeout(2000);
|
await waitFor(element(by.id('room-actions-leave-channel'))).toExist().withTimeout(2000);
|
||||||
await element(by.id('room-actions-leave-channel')).tap();
|
await element(by.id('room-actions-leave-channel')).tap();
|
||||||
await waitFor(element(by.text('Yes, leave it!'))).toExist().withTimeout(2000);
|
await waitFor(element(by.text('Yes, leave it!'))).toExist().withTimeout(2000);
|
||||||
|
@ -368,7 +368,7 @@ describe('Room actions screen', () => {
|
||||||
await element(by.id('room-actions-members')).tap();
|
await element(by.id('room-actions-members')).tap();
|
||||||
await element(by.id('room-members-view-toggle-status')).tap();
|
await element(by.id('room-members-view-toggle-status')).tap();
|
||||||
await waitFor(element(by.id(`room-members-view-item-${ user.username }`))).toExist().withTimeout(60000);
|
await waitFor(element(by.id(`room-members-view-item-${ user.username }`))).toExist().withTimeout(60000);
|
||||||
await backToActions(1);
|
await backToActions();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Room Members', async() => {
|
describe('Room Members', async() => {
|
||||||
|
@ -414,7 +414,7 @@ describe('Room actions screen', () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const closeActionSheet = async() => {
|
const closeActionSheet = async() => {
|
||||||
await element(by.id('action-sheet-backdrop')).tap();
|
await element(by.id('action-sheet-handle')).swipe('down', 'fast', 0.6);
|
||||||
}
|
}
|
||||||
|
|
||||||
it('should set/remove as owner', async() => {
|
it('should set/remove as owner', async() => {
|
||||||
|
@ -483,7 +483,7 @@ describe('Room actions screen', () => {
|
||||||
|
|
||||||
it('should ignore user', async() => {
|
it('should ignore user', async() => {
|
||||||
const message = `${ data.random }ignoredmessagecontent`;
|
const message = `${ data.random }ignoredmessagecontent`;
|
||||||
const channelName = data.groups.private.name;
|
const channelName = `#${ data.groups.private.name }`;
|
||||||
await sendMessage(user, channelName, message);
|
await sendMessage(user, channelName, message);
|
||||||
await openActionSheet(user.username);
|
await openActionSheet(user.username);
|
||||||
await element(by.label('Ignore')).tap();
|
await element(by.label('Ignore')).tap();
|
||||||
|
|
|
@ -81,7 +81,7 @@ describe('Threads', () => {
|
||||||
|
|
||||||
it('should navigate to thread from button', async() => {
|
it('should navigate to thread from button', async() => {
|
||||||
await element(by.id(`message-thread-button-${ thread }`)).tap();
|
await element(by.id(`message-thread-button-${ thread }`)).tap();
|
||||||
await waitFor(element(by.id('room-view'))).toBeVisible().withTimeout(5000);
|
await waitFor(element(by.id('room-view'))).toExist().withTimeout(5000);
|
||||||
await waitFor(element(by.id(`room-view-title-${ thread }`))).toExist().withTimeout(5000);
|
await waitFor(element(by.id(`room-view-title-${ thread }`))).toExist().withTimeout(5000);
|
||||||
await expect(element(by.id(`room-view-title-${ thread }`))).toExist();
|
await expect(element(by.id(`room-view-title-${ thread }`))).toExist();
|
||||||
await tapBack();
|
await tapBack();
|
||||||
|
@ -89,7 +89,7 @@ describe('Threads', () => {
|
||||||
|
|
||||||
it('should toggle follow thread', async() => {
|
it('should toggle follow thread', async() => {
|
||||||
await element(by.id(`message-thread-button-${ thread }`)).tap();
|
await element(by.id(`message-thread-button-${ thread }`)).tap();
|
||||||
await waitFor(element(by.id('room-view'))).toBeVisible().withTimeout(5000);
|
await waitFor(element(by.id('room-view'))).toExist().withTimeout(5000);
|
||||||
await waitFor(element(by.id(`room-view-title-${ thread }`))).toExist().withTimeout(5000);
|
await waitFor(element(by.id(`room-view-title-${ thread }`))).toExist().withTimeout(5000);
|
||||||
await expect(element(by.id(`room-view-title-${ thread }`))).toExist();
|
await expect(element(by.id(`room-view-title-${ thread }`))).toExist();
|
||||||
await element(by.id('room-view-header-unfollow')).tap();
|
await element(by.id('room-view-header-unfollow')).tap();
|
||||||
|
@ -102,7 +102,7 @@ describe('Threads', () => {
|
||||||
|
|
||||||
it('should send message in thread only', async() => {
|
it('should send message in thread only', async() => {
|
||||||
const messageText = 'threadonly';
|
const messageText = 'threadonly';
|
||||||
await mockMessage(messageText);
|
await mockMessage(messageText, true);
|
||||||
await tapBack();
|
await tapBack();
|
||||||
await waitFor(element(by.id('room-header').and(by.label(`${ mainRoom }`)))).toBeVisible().withTimeout(2000);
|
await waitFor(element(by.id('room-header').and(by.label(`${ mainRoom }`)))).toBeVisible().withTimeout(2000);
|
||||||
await waitFor(element(by.id('room-header').and(by.label(`${ data.random }thread`)))).toBeNotVisible().withTimeout(2000);
|
await waitFor(element(by.id('room-header').and(by.label(`${ data.random }thread`)))).toBeNotVisible().withTimeout(2000);
|
||||||
|
@ -113,7 +113,7 @@ describe('Threads', () => {
|
||||||
it('should mark send to channel and show on main channel', async() => {
|
it('should mark send to channel and show on main channel', async() => {
|
||||||
const messageText = 'sendToChannel';
|
const messageText = 'sendToChannel';
|
||||||
await element(by.id(`message-thread-button-${ thread }`)).tap();
|
await element(by.id(`message-thread-button-${ thread }`)).tap();
|
||||||
await element(by.id('messagebox-input')).atIndex(0).typeText(messageText);
|
await element(by.id('messagebox-input-thread')).typeText(messageText);
|
||||||
await element(by.id('messagebox-send-to-channel')).tap();
|
await element(by.id('messagebox-send-to-channel')).tap();
|
||||||
await element(by.id('messagebox-send-message')).tap();
|
await element(by.id('messagebox-send-message')).tap();
|
||||||
await tapBack();
|
await tapBack();
|
||||||
|
@ -128,16 +128,14 @@ describe('Threads', () => {
|
||||||
await mockMessage('dummymessagebetweenthethread');
|
await mockMessage('dummymessagebetweenthethread');
|
||||||
await dismissReviewNag() //TODO: Create a proper test for this elsewhere.
|
await dismissReviewNag() //TODO: Create a proper test for this elsewhere.
|
||||||
await element(by.id(`message-thread-button-${ thread }`)).tap();
|
await element(by.id(`message-thread-button-${ thread }`)).tap();
|
||||||
await element(by.id('messagebox-input')).atIndex(0).typeText(messageText);
|
await element(by.id('messagebox-input-thread')).typeText(messageText);
|
||||||
await element(by.id('messagebox-send-to-channel')).tap();
|
await element(by.id('messagebox-send-to-channel')).tap();
|
||||||
await element(by.id('messagebox-send-message')).tap();
|
await element(by.id('messagebox-send-message')).tap();
|
||||||
await tapBack();
|
await tapBack();
|
||||||
await waitFor(element(by.id('room-header').and(by.label(`${ mainRoom }`)))).toBeVisible().withTimeout(2000);
|
await waitFor(element(by.id('room-header').and(by.label(`${ mainRoom }`)))).toBeVisible().withTimeout(2000);
|
||||||
await waitFor(element(by.id('room-header').and(by.label(`${ data.random }thread`)))).toBeNotVisible().withTimeout(2000);
|
await waitFor(element(by.id('room-header').and(by.label(`${ data.random }thread`)))).toBeNotVisible().withTimeout(2000);
|
||||||
await sleep(500) //TODO: Find a better way to wait for the animation to finish and the messagebox-input to be available and usable :(
|
await waitFor(element(by.id(`message-thread-replied-on-${ thread }`))).toBeVisible().withTimeout(2000);
|
||||||
|
|
||||||
await element(by.id(`message-thread-replied-on-${ thread }`)).tap();
|
await element(by.id(`message-thread-replied-on-${ thread }`)).tap();
|
||||||
await waitFor(element(by.id('room-view'))).toBeVisible().withTimeout(5000);
|
|
||||||
await waitFor(element(by.id(`room-view-title-${ thread }`))).toExist().withTimeout(5000);
|
await waitFor(element(by.id(`room-view-title-${ thread }`))).toExist().withTimeout(5000);
|
||||||
await expect(element(by.id(`room-view-title-${ thread }`))).toExist();
|
await expect(element(by.id(`room-view-title-${ thread }`))).toExist();
|
||||||
await tapBack();
|
await tapBack();
|
||||||
|
@ -149,7 +147,6 @@ describe('Threads', () => {
|
||||||
await waitFor(element(by.id('thread-messages-view'))).toExist().withTimeout(5000);
|
await waitFor(element(by.id('thread-messages-view'))).toExist().withTimeout(5000);
|
||||||
await expect(element(by.id('thread-messages-view'))).toExist();
|
await expect(element(by.id('thread-messages-view'))).toExist();
|
||||||
await element(by.id(`thread-messages-view-${ thread }`)).atIndex(0).tap();
|
await element(by.id(`thread-messages-view-${ thread }`)).atIndex(0).tap();
|
||||||
await waitFor(element(by.id('room-view'))).toBeVisible().withTimeout(5000);
|
|
||||||
await waitFor(element(by.id(`room-view-title-${ thread }`))).toExist().withTimeout(5000);
|
await waitFor(element(by.id(`room-view-title-${ thread }`))).toExist().withTimeout(5000);
|
||||||
await expect(element(by.id(`room-view-title-${ thread }`))).toExist();
|
await expect(element(by.id(`room-view-title-${ thread }`))).toExist();
|
||||||
await tapBack();
|
await tapBack();
|
||||||
|
@ -160,31 +157,20 @@ describe('Threads', () => {
|
||||||
|
|
||||||
it('should draft thread message', async () => {
|
it('should draft thread message', async () => {
|
||||||
await element(by.id(`message-thread-button-${ thread }`)).tap();
|
await element(by.id(`message-thread-button-${ thread }`)).tap();
|
||||||
await waitFor(element(by.id('room-view'))).toBeVisible().withTimeout(5000);
|
|
||||||
await waitFor(element(by.id(`room-view-title-${ thread }`))).toExist().withTimeout(5000);
|
await waitFor(element(by.id(`room-view-title-${ thread }`))).toExist().withTimeout(5000);
|
||||||
await element(by.id('messagebox-input')).atIndex(0).tap();
|
await element(by.id('messagebox-input-thread')).typeText(`${ thread }draft`);
|
||||||
await element(by.id('messagebox-input')).atIndex(0).typeText(`${ thread }draft`);
|
|
||||||
await tapBack();
|
await tapBack();
|
||||||
|
|
||||||
await element(by.id(`message-thread-button-${ thread }`)).tap();
|
await element(by.id(`message-thread-button-${ thread }`)).tap();
|
||||||
await waitFor(element(by.id('room-view'))).toBeVisible().withTimeout(5000);
|
|
||||||
await waitFor(element(by.id(`room-view-title-${ thread }`))).toExist().withTimeout(5000);
|
await waitFor(element(by.id(`room-view-title-${ thread }`))).toExist().withTimeout(5000);
|
||||||
await expect(element(by.id('messagebox-input')).atIndex(0)).toHaveText(`${ thread }draft`);
|
await expect(element(by.id('messagebox-input-thread'))).toHaveText(`${ thread }draft`);
|
||||||
await element(by.id('messagebox-input')).atIndex(0).clearText();
|
await element(by.id('messagebox-input-thread')).clearText();
|
||||||
await tapBack();
|
await tapBack();
|
||||||
|
|
||||||
await element(by.id(`message-thread-button-${ thread }`)).tap();
|
await element(by.id(`message-thread-button-${ thread }`)).tap();
|
||||||
await waitFor(element(by.id('room-view'))).toBeVisible().withTimeout(5000);
|
|
||||||
await waitFor(element(by.id(`room-view-title-${ thread }`))).toExist().withTimeout(5000);
|
await waitFor(element(by.id(`room-view-title-${ thread }`))).toExist().withTimeout(5000);
|
||||||
await expect(element(by.id('messagebox-input')).atIndex(0)).toHaveText('');
|
await expect(element(by.id('messagebox-input-thread'))).toHaveText('');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// after(async() => {
|
|
||||||
// await waitFor(element(by.id('room-view'))).toBeVisible().withTimeout(5000);
|
|
||||||
// await tapBack();
|
|
||||||
// await waitFor(element(by.id('rooms-list-view'))).toExist().withTimeout(2000);
|
|
||||||
// await expect(element(by.id('rooms-list-view'))).toExist();
|
|
||||||
// });
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -2,7 +2,8 @@ const {
|
||||||
device, expect, element, by, waitFor
|
device, expect, element, by, waitFor
|
||||||
} = require('detox');
|
} = require('detox');
|
||||||
const data = require('../../data');
|
const data = require('../../data');
|
||||||
const { navigateToLogin, login, mockMessage, tapBack, searchRoom, logout } = require('../../helpers/app');
|
const { navigateToLogin, login, searchRoom } = require('../../helpers/app');
|
||||||
|
const { sendMessage } = require('../../helpers/data_setup')
|
||||||
|
|
||||||
async function navigateToRoom(user) {
|
async function navigateToRoom(user) {
|
||||||
await searchRoom(`${ user }`);
|
await searchRoom(`${ user }`);
|
||||||
|
@ -20,23 +21,21 @@ describe('Mark as unread', () => {
|
||||||
await navigateToRoom(user);
|
await navigateToRoom(user);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// TODO: Fix flakiness. If it fails, run it solo.
|
||||||
describe('Usage', async() => {
|
describe('Usage', async() => {
|
||||||
describe('Mark message as unread', async() => {
|
describe('Mark message as unread', async() => {
|
||||||
it('should mark message as unread', async() => {
|
it('should mark message as unread', async() => {
|
||||||
await mockMessage('message')
|
const message = `${ data.random }message`;
|
||||||
await expect(element(by.label(`${ data.random }message`)).atIndex(0)).toExist();
|
const channelName = `@${ data.users.regular.username }`;
|
||||||
await tapBack();
|
await sendMessage(data.users.alternate, channelName, message);
|
||||||
await logout();
|
await waitFor(element(by.label(message)).atIndex(0)).toExist().withTimeout(30000);
|
||||||
await navigateToLogin();
|
await element(by.label(message)).atIndex(0).longPress();
|
||||||
await login(data.users.alternate.username, data.users.alternate.password);
|
|
||||||
await navigateToRoom(data.users.regular.username);
|
|
||||||
await element(by.label(`${ data.random }message`)).atIndex(0).longPress();
|
|
||||||
await expect(element(by.id('action-sheet'))).toExist();
|
await expect(element(by.id('action-sheet'))).toExist();
|
||||||
await expect(element(by.id('action-sheet-handle'))).toBeVisible();
|
await expect(element(by.id('action-sheet-handle'))).toBeVisible();
|
||||||
await element(by.id('action-sheet-handle')).swipe('up', 'fast', 0.5);
|
await element(by.id('action-sheet-handle')).swipe('up', 'fast', 0.5);
|
||||||
await element(by.label('Mark Unread')).tap();
|
await element(by.label('Mark Unread')).tap();
|
||||||
await waitFor(element(by.id('rooms-list-view'))).toExist().withTimeout(5000);
|
await waitFor(element(by.id('rooms-list-view'))).toExist().withTimeout(5000);
|
||||||
await expect(element(by.id(`rooms-list-view-item-${data.users.regular.username}`))).toExist();
|
await expect(element(by.id(`rooms-list-view-item-${data.users.alternate.username}`))).toExist();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -119,7 +119,7 @@ describe('Room info screen', () => {
|
||||||
|
|
||||||
it('should have type switch', async() => {
|
it('should have type switch', async() => {
|
||||||
// Ugly hack to scroll on detox
|
// Ugly hack to scroll on detox
|
||||||
await element(by.type('UIScrollView')).atIndex(1).swipe('up');
|
await element(by.id('room-info-edit-view-list')).swipe('up', 'fast', 0.8);
|
||||||
await expect(element(by.id('room-info-edit-view-t'))).toExist();
|
await expect(element(by.id('room-info-edit-view-t'))).toExist();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ describe('Room info screen', () => {
|
||||||
|
|
||||||
after(async() => {
|
after(async() => {
|
||||||
// Ugly hack to scroll on detox
|
// Ugly hack to scroll on detox
|
||||||
await element(by.type('UIScrollView')).atIndex(1).swipe('down');
|
await element(by.id('room-info-edit-view-list')).swipe('down', 'fast', 0.8);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ describe('Room info screen', () => {
|
||||||
|
|
||||||
it('should change room name', async() => {
|
it('should change room name', async() => {
|
||||||
await element(by.id('room-info-edit-view-name')).replaceText(`${ privateRoomName }new`);
|
await element(by.id('room-info-edit-view-name')).replaceText(`${ privateRoomName }new`);
|
||||||
await element(by.type('UIScrollView')).atIndex(1).swipe('up');
|
await element(by.id('room-info-edit-view-list')).swipe('up', 'fast', 0.5);
|
||||||
await element(by.id('room-info-edit-view-submit')).tap();
|
await element(by.id('room-info-edit-view-submit')).tap();
|
||||||
await waitForToast();
|
await waitForToast();
|
||||||
await tapBack();
|
await tapBack();
|
||||||
|
@ -174,10 +174,10 @@ describe('Room info screen', () => {
|
||||||
await element(by.id('room-info-view-edit-button')).tap();
|
await element(by.id('room-info-view-edit-button')).tap();
|
||||||
await waitFor(element(by.id('room-info-edit-view'))).toExist().withTimeout(2000);
|
await waitFor(element(by.id('room-info-edit-view'))).toExist().withTimeout(2000);
|
||||||
await element(by.id('room-info-edit-view-name')).replaceText(`${ privateRoomName }`);
|
await element(by.id('room-info-edit-view-name')).replaceText(`${ privateRoomName }`);
|
||||||
await element(by.type('UIScrollView')).atIndex(1).swipe('up');
|
await element(by.id('room-info-edit-view-list')).swipe('up', 'fast', 0.5);
|
||||||
await element(by.id('room-info-edit-view-submit')).tap();
|
await element(by.id('room-info-edit-view-submit')).tap();
|
||||||
await waitForToast();
|
await waitForToast();
|
||||||
await element(by.type('UIScrollView')).atIndex(1).swipe('down');
|
await element(by.id('room-info-edit-view-list')).swipe('down', 'fast', 0.8);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should reset form', async() => {
|
it('should reset form', async() => {
|
||||||
|
@ -186,7 +186,7 @@ describe('Room info screen', () => {
|
||||||
await element(by.id('room-info-edit-view-topic')).replaceText('abc');
|
await element(by.id('room-info-edit-view-topic')).replaceText('abc');
|
||||||
await element(by.id('room-info-edit-view-announcement')).replaceText('abc');
|
await element(by.id('room-info-edit-view-announcement')).replaceText('abc');
|
||||||
await element(by.id('room-info-edit-view-password')).replaceText('abc');
|
await element(by.id('room-info-edit-view-password')).replaceText('abc');
|
||||||
await element(by.type('UIScrollView')).atIndex(1).swipe('up');
|
await element(by.id('room-info-edit-view-list')).swipe('up', 'fast', 0.5);
|
||||||
await element(by.id('room-info-edit-view-t')).tap();
|
await element(by.id('room-info-edit-view-t')).tap();
|
||||||
await element(by.id('room-info-edit-view-ro')).longPress(); //https://github.com/facebook/react-native/issues/28032
|
await element(by.id('room-info-edit-view-ro')).longPress(); //https://github.com/facebook/react-native/issues/28032
|
||||||
await element(by.id('room-info-edit-view-react-when-ro')).tap();
|
await element(by.id('room-info-edit-view-react-when-ro')).tap();
|
||||||
|
@ -200,12 +200,12 @@ describe('Room info screen', () => {
|
||||||
await expect(element(by.id('room-info-edit-view-t'))).toHaveValue('1');
|
await expect(element(by.id('room-info-edit-view-t'))).toHaveValue('1');
|
||||||
await expect(element(by.id('room-info-edit-view-ro'))).toHaveValue('0');
|
await expect(element(by.id('room-info-edit-view-ro'))).toHaveValue('0');
|
||||||
await expect(element(by.id('room-info-edit-view-react-when-ro'))).toBeNotVisible();
|
await expect(element(by.id('room-info-edit-view-react-when-ro'))).toBeNotVisible();
|
||||||
await element(by.type('UIScrollView')).atIndex(1).swipe('down');
|
await element(by.id('room-info-edit-view-list')).swipe('down', 'fast', 0.8);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should change room description', async() => {
|
it('should change room description', async() => {
|
||||||
await element(by.id('room-info-edit-view-description')).replaceText('new description');
|
await element(by.id('room-info-edit-view-description')).replaceText('new description');
|
||||||
await element(by.type('UIScrollView')).atIndex(1).swipe('up');
|
await element(by.id('room-info-edit-view-list')).swipe('up', 'fast', 0.5);
|
||||||
await element(by.id('room-info-edit-view-submit')).tap();
|
await element(by.id('room-info-edit-view-submit')).tap();
|
||||||
await waitForToast();
|
await waitForToast();
|
||||||
await tapBack();
|
await tapBack();
|
||||||
|
@ -218,7 +218,7 @@ describe('Room info screen', () => {
|
||||||
await element(by.id('room-info-view-edit-button')).tap();
|
await element(by.id('room-info-view-edit-button')).tap();
|
||||||
await waitFor(element(by.id('room-info-edit-view'))).toExist().withTimeout(2000);
|
await waitFor(element(by.id('room-info-edit-view'))).toExist().withTimeout(2000);
|
||||||
await element(by.id('room-info-edit-view-topic')).replaceText('new topic');
|
await element(by.id('room-info-edit-view-topic')).replaceText('new topic');
|
||||||
await element(by.type('UIScrollView')).atIndex(1).swipe('up');
|
await element(by.id('room-info-edit-view-list')).swipe('up', 'fast', 0.5);
|
||||||
await element(by.id('room-info-edit-view-submit')).tap();
|
await element(by.id('room-info-edit-view-submit')).tap();
|
||||||
await waitForToast();
|
await waitForToast();
|
||||||
await tapBack();
|
await tapBack();
|
||||||
|
@ -231,7 +231,7 @@ describe('Room info screen', () => {
|
||||||
await element(by.id('room-info-view-edit-button')).tap();
|
await element(by.id('room-info-view-edit-button')).tap();
|
||||||
await waitFor(element(by.id('room-info-edit-view'))).toExist().withTimeout(2000);
|
await waitFor(element(by.id('room-info-edit-view'))).toExist().withTimeout(2000);
|
||||||
await element(by.id('room-info-edit-view-announcement')).replaceText('new announcement');
|
await element(by.id('room-info-edit-view-announcement')).replaceText('new announcement');
|
||||||
await element(by.type('UIScrollView')).atIndex(1).swipe('up');
|
await element(by.id('room-info-edit-view-list')).swipe('up', 'fast', 0.5);
|
||||||
await element(by.id('room-info-edit-view-submit')).tap();
|
await element(by.id('room-info-edit-view-submit')).tap();
|
||||||
await waitForToast();
|
await waitForToast();
|
||||||
await tapBack();
|
await tapBack();
|
||||||
|
@ -243,14 +243,14 @@ describe('Room info screen', () => {
|
||||||
await waitFor(element(by.id('room-info-view-edit-button'))).toExist().withTimeout(10000);
|
await waitFor(element(by.id('room-info-view-edit-button'))).toExist().withTimeout(10000);
|
||||||
await element(by.id('room-info-view-edit-button')).tap();
|
await element(by.id('room-info-view-edit-button')).tap();
|
||||||
await waitFor(element(by.id('room-info-edit-view'))).toExist().withTimeout(2000);
|
await waitFor(element(by.id('room-info-edit-view'))).toExist().withTimeout(2000);
|
||||||
await element(by.type('UIScrollView')).atIndex(1).swipe('up');
|
await element(by.id('room-info-edit-view-list')).swipe('up', 'fast', 0.5);
|
||||||
await element(by.id('room-info-edit-view-password')).replaceText('password');
|
await element(by.id('room-info-edit-view-password')).replaceText('password');
|
||||||
await element(by.id('room-info-edit-view-submit')).tap();
|
await element(by.id('room-info-edit-view-submit')).tap();
|
||||||
await waitForToast();
|
await waitForToast();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should change room type', async() => {
|
it('should change room type', async() => {
|
||||||
await element(by.type('UIScrollView')).atIndex(1).swipe('up');
|
await element(by.id('room-info-edit-view-list')).swipe('up', 'fast', 0.5);
|
||||||
await element(by.id('room-info-edit-view-t')).tap();
|
await element(by.id('room-info-edit-view-t')).tap();
|
||||||
await element(by.id('room-info-edit-view-submit')).tap();
|
await element(by.id('room-info-edit-view-submit')).tap();
|
||||||
await waitForToast();
|
await waitForToast();
|
||||||
|
@ -272,7 +272,7 @@ describe('Room info screen', () => {
|
||||||
// });
|
// });
|
||||||
|
|
||||||
it('should archive room', async() => {
|
it('should archive room', async() => {
|
||||||
await element(by.type('UIScrollView')).atIndex(1).swipe('up');
|
await element(by.id('room-info-edit-view-list')).swipe('up', 'fast', 0.5);
|
||||||
await element(by.id('room-info-edit-view-archive')).tap();
|
await element(by.id('room-info-edit-view-archive')).tap();
|
||||||
await waitFor(element(by.text('Yes, archive it!'))).toExist().withTimeout(5000);
|
await waitFor(element(by.text('Yes, archive it!'))).toExist().withTimeout(5000);
|
||||||
await element(by.text('Yes, archive it!')).tap();
|
await element(by.text('Yes, archive it!')).tap();
|
||||||
|
@ -288,7 +288,7 @@ describe('Room info screen', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should delete room', async() => {
|
it('should delete room', async() => {
|
||||||
await element(by.type('UIScrollView')).atIndex(1).swipe('up');
|
await element(by.id('room-info-edit-view-list')).swipe('up', 'fast', 0.5);
|
||||||
await element(by.id('room-info-edit-view-delete')).tap();
|
await element(by.id('room-info-edit-view-delete')).tap();
|
||||||
await waitFor(element(by.text('Yes, delete it!'))).toExist().withTimeout(5000);
|
await waitFor(element(by.text('Yes, delete it!'))).toExist().withTimeout(5000);
|
||||||
await element(by.text('Yes, delete it!')).tap();
|
await element(by.text('Yes, delete it!')).tap();
|
||||||
|
|
|
@ -1452,6 +1452,7 @@
|
||||||
DEAD_CODE_STRIPPING = NO;
|
DEAD_CODE_STRIPPING = NO;
|
||||||
DEVELOPMENT_TEAM = S6UPZG7ZR3;
|
DEVELOPMENT_TEAM = S6UPZG7ZR3;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
|
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)",
|
"$(PROJECT_DIR)",
|
||||||
|
@ -1567,6 +1568,7 @@
|
||||||
DEVELOPMENT_TEAM = S6UPZG7ZR3;
|
DEVELOPMENT_TEAM = S6UPZG7ZR3;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
ENABLE_TESTABILITY = YES;
|
ENABLE_TESTABILITY = YES;
|
||||||
|
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"\"${PODS_ROOT}/Crashlytics/iOS\"",
|
"\"${PODS_ROOT}/Crashlytics/iOS\"",
|
||||||
|
@ -1683,11 +1685,12 @@
|
||||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
DEVELOPMENT_TEAM = S6UPZG7ZR3;
|
DEVELOPMENT_TEAM = S6UPZG7ZR3;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
|
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
INFOPLIST_FILE = NotificationService/Info.plist;
|
INFOPLIST_FILE = NotificationService/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
|
||||||
MARKETING_VERSION = 4.16.1;
|
MARKETING_VERSION = 4.16.2;
|
||||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = chat.rocket.reactnative.NotificationService;
|
PRODUCT_BUNDLE_IDENTIFIER = chat.rocket.reactnative.NotificationService;
|
||||||
|
@ -1724,7 +1727,7 @@
|
||||||
INFOPLIST_FILE = NotificationService/Info.plist;
|
INFOPLIST_FILE = NotificationService/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
|
||||||
MARKETING_VERSION = 4.16.1;
|
MARKETING_VERSION = 4.16.2;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = chat.rocket.reactnative.NotificationService;
|
PRODUCT_BUNDLE_IDENTIFIER = chat.rocket.reactnative.NotificationService;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
@ -1752,6 +1755,7 @@
|
||||||
DEAD_CODE_STRIPPING = NO;
|
DEAD_CODE_STRIPPING = NO;
|
||||||
DEVELOPMENT_TEAM = S6UPZG7ZR3;
|
DEVELOPMENT_TEAM = S6UPZG7ZR3;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
|
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)",
|
"$(PROJECT_DIR)",
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>4.16.1</string>
|
<string>4.16.2</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleURLTypes</key>
|
<key>CFBundleURLTypes</key>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>XPC!</string>
|
<string>XPC!</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>4.16.1</string>
|
<string>4.16.2</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1</string>
|
<string>1</string>
|
||||||
<key>KeychainGroup</key>
|
<key>KeychainGroup</key>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "rocket-chat-reactnative",
|
"name": "rocket-chat-reactnative",
|
||||||
"version": "4.16.1",
|
"version": "4.16.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "react-native start",
|
"start": "react-native start",
|
||||||
|
@ -67,6 +67,7 @@
|
||||||
"js-base64": "2.5.2",
|
"js-base64": "2.5.2",
|
||||||
"js-sha256": "^0.9.0",
|
"js-sha256": "^0.9.0",
|
||||||
"lodash": "4.17.20",
|
"lodash": "4.17.20",
|
||||||
|
"mocha": "7.1.2",
|
||||||
"moment": "2.27.0",
|
"moment": "2.27.0",
|
||||||
"pretty-bytes": "^5.3.0",
|
"pretty-bytes": "^5.3.0",
|
||||||
"prop-types": "15.7.2",
|
"prop-types": "15.7.2",
|
||||||
|
@ -144,7 +145,7 @@
|
||||||
"babel-runtime": "^6.26.0",
|
"babel-runtime": "^6.26.0",
|
||||||
"bugsnag-sourcemaps": "1.3.0",
|
"bugsnag-sourcemaps": "1.3.0",
|
||||||
"codecov": "3.7.1",
|
"codecov": "3.7.1",
|
||||||
"detox": "^16.9.0",
|
"detox": "^18.10.0",
|
||||||
"emotion-theming": "10.0.27",
|
"emotion-theming": "10.0.27",
|
||||||
"eslint": "6.8.0",
|
"eslint": "6.8.0",
|
||||||
"eslint-plugin-import": "2.22.0",
|
"eslint-plugin-import": "2.22.0",
|
||||||
|
@ -156,7 +157,6 @@
|
||||||
"jest": "^25.1.0",
|
"jest": "^25.1.0",
|
||||||
"jest-cli": "^23.6.0",
|
"jest-cli": "^23.6.0",
|
||||||
"metro-react-native-babel-preset": "^0.59.0",
|
"metro-react-native-babel-preset": "^0.59.0",
|
||||||
"mocha": "7.1.2",
|
|
||||||
"otp.js": "1.2.0",
|
"otp.js": "1.2.0",
|
||||||
"patch-package": "6.2.2",
|
"patch-package": "6.2.2",
|
||||||
"react-dom": "16.13.1",
|
"react-dom": "16.13.1",
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
|
/* eslint-disable import/no-extraneous-dependencies */
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { ScrollView, StyleSheet, View } from 'react-native';
|
import { StyleSheet } from 'react-native';
|
||||||
import PropTypes from 'prop-types';
|
import { storiesOf } from '@storybook/react-native';
|
||||||
|
|
||||||
import { themes } from '../../app/constants/colors';
|
|
||||||
import Avatar from '../../app/containers/Avatar/Avatar';
|
import Avatar from '../../app/containers/Avatar/Avatar';
|
||||||
import Status from '../../app/containers/Status/Status';
|
import Status from '../../app/containers/Status/Status';
|
||||||
import StoriesSeparator from './StoriesSeparator';
|
|
||||||
import sharedStyles from '../../app/views/Styles';
|
import sharedStyles from '../../app/views/Styles';
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
|
@ -16,125 +15,152 @@ const styles = StyleSheet.create({
|
||||||
|
|
||||||
const server = 'https://open.rocket.chat';
|
const server = 'https://open.rocket.chat';
|
||||||
|
|
||||||
const Separator = ({ title, theme }) => <StoriesSeparator title={title} theme={theme} />;
|
const _theme = 'light';
|
||||||
Separator.propTypes = {
|
|
||||||
title: PropTypes.string,
|
|
||||||
theme: PropTypes.string
|
|
||||||
};
|
|
||||||
|
|
||||||
const AvatarStories = ({ theme }) => (
|
const stories = storiesOf('Avatar', module);
|
||||||
<ScrollView style={{ backgroundColor: themes[theme].backgroundColor }}>
|
|
||||||
<Separator title='Avatar by text' theme={theme} />
|
stories.add('Avatar by text', () => (
|
||||||
<Avatar
|
<Avatar
|
||||||
text='Avatar'
|
text='Avatar'
|
||||||
server={server}
|
server={server}
|
||||||
size={56}
|
size={56}
|
||||||
|
/>
|
||||||
|
));
|
||||||
|
|
||||||
|
stories.add('Avatar by roomId', () => (
|
||||||
|
<Avatar
|
||||||
|
type='p'
|
||||||
|
rid='devWBbYr7inwupPqK'
|
||||||
|
server={server}
|
||||||
|
size={56}
|
||||||
|
/>
|
||||||
|
));
|
||||||
|
|
||||||
|
stories.add('Avatar by url', () => (
|
||||||
|
<Avatar
|
||||||
|
avatar='https://user-images.githubusercontent.com/29778115/89444446-14738480-d728-11ea-9412-75fd978d95fb.jpg'
|
||||||
|
server={server}
|
||||||
|
size={56}
|
||||||
|
/>
|
||||||
|
));
|
||||||
|
|
||||||
|
stories.add('Avatar by path', () => (
|
||||||
|
<Avatar
|
||||||
|
avatar='/avatar/diego.mello'
|
||||||
|
server={server}
|
||||||
|
size={56}
|
||||||
|
/>
|
||||||
|
));
|
||||||
|
|
||||||
|
stories.add('With ETag', () => (
|
||||||
|
<Avatar
|
||||||
|
type='d'
|
||||||
|
text='djorkaeff.alexandre'
|
||||||
|
avatarETag='5ag8KffJcZj9m5rCv'
|
||||||
|
server={server}
|
||||||
|
size={56}
|
||||||
|
/>
|
||||||
|
));
|
||||||
|
|
||||||
|
stories.add('Without ETag', () => (
|
||||||
|
<Avatar
|
||||||
|
type='d'
|
||||||
|
text='djorkaeff.alexandre'
|
||||||
|
server={server}
|
||||||
|
size={56}
|
||||||
|
/>
|
||||||
|
));
|
||||||
|
|
||||||
|
stories.add('Emoji', () => (
|
||||||
|
<Avatar
|
||||||
|
emoji='troll'
|
||||||
|
getCustomEmoji={() => ({ name: 'troll', extension: 'jpg' })}
|
||||||
|
server={server}
|
||||||
|
size={56}
|
||||||
|
/>
|
||||||
|
));
|
||||||
|
|
||||||
|
stories.add('Direct', () => (
|
||||||
|
<Avatar
|
||||||
|
text='diego.mello'
|
||||||
|
server={server}
|
||||||
|
type='d'
|
||||||
|
size={56}
|
||||||
|
/>
|
||||||
|
));
|
||||||
|
|
||||||
|
stories.add('Channel', () => (
|
||||||
|
<Avatar
|
||||||
|
text='general'
|
||||||
|
server={server}
|
||||||
|
type='c'
|
||||||
|
size={56}
|
||||||
|
/>
|
||||||
|
));
|
||||||
|
|
||||||
|
stories.add('Touchable', () => (
|
||||||
|
<Avatar
|
||||||
|
text='Avatar'
|
||||||
|
server={server}
|
||||||
|
onPress={() => console.log('Pressed!')}
|
||||||
|
size={56}
|
||||||
|
/>
|
||||||
|
));
|
||||||
|
|
||||||
|
stories.add('Static', () => (
|
||||||
|
<Avatar
|
||||||
|
avatar='https://user-images.githubusercontent.com/29778115/89444446-14738480-d728-11ea-9412-75fd978d95fb.jpg'
|
||||||
|
server={server}
|
||||||
|
isStatic
|
||||||
|
size={56}
|
||||||
|
/>
|
||||||
|
));
|
||||||
|
|
||||||
|
stories.add('Avatar by roomId', () => (
|
||||||
|
<Avatar
|
||||||
|
type='p'
|
||||||
|
rid='devWBbYr7inwupPqK'
|
||||||
|
server={server}
|
||||||
|
size={56}
|
||||||
|
/>
|
||||||
|
));
|
||||||
|
|
||||||
|
stories.add('Custom borderRadius', () => (
|
||||||
|
<Avatar
|
||||||
|
text='Avatar'
|
||||||
|
server={server}
|
||||||
|
borderRadius={28}
|
||||||
|
size={56}
|
||||||
|
/>
|
||||||
|
));
|
||||||
|
|
||||||
|
stories.add('Children', () => (
|
||||||
|
<Avatar
|
||||||
|
text='Avatar'
|
||||||
|
server={server}
|
||||||
|
size={56}
|
||||||
|
>
|
||||||
|
<Status
|
||||||
|
size={24}
|
||||||
|
style={[sharedStyles.status, styles.status]}
|
||||||
|
theme={_theme}
|
||||||
/>
|
/>
|
||||||
<Separator title='Avatar by roomId' theme={theme} />
|
</Avatar>
|
||||||
<Avatar
|
));
|
||||||
type='p'
|
|
||||||
rid='devWBbYr7inwupPqK'
|
stories.add('Wrong server', () => (
|
||||||
server={server}
|
<Avatar
|
||||||
size={56}
|
text='Avatar'
|
||||||
/>
|
server='https://google.com'
|
||||||
<Separator title='Avatar by url' theme={theme} />
|
size={56}
|
||||||
<Avatar
|
/>
|
||||||
avatar='https://user-images.githubusercontent.com/29778115/89444446-14738480-d728-11ea-9412-75fd978d95fb.jpg'
|
));
|
||||||
server={server}
|
|
||||||
size={56}
|
stories.add('Custom style', () => (
|
||||||
/>
|
<Avatar
|
||||||
<Separator title='Avatar by path' theme={theme} />
|
text='Avatar'
|
||||||
<Avatar
|
server={server}
|
||||||
avatar='/avatar/diego.mello'
|
size={56}
|
||||||
server={server}
|
style={styles.custom}
|
||||||
size={56}
|
/>
|
||||||
/>
|
));
|
||||||
<Separator title='With ETag' theme={theme} />
|
|
||||||
<Avatar
|
|
||||||
type='d'
|
|
||||||
text='djorkaeff.alexandre'
|
|
||||||
avatarETag='5ag8KffJcZj9m5rCv'
|
|
||||||
server={server}
|
|
||||||
size={56}
|
|
||||||
/>
|
|
||||||
<Separator title='Without ETag' theme={theme} />
|
|
||||||
<Avatar
|
|
||||||
type='d'
|
|
||||||
text='djorkaeff.alexandre'
|
|
||||||
server={server}
|
|
||||||
size={56}
|
|
||||||
/>
|
|
||||||
<Separator title='Emoji' theme={theme} />
|
|
||||||
<Avatar
|
|
||||||
emoji='troll'
|
|
||||||
getCustomEmoji={() => ({ name: 'troll', extension: 'jpg' })}
|
|
||||||
server={server}
|
|
||||||
size={56}
|
|
||||||
/>
|
|
||||||
<Separator title='Direct' theme={theme} />
|
|
||||||
<Avatar
|
|
||||||
text='diego.mello'
|
|
||||||
server={server}
|
|
||||||
type='d'
|
|
||||||
size={56}
|
|
||||||
/>
|
|
||||||
<Separator title='Channel' theme={theme} />
|
|
||||||
<Avatar
|
|
||||||
text='general'
|
|
||||||
server={server}
|
|
||||||
type='c'
|
|
||||||
size={56}
|
|
||||||
/>
|
|
||||||
<Separator title='Touchable' theme={theme} />
|
|
||||||
<Avatar
|
|
||||||
text='Avatar'
|
|
||||||
server={server}
|
|
||||||
onPress={() => console.log('Pressed!')}
|
|
||||||
size={56}
|
|
||||||
/>
|
|
||||||
<Separator title='Static' theme={theme} />
|
|
||||||
<Avatar
|
|
||||||
avatar='https://user-images.githubusercontent.com/29778115/89444446-14738480-d728-11ea-9412-75fd978d95fb.jpg'
|
|
||||||
server={server}
|
|
||||||
isStatic
|
|
||||||
size={56}
|
|
||||||
/>
|
|
||||||
<Separator title='Custom borderRadius' theme={theme} />
|
|
||||||
<Avatar
|
|
||||||
text='Avatar'
|
|
||||||
server={server}
|
|
||||||
borderRadius={28}
|
|
||||||
size={56}
|
|
||||||
/>
|
|
||||||
<Separator title='Children' theme={theme} />
|
|
||||||
<Avatar
|
|
||||||
text='Avatar'
|
|
||||||
server={server}
|
|
||||||
size={56}
|
|
||||||
>
|
|
||||||
<View style={[sharedStyles.status, { backgroundColor: themes[theme].backgroundColor }]}>
|
|
||||||
<Status
|
|
||||||
size={20}
|
|
||||||
status='online'
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
</Avatar>
|
|
||||||
<Separator title='Wrong server' theme={theme} />
|
|
||||||
<Avatar
|
|
||||||
text='Avatar'
|
|
||||||
server='https://google.com'
|
|
||||||
size={56}
|
|
||||||
/>
|
|
||||||
<Separator title='Custom style' theme={theme} />
|
|
||||||
<Avatar
|
|
||||||
text='Avatar'
|
|
||||||
server={server}
|
|
||||||
size={56}
|
|
||||||
style={styles.custom}
|
|
||||||
/>
|
|
||||||
</ScrollView>
|
|
||||||
);
|
|
||||||
AvatarStories.propTypes = {
|
|
||||||
theme: PropTypes.string
|
|
||||||
};
|
|
||||||
export default AvatarStories;
|
|
||||||
|
|
|
@ -1,14 +1,19 @@
|
||||||
/* eslint-disable react/prop-types */
|
/* eslint-disable import/no-extraneous-dependencies */
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { ScrollView, StyleSheet, View } from 'react-native';
|
import { ScrollView, StyleSheet, View } from 'react-native';
|
||||||
|
import { storiesOf } from '@storybook/react-native';
|
||||||
|
|
||||||
import Markdown from '../../app/containers/markdown';
|
import Markdown from '../../app/containers/markdown';
|
||||||
import StoriesSeparator from './StoriesSeparator';
|
|
||||||
import { themes } from '../../app/constants/colors';
|
import { themes } from '../../app/constants/colors';
|
||||||
|
|
||||||
|
|
||||||
|
const theme = 'light';
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
container: {
|
container: {
|
||||||
marginHorizontal: 15
|
marginHorizontal: 15,
|
||||||
|
backgroundColor: themes[theme].backgroundColor,
|
||||||
|
marginVertical: 50
|
||||||
},
|
},
|
||||||
separator: {
|
separator: {
|
||||||
marginHorizontal: 10,
|
marginHorizontal: 10,
|
||||||
|
@ -37,258 +42,231 @@ const getCustomEmoji = (content) => {
|
||||||
return customEmoji;
|
return customEmoji;
|
||||||
};
|
};
|
||||||
|
|
||||||
// eslint-disable-next-line arrow-body-style
|
const stories = storiesOf('Markdown', module);
|
||||||
export default ({ theme }) => {
|
|
||||||
return (
|
|
||||||
<ScrollView
|
|
||||||
style={{
|
|
||||||
backgroundColor: themes[theme].backgroundColor,
|
|
||||||
marginVertical: 50
|
|
||||||
}}
|
|
||||||
contentContainerStyle={{
|
|
||||||
paddingBottom: 50
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<StoriesSeparator style={styles.separator} title='Short Text' theme={theme} />
|
|
||||||
<View style={styles.container}>
|
|
||||||
<Markdown msg='This is Rocket.Chat' theme={theme} />
|
|
||||||
</View>
|
|
||||||
|
|
||||||
<StoriesSeparator style={styles.separator} title='Long Text' theme={theme} />
|
stories.add('Text', () => (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<Markdown
|
<Markdown msg='This is Rocket.Chat' theme={theme} />
|
||||||
msg={longText}
|
<Markdown
|
||||||
theme={theme}
|
msg={longText}
|
||||||
/>
|
theme={theme}
|
||||||
</View>
|
/>
|
||||||
|
<Markdown
|
||||||
|
msg={lineBreakText}
|
||||||
|
theme={theme}
|
||||||
|
/>
|
||||||
|
<Markdown
|
||||||
|
msg={sequentialEmptySpacesText}
|
||||||
|
theme={theme}
|
||||||
|
/>
|
||||||
|
<Markdown
|
||||||
|
msg='Strong emphasis, aka bold, with **asterisks** or __underscores__'
|
||||||
|
theme={theme}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
));
|
||||||
|
|
||||||
<StoriesSeparator style={styles.separator} title='Line Break Text' theme={theme} />
|
stories.add('Edited', () => (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<Markdown
|
<Markdown
|
||||||
msg={lineBreakText}
|
msg='This is edited'
|
||||||
theme={theme}
|
theme={theme}
|
||||||
/>
|
isEdited
|
||||||
</View>
|
/>
|
||||||
|
</View>
|
||||||
|
));
|
||||||
|
|
||||||
<StoriesSeparator style={styles.separator} title='Sequential empty spaces' theme={theme} />
|
stories.add('Preview', () => (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<Markdown
|
<Markdown
|
||||||
msg={sequentialEmptySpacesText}
|
msg={longText}
|
||||||
theme={theme}
|
theme={theme}
|
||||||
/>
|
numberOfLines={1}
|
||||||
</View>
|
preview
|
||||||
|
/>
|
||||||
|
<Markdown
|
||||||
|
msg={lineBreakText}
|
||||||
|
theme={theme}
|
||||||
|
numberOfLines={1}
|
||||||
|
preview
|
||||||
|
/>
|
||||||
|
<Markdown
|
||||||
|
msg={sequentialEmptySpacesText}
|
||||||
|
theme={theme}
|
||||||
|
numberOfLines={1}
|
||||||
|
preview
|
||||||
|
/>
|
||||||
|
<Markdown
|
||||||
|
msg='@rocket.cat @name1 @all @here @unknown #general #unknown'
|
||||||
|
theme={theme}
|
||||||
|
numberOfLines={1}
|
||||||
|
preview
|
||||||
|
mentions={[
|
||||||
|
{ _id: 'random', name: 'Rocket Cat', username: 'rocket.cat' },
|
||||||
|
{ _id: 'random2', name: 'Name', username: 'name1' },
|
||||||
|
{ _id: 'here', username: 'here' },
|
||||||
|
{ _id: 'all', username: 'all' }
|
||||||
|
]}
|
||||||
|
channels={[{ _id: '123', name: 'test-channel' }]}
|
||||||
|
username='rocket.cat'
|
||||||
|
/>
|
||||||
|
<Markdown
|
||||||
|
msg='Testing: 😃 :+1: :marioparty:'
|
||||||
|
getCustomEmoji={getCustomEmoji}
|
||||||
|
theme={theme}
|
||||||
|
numberOfLines={1}
|
||||||
|
preview
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
));
|
||||||
|
|
||||||
<StoriesSeparator style={styles.separator} title='Edited' theme={theme} />
|
stories.add('Mentions', () => (
|
||||||
<View style={styles.container}>
|
<ScrollView style={styles.container}>
|
||||||
<Markdown
|
<Markdown
|
||||||
msg='This is edited'
|
msg='@rocket.cat @name1 @all @here @unknown'
|
||||||
theme={theme}
|
theme={theme}
|
||||||
isEdited
|
mentions={[
|
||||||
/>
|
{ _id: 'random', name: 'Rocket Cat', username: 'rocket.cat' },
|
||||||
</View>
|
{ _id: 'random2', name: 'Name', username: 'name1' },
|
||||||
|
{ _id: 'here', username: 'here' },
|
||||||
|
{ _id: 'all', username: 'all' }
|
||||||
|
]}
|
||||||
|
username='rocket.cat'
|
||||||
|
/>
|
||||||
|
<Markdown
|
||||||
|
msg='@rocket.cat @name1 @all @here @unknown'
|
||||||
|
theme={theme}
|
||||||
|
mentions={[
|
||||||
|
{ _id: 'random', name: 'Rocket Cat', username: 'rocket.cat' },
|
||||||
|
{ _id: 'random2', name: 'Name', username: 'name1' },
|
||||||
|
{ _id: 'here', username: 'here' },
|
||||||
|
{ _id: 'all', username: 'all' }
|
||||||
|
]}
|
||||||
|
username='rocket.cat'
|
||||||
|
useRealName
|
||||||
|
/>
|
||||||
|
</ScrollView>
|
||||||
|
));
|
||||||
|
|
||||||
<StoriesSeparator style={styles.separator} title='Preview' theme={theme} />
|
stories.add('Hashtag', () => (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<Markdown
|
<Markdown
|
||||||
msg={longText}
|
msg='#test-channel #unknown'
|
||||||
theme={theme}
|
theme={theme}
|
||||||
numberOfLines={1}
|
channels={[{ _id: '123', name: 'test-channel' }]}
|
||||||
preview
|
/>
|
||||||
/>
|
</View>
|
||||||
<Markdown
|
));
|
||||||
msg={lineBreakText}
|
|
||||||
theme={theme}
|
|
||||||
numberOfLines={1}
|
|
||||||
preview
|
|
||||||
/>
|
|
||||||
<Markdown
|
|
||||||
msg={sequentialEmptySpacesText}
|
|
||||||
theme={theme}
|
|
||||||
numberOfLines={1}
|
|
||||||
preview
|
|
||||||
/>
|
|
||||||
<Markdown
|
|
||||||
msg='@rocket.cat @name1 @all @here @unknown #general #unknown'
|
|
||||||
theme={theme}
|
|
||||||
numberOfLines={1}
|
|
||||||
preview
|
|
||||||
mentions={[
|
|
||||||
{ _id: 'random', name: 'Rocket Cat', username: 'rocket.cat' },
|
|
||||||
{ _id: 'random2', name: 'Name', username: 'name1' },
|
|
||||||
{ _id: 'here', username: 'here' },
|
|
||||||
{ _id: 'all', username: 'all' }
|
|
||||||
]}
|
|
||||||
channels={[{ _id: '123', name: 'test-channel' }]}
|
|
||||||
username='rocket.cat'
|
|
||||||
/>
|
|
||||||
<Markdown
|
|
||||||
msg='Testing: 😃 :+1: :marioparty:'
|
|
||||||
getCustomEmoji={getCustomEmoji}
|
|
||||||
theme={theme}
|
|
||||||
numberOfLines={1}
|
|
||||||
preview
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
|
|
||||||
<StoriesSeparator style={styles.separator} title='Mentions' theme={theme} />
|
stories.add('Emoji', () => (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<Markdown
|
<Markdown msg='Unicode: 😃😇👍' theme={theme} />
|
||||||
msg='@rocket.cat @name1 @all @here @unknown'
|
<Markdown msg='Shortnames: :joy::+1:' theme={theme} />
|
||||||
theme={theme}
|
<Markdown
|
||||||
mentions={[
|
msg='Custom emojis: :react_rocket: :nyan_rocket: :marioparty:'
|
||||||
{ _id: 'random', name: 'Rocket Cat', username: 'rocket.cat' },
|
theme={theme}
|
||||||
{ _id: 'random2', name: 'Name', username: 'name1' },
|
getCustomEmoji={getCustomEmoji}
|
||||||
{ _id: 'here', username: 'here' },
|
baseUrl={baseUrl}
|
||||||
{ _id: 'all', username: 'all' }
|
/>
|
||||||
]}
|
<Markdown
|
||||||
username='rocket.cat'
|
msg='😃 :+1: :marioparty:'
|
||||||
/>
|
theme={theme}
|
||||||
</View>
|
getCustomEmoji={getCustomEmoji}
|
||||||
|
baseUrl={baseUrl}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
));
|
||||||
|
|
||||||
<StoriesSeparator style={styles.separator} title='Mentions with Real Name' theme={theme} />
|
stories.add('Block quote', () => (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<Markdown
|
<Markdown
|
||||||
msg='@rocket.cat @name1 @all @here @unknown'
|
msg={`> This is block quote
|
||||||
theme={theme}
|
|
||||||
mentions={[
|
|
||||||
{ _id: 'random', name: 'Rocket Cat', username: 'rocket.cat' },
|
|
||||||
{ _id: 'random2', name: 'Name', username: 'name1' },
|
|
||||||
{ _id: 'here', username: 'here' },
|
|
||||||
{ _id: 'all', username: 'all' }
|
|
||||||
]}
|
|
||||||
username='rocket.cat'
|
|
||||||
useRealName
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
|
|
||||||
<StoriesSeparator style={styles.separator} title='Hashtag' theme={theme} />
|
|
||||||
<View style={styles.container}>
|
|
||||||
<Markdown
|
|
||||||
msg='#test-channel #unknown'
|
|
||||||
theme={theme}
|
|
||||||
channels={[{ _id: '123', name: 'test-channel' }]}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
|
|
||||||
<StoriesSeparator style={styles.separator} title='Emoji' theme={theme} />
|
|
||||||
<View style={styles.container}>
|
|
||||||
<Markdown msg='Unicode: 😃😇👍' theme={theme} />
|
|
||||||
<Markdown msg='Shortnames: :joy::+1:' theme={theme} />
|
|
||||||
<Markdown
|
|
||||||
msg='Custom emojis: :react_rocket: :nyan_rocket: :marioparty:'
|
|
||||||
theme={theme}
|
|
||||||
getCustomEmoji={getCustomEmoji}
|
|
||||||
baseUrl={baseUrl}
|
|
||||||
/>
|
|
||||||
<Markdown
|
|
||||||
msg='😃 :+1: :marioparty:'
|
|
||||||
theme={theme}
|
|
||||||
getCustomEmoji={getCustomEmoji}
|
|
||||||
baseUrl={baseUrl}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
|
|
||||||
<StoriesSeparator style={styles.separator} title='Block Quote' theme={theme} />
|
|
||||||
<View style={styles.container}>
|
|
||||||
<Markdown
|
|
||||||
msg={`> This is block quote
|
|
||||||
this is a normal line`}
|
this is a normal line`}
|
||||||
theme={theme}
|
theme={theme}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
|
));
|
||||||
|
|
||||||
<StoriesSeparator style={styles.separator} title='Links' theme={theme} />
|
stories.add('Links', () => (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<Markdown msg='[Markdown link](https://rocket.chat): `[description](url)`' theme={theme} />
|
<Markdown msg='[Markdown link](https://rocket.chat): `[description](url)`' theme={theme} />
|
||||||
<Markdown msg='<https://rocket.chat|Formatted Link>: `<url|description>`' theme={theme} />
|
<Markdown msg='<https://rocket.chat|Formatted Link>: `<url|description>`' theme={theme} />
|
||||||
</View>
|
</View>
|
||||||
|
));
|
||||||
|
|
||||||
<StoriesSeparator style={styles.separator} title='Image' theme={theme} />
|
|
||||||
<View style={styles.container}>
|
|
||||||
<Markdown msg='![alt text](https://play.google.com/intl/en_us/badges/images/badge_new.png)' theme={theme} />
|
|
||||||
</View>
|
|
||||||
|
|
||||||
<StoriesSeparator style={styles.separator} title='Headers' theme={theme} />
|
stories.add('Image', () => (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<Markdown
|
<Markdown msg='![alt text](https://play.google.com/intl/en_us/badges/images/badge_new.png)' theme={theme} />
|
||||||
msg='# Header 1'
|
</View>
|
||||||
theme={theme}
|
));
|
||||||
/>
|
|
||||||
<Markdown
|
|
||||||
msg='## Header 2'
|
|
||||||
theme={theme}
|
|
||||||
/>
|
|
||||||
<Markdown
|
|
||||||
msg='### Header 3'
|
|
||||||
theme={theme}
|
|
||||||
/>
|
|
||||||
<Markdown
|
|
||||||
msg='#### Header 4'
|
|
||||||
theme={theme}
|
|
||||||
/>
|
|
||||||
<Markdown
|
|
||||||
msg='##### Header 5'
|
|
||||||
theme={theme}
|
|
||||||
/>
|
|
||||||
<Markdown
|
|
||||||
msg='###### Header 6'
|
|
||||||
theme={theme}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
|
|
||||||
<StoriesSeparator style={styles.separator} title='Inline Code' theme={theme} />
|
stories.add('Headers', () => (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<Markdown
|
<Markdown
|
||||||
msg='This is `inline code`'
|
msg='# Header 1'
|
||||||
theme={theme}
|
theme={theme}
|
||||||
/>
|
/>
|
||||||
</View>
|
<Markdown
|
||||||
|
msg='## Header 2'
|
||||||
|
theme={theme}
|
||||||
|
/>
|
||||||
|
<Markdown
|
||||||
|
msg='### Header 3'
|
||||||
|
theme={theme}
|
||||||
|
/>
|
||||||
|
<Markdown
|
||||||
|
msg='#### Header 4'
|
||||||
|
theme={theme}
|
||||||
|
/>
|
||||||
|
<Markdown
|
||||||
|
msg='##### Header 5'
|
||||||
|
theme={theme}
|
||||||
|
/>
|
||||||
|
<Markdown
|
||||||
|
msg='###### Header 6'
|
||||||
|
theme={theme}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
));
|
||||||
|
|
||||||
<StoriesSeparator style={styles.separator} title='Code Block' theme={theme} />
|
stories.add('Code', () => (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<Markdown
|
<Markdown
|
||||||
msg='Inline `code` has `back-ticks around` it.
|
msg='This is `inline code`'
|
||||||
|
theme={theme}
|
||||||
|
/>
|
||||||
|
<Markdown
|
||||||
|
msg='Inline `code` has `back-ticks around` it.
|
||||||
```
|
```
|
||||||
Code block
|
Code block
|
||||||
```'
|
```'
|
||||||
theme={theme}
|
theme={theme}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
|
));
|
||||||
|
|
||||||
<StoriesSeparator style={styles.separator} title='Lists' theme={theme} />
|
stories.add('Lists', () => (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<Markdown
|
<Markdown
|
||||||
msg={'* Open Source\n* Rocket.Chat\n - nodejs\n - ReactNative'}
|
msg={'* Open Source\n* Rocket.Chat\n - nodejs\n - ReactNative'}
|
||||||
theme={theme}
|
theme={theme}
|
||||||
/>
|
/>
|
||||||
</View>
|
<Markdown
|
||||||
|
msg={'1. Open Source\n2. Rocket.Chat'}
|
||||||
|
theme={theme}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
));
|
||||||
|
|
||||||
<StoriesSeparator style={styles.separator} title='Numbered Lists' theme={theme} />
|
stories.add('Table', () => (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<Markdown
|
<Markdown
|
||||||
msg={'1. Open Source\n2. Rocket.Chat'}
|
msg='First Header | Second Header
|
||||||
theme={theme}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
|
|
||||||
<StoriesSeparator style={styles.separator} title='Emphasis' theme={theme} />
|
|
||||||
<View style={styles.container}>
|
|
||||||
<Markdown
|
|
||||||
msg='Strong emphasis, aka bold, with **asterisks** or __underscores__'
|
|
||||||
theme={theme}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
|
|
||||||
<StoriesSeparator style={styles.separator} title='Table' theme={theme} />
|
|
||||||
<View style={styles.container}>
|
|
||||||
<Markdown
|
|
||||||
msg='First Header | Second Header
|
|
||||||
------------ | -------------
|
------------ | -------------
|
||||||
Content from cell 1 | Content from cell 2
|
Content from cell 1 | Content from cell 2
|
||||||
Content in the first column | Content in the second column'
|
Content in the first column | Content in the second column'
|
||||||
theme={theme}
|
theme={theme}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
</ScrollView>
|
));
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,15 +1,18 @@
|
||||||
|
/* eslint-disable import/no-extraneous-dependencies */
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { ScrollView, Dimensions } from 'react-native';
|
import { ScrollView, Dimensions } from 'react-native';
|
||||||
|
import { storiesOf } from '@storybook/react-native';
|
||||||
|
import { Provider } from 'react-redux';
|
||||||
// import moment from 'moment';
|
// import moment from 'moment';
|
||||||
|
|
||||||
import { themes } from '../../app/constants/colors';
|
import { themes } from '../../app/constants/colors';
|
||||||
import RoomItemComponent from '../../app/presentation/RoomItem/RoomItem';
|
import RoomItemComponent from '../../app/presentation/RoomItem/RoomItem';
|
||||||
import { longText } from '../utils';
|
import { longText } from '../utils';
|
||||||
import StoriesSeparator from './StoriesSeparator';
|
import { store } from './index';
|
||||||
|
|
||||||
const baseUrl = 'https://open.rocket.chat';
|
const baseUrl = 'https://open.rocket.chat';
|
||||||
const { width } = Dimensions.get('window');
|
const { width } = Dimensions.get('window');
|
||||||
let _theme = 'light';
|
const _theme = 'light';
|
||||||
const lastMessage = {
|
const lastMessage = {
|
||||||
u: {
|
u: {
|
||||||
username: 'diego.mello'
|
username: 'diego.mello'
|
||||||
|
@ -22,7 +25,6 @@ const updatedAt = {
|
||||||
|
|
||||||
const RoomItem = props => (
|
const RoomItem = props => (
|
||||||
<RoomItemComponent
|
<RoomItemComponent
|
||||||
rid='abc'
|
|
||||||
type='d'
|
type='d'
|
||||||
name='rocket.cat'
|
name='rocket.cat'
|
||||||
avatar='rocket.cat'
|
avatar='rocket.cat'
|
||||||
|
@ -34,98 +36,109 @@ const RoomItem = props => (
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
// eslint-disable-next-line react/prop-types
|
const stories = storiesOf('Room Item', module)
|
||||||
const Separator = ({ title }) => <StoriesSeparator title={title} theme={_theme} />;
|
.addDecorator(story => <Provider store={store}>{story()}</Provider>)
|
||||||
|
.addDecorator(story => <ScrollView style={{ backgroundColor: themes[_theme].backgroundColor }}>{story()}</ScrollView>);
|
||||||
|
|
||||||
// eslint-disable-next-line react/prop-types
|
|
||||||
export default ({ theme }) => {
|
|
||||||
_theme = theme;
|
|
||||||
return (
|
|
||||||
<ScrollView style={{ backgroundColor: themes[theme].auxiliaryBackground }}>
|
|
||||||
<Separator title='Basic' />
|
|
||||||
<RoomItem />
|
|
||||||
|
|
||||||
<Separator title='User' />
|
stories.add('Basic', () => (
|
||||||
<RoomItem name='diego.mello' avatar='diego.mello' />
|
<RoomItem />
|
||||||
<RoomItem
|
));
|
||||||
name={longText}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Separator title='Type' />
|
|
||||||
<RoomItem type='d' />
|
|
||||||
<RoomItem type='c' />
|
|
||||||
<RoomItem type='p' />
|
|
||||||
<RoomItem type='l' />
|
|
||||||
<RoomItem type='discussion' />
|
|
||||||
<RoomItem type='d' isGroupChat />
|
|
||||||
<RoomItem type='&' />
|
|
||||||
|
|
||||||
<Separator title='User status' />
|
stories.add('User', () => (
|
||||||
<RoomItem status='online' />
|
<>
|
||||||
<RoomItem status='away' />
|
<RoomItem name='diego.mello' avatar='diego.mello' />
|
||||||
<RoomItem status='busy' />
|
<RoomItem
|
||||||
<RoomItem status='offline' />
|
name={longText}
|
||||||
<RoomItem status='loading' />
|
/>
|
||||||
<RoomItem status='wrong' />
|
</>
|
||||||
|
));
|
||||||
|
|
||||||
<Separator title='Alerts' />
|
stories.add('Type', () => (
|
||||||
<RoomItem alert />
|
<>
|
||||||
<RoomItem alert name='unread' unread={1} />
|
<RoomItem type='d' />
|
||||||
<RoomItem alert name='unread' unread={1000} />
|
<RoomItem type='c' />
|
||||||
<RoomItem alert name='user mentions' unread={1} userMentions={1} />
|
<RoomItem type='p' />
|
||||||
<RoomItem alert name='group mentions' unread={1} groupMentions={1} />
|
<RoomItem type='l' />
|
||||||
<RoomItem alert name='thread unread' tunread={[1]} />
|
<RoomItem type='discussion' />
|
||||||
<RoomItem alert name='thread unread user' tunread={[1]} tunreadUser={[1]} />
|
<RoomItem type='d' isGroupChat />
|
||||||
<RoomItem alert name='thread unread group' tunread={[1]} tunreadGroup={[1]} />
|
<RoomItem type='&' />
|
||||||
<RoomItem name='user mentions priority 1' alert unread={1} userMentions={1} groupMentions={1} tunread={[1]} />
|
</>
|
||||||
<RoomItem name='group mentions priority 2' alert unread={1} groupMentions={1} tunread={[1]} />
|
));
|
||||||
<RoomItem name='thread unread priority 3' alert unread={1} tunread={[1]} />
|
|
||||||
|
|
||||||
<Separator title='Last Message' />
|
stories.add('User status', () => (
|
||||||
<RoomItem
|
<>
|
||||||
showLastMessage
|
<RoomItem status='online' />
|
||||||
/>
|
<RoomItem status='away' />
|
||||||
<RoomItem
|
<RoomItem status='busy' />
|
||||||
showLastMessage
|
<RoomItem status='offline' />
|
||||||
lastMessage={{
|
<RoomItem status='loading' />
|
||||||
u: {
|
<RoomItem status='wrong' />
|
||||||
username: 'rocket.chat'
|
</>
|
||||||
},
|
));
|
||||||
msg: '2'
|
|
||||||
}}
|
stories.add('Alerts', () => (
|
||||||
/>
|
<>
|
||||||
<RoomItem
|
<RoomItem alert />
|
||||||
showLastMessage
|
<RoomItem alert name='unread' unread={1} />
|
||||||
lastMessage={{
|
<RoomItem alert name='unread' unread={1000} />
|
||||||
u: {
|
<RoomItem alert name='user mentions' unread={1} userMentions={1} />
|
||||||
username: 'diego.mello'
|
<RoomItem alert name='group mentions' unread={1} groupMentions={1} />
|
||||||
},
|
<RoomItem alert name='thread unread' tunread={[1]} />
|
||||||
msg: '1'
|
<RoomItem alert name='thread unread user' tunread={[1]} tunreadUser={[1]} />
|
||||||
}}
|
<RoomItem alert name='thread unread group' tunread={[1]} tunreadGroup={[1]} />
|
||||||
username='diego.mello'
|
<RoomItem name='user mentions priority 1' alert unread={1} userMentions={1} groupMentions={1} tunread={[1]} />
|
||||||
/>
|
<RoomItem name='group mentions priority 2' alert unread={1} groupMentions={1} tunread={[1]} />
|
||||||
<RoomItem
|
<RoomItem name='thread unread priority 3' alert unread={1} tunread={[1]} />
|
||||||
showLastMessage
|
</>
|
||||||
lastMessage={lastMessage}
|
));
|
||||||
/>
|
|
||||||
<RoomItem
|
stories.add('Last Message', () => (
|
||||||
showLastMessage
|
<>
|
||||||
alert
|
<RoomItem
|
||||||
unread={1}
|
showLastMessage
|
||||||
lastMessage={lastMessage}
|
/>
|
||||||
/>
|
<RoomItem
|
||||||
<RoomItem
|
showLastMessage
|
||||||
showLastMessage
|
lastMessage={{
|
||||||
alert
|
u: {
|
||||||
unread={1000}
|
username: 'rocket.chat'
|
||||||
lastMessage={lastMessage}
|
},
|
||||||
/>
|
msg: '2'
|
||||||
<RoomItem
|
}}
|
||||||
showLastMessage
|
/>
|
||||||
alert
|
<RoomItem
|
||||||
tunread={[1]}
|
showLastMessage
|
||||||
lastMessage={lastMessage}
|
lastMessage={{
|
||||||
/>
|
u: {
|
||||||
</ScrollView>
|
username: 'diego.mello'
|
||||||
);
|
},
|
||||||
};
|
msg: '1'
|
||||||
|
}}
|
||||||
|
username='diego.mello'
|
||||||
|
/>
|
||||||
|
<RoomItem
|
||||||
|
showLastMessage
|
||||||
|
lastMessage={lastMessage}
|
||||||
|
/>
|
||||||
|
<RoomItem
|
||||||
|
showLastMessage
|
||||||
|
alert
|
||||||
|
unread={1}
|
||||||
|
lastMessage={lastMessage}
|
||||||
|
/>
|
||||||
|
<RoomItem
|
||||||
|
showLastMessage
|
||||||
|
alert
|
||||||
|
unread={1000}
|
||||||
|
lastMessage={lastMessage}
|
||||||
|
/>
|
||||||
|
<RoomItem
|
||||||
|
showLastMessage
|
||||||
|
alert
|
||||||
|
tunread={[1]}
|
||||||
|
lastMessage={lastMessage}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
));
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
import React from 'react';
|
|
||||||
import { Text, StyleSheet } from 'react-native';
|
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
|
|
||||||
import { themes } from '../../app/constants/colors';
|
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
|
||||||
separator: {
|
|
||||||
marginVertical: 30,
|
|
||||||
marginLeft: 10,
|
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: '300'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const Separator = ({ title, style, theme }) => (
|
|
||||||
<Text
|
|
||||||
style={[
|
|
||||||
styles.separator,
|
|
||||||
{
|
|
||||||
color: themes[theme].titleText
|
|
||||||
},
|
|
||||||
style
|
|
||||||
]}
|
|
||||||
>
|
|
||||||
{title}
|
|
||||||
</Text>
|
|
||||||
);
|
|
||||||
|
|
||||||
Separator.propTypes = {
|
|
||||||
title: PropTypes.string.isRequired,
|
|
||||||
theme: PropTypes.string,
|
|
||||||
style: PropTypes.object
|
|
||||||
};
|
|
||||||
|
|
||||||
export default Separator;
|
|
|
@ -1,11 +1,11 @@
|
||||||
|
/* eslint-disable import/no-extraneous-dependencies */
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { ScrollView, StyleSheet, SafeAreaView } from 'react-native';
|
import { ScrollView, StyleSheet, SafeAreaView } from 'react-native';
|
||||||
|
import { storiesOf } from '@storybook/react-native';
|
||||||
|
import MessageContext from '../../app/containers/message/Context';
|
||||||
|
|
||||||
import { UiKitMessage } from '../../app/containers/UIKit';
|
import { UiKitMessage } from '../../app/containers/UIKit';
|
||||||
import StoriesSeparator from './StoriesSeparator';
|
import { themes } from '../../app/constants/colors';
|
||||||
|
|
||||||
// eslint-disable-next-line react/prop-types
|
|
||||||
const Separator = ({ title }) => <StoriesSeparator title={title} theme='light' />;
|
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
container: {
|
container: {
|
||||||
|
@ -17,426 +17,435 @@ const styles = StyleSheet.create({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
export default () => (
|
const user = {
|
||||||
<SafeAreaView style={styles.container}>
|
id: 'y8bd77ptZswPj3EW8',
|
||||||
<ScrollView style={[styles.container, styles.padding]} keyboardShouldPersistTaps='always'>
|
username: 'diego.mello',
|
||||||
<Separator title='Section' />
|
token: '79q6lH40W4ZRGLOshDiDiVlQaCc4f_lU9HNdHLAzuHz'
|
||||||
{
|
};
|
||||||
UiKitMessage([{
|
|
||||||
type: 'section',
|
const baseUrl = 'https://open.rocket.chat';
|
||||||
|
|
||||||
|
const messageDecorator = story => (
|
||||||
|
<MessageContext.Provider
|
||||||
|
value={{
|
||||||
|
user,
|
||||||
|
baseUrl,
|
||||||
|
onPress: () => {},
|
||||||
|
onLongPress: () => {},
|
||||||
|
reactionInit: () => {},
|
||||||
|
onErrorPress: () => {},
|
||||||
|
replyBroadcast: () => {},
|
||||||
|
onReactionPress: () => {},
|
||||||
|
onDiscussionPress: () => {},
|
||||||
|
onReactionLongPress: () => {},
|
||||||
|
threadBadgeColor: themes.light.tunreadColor
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{story()}
|
||||||
|
</MessageContext.Provider>
|
||||||
|
);
|
||||||
|
|
||||||
|
const stories = storiesOf('UiKitMessage', module)
|
||||||
|
.addDecorator(story => <SafeAreaView style={styles.container}>{story()}</SafeAreaView>)
|
||||||
|
.addDecorator(story => <ScrollView style={[styles.container, styles.padding]} keyboardShouldPersistTaps='always'>{story()}</ScrollView>)
|
||||||
|
.addDecorator(messageDecorator);
|
||||||
|
|
||||||
|
const Section = () => UiKitMessage([{
|
||||||
|
type: 'section',
|
||||||
|
text: {
|
||||||
|
type: 'mrkdwn',
|
||||||
|
text: 'Section'
|
||||||
|
}
|
||||||
|
}]);
|
||||||
|
stories.add('Section', () => <Section />);
|
||||||
|
|
||||||
|
const SectionMarkdownList = () => UiKitMessage([{
|
||||||
|
type: 'section',
|
||||||
|
text: {
|
||||||
|
type: 'mrkdwn',
|
||||||
|
text: '*List*:\n1. Item'
|
||||||
|
}
|
||||||
|
}]);
|
||||||
|
stories.add('Section + Markdown List', () => <SectionMarkdownList />);
|
||||||
|
|
||||||
|
const SectionOverflow = () => UiKitMessage([
|
||||||
|
{
|
||||||
|
type: 'section',
|
||||||
|
text: {
|
||||||
|
type: 'mrkdwn',
|
||||||
|
text: 'Section + Overflow'
|
||||||
|
},
|
||||||
|
accessory: {
|
||||||
|
type: 'overflow',
|
||||||
|
options: [
|
||||||
|
{
|
||||||
text: {
|
text: {
|
||||||
type: 'mrkdwn',
|
|
||||||
text: 'Section'
|
|
||||||
}
|
|
||||||
}])
|
|
||||||
}
|
|
||||||
|
|
||||||
<Separator title='Section + Markdown List' />
|
|
||||||
{
|
|
||||||
UiKitMessage([{
|
|
||||||
type: 'section',
|
|
||||||
text: {
|
|
||||||
type: 'mrkdwn',
|
|
||||||
text: '*List*:\n1. Item'
|
|
||||||
}
|
|
||||||
}])
|
|
||||||
}
|
|
||||||
|
|
||||||
<Separator title='Section + Overflow' />
|
|
||||||
{
|
|
||||||
UiKitMessage([
|
|
||||||
{
|
|
||||||
type: 'section',
|
|
||||||
text: {
|
|
||||||
type: 'mrkdwn',
|
|
||||||
text: 'Section + Overflow'
|
|
||||||
},
|
|
||||||
accessory: {
|
|
||||||
type: 'overflow',
|
|
||||||
options: [
|
|
||||||
{
|
|
||||||
text: {
|
|
||||||
type: 'plain_text',
|
|
||||||
text: 'Option 1',
|
|
||||||
emoji: true
|
|
||||||
},
|
|
||||||
value: 'value-0'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: {
|
|
||||||
type: 'plain_text',
|
|
||||||
text: 'Option 2',
|
|
||||||
emoji: true
|
|
||||||
},
|
|
||||||
value: 'value-1'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: {
|
|
||||||
type: 'plain_text',
|
|
||||||
text: 'Option 3',
|
|
||||||
emoji: true
|
|
||||||
},
|
|
||||||
value: 'value-2'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: {
|
|
||||||
type: 'plain_text',
|
|
||||||
text: 'Option 4',
|
|
||||||
emoji: true
|
|
||||||
},
|
|
||||||
value: 'value-3'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
])
|
|
||||||
}
|
|
||||||
|
|
||||||
<Separator title='Section + image' />
|
|
||||||
{
|
|
||||||
UiKitMessage([{
|
|
||||||
type: 'section',
|
|
||||||
text: {
|
|
||||||
type: 'mrkdwn',
|
|
||||||
text: 'Section + Image'
|
|
||||||
},
|
|
||||||
accessory: {
|
|
||||||
type: 'image',
|
|
||||||
imageUrl: 'https://raw.githubusercontent.com/RocketChat/Rocket.Chat.Artwork/master/Logos/icon-circle-256.png',
|
|
||||||
altText: 'plants'
|
|
||||||
}
|
|
||||||
}])
|
|
||||||
}
|
|
||||||
|
|
||||||
<Separator title='Section + button' />
|
|
||||||
{
|
|
||||||
UiKitMessage([{
|
|
||||||
type: 'section',
|
|
||||||
text: {
|
|
||||||
type: 'mrkdwn',
|
|
||||||
text: 'Section + button'
|
|
||||||
},
|
|
||||||
accessory: {
|
|
||||||
type: 'button',
|
|
||||||
text: {
|
|
||||||
type: 'plain_text',
|
|
||||||
text: 'button'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}])
|
|
||||||
}
|
|
||||||
|
|
||||||
<Separator title='Section + Select' />
|
|
||||||
{
|
|
||||||
UiKitMessage([{
|
|
||||||
type: 'section',
|
|
||||||
text: {
|
|
||||||
type: 'mrkdwn',
|
|
||||||
text: 'Section + select'
|
|
||||||
},
|
|
||||||
accessory: {
|
|
||||||
type: 'static_select',
|
|
||||||
options: [
|
|
||||||
{
|
|
||||||
value: 1,
|
|
||||||
text: {
|
|
||||||
type: 'plain_text',
|
|
||||||
text: 'button'
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
value: 2,
|
|
||||||
text: {
|
|
||||||
type: 'plain_text',
|
|
||||||
text: 'second button'
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
}])
|
|
||||||
}
|
|
||||||
|
|
||||||
<Separator title='Section + DatePicker' />
|
|
||||||
{
|
|
||||||
UiKitMessage([{
|
|
||||||
type: 'section',
|
|
||||||
text: {
|
|
||||||
type: 'mrkdwn',
|
|
||||||
text: 'Section + DatePicker'
|
|
||||||
},
|
|
||||||
accessory: {
|
|
||||||
type: 'datepicker',
|
|
||||||
initial_date: '1990-04-28',
|
|
||||||
placeholder: {
|
|
||||||
type: 'plain_text',
|
|
||||||
text: 'Select a date',
|
|
||||||
emoji: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}])
|
|
||||||
}
|
|
||||||
|
|
||||||
<Separator title='Section + Multi Select' />
|
|
||||||
{
|
|
||||||
UiKitMessage([{
|
|
||||||
type: 'section',
|
|
||||||
text: {
|
|
||||||
type: 'mrkdwn',
|
|
||||||
text: 'Section + select'
|
|
||||||
},
|
|
||||||
accessory: {
|
|
||||||
type: 'multi_static_select',
|
|
||||||
options: [{
|
|
||||||
text: {
|
|
||||||
type: 'plain_text',
|
|
||||||
text: 'button'
|
|
||||||
},
|
|
||||||
value: 1
|
|
||||||
}, {
|
|
||||||
text: {
|
|
||||||
type: 'plain_text',
|
|
||||||
text: 'opt 1'
|
|
||||||
},
|
|
||||||
value: 2
|
|
||||||
}, {
|
|
||||||
text: {
|
|
||||||
type: 'plain_text',
|
|
||||||
text: 'opt 2'
|
|
||||||
},
|
|
||||||
value: 3
|
|
||||||
}, {
|
|
||||||
text: {
|
|
||||||
type: 'plain_text',
|
|
||||||
text: 'opt 3'
|
|
||||||
},
|
|
||||||
value: 4
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
}])
|
|
||||||
}
|
|
||||||
|
|
||||||
<Separator title='Image' />
|
|
||||||
{
|
|
||||||
UiKitMessage([{
|
|
||||||
type: 'image',
|
|
||||||
title: {
|
|
||||||
type: 'plain_text',
|
type: 'plain_text',
|
||||||
text: 'Example Image',
|
text: 'Option 1',
|
||||||
emoji: true
|
emoji: true
|
||||||
},
|
},
|
||||||
imageUrl: 'https://raw.githubusercontent.com/RocketChat/Rocket.Chat.Artwork/master/Logos/icon-circle-256.png',
|
value: 'value-0'
|
||||||
altText: 'Example Image'
|
},
|
||||||
}])
|
{
|
||||||
}
|
text: {
|
||||||
|
type: 'plain_text',
|
||||||
<Separator title='Context' />
|
text: 'Option 2',
|
||||||
{
|
emoji: true
|
||||||
UiKitMessage([{
|
|
||||||
type: 'context',
|
|
||||||
elements: [{
|
|
||||||
type: 'image',
|
|
||||||
title: {
|
|
||||||
type: 'plain_text',
|
|
||||||
text: 'Example Image',
|
|
||||||
emoji: true
|
|
||||||
},
|
|
||||||
imageUrl: 'https://raw.githubusercontent.com/RocketChat/Rocket.Chat.Artwork/master/Logos/icon-circle-256.png',
|
|
||||||
altText: 'Example Image'
|
|
||||||
},
|
},
|
||||||
{
|
value: 'value-1'
|
||||||
type: 'mrkdwn',
|
},
|
||||||
text: 'context'
|
{
|
||||||
}
|
text: {
|
||||||
]
|
type: 'plain_text',
|
||||||
}])
|
text: 'Option 3',
|
||||||
}
|
emoji: true
|
||||||
|
},
|
||||||
|
value: 'value-2'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: {
|
||||||
|
type: 'plain_text',
|
||||||
|
text: 'Option 4',
|
||||||
|
emoji: true
|
||||||
|
},
|
||||||
|
value: 'value-3'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
stories.add('Section + Overflow', () => <SectionOverflow />);
|
||||||
|
|
||||||
<Separator title='Action - Buttons' />
|
const SectionImage = () => UiKitMessage([{
|
||||||
{
|
type: 'section',
|
||||||
UiKitMessage([{
|
text: {
|
||||||
type: 'actions',
|
type: 'mrkdwn',
|
||||||
elements: [
|
text: 'Section + Image'
|
||||||
{
|
},
|
||||||
type: 'button',
|
accessory: {
|
||||||
text: {
|
type: 'image',
|
||||||
type: 'plain_text',
|
imageUrl: 'https://raw.githubusercontent.com/RocketChat/Rocket.Chat.Artwork/master/Logos/icon-circle-256.png',
|
||||||
emoji: true,
|
altText: 'plants'
|
||||||
text: 'Approve'
|
}
|
||||||
},
|
}]);
|
||||||
style: 'primary',
|
stories.add('Section + image', () => <SectionImage />);
|
||||||
value: 'click_me_123'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'button',
|
|
||||||
text: {
|
|
||||||
type: 'plain_text',
|
|
||||||
emoji: true,
|
|
||||||
text: 'Deny'
|
|
||||||
},
|
|
||||||
style: 'danger',
|
|
||||||
value: 'click_me_123'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'button',
|
|
||||||
text: {
|
|
||||||
type: 'plain_text',
|
|
||||||
emoji: true,
|
|
||||||
text: 'Deny'
|
|
||||||
},
|
|
||||||
style: 'danger',
|
|
||||||
value: 'click_me_123'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'button',
|
|
||||||
text: {
|
|
||||||
type: 'plain_text',
|
|
||||||
emoji: true,
|
|
||||||
text: 'Deny'
|
|
||||||
},
|
|
||||||
style: 'danger',
|
|
||||||
value: 'click_me_123'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'button',
|
|
||||||
text: {
|
|
||||||
type: 'plain_text',
|
|
||||||
emoji: true,
|
|
||||||
text: 'Deny'
|
|
||||||
},
|
|
||||||
style: 'danger',
|
|
||||||
value: 'click_me_123'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'button',
|
|
||||||
text: {
|
|
||||||
type: 'plain_text',
|
|
||||||
emoji: true,
|
|
||||||
text: 'Deny'
|
|
||||||
},
|
|
||||||
style: 'danger',
|
|
||||||
value: 'click_me_123'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'button',
|
|
||||||
text: {
|
|
||||||
type: 'plain_text',
|
|
||||||
emoji: true,
|
|
||||||
text: 'Deny'
|
|
||||||
},
|
|
||||||
style: 'danger',
|
|
||||||
value: 'click_me_123'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}])
|
|
||||||
}
|
|
||||||
|
|
||||||
<Separator title='Fields' />
|
const SectionButton = () => UiKitMessage([{
|
||||||
{
|
type: 'section',
|
||||||
UiKitMessage([
|
text: {
|
||||||
{
|
type: 'mrkdwn',
|
||||||
type: 'section',
|
text: 'Section + button'
|
||||||
fields: [
|
},
|
||||||
{
|
accessory: {
|
||||||
type: 'plain_text',
|
type: 'button',
|
||||||
text: '*this is plain_text text*',
|
text: {
|
||||||
emoji: true
|
type: 'plain_text',
|
||||||
},
|
text: 'button'
|
||||||
{
|
}
|
||||||
type: 'plain_text',
|
}
|
||||||
text: '*this is plain_text text*',
|
}]);
|
||||||
emoji: true
|
stories.add('Section + button', () => <SectionButton />);
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'plain_text',
|
|
||||||
text: '*this is plain_text text*',
|
|
||||||
emoji: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'plain_text',
|
|
||||||
text: '*this is plain_text text*',
|
|
||||||
emoji: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'plain_text',
|
|
||||||
text: '*this is plain_text text*',
|
|
||||||
emoji: true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}])
|
|
||||||
}
|
|
||||||
|
|
||||||
<Separator title='Action - Select' />
|
const SectionSelect = () => UiKitMessage([{
|
||||||
|
type: 'section',
|
||||||
|
text: {
|
||||||
|
type: 'mrkdwn',
|
||||||
|
text: 'Section + select'
|
||||||
|
},
|
||||||
|
accessory: {
|
||||||
|
type: 'static_select',
|
||||||
|
options: [
|
||||||
{
|
{
|
||||||
UiKitMessage([{
|
value: 1,
|
||||||
type: 'actions',
|
text: {
|
||||||
elements: [
|
type: 'plain_text',
|
||||||
{
|
text: 'button'
|
||||||
type: 'conversations_select',
|
}
|
||||||
placeholder: {
|
}, {
|
||||||
type: 'plain_text',
|
value: 2,
|
||||||
text: 'Select a conversation',
|
text: {
|
||||||
emoji: true
|
type: 'plain_text',
|
||||||
}
|
text: 'second button'
|
||||||
},
|
}
|
||||||
{
|
}]
|
||||||
type: 'channels_select',
|
}
|
||||||
placeholder: {
|
}]);
|
||||||
type: 'plain_text',
|
stories.add('Section + Select', () => <SectionSelect />);
|
||||||
text: 'Select a channel',
|
|
||||||
emoji: true
|
const SectionDatePicker = () => UiKitMessage([{
|
||||||
}
|
type: 'section',
|
||||||
},
|
text: {
|
||||||
{
|
type: 'mrkdwn',
|
||||||
type: 'users_select',
|
text: 'Section + DatePicker'
|
||||||
placeholder: {
|
},
|
||||||
type: 'plain_text',
|
accessory: {
|
||||||
text: 'Select a user',
|
type: 'datepicker',
|
||||||
emoji: true
|
initial_date: '1990-04-28',
|
||||||
}
|
placeholder: {
|
||||||
},
|
type: 'plain_text',
|
||||||
{
|
text: 'Select a date',
|
||||||
type: 'static_select',
|
emoji: true
|
||||||
placeholder: {
|
}
|
||||||
type: 'plain_text',
|
}
|
||||||
text: 'Select an item',
|
}]);
|
||||||
emoji: true
|
stories.add('Section + DatePicker', () => <SectionDatePicker />);
|
||||||
},
|
|
||||||
options: [
|
const SectionMultiSelect = () => UiKitMessage([{
|
||||||
{
|
type: 'section',
|
||||||
text: {
|
text: {
|
||||||
type: 'plain_text',
|
type: 'mrkdwn',
|
||||||
text: 'Excellent item 1',
|
text: 'Section + select'
|
||||||
emoji: true
|
},
|
||||||
},
|
accessory: {
|
||||||
value: 'value-0'
|
type: 'multi_static_select',
|
||||||
},
|
options: [{
|
||||||
{
|
text: {
|
||||||
text: {
|
type: 'plain_text',
|
||||||
type: 'plain_text',
|
text: 'button'
|
||||||
text: 'Fantastic item 2',
|
},
|
||||||
emoji: true
|
value: 1
|
||||||
},
|
}, {
|
||||||
value: 'value-1'
|
text: {
|
||||||
},
|
type: 'plain_text',
|
||||||
{
|
text: 'opt 1'
|
||||||
text: {
|
},
|
||||||
type: 'plain_text',
|
value: 2
|
||||||
text: 'Nifty item 3',
|
}, {
|
||||||
emoji: true
|
text: {
|
||||||
},
|
type: 'plain_text',
|
||||||
value: 'value-2'
|
text: 'opt 2'
|
||||||
},
|
},
|
||||||
{
|
value: 3
|
||||||
text: {
|
}, {
|
||||||
type: 'plain_text',
|
text: {
|
||||||
text: 'Pretty good item 4',
|
type: 'plain_text',
|
||||||
emoji: true
|
text: 'opt 3'
|
||||||
},
|
},
|
||||||
value: 'value-3'
|
value: 4
|
||||||
}
|
}]
|
||||||
]
|
}
|
||||||
}
|
}]);
|
||||||
]
|
stories.add('Section + Multi Select', () => <SectionMultiSelect />);
|
||||||
}])
|
|
||||||
|
const Image = () => UiKitMessage([{
|
||||||
|
type: 'image',
|
||||||
|
title: {
|
||||||
|
type: 'plain_text',
|
||||||
|
text: 'Example Image',
|
||||||
|
emoji: true
|
||||||
|
},
|
||||||
|
imageUrl: 'https://raw.githubusercontent.com/RocketChat/Rocket.Chat.Artwork/master/Logos/icon-circle-256.png',
|
||||||
|
altText: 'Example Image'
|
||||||
|
}]);
|
||||||
|
stories.add('Image', () => <Image />);
|
||||||
|
|
||||||
|
const Context = () => UiKitMessage([{
|
||||||
|
type: 'context',
|
||||||
|
elements: [{
|
||||||
|
type: 'image',
|
||||||
|
title: {
|
||||||
|
type: 'plain_text',
|
||||||
|
text: 'Example Image',
|
||||||
|
emoji: true
|
||||||
|
},
|
||||||
|
imageUrl: 'https://raw.githubusercontent.com/RocketChat/Rocket.Chat.Artwork/master/Logos/icon-circle-256.png',
|
||||||
|
altText: 'Example Image'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'mrkdwn',
|
||||||
|
text: 'context'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}]);
|
||||||
|
stories.add('Context', () => <Context />);
|
||||||
|
|
||||||
|
const ActionButton = () => UiKitMessage([{
|
||||||
|
type: 'actions',
|
||||||
|
elements: [
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
text: {
|
||||||
|
type: 'plain_text',
|
||||||
|
emoji: true,
|
||||||
|
text: 'Approve'
|
||||||
|
},
|
||||||
|
style: 'primary',
|
||||||
|
value: 'click_me_123'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
text: {
|
||||||
|
type: 'plain_text',
|
||||||
|
emoji: true,
|
||||||
|
text: 'Deny'
|
||||||
|
},
|
||||||
|
style: 'danger',
|
||||||
|
value: 'click_me_123'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
text: {
|
||||||
|
type: 'plain_text',
|
||||||
|
emoji: true,
|
||||||
|
text: 'Deny'
|
||||||
|
},
|
||||||
|
style: 'danger',
|
||||||
|
value: 'click_me_123'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
text: {
|
||||||
|
type: 'plain_text',
|
||||||
|
emoji: true,
|
||||||
|
text: 'Deny'
|
||||||
|
},
|
||||||
|
style: 'danger',
|
||||||
|
value: 'click_me_123'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
text: {
|
||||||
|
type: 'plain_text',
|
||||||
|
emoji: true,
|
||||||
|
text: 'Deny'
|
||||||
|
},
|
||||||
|
style: 'danger',
|
||||||
|
value: 'click_me_123'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
text: {
|
||||||
|
type: 'plain_text',
|
||||||
|
emoji: true,
|
||||||
|
text: 'Deny'
|
||||||
|
},
|
||||||
|
style: 'danger',
|
||||||
|
value: 'click_me_123'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
text: {
|
||||||
|
type: 'plain_text',
|
||||||
|
emoji: true,
|
||||||
|
text: 'Deny'
|
||||||
|
},
|
||||||
|
style: 'danger',
|
||||||
|
value: 'click_me_123'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}]);
|
||||||
|
stories.add('Action - Buttons', () => <ActionButton />);
|
||||||
|
|
||||||
|
const Fields = () => UiKitMessage([
|
||||||
|
{
|
||||||
|
type: 'section',
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
type: 'plain_text',
|
||||||
|
text: '*this is plain_text text*',
|
||||||
|
emoji: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'plain_text',
|
||||||
|
text: '*this is plain_text text*',
|
||||||
|
emoji: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'plain_text',
|
||||||
|
text: '*this is plain_text text*',
|
||||||
|
emoji: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'plain_text',
|
||||||
|
text: '*this is plain_text text*',
|
||||||
|
emoji: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'plain_text',
|
||||||
|
text: '*this is plain_text text*',
|
||||||
|
emoji: true
|
||||||
}
|
}
|
||||||
</ScrollView>
|
]
|
||||||
</SafeAreaView>
|
}]);
|
||||||
);
|
stories.add('Fields', () => <Fields />);
|
||||||
|
|
||||||
|
const ActionSelect = () => UiKitMessage([{
|
||||||
|
type: 'actions',
|
||||||
|
elements: [
|
||||||
|
{
|
||||||
|
type: 'conversations_select',
|
||||||
|
placeholder: {
|
||||||
|
type: 'plain_text',
|
||||||
|
text: 'Select a conversation',
|
||||||
|
emoji: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'channels_select',
|
||||||
|
placeholder: {
|
||||||
|
type: 'plain_text',
|
||||||
|
text: 'Select a channel',
|
||||||
|
emoji: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'users_select',
|
||||||
|
placeholder: {
|
||||||
|
type: 'plain_text',
|
||||||
|
text: 'Select a user',
|
||||||
|
emoji: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'static_select',
|
||||||
|
placeholder: {
|
||||||
|
type: 'plain_text',
|
||||||
|
text: 'Select an item',
|
||||||
|
emoji: true
|
||||||
|
},
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
text: {
|
||||||
|
type: 'plain_text',
|
||||||
|
text: 'Excellent item 1',
|
||||||
|
emoji: true
|
||||||
|
},
|
||||||
|
value: 'value-0'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: {
|
||||||
|
type: 'plain_text',
|
||||||
|
text: 'Fantastic item 2',
|
||||||
|
emoji: true
|
||||||
|
},
|
||||||
|
value: 'value-1'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: {
|
||||||
|
type: 'plain_text',
|
||||||
|
text: 'Nifty item 3',
|
||||||
|
emoji: true
|
||||||
|
},
|
||||||
|
value: 'value-2'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: {
|
||||||
|
type: 'plain_text',
|
||||||
|
text: 'Pretty good item 4',
|
||||||
|
emoji: true
|
||||||
|
},
|
||||||
|
value: 'value-3'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}]);
|
||||||
|
stories.add('Action - Select', () => <ActionSelect />);
|
||||||
|
|
||||||
|
// stories.add('Section', () => UiKitMessage([{
|
||||||
|
// type: 'section',
|
||||||
|
// text: {
|
||||||
|
// type: 'mrkdwn',
|
||||||
|
// text: 'Section'
|
||||||
|
// }
|
||||||
|
// }]));
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,37 +1,22 @@
|
||||||
/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */
|
/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */
|
||||||
import React from 'react';
|
|
||||||
import { Provider } from 'react-redux';
|
|
||||||
import { createStore, combineReducers } from 'redux';
|
import { createStore, combineReducers } from 'redux';
|
||||||
import { storiesOf } from '@storybook/react-native';
|
|
||||||
|
|
||||||
import RoomItem from './RoomItem';
|
import './RoomItem';
|
||||||
import './List';
|
import './List';
|
||||||
import './ServerItem';
|
import './ServerItem';
|
||||||
import Message from './Message';
|
import './Message';
|
||||||
import UiKitMessage from './UiKitMessage';
|
import './UiKitMessage';
|
||||||
import UiKitModal from './UiKitModal';
|
import './UiKitModal';
|
||||||
import Markdown from './Markdown';
|
import './Markdown';
|
||||||
import './HeaderButtons';
|
import './HeaderButtons';
|
||||||
import './UnreadBadge';
|
import './UnreadBadge';
|
||||||
import '../../app/views/ThreadMessagesView/Item.stories.js';
|
import '../../app/views/ThreadMessagesView/Item.stories.js';
|
||||||
|
import './Avatar';
|
||||||
import '../../app/containers/BackgroundContainer/index.stories.js';
|
import '../../app/containers/BackgroundContainer/index.stories.js';
|
||||||
import '../../app/containers/RoomHeader/RoomHeader.stories.js';
|
import '../../app/containers/RoomHeader/RoomHeader.stories.js';
|
||||||
import Avatar from './Avatar';
|
|
||||||
// import RoomViewHeader from './RoomViewHeader';
|
|
||||||
|
|
||||||
import MessageContext from '../../app/containers/message/Context';
|
|
||||||
import { themes } from '../../app/constants/colors';
|
|
||||||
|
|
||||||
// MessageProvider
|
|
||||||
const baseUrl = 'https://open.rocket.chat';
|
|
||||||
const user = {
|
|
||||||
id: '',
|
|
||||||
username: 'diego.mello',
|
|
||||||
token: ''
|
|
||||||
};
|
|
||||||
|
|
||||||
// Change here to see themed storybook
|
// Change here to see themed storybook
|
||||||
const theme = 'light';
|
export const theme = 'light';
|
||||||
|
|
||||||
const reducers = combineReducers({
|
const reducers = combineReducers({
|
||||||
settings: () => ({}),
|
settings: () => ({}),
|
||||||
|
@ -52,47 +37,4 @@ const reducers = combineReducers({
|
||||||
meteor: () => ({ connected: true }),
|
meteor: () => ({ connected: true }),
|
||||||
activeUsers: () => ({ abc: { status: 'online', statusText: 'dog' } })
|
activeUsers: () => ({ abc: { status: 'online', statusText: 'dog' } })
|
||||||
});
|
});
|
||||||
const store = createStore(reducers);
|
export const store = createStore(reducers);
|
||||||
|
|
||||||
const messageDecorator = story => (
|
|
||||||
<MessageContext.Provider
|
|
||||||
value={{
|
|
||||||
user,
|
|
||||||
baseUrl,
|
|
||||||
onPress: () => {},
|
|
||||||
onLongPress: () => {},
|
|
||||||
reactionInit: () => {},
|
|
||||||
onErrorPress: () => {},
|
|
||||||
replyBroadcast: () => {},
|
|
||||||
onReactionPress: () => {},
|
|
||||||
onDiscussionPress: () => {},
|
|
||||||
onReactionLongPress: () => {},
|
|
||||||
threadBadgeColor: themes.light.tunreadColor
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{story()}
|
|
||||||
</MessageContext.Provider>
|
|
||||||
);
|
|
||||||
|
|
||||||
storiesOf('RoomItem', module)
|
|
||||||
.addDecorator(story => <Provider store={store}>{story()}</Provider>)
|
|
||||||
.add('list roomitem', () => <RoomItem theme={theme} />);
|
|
||||||
storiesOf('Message', module)
|
|
||||||
.addDecorator(story => <Provider store={store}>{story()}</Provider>)
|
|
||||||
.addDecorator(messageDecorator)
|
|
||||||
.add('list message', () => <Message theme={theme} />);
|
|
||||||
|
|
||||||
storiesOf('UiKitMessage', module)
|
|
||||||
.addDecorator(messageDecorator)
|
|
||||||
.add('list uikitmessage', () => <UiKitMessage theme={theme} />);
|
|
||||||
storiesOf('UiKitModal', module)
|
|
||||||
.addDecorator(messageDecorator)
|
|
||||||
.add('list UiKitModal', () => <UiKitModal theme={theme} />);
|
|
||||||
storiesOf('Markdown', module)
|
|
||||||
.add('list Markdown', () => <Markdown theme={theme} />);
|
|
||||||
storiesOf('Avatar', module)
|
|
||||||
.add('list Avatar', () => <Avatar theme={theme} />);
|
|
||||||
|
|
||||||
// FIXME: I couldn't make these pass on jest :(
|
|
||||||
// storiesOf('RoomViewHeader', module)
|
|
||||||
// .add('list', () => <RoomViewHeader theme='black' />);
|
|
||||||
|
|
179
yarn.lock
179
yarn.lock
|
@ -4610,12 +4610,12 @@ bunyan-debug-stream@^1.1.0:
|
||||||
exception-formatter "^1.0.4"
|
exception-formatter "^1.0.4"
|
||||||
|
|
||||||
bunyan@^1.8.12:
|
bunyan@^1.8.12:
|
||||||
version "1.8.12"
|
version "1.8.15"
|
||||||
resolved "https://registry.yarnpkg.com/bunyan/-/bunyan-1.8.12.tgz#f150f0f6748abdd72aeae84f04403be2ef113797"
|
resolved "https://registry.yarnpkg.com/bunyan/-/bunyan-1.8.15.tgz#8ce34ca908a17d0776576ca1b2f6cbd916e93b46"
|
||||||
integrity sha1-8VDw9nSKvdcq6uhPBEA74u8RN5c=
|
integrity sha512-0tECWShh6wUysgucJcBAoYegf3JJoZWibxdqhTm7OHPeT42qdjkZ29QCMcKwbgU1kiH+auSIasNRXMLWXafXig==
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
dtrace-provider "~0.8"
|
dtrace-provider "~0.8"
|
||||||
moment "^2.10.6"
|
moment "^2.19.3"
|
||||||
mv "~2"
|
mv "~2"
|
||||||
safe-json-stringify "~1"
|
safe-json-stringify "~1"
|
||||||
|
|
||||||
|
@ -4756,6 +4756,11 @@ camelcase@^5.0.0, camelcase@^5.3.1:
|
||||||
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320"
|
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320"
|
||||||
integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
|
integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
|
||||||
|
|
||||||
|
camelcase@^6.0.0:
|
||||||
|
version "6.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809"
|
||||||
|
integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==
|
||||||
|
|
||||||
camelize@^1.0.0:
|
camelize@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.0.tgz#164a5483e630fa4321e5af07020e531831b2609b"
|
resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.0.tgz#164a5483e630fa4321e5af07020e531831b2609b"
|
||||||
|
@ -5046,6 +5051,15 @@ cliui@^6.0.0:
|
||||||
strip-ansi "^6.0.0"
|
strip-ansi "^6.0.0"
|
||||||
wrap-ansi "^6.2.0"
|
wrap-ansi "^6.2.0"
|
||||||
|
|
||||||
|
cliui@^7.0.2:
|
||||||
|
version "7.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f"
|
||||||
|
integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==
|
||||||
|
dependencies:
|
||||||
|
string-width "^4.2.0"
|
||||||
|
strip-ansi "^6.0.0"
|
||||||
|
wrap-ansi "^7.0.0"
|
||||||
|
|
||||||
clone-deep@^2.0.1:
|
clone-deep@^2.0.1:
|
||||||
version "2.0.2"
|
version "2.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-2.0.2.tgz#00db3a1e173656730d1188c3d6aced6d7ea97713"
|
resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-2.0.2.tgz#00db3a1e173656730d1188c3d6aced6d7ea97713"
|
||||||
|
@ -5726,6 +5740,11 @@ decamelize@^3.2.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
xregexp "^4.2.4"
|
xregexp "^4.2.4"
|
||||||
|
|
||||||
|
decamelize@^4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837"
|
||||||
|
integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==
|
||||||
|
|
||||||
decode-uri-component@^0.2.0:
|
decode-uri-component@^0.2.0:
|
||||||
version "0.2.0"
|
version "0.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
|
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
|
||||||
|
@ -5904,10 +5923,10 @@ detect-port@^1.3.0:
|
||||||
address "^1.0.1"
|
address "^1.0.1"
|
||||||
debug "^2.6.0"
|
debug "^2.6.0"
|
||||||
|
|
||||||
detox@^16.9.0:
|
detox@^18.10.0:
|
||||||
version "16.9.2"
|
version "18.10.0"
|
||||||
resolved "https://registry.yarnpkg.com/detox/-/detox-16.9.2.tgz#3b99be3df54ef0f35ffe12d3aa87b556d00a50d3"
|
resolved "https://registry.yarnpkg.com/detox/-/detox-18.10.0.tgz#8b8d6b6f2bf9775f09d92b63f98dc1b5f4c9334e"
|
||||||
integrity sha512-yi74zL3hHFRU131B5tgZiYh0hPWvpryntllAKEpxRGRRuz+11s2+TjpuS0M02jGOdDMFBk5BzcXFGM57FWbWNA==
|
integrity sha512-okqMongBq0hKuJN8hxVHoBjM3Ms0XbaaWq5PyZGWuog3SXTX18ux8YjSmCU2J8ESA8muXyuOpl9KGgT8bWJTHA==
|
||||||
dependencies:
|
dependencies:
|
||||||
bunyan "^1.8.12"
|
bunyan "^1.8.12"
|
||||||
bunyan-debug-stream "^1.1.0"
|
bunyan-debug-stream "^1.1.0"
|
||||||
|
@ -5921,16 +5940,18 @@ detox@^16.9.0:
|
||||||
lodash "^4.17.5"
|
lodash "^4.17.5"
|
||||||
minimist "^1.2.0"
|
minimist "^1.2.0"
|
||||||
proper-lockfile "^3.0.2"
|
proper-lockfile "^3.0.2"
|
||||||
|
resolve-from "^5.0.0"
|
||||||
sanitize-filename "^1.6.1"
|
sanitize-filename "^1.6.1"
|
||||||
shell-utils "^1.0.9"
|
serialize-error "^8.0.1"
|
||||||
|
shell-quote "^1.7.2"
|
||||||
signal-exit "^3.0.3"
|
signal-exit "^3.0.3"
|
||||||
tail "^2.0.0"
|
tail "^2.0.0"
|
||||||
telnet-client "1.2.8"
|
telnet-client "1.2.8"
|
||||||
tempfile "^2.0.0"
|
tempfile "^2.0.0"
|
||||||
which "^1.3.1"
|
which "^1.3.1"
|
||||||
ws "^3.3.1"
|
ws "^7.4.3"
|
||||||
yargs "^13.0.0"
|
yargs "^16.0.3"
|
||||||
yargs-parser "^13.0.0"
|
yargs-unparser "^2.0.0"
|
||||||
|
|
||||||
diff-sequences@^24.9.0:
|
diff-sequences@^24.9.0:
|
||||||
version "24.9.0"
|
version "24.9.0"
|
||||||
|
@ -6323,6 +6344,11 @@ es6-shim@^0.35.5:
|
||||||
resolved "https://registry.yarnpkg.com/es6-shim/-/es6-shim-0.35.5.tgz#46f59dc0a84a1c5029e8ff1166ca0a902077a9ab"
|
resolved "https://registry.yarnpkg.com/es6-shim/-/es6-shim-0.35.5.tgz#46f59dc0a84a1c5029e8ff1166ca0a902077a9ab"
|
||||||
integrity sha512-E9kK/bjtCQRpN1K28Xh4BlmP8egvZBGJJ+9GtnzOwt7mdqtrjHFuVGr7QJfdjBIKqrlU5duPf3pCBoDrkjVYFg==
|
integrity sha512-E9kK/bjtCQRpN1K28Xh4BlmP8egvZBGJJ+9GtnzOwt7mdqtrjHFuVGr7QJfdjBIKqrlU5duPf3pCBoDrkjVYFg==
|
||||||
|
|
||||||
|
escalade@^3.1.1:
|
||||||
|
version "3.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
|
||||||
|
integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==
|
||||||
|
|
||||||
escape-html@~1.0.3:
|
escape-html@~1.0.3:
|
||||||
version "1.0.3"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
|
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
|
||||||
|
@ -7281,12 +7307,17 @@ flat-cache@^2.0.1:
|
||||||
write "1.0.3"
|
write "1.0.3"
|
||||||
|
|
||||||
flat@^4.1.0:
|
flat@^4.1.0:
|
||||||
version "4.1.0"
|
version "4.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.0.tgz#090bec8b05e39cba309747f1d588f04dbaf98db2"
|
resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.1.tgz#a392059cc382881ff98642f5da4dde0a959f309b"
|
||||||
integrity sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==
|
integrity sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==
|
||||||
dependencies:
|
dependencies:
|
||||||
is-buffer "~2.0.3"
|
is-buffer "~2.0.3"
|
||||||
|
|
||||||
|
flat@^5.0.2:
|
||||||
|
version "5.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241"
|
||||||
|
integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==
|
||||||
|
|
||||||
flatted@^2.0.0:
|
flatted@^2.0.0:
|
||||||
version "2.0.2"
|
version "2.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138"
|
resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138"
|
||||||
|
@ -7543,7 +7574,7 @@ get-caller-file@^1.0.1:
|
||||||
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a"
|
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a"
|
||||||
integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==
|
integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==
|
||||||
|
|
||||||
get-caller-file@^2.0.1:
|
get-caller-file@^2.0.1, get-caller-file@^2.0.5:
|
||||||
version "2.0.5"
|
version "2.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
|
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
|
||||||
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
|
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
|
||||||
|
@ -8294,7 +8325,12 @@ inherits@2.0.3:
|
||||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
|
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
|
||||||
integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
|
integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
|
||||||
|
|
||||||
ini@^1.3.4, ini@^1.3.5, ini@~1.3.0:
|
ini@^1.3.4:
|
||||||
|
version "1.3.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c"
|
||||||
|
integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==
|
||||||
|
|
||||||
|
ini@^1.3.5, ini@~1.3.0:
|
||||||
version "1.3.5"
|
version "1.3.5"
|
||||||
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
|
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
|
||||||
integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
|
integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
|
||||||
|
@ -8465,9 +8501,9 @@ is-buffer@^1.1.5:
|
||||||
integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==
|
integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==
|
||||||
|
|
||||||
is-buffer@~2.0.3:
|
is-buffer@~2.0.3:
|
||||||
version "2.0.4"
|
version "2.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623"
|
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191"
|
||||||
integrity sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==
|
integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==
|
||||||
|
|
||||||
is-callable@^1.1.4, is-callable@^1.1.5:
|
is-callable@^1.1.4, is-callable@^1.1.5:
|
||||||
version "1.1.5"
|
version "1.1.5"
|
||||||
|
@ -8676,6 +8712,11 @@ is-plain-obj@^1.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e"
|
resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e"
|
||||||
integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4=
|
integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4=
|
||||||
|
|
||||||
|
is-plain-obj@^2.1.0:
|
||||||
|
version "2.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287"
|
||||||
|
integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==
|
||||||
|
|
||||||
is-plain-object@^2.0.3, is-plain-object@^2.0.4:
|
is-plain-object@^2.0.3, is-plain-object@^2.0.4:
|
||||||
version "2.0.4"
|
version "2.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677"
|
resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677"
|
||||||
|
@ -10290,11 +10331,16 @@ lodash@4.17.20, lodash@^4.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
|
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
|
||||||
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
|
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
|
||||||
|
|
||||||
lodash@4.x.x, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0, lodash@^4.5.0:
|
lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4, lodash@^4.3.0, lodash@^4.5.0:
|
||||||
version "4.17.15"
|
version "4.17.15"
|
||||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
|
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
|
||||||
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
|
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
|
||||||
|
|
||||||
|
lodash@^4.17.5:
|
||||||
|
version "4.17.21"
|
||||||
|
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
|
||||||
|
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
|
||||||
|
|
||||||
log-symbols@3.0.0:
|
log-symbols@3.0.0:
|
||||||
version "3.0.0"
|
version "3.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4"
|
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4"
|
||||||
|
@ -11121,12 +11167,12 @@ moment@2.27.0:
|
||||||
resolved "https://registry.yarnpkg.com/moment/-/moment-2.27.0.tgz#8bff4e3e26a236220dfe3e36de756b6ebaa0105d"
|
resolved "https://registry.yarnpkg.com/moment/-/moment-2.27.0.tgz#8bff4e3e26a236220dfe3e36de756b6ebaa0105d"
|
||||||
integrity sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ==
|
integrity sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ==
|
||||||
|
|
||||||
moment@2.x.x, moment@^2.10.6:
|
moment@2.x.x:
|
||||||
version "2.26.0"
|
version "2.26.0"
|
||||||
resolved "https://registry.yarnpkg.com/moment/-/moment-2.26.0.tgz#5e1f82c6bafca6e83e808b30c8705eed0dcbd39a"
|
resolved "https://registry.yarnpkg.com/moment/-/moment-2.26.0.tgz#5e1f82c6bafca6e83e808b30c8705eed0dcbd39a"
|
||||||
integrity sha512-oIixUO+OamkUkwjhAVE18rAMfRJNsNe/Stid/gwHSOfHrOtw9EhAY2AHvdKZ/k/MggcYELFCJz/Sn2pL8b8JMw==
|
integrity sha512-oIixUO+OamkUkwjhAVE18rAMfRJNsNe/Stid/gwHSOfHrOtw9EhAY2AHvdKZ/k/MggcYELFCJz/Sn2pL8b8JMw==
|
||||||
|
|
||||||
moment@^2.24.0:
|
moment@^2.19.3, moment@^2.24.0:
|
||||||
version "2.29.1"
|
version "2.29.1"
|
||||||
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3"
|
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3"
|
||||||
integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==
|
integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==
|
||||||
|
@ -11177,11 +11223,16 @@ mv@~2:
|
||||||
ncp "~2.0.0"
|
ncp "~2.0.0"
|
||||||
rimraf "~2.4.0"
|
rimraf "~2.4.0"
|
||||||
|
|
||||||
nan@^2.12.1, nan@^2.14.0:
|
nan@^2.12.1:
|
||||||
version "2.14.1"
|
version "2.14.1"
|
||||||
resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01"
|
resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01"
|
||||||
integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==
|
integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==
|
||||||
|
|
||||||
|
nan@^2.14.0:
|
||||||
|
version "2.14.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19"
|
||||||
|
integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==
|
||||||
|
|
||||||
nanoid@^3.1.9:
|
nanoid@^3.1.9:
|
||||||
version "3.1.10"
|
version "3.1.10"
|
||||||
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.10.tgz#69a8a52b77892de0d11cede96bc9762852145bc4"
|
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.10.tgz#69a8a52b77892de0d11cede96bc9762852145bc4"
|
||||||
|
@ -14022,6 +14073,13 @@ serialize-error@^2.1.0:
|
||||||
resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-2.1.0.tgz#50b679d5635cdf84667bdc8e59af4e5b81d5f60a"
|
resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-2.1.0.tgz#50b679d5635cdf84667bdc8e59af4e5b81d5f60a"
|
||||||
integrity sha1-ULZ51WNc34Rme9yOWa9OW4HV9go=
|
integrity sha1-ULZ51WNc34Rme9yOWa9OW4HV9go=
|
||||||
|
|
||||||
|
serialize-error@^8.0.1:
|
||||||
|
version "8.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-8.0.1.tgz#7a67f8ecbbf28973b5a954a2852ff9f4eef52d99"
|
||||||
|
integrity sha512-r5o60rWFS+8/b49DNAbB+GXZA0SpDpuWE758JxDKgRTga05r3U5lwyksE91dYKDhXSmnu36RALj615E6Aj5pSg==
|
||||||
|
dependencies:
|
||||||
|
type-fest "^0.20.2"
|
||||||
|
|
||||||
serialize-javascript@^2.1.2:
|
serialize-javascript@^2.1.2:
|
||||||
version "2.1.2"
|
version "2.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61"
|
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61"
|
||||||
|
@ -14139,18 +14197,11 @@ shell-quote@1.6.1:
|
||||||
array-reduce "~0.0.0"
|
array-reduce "~0.0.0"
|
||||||
jsonify "~0.0.0"
|
jsonify "~0.0.0"
|
||||||
|
|
||||||
shell-quote@1.7.2, shell-quote@^1.6.1:
|
shell-quote@1.7.2, shell-quote@^1.6.1, shell-quote@^1.7.2:
|
||||||
version "1.7.2"
|
version "1.7.2"
|
||||||
resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2"
|
resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2"
|
||||||
integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==
|
integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==
|
||||||
|
|
||||||
shell-utils@^1.0.9:
|
|
||||||
version "1.0.10"
|
|
||||||
resolved "https://registry.yarnpkg.com/shell-utils/-/shell-utils-1.0.10.tgz#7fe7b8084f5d6d21323d941267013bc38aed063e"
|
|
||||||
integrity sha512-p1xuqhj3jgcXiV8wGoF1eL/NOvapN9tyGDoObqKwvZTUZn7fIzK75swLTEHfGa7sObeN9vxFplHw/zgYUYRTsg==
|
|
||||||
dependencies:
|
|
||||||
lodash "4.x.x"
|
|
||||||
|
|
||||||
shelljs@^0.7.8:
|
shelljs@^0.7.8:
|
||||||
version "0.7.8"
|
version "0.7.8"
|
||||||
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3"
|
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3"
|
||||||
|
@ -14890,9 +14941,9 @@ table@^5.2.3:
|
||||||
string-width "^3.0.0"
|
string-width "^3.0.0"
|
||||||
|
|
||||||
tail@^2.0.0:
|
tail@^2.0.0:
|
||||||
version "2.0.3"
|
version "2.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/tail/-/tail-2.0.3.tgz#37567adc4624a70b35f1d146c3376fa3d6ef7c04"
|
resolved "https://registry.yarnpkg.com/tail/-/tail-2.2.1.tgz#3369a786dde3d7b1a5baa3a0accea09348bc5a83"
|
||||||
integrity sha512-s9NOGkLqqiDEtBttQZI7acLS8ycYK5sTlDwNjGnpXG9c8AWj0cfAtwEIzo/hVRMMiC5EYz+bXaJWC1u1u0GPpQ==
|
integrity sha512-pqtI8HB6pbltcaDxkTq12meYxMeLNtZg7+h+c2WlXofaOh4bUeLFQ3eU8S23niqb8We4/UFc+QNlky9nCRnrSQ==
|
||||||
|
|
||||||
tapable@^1.0.0, tapable@^1.1.3:
|
tapable@^1.0.0, tapable@^1.1.3:
|
||||||
version "1.1.3"
|
version "1.1.3"
|
||||||
|
@ -15288,6 +15339,11 @@ type-fest@^0.11.0:
|
||||||
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1"
|
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1"
|
||||||
integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==
|
integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==
|
||||||
|
|
||||||
|
type-fest@^0.20.2:
|
||||||
|
version "0.20.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4"
|
||||||
|
integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==
|
||||||
|
|
||||||
type-fest@^0.6.0:
|
type-fest@^0.6.0:
|
||||||
version "0.6.0"
|
version "0.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b"
|
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b"
|
||||||
|
@ -16034,6 +16090,15 @@ wrap-ansi@^6.2.0:
|
||||||
string-width "^4.1.0"
|
string-width "^4.1.0"
|
||||||
strip-ansi "^6.0.0"
|
strip-ansi "^6.0.0"
|
||||||
|
|
||||||
|
wrap-ansi@^7.0.0:
|
||||||
|
version "7.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
|
||||||
|
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
|
||||||
|
dependencies:
|
||||||
|
ansi-styles "^4.0.0"
|
||||||
|
string-width "^4.1.0"
|
||||||
|
strip-ansi "^6.0.0"
|
||||||
|
|
||||||
wrappy@1:
|
wrappy@1:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||||
|
@ -16091,7 +16156,7 @@ ws@^1.1.0, ws@^1.1.5:
|
||||||
options ">=0.0.5"
|
options ">=0.0.5"
|
||||||
ultron "1.0.x"
|
ultron "1.0.x"
|
||||||
|
|
||||||
ws@^3.3.1, ws@^3.3.3:
|
ws@^3.3.3:
|
||||||
version "3.3.3"
|
version "3.3.3"
|
||||||
resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2"
|
resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2"
|
||||||
integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==
|
integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==
|
||||||
|
@ -16117,6 +16182,11 @@ ws@^7.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/ws/-/ws-7.3.1.tgz#d0547bf67f7ce4f12a72dfe31262c68d7dc551c8"
|
resolved "https://registry.yarnpkg.com/ws/-/ws-7.3.1.tgz#d0547bf67f7ce4f12a72dfe31262c68d7dc551c8"
|
||||||
integrity sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA==
|
integrity sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA==
|
||||||
|
|
||||||
|
ws@^7.4.3:
|
||||||
|
version "7.4.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.4.tgz#383bc9742cb202292c9077ceab6f6047b17f2d59"
|
||||||
|
integrity sha512-Qm8k8ojNQIMx7S+Zp8u/uHOx7Qazv3Yv4q68MiWWWOJhiwG5W3x7iqmRtJo8xxrciZUY4vRxUTJCKuRnF28ZZw==
|
||||||
|
|
||||||
xcode@^2.0.0:
|
xcode@^2.0.0:
|
||||||
version "2.1.0"
|
version "2.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/xcode/-/xcode-2.1.0.tgz#bab64a7e954bb50ca8d19da7e09531c65a43ecfe"
|
resolved "https://registry.yarnpkg.com/xcode/-/xcode-2.1.0.tgz#bab64a7e954bb50ca8d19da7e09531c65a43ecfe"
|
||||||
|
@ -16224,6 +16294,11 @@ y18n@^4.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b"
|
resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b"
|
||||||
integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==
|
integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==
|
||||||
|
|
||||||
|
y18n@^5.0.5:
|
||||||
|
version "5.0.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.7.tgz#0c514aba53fc40e2db911aeb8b51566a3374efe7"
|
||||||
|
integrity sha512-oOhslryvNcA1lB9WYr+M6TMyLkLg81Dgmyb48ZDU0lvR+5bmNDTMz7iobM1QXooaLhbbrcHrlNaABhI6Vo6StQ==
|
||||||
|
|
||||||
yallist@^2.1.2:
|
yallist@^2.1.2:
|
||||||
version "2.1.2"
|
version "2.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
|
resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
|
||||||
|
@ -16244,7 +16319,7 @@ yaml@^1.7.2:
|
||||||
resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e"
|
resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e"
|
||||||
integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==
|
integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==
|
||||||
|
|
||||||
yargs-parser@13.1.2, yargs-parser@^13.0.0, yargs-parser@^13.1.2:
|
yargs-parser@13.1.2, yargs-parser@^13.1.2:
|
||||||
version "13.1.2"
|
version "13.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38"
|
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38"
|
||||||
integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==
|
integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==
|
||||||
|
@ -16268,6 +16343,11 @@ yargs-parser@^18.1.2:
|
||||||
camelcase "^5.0.0"
|
camelcase "^5.0.0"
|
||||||
decamelize "^1.2.0"
|
decamelize "^1.2.0"
|
||||||
|
|
||||||
|
yargs-parser@^20.2.2:
|
||||||
|
version "20.2.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.7.tgz#61df85c113edfb5a7a4e36eb8aa60ef423cbc90a"
|
||||||
|
integrity sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==
|
||||||
|
|
||||||
yargs-parser@^9.0.2:
|
yargs-parser@^9.0.2:
|
||||||
version "9.0.2"
|
version "9.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077"
|
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077"
|
||||||
|
@ -16284,7 +16364,17 @@ yargs-unparser@1.6.0:
|
||||||
lodash "^4.17.15"
|
lodash "^4.17.15"
|
||||||
yargs "^13.3.0"
|
yargs "^13.3.0"
|
||||||
|
|
||||||
yargs@13.3.2, yargs@^13.0.0, yargs@^13.3.0:
|
yargs-unparser@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb"
|
||||||
|
integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==
|
||||||
|
dependencies:
|
||||||
|
camelcase "^6.0.0"
|
||||||
|
decamelize "^4.0.0"
|
||||||
|
flat "^5.0.2"
|
||||||
|
is-plain-obj "^2.1.0"
|
||||||
|
|
||||||
|
yargs@13.3.2, yargs@^13.3.0:
|
||||||
version "13.3.2"
|
version "13.3.2"
|
||||||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd"
|
resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd"
|
||||||
integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==
|
integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==
|
||||||
|
@ -16368,3 +16458,16 @@ yargs@^15.1.0, yargs@^15.3.1:
|
||||||
which-module "^2.0.0"
|
which-module "^2.0.0"
|
||||||
y18n "^4.0.0"
|
y18n "^4.0.0"
|
||||||
yargs-parser "^18.1.2"
|
yargs-parser "^18.1.2"
|
||||||
|
|
||||||
|
yargs@^16.0.3:
|
||||||
|
version "16.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"
|
||||||
|
integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==
|
||||||
|
dependencies:
|
||||||
|
cliui "^7.0.2"
|
||||||
|
escalade "^3.1.1"
|
||||||
|
get-caller-file "^2.0.5"
|
||||||
|
require-directory "^2.1.1"
|
||||||
|
string-width "^4.2.0"
|
||||||
|
y18n "^5.0.5"
|
||||||
|
yargs-parser "^20.2.2"
|
||||||
|
|
Loading…
Reference in New Issue