tangled mirror of catsky-🐱 Soothing soft social-app fork with all the niche toggles! (Unofficial); for issues and PRs please put them on github:NekoDrone/catsky-social

Unit Testing (#35)

* add testing lib

* remove coverage folder from git

* finished basic test setup

* fix tests typescript and import paths

* add first snapshot

* testing utils

* rename test files; update script flags; ++tests

* testing utils functions

* testing downloadAndResize wip

* remove download test

* specify unwanted coverage paths;
remove update snapshots flag

* fix strings tests

* testing downloadAndResize method

* increasing testing

* fixing snapshots wip

* fixed shell mobile snapshot

* adding snapshots for the screens

* fix onboard snapshot

* fix typescript issues

* fix TabsSelector snapshot

* Account for testing device's locale in ago() tests

* Remove platform detection on regex

* mocking store state wip

* mocking store state

* increasing test coverage

* increasing test coverage

* increasing test coverage on src/screens

* src/screens (except for profile) above 80% cov

* testing profile screen wip

* increase coverage on Menu and TabsSelector

* mocking profile ui state wip

* mocking profile ui state wip

* fixing mobileshell tests wip

* snapshots using testing-library

* fixing profile tests wip

* removing mobile shell tests

* src/view/com tests wip

* remove unnecessary patch-package

* fixed profile test error

* clear mocks after every test

* fix base mocked store values (getters)

* fix base mocked store values
(hasLoaded, nonReplyFeed)

* profile screen above 80% coverage

* testing custom hooks

* improving composer coverage

* fix tests after merge

* finishing composer coverage

* improving src/com/discover coverage

* improve src/view/com/login coverage
fix SuggestedFollows tests
adding some comments

* fix SuggestedFollows tests

* improve src/view/com/profile coverage
extra minor fixes

* improve src/view/com/notifications coverage

* update coverage ignore patterns

* rename errorMessageTryAgainButton
increase SuggestedFollows converage

* improve src/view/com/posts coverage

* improve src/view/com/onboard coverage

* update snapshot

* improve src/view/com/post coverage

* improve src/view/com/post-thread coverage
rename ErrorMessage tests
test Debug and Log components

* init testing state

* testing root-store

* updating comments

* small fixes

* removed extra console logs

* improve src/state/models coverage
refactor rootStore
rename some spies

* adding cleanup method after tests

* improve src/state/models coverage

* improve src/state/models coverage

* improve src/state/models coverage

* improve src/state/models coverage

* test setInterval in setupState

* Clean up tests and update Home screen state management

* Remove some tests we dont need

* Remove snapshot tests

* Remove any tests that dont demonstrate clear value

* Cleanup

Co-authored-by: Paul Frazee <pfrazee@gmail.com>

authored by João Ferreiro Paul Frazee and committed by GitHub 5abcc8e3 11c861d2

Changed files
+2852 -9936
__mocks__
__tests__
ios
app.xcodeproj
jest
patches
src
+8 -2
__mocks__/@react-native-camera-roll/camera-roll.js
··· 1 - export default { 2 - CameraRoll: jest.fn(), 1 + export const CameraRoll = { 2 + getPhotos: jest.fn().mockResolvedValue({ 3 + edges: [ 4 + {node: {image: {uri: 'path/to/image1.jpg'}}}, 5 + {node: {image: {uri: 'path/to/image2.jpg'}}}, 6 + {node: {image: {uri: 'path/to/image3.jpg'}}}, 7 + ], 8 + }), 3 9 }
+9 -3
__mocks__/react-native-image-crop-picker.js
··· 1 - export default { 2 - openPicker: jest.fn().mockImplementation(() => Promise.resolve(result)), 3 - } 1 + export const openPicker = jest 2 + .fn() 3 + .mockImplementation(() => Promise.resolve({uri: ''})) 4 + export const openCamera = jest 5 + .fn() 6 + .mockImplementation(() => Promise.resolve({uri: ''})) 7 + export const openCropper = jest 8 + .fn() 9 + .mockImplementation(() => Promise.resolve({uri: ''}))
+934
__mocks__/state-mock.ts
··· 1 + import {LogModel} from './../src/state/models/log' 2 + import {LRUMap} from 'lru_map' 3 + import {RootStoreModel} from './../src/state/models/root-store' 4 + import {NavigationTabModel} from './../src/state/models/navigation' 5 + import {SessionModel} from '../src/state/models/session' 6 + import {NavigationModel} from '../src/state/models/navigation' 7 + import {ShellUiModel} from '../src/state/models/shell-ui' 8 + import {MeModel} from '../src/state/models/me' 9 + import {OnboardModel} from '../src/state/models/onboard' 10 + import {ProfilesViewModel} from '../src/state/models/profiles-view' 11 + import {LinkMetasViewModel} from '../src/state/models/link-metas-view' 12 + import {MembershipsViewModel} from '../src/state/models/memberships-view' 13 + import {FeedModel} from '../src/state/models/feed-view' 14 + import {NotificationsViewModel} from '../src/state/models/notifications-view' 15 + import {ProfileViewModel} from '../src/state/models/profile-view' 16 + import {MembersViewModel} from '../src/state/models/members-view' 17 + import {ProfileUiModel, Sections} from '../src/state/models/profile-ui' 18 + import {SessionServiceClient} from '@atproto/api' 19 + import {UserAutocompleteViewModel} from '../src/state/models/user-autocomplete-view' 20 + import {UserLocalPhotosModel} from '../src/state/models/user-local-photos' 21 + import {SuggestedActorsViewModel} from '../src/state/models/suggested-actors-view' 22 + import {UserFollowersViewModel} from '../src/state/models/user-followers-view' 23 + import {UserFollowsViewModel} from '../src/state/models/user-follows-view' 24 + import {NotificationsViewItemModel} from './../src/state/models/notifications-view' 25 + import { 26 + PostThreadViewModel, 27 + PostThreadViewPostModel, 28 + } from '../src/state/models/post-thread-view' 29 + import {FeedItemModel} from '../src/state/models/feed-view' 30 + import {RepostedByViewModel} from '../src/state/models/reposted-by-view' 31 + import {VotesViewModel} from '../src/state/models/votes-view' 32 + 33 + export const mockedProfileStore = { 34 + isLoading: false, 35 + isRefreshing: false, 36 + hasLoaded: true, 37 + error: '', 38 + params: { 39 + actor: '', 40 + }, 41 + did: 'test did', 42 + handle: 'testhandle', 43 + declaration: { 44 + cid: '', 45 + actorType: '', 46 + }, 47 + creator: 'test did', 48 + displayName: '', 49 + description: '', 50 + avatar: '', 51 + banner: '', 52 + followersCount: 0, 53 + followsCount: 0, 54 + membersCount: 0, 55 + postsCount: 0, 56 + myState: { 57 + follow: '', 58 + member: '', 59 + }, 60 + rootStore: {} as RootStoreModel, 61 + hasContent: true, 62 + hasError: false, 63 + isEmpty: false, 64 + isUser: true, 65 + isScene: false, 66 + setup: jest.fn().mockResolvedValue({aborted: false}), 67 + refresh: jest.fn(), 68 + toggleFollowing: jest.fn().mockResolvedValue({}), 69 + updateProfile: jest.fn(), 70 + // unknown required because of the missing private methods: _xLoading, _xIdle, _load, _replaceAll 71 + } as unknown as ProfileViewModel 72 + 73 + export const mockedMembersStore = { 74 + isLoading: false, 75 + isRefreshing: false, 76 + hasLoaded: true, 77 + error: '', 78 + params: { 79 + actor: 'test actor', 80 + }, 81 + subject: { 82 + did: 'test did', 83 + handle: '', 84 + displayName: '', 85 + declaration: { 86 + cid: '', 87 + actorType: '', 88 + }, 89 + avatar: undefined, 90 + }, 91 + members: [ 92 + { 93 + did: 'test did2', 94 + declaration: { 95 + cid: '', 96 + actorType: '', 97 + }, 98 + handle: 'testhandle', 99 + displayName: 'test name', 100 + indexedAt: '', 101 + }, 102 + ], 103 + rootStore: {} as RootStoreModel, 104 + hasContent: true, 105 + hasError: false, 106 + isEmpty: false, 107 + isMember: jest.fn(), 108 + setup: jest.fn().mockResolvedValue({aborted: false}), 109 + refresh: jest.fn(), 110 + loadMore: jest.fn(), 111 + removeMember: jest.fn(), 112 + // unknown required because of the missing private methods: _xLoading, _xIdle, _fetch, _replaceAll, _append 113 + } as unknown as MembersViewModel 114 + 115 + export const mockedMembershipsStore = { 116 + isLoading: false, 117 + isRefreshing: false, 118 + hasLoaded: true, 119 + error: '', 120 + params: { 121 + actor: '', 122 + limit: 1, 123 + before: '', 124 + }, 125 + subject: { 126 + did: 'test did', 127 + handle: '', 128 + displayName: '', 129 + declaration: {cid: '', actorType: ''}, 130 + avatar: undefined, 131 + }, 132 + memberships: [ 133 + { 134 + did: 'test did', 135 + declaration: { 136 + cid: '', 137 + actorType: 'app.bsky.system.actorUser', 138 + }, 139 + handle: ',', 140 + displayName: '', 141 + createdAt: '', 142 + indexedAt: '', 143 + _reactKey: 'item-1', 144 + }, 145 + ], 146 + rootStore: {} as RootStoreModel, 147 + hasContent: true, 148 + hasError: false, 149 + isEmpty: false, 150 + isMemberOf: jest.fn(), 151 + setup: jest.fn().mockResolvedValue({aborted: false}), 152 + refresh: jest.fn(), 153 + loadMore: jest.fn(), 154 + // unknown required because of the missing private methods: _xLoading, _xIdle, _fetch, _replaceAll, _append 155 + } as unknown as MembershipsViewModel 156 + 157 + export const mockedFeedItemStore = { 158 + _reactKey: 'item-1', 159 + _isThreadParent: false, 160 + _isThreadChildElided: false, 161 + _isThreadChild: false, 162 + post: { 163 + uri: 'testuri', 164 + cid: 'test cid', 165 + author: { 166 + did: 'test did', 167 + handle: 'test.handle', 168 + displayName: 'test name', 169 + declaration: {cid: '', actorType: ''}, 170 + }, 171 + record: { 172 + $type: 'app.bsky.feed.post', 173 + createdAt: '2022-12-29T16:39:57.919Z', 174 + text: 'Sup', 175 + }, 176 + replyCount: 0, 177 + repostCount: 0, 178 + upvoteCount: 0, 179 + downvoteCount: 0, 180 + indexedAt: '2022-12-29T16:39:57.919Z', 181 + viewer: {}, 182 + }, 183 + postRecord: { 184 + $type: 'app.bsky.feed.post', 185 + text: 'test text', 186 + createdAt: '1', 187 + reply: { 188 + root: { 189 + uri: 'testuri', 190 + cid: 'tes cid', 191 + }, 192 + parent: { 193 + uri: 'testuri', 194 + cid: 'tes cid', 195 + }, 196 + }, 197 + }, 198 + rootStore: {} as RootStoreModel, 199 + copy: jest.fn(), 200 + toggleUpvote: jest.fn().mockResolvedValue({}), 201 + toggleDownvote: jest.fn(), 202 + toggleRepost: jest.fn().mockResolvedValue({}), 203 + delete: jest.fn().mockResolvedValue({}), 204 + reasonRepost: { 205 + by: { 206 + did: 'test did', 207 + handle: 'test.handle', 208 + declaration: {cid: '', actorType: ''}, 209 + }, 210 + indexedAt: '', 211 + }, 212 + reasonTrend: { 213 + by: { 214 + did: 'test did', 215 + handle: 'test.handle', 216 + declaration: {cid: '', actorType: ''}, 217 + }, 218 + indexedAt: '', 219 + }, 220 + reply: { 221 + parent: { 222 + author: { 223 + did: 'test did', 224 + handle: 'test.handle', 225 + displayName: 'test name', 226 + declaration: {cid: '', actorType: ''}, 227 + }, 228 + cid: '', 229 + downvoteCount: 0, 230 + indexedAt: '2023-01-10T11:17:46.945Z', 231 + record: {}, 232 + replyCount: 1, 233 + repostCount: 0, 234 + upvoteCount: 0, 235 + uri: 'testuri', 236 + viewer: {}, 237 + }, 238 + root: { 239 + author: { 240 + did: 'test did', 241 + handle: 'test.handle', 242 + displayName: 'test name', 243 + declaration: {cid: '', actorType: ''}, 244 + }, 245 + cid: '', 246 + downvoteCount: 0, 247 + indexedAt: '2023-01-10T11:17:46.739Z', 248 + record: {}, 249 + replyCount: 1, 250 + repostCount: 0, 251 + upvoteCount: 1, 252 + uri: 'testuri', 253 + viewer: {}, 254 + }, 255 + }, 256 + } as FeedItemModel 257 + 258 + export const mockedFeedStore = { 259 + isLoading: false, 260 + isRefreshing: false, 261 + hasNewLatest: false, 262 + hasLoaded: true, 263 + error: '', 264 + hasMore: true, 265 + params: { 266 + actor: '', 267 + limit: 1, 268 + before: '', 269 + }, 270 + feed: [], 271 + rootStore: {} as RootStoreModel, 272 + feedType: 'home', 273 + hasContent: true, 274 + hasError: false, 275 + isEmpty: false, 276 + nonReplyFeed: [ 277 + { 278 + _reactKey: 'item-1', 279 + post: { 280 + author: { 281 + handle: 'handle.test', 282 + displayName: 'test name', 283 + avatar: '', 284 + }, 285 + cid: 'bafyreihkwjoy2vbfqld2lp3tv4ce6yfr354sqgp32qoplrudso4gyyjiwe', 286 + downvoteCount: 0, 287 + indexedAt: '2022-12-29T16:35:55.270Z', 288 + record: { 289 + $type: 'app.bsky.feed.post', 290 + createdAt: '2022-12-29T16:39:57.919Z', 291 + text: 'Sup', 292 + }, 293 + replyCount: 0, 294 + repostCount: 0, 295 + upvoteCount: 0, 296 + uri: 'at://did:plc:wcizmlgv3rdslk64t6q4silu/app.bsky.feed.post/3jkzce5kfvn2h', 297 + viewer: { 298 + handle: 'handle.test', 299 + displayName: 'test name', 300 + avatar: '', 301 + }, 302 + }, 303 + reason: undefined, 304 + reply: undefined, 305 + }, 306 + ], 307 + setHasNewLatest: jest.fn(), 308 + setup: jest.fn().mockResolvedValue({}), 309 + refresh: jest.fn().mockResolvedValue({}), 310 + loadMore: jest.fn().mockResolvedValue({}), 311 + loadLatest: jest.fn(), 312 + update: jest.fn(), 313 + checkForLatest: jest.fn().mockRejectedValue('Error checking for latest'), 314 + // unknown required because of the missing private methods: _xLoading, _xIdle, _pendingWork, _initialLoad, _loadLatest, _loadMore, _update, _replaceAll, _appendAll, _prependAll, _updateAll, _getFeed, loadMoreCursor, pollCursor, _loadPromise, _updatePromise, _loadLatestPromise, _loadMorePromise 315 + } as unknown as FeedModel 316 + 317 + export const mockedPostThreadViewPostStore = { 318 + _reactKey: 'item-1', 319 + _depth: 0, 320 + _isHighlightedPost: false, 321 + _hasMore: false, 322 + postRecord: { 323 + text: 'test text', 324 + createdAt: '', 325 + reply: { 326 + root: { 327 + uri: 'testuri', 328 + cid: 'tes cid', 329 + }, 330 + parent: { 331 + uri: 'testuri', 332 + cid: 'tes cid', 333 + }, 334 + }, 335 + }, 336 + post: { 337 + uri: 'testuri', 338 + cid: 'testcid', 339 + record: {}, 340 + author: { 341 + did: 'test did', 342 + handle: 'test.handle', 343 + declaration: {cid: '', actorType: ''}, 344 + viewer: { 345 + muted: true, 346 + }, 347 + }, 348 + replyCount: 0, 349 + repostCount: 0, 350 + upvoteCount: 0, 351 + downvoteCount: 0, 352 + indexedAt: '', 353 + viewer: { 354 + repost: '', 355 + upvote: '', 356 + downvote: '', 357 + }, 358 + }, 359 + rootStore: {} as RootStoreModel, 360 + assignTreeModels: jest.fn(), 361 + toggleRepost: jest.fn().mockRejectedValue({}), 362 + toggleUpvote: jest.fn().mockRejectedValue({}), 363 + toggleDownvote: jest.fn(), 364 + delete: jest.fn(), 365 + } as PostThreadViewPostModel 366 + 367 + export const mockedPostThreadViewStore = { 368 + isLoading: false, 369 + isRefreshing: false, 370 + hasLoaded: false, 371 + error: '', 372 + notFound: false, 373 + resolvedUri: 'testuri', 374 + params: { 375 + uri: 'testuri', 376 + }, 377 + thread: mockedPostThreadViewPostStore, 378 + hasContent: true, 379 + hasError: false, 380 + setup: jest.fn(), 381 + refresh: jest.fn().mockResolvedValue({}), 382 + update: jest.fn(), 383 + // unknown required because of the missing private methods: _xLoading, _xIdle, _resolveUri, _load, _replaceAll 384 + } as unknown as PostThreadViewModel 385 + 386 + export const mockedNotificationsViewItemStore = { 387 + _reactKey: 'item-1', 388 + uri: 'testuri', 389 + cid: '', 390 + author: { 391 + did: 'test did', 392 + handle: 'test.handle', 393 + declaration: {cid: '', actorType: ''}, 394 + }, 395 + rootStore: {} as RootStoreModel, 396 + copy: jest.fn(), 397 + reason: 'test reason', 398 + isRead: true, 399 + indexedAt: '', 400 + isUpvote: true, 401 + isRepost: false, 402 + isTrend: false, 403 + isMention: false, 404 + isReply: false, 405 + isFollow: false, 406 + isAssertion: false, 407 + needsAdditionalData: false, 408 + isInvite: false, 409 + subjectUri: 'testuri', 410 + toSupportedRecord: jest.fn().mockReturnValue({ 411 + text: 'test text', 412 + createdAt: '', 413 + }), 414 + fetchAdditionalData: jest.fn(), 415 + } as NotificationsViewItemModel 416 + 417 + export const mockedNotificationsStore = { 418 + isLoading: false, 419 + isRefreshing: false, 420 + hasLoaded: true, 421 + error: '', 422 + params: { 423 + limit: 1, 424 + before: '', 425 + }, 426 + hasMore: true, 427 + notifications: [mockedNotificationsViewItemStore], 428 + rootStore: {} as RootStoreModel, 429 + hasContent: true, 430 + hasError: false, 431 + isEmpty: false, 432 + setup: jest.fn().mockResolvedValue({aborted: false}), 433 + refresh: jest.fn().mockResolvedValue({}), 434 + loadMore: jest.fn().mockResolvedValue({}), 435 + update: jest.fn().mockResolvedValue(null), 436 + updateReadState: jest.fn(), 437 + // unknown required because of the missing private methods: _xLoading, _xIdle, _pendingWork, _initialLoad, _loadMore, _update, _replaceAll, _appendAll, _updateAll, loadMoreCursor, _loadPromise, _updatePromise, _loadLatestPromise, _loadMorePromise 438 + } as unknown as NotificationsViewModel 439 + 440 + export const mockedSessionStore = { 441 + serialize: jest.fn(), 442 + hydrate: jest.fn(), 443 + data: { 444 + service: '', 445 + refreshJwt: '', 446 + accessJwt: '', 447 + handle: '', 448 + did: 'test did', 449 + }, 450 + online: false, 451 + attemptingConnect: false, 452 + rootStore: {} as RootStoreModel, 453 + hasSession: true, 454 + clear: jest.fn(), 455 + setState: jest.fn(), 456 + setOnline: jest.fn(), 457 + updateAuthTokens: jest.fn(), 458 + connect: jest.fn(), 459 + describeService: jest.fn().mockResolvedValue({ 460 + availableUserDomains: ['test'], 461 + links: { 462 + termsOfService: 'https://testTermsOfService', 463 + privacyPolicy: 'https://testPrivacyPolicy', 464 + }, 465 + }), 466 + login: jest.fn(), 467 + createAccount: jest.fn(), 468 + logout: jest.fn(), 469 + 470 + // unknown required because of the missing private methods: _connectPromise, configureApi & _connect 471 + } as unknown as SessionModel 472 + 473 + export const mockedNavigationTabStore = { 474 + serialize: jest.fn(), 475 + hydrate: jest.fn(), 476 + id: 0, 477 + history: [ 478 + { 479 + url: '', 480 + ts: 0, 481 + title: '', 482 + id: 0, 483 + }, 484 + ], 485 + index: 0, 486 + isNewTab: false, 487 + current: { 488 + url: '', 489 + ts: 0, 490 + title: '', 491 + id: 0, 492 + }, 493 + canGoBack: false, 494 + canGoForward: false, 495 + backTen: [ 496 + { 497 + url: '', 498 + title: '', 499 + index: 0, 500 + id: 0, 501 + }, 502 + ], 503 + forwardTen: [ 504 + { 505 + url: '', 506 + title: '', 507 + index: 0, 508 + id: 0, 509 + }, 510 + ], 511 + navigate: jest.fn(), 512 + refresh: jest.fn(), 513 + goBack: jest.fn(), 514 + fixedTabReset: jest.fn(), 515 + goForward: jest.fn(), 516 + goToIndex: jest.fn(), 517 + setTitle: jest.fn(), 518 + setIsNewTab: jest.fn(), 519 + fixedTabPurpose: 0, 520 + getBackList: () => [ 521 + { 522 + url: '/', 523 + title: '', 524 + index: 1, 525 + id: 1, 526 + }, 527 + ], 528 + getForwardList: jest.fn(), 529 + } as NavigationTabModel 530 + 531 + export const mockedNavigationStore = { 532 + serialize: jest.fn(), 533 + hydrate: jest.fn(), 534 + tabs: [mockedNavigationTabStore], 535 + tabIndex: 0, 536 + clear: jest.fn(), 537 + tab: mockedNavigationTabStore, 538 + tabCount: 1, 539 + isCurrentScreen: jest.fn(), 540 + navigate: jest.fn(), 541 + refresh: jest.fn(), 542 + setTitle: jest.fn(), 543 + handleLink: jest.fn(), 544 + switchTo: jest.fn(), 545 + setActiveTab: jest.fn(), 546 + closeTab: jest.fn(), 547 + newTab: jest.fn(), 548 + } as NavigationModel 549 + 550 + export const mockedShellStore = { 551 + serialize: jest.fn(), 552 + hydrate: jest.fn(), 553 + minimalShellMode: false, 554 + isMainMenuOpen: false, 555 + isModalActive: false, 556 + activeModal: undefined, 557 + isLightboxActive: false, 558 + activeLightbox: undefined, 559 + isComposerActive: false, 560 + composerOpts: undefined, 561 + darkMode: false, 562 + setDarkMode: jest.fn(), 563 + setMainMenuOpen: jest.fn(), 564 + setMinimalShellMode: jest.fn(), 565 + openModal: jest.fn(), 566 + closeModal: jest.fn(), 567 + closeComposer: jest.fn(), 568 + closeLightbox: jest.fn(), 569 + openComposer: jest.fn(), 570 + openLightbox: jest.fn(), 571 + } as ShellUiModel 572 + 573 + export const mockedMeStore = { 574 + serialize: jest.fn(), 575 + hydrate: jest.fn(), 576 + did: 'test did', 577 + handle: 'test', 578 + displayName: 'test', 579 + description: 'test', 580 + avatar: '', 581 + notificationCount: 0, 582 + rootStore: {} as RootStoreModel, 583 + memberships: mockedMembershipsStore, 584 + mainFeed: mockedFeedStore, 585 + notifications: mockedNotificationsStore, 586 + clear: jest.fn(), 587 + load: jest.fn(), 588 + clearNotificationCount: jest.fn(), 589 + fetchStateUpdate: jest.fn(), 590 + refreshMemberships: jest.fn(), 591 + } as MeModel 592 + 593 + export const mockedOnboardStore = { 594 + serialize: jest.fn(), 595 + hydrate: jest.fn(), 596 + isOnboarding: false, 597 + stage: '', 598 + start: jest.fn(), 599 + stop: jest.fn(), 600 + next: jest.fn(), 601 + } as OnboardModel 602 + 603 + export const mockedProfilesStore = { 604 + hydrate: jest.fn(), 605 + serialize: jest.fn(), 606 + cache: new LRUMap(100), 607 + rootStore: {} as RootStoreModel, 608 + getProfile: jest.fn().mockResolvedValue({data: {}}), 609 + overwrite: jest.fn(), 610 + } as ProfilesViewModel 611 + 612 + export const mockedLinkMetasStore = { 613 + hydrate: jest.fn(), 614 + serialize: jest.fn(), 615 + cache: new LRUMap(100), 616 + rootStore: {} as RootStoreModel, 617 + getLinkMeta: jest.fn(), 618 + } as LinkMetasViewModel 619 + 620 + export const mockedLogStore = { 621 + entries: [], 622 + serialize: jest.fn(), 623 + hydrate: jest.fn(), 624 + debug: jest.fn(), 625 + warn: jest.fn(), 626 + error: jest.fn(), 627 + // unknown required because of the missing private methods: add 628 + } as unknown as LogModel 629 + 630 + export const mockedRootStore = { 631 + api: { 632 + com: {}, 633 + app: { 634 + bsky: { 635 + graph: { 636 + confirmation: { 637 + delete: jest.fn().mockResolvedValue({}), 638 + }, 639 + getFollowers: jest.fn().mockResolvedValue({}), 640 + getMembers: jest.fn().mockResolvedValue({}), 641 + }, 642 + }, 643 + }, 644 + } as unknown as SessionServiceClient, 645 + resolveName: jest.fn(), 646 + serialize: jest.fn(), 647 + hydrate: jest.fn(), 648 + fetchStateUpdate: jest.fn(), 649 + clearAll: jest.fn(), 650 + session: mockedSessionStore, 651 + nav: mockedNavigationStore, 652 + shell: mockedShellStore, 653 + me: mockedMeStore, 654 + onboard: mockedOnboardStore, 655 + profiles: mockedProfilesStore, 656 + linkMetas: mockedLinkMetasStore, 657 + log: mockedLogStore, 658 + } as RootStoreModel 659 + 660 + export const mockedProfileUiStore = { 661 + profile: mockedProfileStore, 662 + feed: mockedFeedStore, 663 + memberships: mockedMembershipsStore, 664 + members: mockedMembersStore, 665 + selectedViewIndex: 0, 666 + rootStore: mockedRootStore, 667 + params: { 668 + user: 'test user', 669 + }, 670 + currentView: mockedFeedStore, 671 + isInitialLoading: false, 672 + isRefreshing: false, 673 + isUser: true, 674 + isScene: false, 675 + selectorItems: [Sections.Posts, Sections.PostsWithReplies, Sections.Scenes], 676 + selectedView: Sections.Posts, 677 + setSelectedViewIndex: jest.fn(), 678 + setup: jest.fn().mockResolvedValue({aborted: false}), 679 + update: jest.fn(), 680 + refresh: jest.fn(), 681 + loadMore: jest.fn(), 682 + } as ProfileUiModel 683 + 684 + export const mockedAutocompleteViewStore = { 685 + isLoading: false, 686 + isActive: true, 687 + prefix: '', 688 + follows: [ 689 + { 690 + did: 'test did', 691 + declaration: { 692 + cid: '', 693 + actorType: 'app.bsky.system.actorUser', 694 + }, 695 + handle: '', 696 + displayName: '', 697 + createdAt: '', 698 + indexedAt: '', 699 + }, 700 + ], 701 + searchRes: [ 702 + { 703 + did: 'test did', 704 + declaration: { 705 + cid: '', 706 + actorType: 'app.bsky.system.actorUser', 707 + }, 708 + handle: '', 709 + displayName: '', 710 + }, 711 + ], 712 + knownHandles: new Set<string>(), 713 + suggestions: [ 714 + { 715 + handle: 'handle.test', 716 + displayName: 'Test Display', 717 + }, 718 + { 719 + handle: 'handle2.test', 720 + displayName: 'Test Display 2', 721 + }, 722 + ], 723 + rootStore: {} as RootStoreModel, 724 + setup: jest.fn(), 725 + setActive: jest.fn(), 726 + setPrefix: jest.fn(), 727 + // unknown required because of the missing private methods: _searchPromise, _getFollows , _search 728 + } as unknown as UserAutocompleteViewModel 729 + 730 + export const mockedLocalPhotosStore = { 731 + photos: { 732 + node: { 733 + type: '', 734 + group_name: '', 735 + image: { 736 + filename: '', 737 + extension: '', 738 + uri: '', 739 + height: 1000, 740 + width: 1000, 741 + fileSize: null, 742 + playableDuration: 0, 743 + }, 744 + timestamp: 1672847197, 745 + location: null, 746 + }, 747 + }, 748 + rootStore: {} as RootStoreModel, 749 + setup: jest.fn(), 750 + // unknown required because of the missing private methods: _getPhotos 751 + } as unknown as UserLocalPhotosModel 752 + 753 + export const mockedSuggestedActorsStore = { 754 + isLoading: false, 755 + isRefreshing: false, 756 + hasLoaded: false, 757 + error: '', 758 + suggestions: [ 759 + { 760 + did: '1', 761 + declaration: { 762 + cid: '', 763 + actorType: 'app.bsky.system.actorUser', 764 + }, 765 + handle: 'handle1.test', 766 + displayName: 'test name 1', 767 + description: 'desc', 768 + indexedAt: '', 769 + _reactKey: '1', 770 + }, 771 + { 772 + did: '2', 773 + declaration: { 774 + cid: '', 775 + actorType: 'app.bsky.system.actorUser', 776 + }, 777 + handle: '', 778 + displayName: 'handle2.test', 779 + description: 'desc', 780 + indexedAt: '', 781 + _reactKey: '2', 782 + }, 783 + ], 784 + rootStore: {} as RootStoreModel, 785 + hasContent: true, 786 + hasError: false, 787 + isEmpty: false, 788 + setup: jest.fn().mockResolvedValue(null), 789 + refresh: jest.fn(), 790 + // unknown required because of the missing private methods: _xLoading, _xIdle, _fetch, _appendAll, _append 791 + } as unknown as SuggestedActorsViewModel 792 + 793 + export const mockedUserFollowersStore = { 794 + isLoading: false, 795 + isRefreshing: false, 796 + hasLoaded: false, 797 + error: '', 798 + params: { 799 + user: 'test user', 800 + }, 801 + subject: { 802 + did: 'test did', 803 + handle: '', 804 + declaration: {cid: '', actorType: ''}, 805 + }, 806 + followers: [ 807 + { 808 + did: 'test did', 809 + declaration: {cid: '', actorType: ''}, 810 + handle: 'testhandle', 811 + displayName: 'test name', 812 + indexedAt: '', 813 + _reactKey: '1', 814 + }, 815 + { 816 + did: 'test did2', 817 + declaration: {cid: '', actorType: ''}, 818 + handle: 'testhandle2', 819 + displayName: 'test name 2', 820 + indexedAt: '', 821 + _reactKey: '2', 822 + }, 823 + ], 824 + rootStore: {} as RootStoreModel, 825 + hasContent: true, 826 + hasError: false, 827 + isEmpty: false, 828 + setup: jest.fn(), 829 + refresh: jest.fn(), 830 + loadMore: jest.fn(), 831 + // unknown required because of the missing private methods: _xIdle, _xLoading, _fetch, _replaceAll, _append 832 + } as unknown as UserFollowersViewModel 833 + 834 + export const mockedUserFollowsStore = { 835 + isLoading: false, 836 + isRefreshing: false, 837 + hasLoaded: false, 838 + error: '', 839 + params: { 840 + user: 'test user', 841 + }, 842 + subject: { 843 + did: 'test did', 844 + handle: '', 845 + declaration: {cid: '', actorType: ''}, 846 + }, 847 + follows: [ 848 + { 849 + did: 'test did', 850 + declaration: {cid: '', actorType: ''}, 851 + handle: 'testhandle', 852 + displayName: 'test name', 853 + indexedAt: '', 854 + _reactKey: '1', 855 + }, 856 + { 857 + did: 'test did2', 858 + declaration: {cid: '', actorType: ''}, 859 + handle: 'testhandle2', 860 + displayName: 'test name 2', 861 + indexedAt: '', 862 + _reactKey: '2', 863 + }, 864 + ], 865 + rootStore: {} as RootStoreModel, 866 + hasContent: true, 867 + hasError: false, 868 + isEmpty: false, 869 + setup: jest.fn(), 870 + refresh: jest.fn(), 871 + loadMore: jest.fn(), 872 + // unknown required because of the missing private methods: _xIdle, _xLoading, _fetch, _replaceAll, _append 873 + } as unknown as UserFollowsViewModel 874 + 875 + export const mockedRepostedByViewStore = { 876 + isLoading: false, 877 + isRefreshing: false, 878 + hasLoaded: false, 879 + error: '', 880 + resolvedUri: '', 881 + params: { 882 + uri: 'testuri', 883 + }, 884 + uri: '', 885 + repostedBy: [ 886 + { 887 + _reactKey: '', 888 + did: '', 889 + handle: '', 890 + displayName: '', 891 + declaration: {cid: '', actorType: ''}, 892 + indexedAt: '', 893 + }, 894 + ], 895 + hasContent: false, 896 + hasError: false, 897 + isEmpty: false, 898 + setup: jest.fn().mockResolvedValue({}), 899 + refresh: jest.fn().mockResolvedValue({}), 900 + loadMore: jest.fn().mockResolvedValue({}), 901 + // unknown required because of the missing private methods: _xIdle, _xLoading, _resolveUri, _fetch, _refresh, _replaceAll, _append 902 + } as unknown as RepostedByViewModel 903 + 904 + export const mockedVotesViewStore = { 905 + isLoading: false, 906 + isRefreshing: false, 907 + hasLoaded: false, 908 + error: '', 909 + resolvedUri: '', 910 + params: { 911 + uri: 'testuri', 912 + }, 913 + uri: '', 914 + votes: [ 915 + { 916 + _reactKey: '', 917 + direction: 'up', 918 + indexedAt: '', 919 + createdAt: '', 920 + actor: { 921 + did: '', 922 + handle: '', 923 + declaration: {cid: '', actorType: ''}, 924 + }, 925 + }, 926 + ], 927 + hasContent: false, 928 + hasError: false, 929 + isEmpty: false, 930 + setup: jest.fn(), 931 + refresh: jest.fn().mockResolvedValue({}), 932 + loadMore: jest.fn().mockResolvedValue({}), 933 + // unknown required because of the missing private methods: _xIdle, _xLoading, _resolveUri, _fetch, _replaceAll, _append 934 + } as unknown as VotesViewModel
+7 -11
__tests__/lib/images.test.ts
··· 2 2 import ImageResizer from '@bam.tech/react-native-image-resizer' 3 3 import RNFetchBlob from 'rn-fetch-blob' 4 4 5 - jest.mock('rn-fetch-blob', () => ({ 6 - config: jest.fn().mockReturnThis(), 7 - cancel: jest.fn(), 8 - fetch: jest.fn(), 9 - })) 10 - jest.mock('@bam.tech/react-native-image-resizer', () => ({ 11 - createResizedImage: jest.fn(), 12 - })) 13 - 14 5 describe('downloadAndResize', () => { 15 6 const errorSpy = jest.spyOn(global.console, 'error') 16 7 17 8 const mockResizedImage = { 18 9 path: jest.fn().mockReturnValue('file://resized-image.jpg'), 19 10 size: 100, 11 + width: 50, 12 + height: 50, 13 + mime: 'image/jpeg', 20 14 } 21 15 22 16 beforeEach(() => { 23 - jest.clearAllMocks() 24 - 25 17 const mockedCreateResizedImage = 26 18 ImageResizer.createResizedImage as jest.Mock 27 19 mockedCreateResizedImage.mockResolvedValue(mockResizedImage) 20 + }) 21 + 22 + afterEach(() => { 23 + jest.clearAllMocks() 28 24 }) 29 25 30 26 it('should return resized image for valid URI and options', async () => {
+153
__tests__/state/models/log.test.ts
··· 1 + import {LogModel} from '../../../src/state/models/log' 2 + 3 + describe('LogModel', () => { 4 + let logModel: LogModel 5 + 6 + beforeEach(() => { 7 + logModel = new LogModel() 8 + jest.spyOn(console, 'debug') 9 + }) 10 + 11 + afterAll(() => { 12 + jest.clearAllMocks() 13 + }) 14 + 15 + it('should call a log method and add a log entry to the entries array', () => { 16 + logModel.debug('Test log') 17 + expect(logModel.entries.length).toEqual(1) 18 + expect(logModel.entries[0]).toEqual({ 19 + id: logModel.entries[0].id, 20 + type: 'debug', 21 + summary: 'Test log', 22 + details: undefined, 23 + ts: logModel.entries[0].ts, 24 + }) 25 + 26 + logModel.warn('Test log') 27 + expect(logModel.entries.length).toEqual(2) 28 + expect(logModel.entries[1]).toEqual({ 29 + id: logModel.entries[1].id, 30 + type: 'warn', 31 + summary: 'Test log', 32 + details: undefined, 33 + ts: logModel.entries[1].ts, 34 + }) 35 + 36 + logModel.error('Test log') 37 + expect(logModel.entries.length).toEqual(3) 38 + expect(logModel.entries[2]).toEqual({ 39 + id: logModel.entries[2].id, 40 + type: 'error', 41 + summary: 'Test log', 42 + details: undefined, 43 + ts: logModel.entries[2].ts, 44 + }) 45 + }) 46 + 47 + it('should call the console.debug after calling the debug method', () => { 48 + logModel.debug('Test log') 49 + expect(console.debug).toHaveBeenCalledWith('Test log', '') 50 + }) 51 + 52 + it('should call the serialize method', () => { 53 + logModel.debug('Test log') 54 + expect(logModel.serialize()).toEqual({ 55 + entries: [ 56 + { 57 + id: logModel.entries[0].id, 58 + type: 'debug', 59 + summary: 'Test log', 60 + details: undefined, 61 + ts: logModel.entries[0].ts, 62 + }, 63 + ], 64 + }) 65 + }) 66 + 67 + it('should call the hydrate method with valid properties', () => { 68 + logModel.hydrate({ 69 + entries: [ 70 + { 71 + id: '123', 72 + type: 'debug', 73 + summary: 'Test log', 74 + details: undefined, 75 + ts: 123, 76 + }, 77 + ], 78 + }) 79 + expect(logModel.entries).toEqual([ 80 + { 81 + id: '123', 82 + type: 'debug', 83 + summary: 'Test log', 84 + details: undefined, 85 + ts: 123, 86 + }, 87 + ]) 88 + }) 89 + 90 + it('should call the hydrate method with invalid properties', () => { 91 + logModel.hydrate({ 92 + entries: [ 93 + { 94 + id: '123', 95 + type: 'debug', 96 + summary: 'Test log', 97 + details: undefined, 98 + ts: 123, 99 + }, 100 + { 101 + summary: 'Invalid entry', 102 + }, 103 + ], 104 + }) 105 + expect(logModel.entries).toEqual([ 106 + { 107 + id: '123', 108 + type: 'debug', 109 + summary: 'Test log', 110 + details: undefined, 111 + ts: 123, 112 + }, 113 + ]) 114 + }) 115 + 116 + it('should stringify the details if it is not a string', () => { 117 + logModel.debug('Test log', {details: 'test'}) 118 + expect(logModel.entries[0].details).toEqual('{\n "details": "test"\n}') 119 + }) 120 + 121 + it('should stringify the details object if it is of a specific error', () => { 122 + class TestError extends Error { 123 + constructor() { 124 + super() 125 + this.name = 'TestError' 126 + } 127 + } 128 + const error = new TestError() 129 + logModel.error('Test error log', error) 130 + expect(logModel.entries[0].details).toEqual('TestError') 131 + 132 + class XRPCInvalidResponseErrorMock { 133 + validationError = {toString: () => 'validationError'} 134 + lexiconNsid = 'test' 135 + } 136 + const xrpcInvalidResponseError = new XRPCInvalidResponseErrorMock() 137 + logModel.error('Test error log', xrpcInvalidResponseError) 138 + expect(logModel.entries[1].details).toEqual( 139 + '{\n "validationError": {},\n "lexiconNsid": "test"\n}', 140 + ) 141 + 142 + class XRPCErrorMock { 143 + status = 'status' 144 + error = 'error' 145 + message = 'message' 146 + } 147 + const xrpcError = new XRPCErrorMock() 148 + logModel.error('Test error log', xrpcError) 149 + expect(logModel.entries[2].details).toEqual( 150 + '{\n "status": "status",\n "error": "error",\n "message": "message"\n}', 151 + ) 152 + }) 153 + })
+183
__tests__/state/models/me.test.ts
··· 1 + import {RootStoreModel} from '../../../src/state/models/root-store' 2 + import {MeModel} from '../../../src/state/models/me' 3 + import {MembershipsViewModel} from './../../../src/state/models/memberships-view' 4 + import {NotificationsViewModel} from './../../../src/state/models/notifications-view' 5 + import {sessionClient, SessionServiceClient} from '@atproto/api' 6 + import {DEFAULT_SERVICE} from './../../../src/state/index' 7 + 8 + describe('MeModel', () => { 9 + let rootStore: RootStoreModel 10 + let meModel: MeModel 11 + 12 + beforeEach(() => { 13 + const api = sessionClient.service(DEFAULT_SERVICE) as SessionServiceClient 14 + rootStore = new RootStoreModel(api) 15 + meModel = new MeModel(rootStore) 16 + }) 17 + 18 + afterAll(() => { 19 + jest.clearAllMocks() 20 + }) 21 + 22 + it('should clear() correctly', () => { 23 + meModel.did = '123' 24 + meModel.handle = 'handle' 25 + meModel.displayName = 'John Doe' 26 + meModel.description = 'description' 27 + meModel.avatar = 'avatar' 28 + meModel.notificationCount = 1 29 + meModel.clear() 30 + expect(meModel.did).toEqual('') 31 + expect(meModel.handle).toEqual('') 32 + expect(meModel.displayName).toEqual('') 33 + expect(meModel.description).toEqual('') 34 + expect(meModel.avatar).toEqual('') 35 + expect(meModel.notificationCount).toEqual(0) 36 + expect(meModel.memberships).toBeUndefined() 37 + }) 38 + 39 + it('should hydrate() successfully with valid properties', () => { 40 + meModel.hydrate({ 41 + did: '123', 42 + handle: 'handle', 43 + displayName: 'John Doe', 44 + description: 'description', 45 + avatar: 'avatar', 46 + }) 47 + expect(meModel.did).toEqual('123') 48 + expect(meModel.handle).toEqual('handle') 49 + expect(meModel.displayName).toEqual('John Doe') 50 + expect(meModel.description).toEqual('description') 51 + expect(meModel.avatar).toEqual('avatar') 52 + }) 53 + 54 + it('should not hydrate() with invalid properties', () => { 55 + meModel.hydrate({ 56 + did: '', 57 + handle: 'handle', 58 + displayName: 'John Doe', 59 + description: 'description', 60 + avatar: 'avatar', 61 + }) 62 + expect(meModel.did).toEqual('') 63 + expect(meModel.handle).toEqual('') 64 + expect(meModel.displayName).toEqual('') 65 + expect(meModel.description).toEqual('') 66 + expect(meModel.avatar).toEqual('') 67 + 68 + meModel.hydrate({ 69 + did: '123', 70 + displayName: 'John Doe', 71 + description: 'description', 72 + avatar: 'avatar', 73 + }) 74 + expect(meModel.did).toEqual('') 75 + expect(meModel.handle).toEqual('') 76 + expect(meModel.displayName).toEqual('') 77 + expect(meModel.description).toEqual('') 78 + expect(meModel.avatar).toEqual('') 79 + }) 80 + 81 + it('should load() successfully', async () => { 82 + jest 83 + .spyOn(rootStore.api.app.bsky.actor, 'getProfile') 84 + .mockImplementationOnce((): Promise<any> => { 85 + return Promise.resolve({ 86 + data: { 87 + displayName: 'John Doe', 88 + description: 'description', 89 + avatar: 'avatar', 90 + }, 91 + }) 92 + }) 93 + rootStore.session.data = { 94 + did: '123', 95 + handle: 'handle', 96 + service: 'test service', 97 + accessJwt: 'test token', 98 + refreshJwt: 'test token', 99 + } 100 + await meModel.load() 101 + expect(meModel.did).toEqual('123') 102 + expect(meModel.handle).toEqual('handle') 103 + expect(meModel.displayName).toEqual('John Doe') 104 + expect(meModel.description).toEqual('description') 105 + expect(meModel.avatar).toEqual('avatar') 106 + }) 107 + 108 + it('should load() successfully without profile data', async () => { 109 + jest 110 + .spyOn(rootStore.api.app.bsky.actor, 'getProfile') 111 + .mockImplementationOnce((): Promise<any> => { 112 + return Promise.resolve({ 113 + data: null, 114 + }) 115 + }) 116 + rootStore.session.data = { 117 + did: '123', 118 + handle: 'handle', 119 + service: 'test service', 120 + accessJwt: 'test token', 121 + refreshJwt: 'test token', 122 + } 123 + await meModel.load() 124 + expect(meModel.did).toEqual('123') 125 + expect(meModel.handle).toEqual('handle') 126 + expect(meModel.displayName).toEqual('') 127 + expect(meModel.description).toEqual('') 128 + expect(meModel.avatar).toEqual('') 129 + }) 130 + 131 + it('should load() to nothing when no session', async () => { 132 + rootStore.session.data = null 133 + await meModel.load() 134 + expect(meModel.did).toEqual('') 135 + expect(meModel.handle).toEqual('') 136 + expect(meModel.displayName).toEqual('') 137 + expect(meModel.description).toEqual('') 138 + expect(meModel.avatar).toEqual('') 139 + expect(meModel.notificationCount).toEqual(0) 140 + expect(meModel.memberships).toBeUndefined() 141 + }) 142 + 143 + it('should serialize() key information', () => { 144 + meModel.did = '123' 145 + meModel.handle = 'handle' 146 + meModel.displayName = 'John Doe' 147 + meModel.description = 'description' 148 + meModel.avatar = 'avatar' 149 + 150 + expect(meModel.serialize()).toEqual({ 151 + did: '123', 152 + handle: 'handle', 153 + displayName: 'John Doe', 154 + description: 'description', 155 + avatar: 'avatar', 156 + }) 157 + }) 158 + 159 + it('should clearNotificationCount() successfully', () => { 160 + meModel.clearNotificationCount() 161 + expect(meModel.notificationCount).toBe(0) 162 + }) 163 + 164 + it('should update notifs count with fetchStateUpdate()', async () => { 165 + meModel.notifications = { 166 + refresh: jest.fn(), 167 + } as unknown as NotificationsViewModel 168 + 169 + jest 170 + .spyOn(rootStore.api.app.bsky.notification, 'getCount') 171 + .mockImplementationOnce((): Promise<any> => { 172 + return Promise.resolve({ 173 + data: { 174 + count: 1, 175 + }, 176 + }) 177 + }) 178 + 179 + await meModel.fetchStateUpdate() 180 + expect(meModel.notificationCount).toBe(1) 181 + expect(meModel.notifications.refresh).toHaveBeenCalled() 182 + }) 183 + })
+154
__tests__/state/models/navigation.test.ts
··· 1 + import { 2 + NavigationModel, 3 + NavigationTabModel, 4 + } from './../../../src/state/models/navigation' 5 + import * as flags from '../../../src/build-flags' 6 + 7 + describe('NavigationModel', () => { 8 + let model: NavigationModel 9 + 10 + beforeEach(() => { 11 + model = new NavigationModel() 12 + model.setTitle([0, 0], 'title') 13 + }) 14 + 15 + afterAll(() => { 16 + jest.clearAllMocks() 17 + }) 18 + 19 + it('should clear() to the correct base state', async () => { 20 + await model.clear() 21 + expect(model.tabCount).toBe(2) 22 + expect(model.tab).toEqual({ 23 + fixedTabPurpose: 0, 24 + history: [ 25 + { 26 + id: expect.anything(), 27 + ts: expect.anything(), 28 + url: '/', 29 + }, 30 + ], 31 + id: expect.anything(), 32 + index: 0, 33 + isNewTab: false, 34 + }) 35 + }) 36 + 37 + it('should call the navigate method', async () => { 38 + const navigateSpy = jest.spyOn(model.tab, 'navigate') 39 + await model.navigate('testurl', 'teststring') 40 + expect(navigateSpy).toHaveBeenCalledWith('testurl', 'teststring') 41 + }) 42 + 43 + it('should call the refresh method', async () => { 44 + const refreshSpy = jest.spyOn(model.tab, 'refresh') 45 + await model.refresh() 46 + expect(refreshSpy).toHaveBeenCalled() 47 + }) 48 + 49 + it('should call the isCurrentScreen method', () => { 50 + expect(model.isCurrentScreen(11, 0)).toEqual(false) 51 + }) 52 + 53 + it('should call the tab getter', () => { 54 + expect(model.tab).toEqual({ 55 + fixedTabPurpose: 0, 56 + history: [ 57 + { 58 + id: expect.anything(), 59 + ts: expect.anything(), 60 + url: '/', 61 + }, 62 + ], 63 + id: expect.anything(), 64 + index: 0, 65 + isNewTab: false, 66 + }) 67 + }) 68 + 69 + it('should call the tabCount getter', () => { 70 + expect(model.tabCount).toBe(2) 71 + }) 72 + 73 + describe('tabs not enabled', () => { 74 + jest.mock('../../../src/build-flags', () => ({ 75 + TABS_ENABLED: false, 76 + })) 77 + 78 + afterAll(() => { 79 + jest.clearAllMocks() 80 + }) 81 + 82 + it('should not create new tabs', () => { 83 + // @ts-expect-error 84 + flags.TABS_ENABLED = false 85 + model.newTab('testurl') 86 + expect(model.tab.isNewTab).toBe(false) 87 + expect(model.tabIndex).toBe(0) 88 + }) 89 + 90 + it('should not change the active tab', () => { 91 + // @ts-expect-error 92 + flags.TABS_ENABLED = false 93 + model.setActiveTab(2) 94 + expect(model.tabIndex).toBe(0) 95 + }) 96 + 97 + it('should note close tabs', () => { 98 + // @ts-expect-error 99 + flags.TABS_ENABLED = false 100 + model.closeTab(0) 101 + expect(model.tabCount).toBe(2) 102 + }) 103 + }) 104 + 105 + describe('tabs enabled', () => { 106 + jest.mock('../../../src/build-flags', () => ({ 107 + TABS_ENABLED: true, 108 + })) 109 + 110 + afterAll(() => { 111 + jest.clearAllMocks() 112 + }) 113 + 114 + it('should create new tabs', () => { 115 + // @ts-expect-error 116 + flags.TABS_ENABLED = true 117 + 118 + model.newTab('testurl', 'title') 119 + expect(model.tab.isNewTab).toBe(true) 120 + expect(model.tabIndex).toBe(2) 121 + }) 122 + 123 + it('should change the current tab', () => { 124 + // @ts-expect-error 125 + flags.TABS_ENABLED = true 126 + 127 + model.setActiveTab(0) 128 + expect(model.tabIndex).toBe(0) 129 + }) 130 + 131 + it('should close tabs', () => { 132 + // @ts-expect-error 133 + flags.TABS_ENABLED = true 134 + 135 + model.closeTab(0) 136 + expect(model.tabs).toEqual([ 137 + { 138 + fixedTabPurpose: 1, 139 + history: [ 140 + { 141 + id: expect.anything(), 142 + ts: expect.anything(), 143 + url: '/notifications', 144 + }, 145 + ], 146 + id: expect.anything(), 147 + index: 0, 148 + isNewTab: false, 149 + }, 150 + ]) 151 + expect(model.tabIndex).toBe(0) 152 + }) 153 + }) 154 + })
+46
__tests__/state/models/onboard.test.ts
··· 1 + import { 2 + OnboardModel, 3 + OnboardStageOrder, 4 + } from '../../../src/state/models/onboard' 5 + 6 + describe('OnboardModel', () => { 7 + let onboardModel: OnboardModel 8 + 9 + beforeEach(() => { 10 + onboardModel = new OnboardModel() 11 + }) 12 + 13 + afterAll(() => { 14 + jest.clearAllMocks() 15 + }) 16 + 17 + it('should start/stop correctly', () => { 18 + onboardModel.start() 19 + expect(onboardModel.isOnboarding).toBe(true) 20 + onboardModel.stop() 21 + expect(onboardModel.isOnboarding).toBe(false) 22 + }) 23 + 24 + it('should call the next method until it has no more stages', () => { 25 + onboardModel.start() 26 + onboardModel.next() 27 + expect(onboardModel.stage).toBe(OnboardStageOrder[1]) 28 + 29 + onboardModel.next() 30 + expect(onboardModel.isOnboarding).toBe(false) 31 + expect(onboardModel.stage).toBe(OnboardStageOrder[0]) 32 + }) 33 + 34 + it('serialize and hydrate', () => { 35 + const serialized = onboardModel.serialize() 36 + const newModel = new OnboardModel() 37 + newModel.hydrate(serialized) 38 + expect(newModel).toEqual(onboardModel) 39 + 40 + onboardModel.start() 41 + onboardModel.next() 42 + const serialized2 = onboardModel.serialize() 43 + newModel.hydrate(serialized2) 44 + expect(newModel).toEqual(onboardModel) 45 + }) 46 + })
+73
__tests__/state/models/root-store.test.ts
··· 1 + import {RootStoreModel} from '../../../src/state/models/root-store' 2 + import {setupState} from '../../../src/state' 3 + 4 + describe('rootStore', () => { 5 + let rootStore: RootStoreModel 6 + 7 + beforeAll(() => { 8 + jest.useFakeTimers() 9 + }) 10 + 11 + beforeEach(async () => { 12 + rootStore = await setupState() 13 + }) 14 + 15 + afterAll(() => { 16 + jest.clearAllMocks() 17 + }) 18 + 19 + it('resolveName() handles inputs correctly', () => { 20 + const spyMethod = jest 21 + .spyOn(rootStore.api.com.atproto.handle, 'resolve') 22 + .mockResolvedValue({success: true, headers: {}, data: {did: 'testdid'}}) 23 + 24 + rootStore.resolveName('teststring') 25 + expect(spyMethod).toHaveBeenCalledWith({handle: 'teststring'}) 26 + 27 + expect(rootStore.resolveName('')).rejects.toThrow('Invalid handle: ""') 28 + 29 + expect(rootStore.resolveName('did:123')).resolves.toReturnWith('did:123') 30 + }) 31 + 32 + it('should call the clearAll() resets state correctly', () => { 33 + rootStore.clearAll() 34 + 35 + expect(rootStore.session.data).toEqual(null) 36 + expect(rootStore.nav.tabs).toEqual([ 37 + { 38 + fixedTabPurpose: 0, 39 + history: [ 40 + { 41 + id: expect.anything(), 42 + ts: expect.anything(), 43 + url: '/', 44 + }, 45 + ], 46 + id: expect.anything(), 47 + index: 0, 48 + isNewTab: false, 49 + }, 50 + { 51 + fixedTabPurpose: 1, 52 + history: [ 53 + { 54 + id: expect.anything(), 55 + ts: expect.anything(), 56 + url: '/notifications', 57 + }, 58 + ], 59 + id: expect.anything(), 60 + index: 0, 61 + isNewTab: false, 62 + }, 63 + ]) 64 + expect(rootStore.nav.tabIndex).toEqual(0) 65 + expect(rootStore.me.did).toEqual('') 66 + expect(rootStore.me.handle).toEqual('') 67 + expect(rootStore.me.displayName).toEqual('') 68 + expect(rootStore.me.description).toEqual('') 69 + expect(rootStore.me.avatar).toEqual('') 70 + expect(rootStore.me.notificationCount).toEqual(0) 71 + expect(rootStore.me.memberships).toBeUndefined() 72 + }) 73 + })
+59
__tests__/state/models/shell-ui.test.ts
··· 1 + import { 2 + ConfirmModal, 3 + ImageLightbox, 4 + ShellUiModel, 5 + } from './../../../src/state/models/shell-ui' 6 + 7 + describe('ShellUiModel', () => { 8 + let model: ShellUiModel 9 + 10 + beforeEach(() => { 11 + model = new ShellUiModel() 12 + }) 13 + 14 + afterAll(() => { 15 + jest.clearAllMocks() 16 + }) 17 + 18 + it('should call the openModal & closeModal method', () => { 19 + model.openModal(ConfirmModal) 20 + expect(model.isModalActive).toEqual(true) 21 + expect(model.activeModal).toEqual(ConfirmModal) 22 + 23 + model.closeModal() 24 + expect(model.isModalActive).toEqual(false) 25 + expect(model.activeModal).toBeUndefined() 26 + }) 27 + 28 + it('should call the openLightbox & closeLightbox method', () => { 29 + model.openLightbox(new ImageLightbox('uri')) 30 + expect(model.isLightboxActive).toEqual(true) 31 + expect(model.activeLightbox).toEqual(new ImageLightbox('uri')) 32 + 33 + model.closeLightbox() 34 + expect(model.isLightboxActive).toEqual(false) 35 + expect(model.activeLightbox).toBeUndefined() 36 + }) 37 + 38 + it('should call the openComposer & closeComposer method', () => { 39 + const composer = { 40 + replyTo: { 41 + uri: 'uri', 42 + cid: 'cid', 43 + text: 'text', 44 + author: { 45 + handle: 'handle', 46 + displayName: 'name', 47 + }, 48 + }, 49 + onPost: jest.fn(), 50 + } 51 + model.openComposer(composer) 52 + expect(model.isComposerActive).toEqual(true) 53 + expect(model.composerOpts).toEqual(composer) 54 + 55 + model.closeComposer() 56 + expect(model.isComposerActive).toEqual(false) 57 + expect(model.composerOpts).toBeUndefined() 58 + }) 59 + })
+43
__tests__/view/com/composer/Autocomplete.test.tsx
··· 1 + import React from 'react' 2 + import {Autocomplete} from '../../../../src/view/com/composer/Autocomplete' 3 + import {cleanup, fireEvent, render} from '../../../../jest/test-utils' 4 + 5 + describe('Autocomplete', () => { 6 + const onSelectMock = jest.fn() 7 + const mockedProps = { 8 + active: true, 9 + items: [ 10 + { 11 + handle: 'handle.test', 12 + displayName: 'Test Display', 13 + }, 14 + { 15 + handle: 'handle2.test', 16 + displayName: 'Test Display 2', 17 + }, 18 + ], 19 + onSelect: onSelectMock, 20 + } 21 + 22 + afterAll(() => { 23 + jest.clearAllMocks() 24 + cleanup() 25 + }) 26 + 27 + it('renders a button for each user', async () => { 28 + const {findAllByTestId} = render(<Autocomplete {...mockedProps} />) 29 + const autocompleteButton = await findAllByTestId('autocompleteButton') 30 + expect(autocompleteButton.length).toBe(2) 31 + }) 32 + 33 + it('triggers onSelect by pressing the button', async () => { 34 + const {findAllByTestId} = render(<Autocomplete {...mockedProps} />) 35 + const autocompleteButton = await findAllByTestId('autocompleteButton') 36 + 37 + fireEvent.press(autocompleteButton[0]) 38 + expect(onSelectMock).toHaveBeenCalledWith('handle.test') 39 + 40 + fireEvent.press(autocompleteButton[1]) 41 + expect(onSelectMock).toHaveBeenCalledWith('handle2.test') 42 + }) 43 + })
+117
__tests__/view/com/composer/ComposePost.test.tsx
··· 1 + import React from 'react' 2 + import {ComposePost} from '../../../../src/view/com/composer/ComposePost' 3 + import {cleanup, fireEvent, render, waitFor} from '../../../../jest/test-utils' 4 + import * as apilib from '../../../../src/state/lib/api' 5 + import { 6 + mockedAutocompleteViewStore, 7 + mockedRootStore, 8 + } from '../../../../__mocks__/state-mock' 9 + import Toast from 'react-native-root-toast' 10 + 11 + describe('ComposePost', () => { 12 + const mockedProps = { 13 + replyTo: { 14 + uri: 'testUri', 15 + cid: 'testCid', 16 + text: 'testText', 17 + author: { 18 + handle: 'test.handle', 19 + displayName: 'test name', 20 + avatar: '', 21 + }, 22 + }, 23 + onPost: jest.fn(), 24 + onClose: jest.fn(), 25 + } 26 + 27 + afterAll(() => { 28 + jest.clearAllMocks() 29 + cleanup() 30 + }) 31 + 32 + it('renders post composer', async () => { 33 + const {findByTestId} = render(<ComposePost {...mockedProps} />) 34 + const composePostView = await findByTestId('composePostView') 35 + expect(composePostView).toBeTruthy() 36 + }) 37 + 38 + it('closes composer', async () => { 39 + const {findByTestId} = render(<ComposePost {...mockedProps} />) 40 + const composerCancelButton = await findByTestId('composerCancelButton') 41 + fireEvent.press(composerCancelButton) 42 + expect(mockedProps.onClose).toHaveBeenCalled() 43 + }) 44 + 45 + it('changes text and publishes post', async () => { 46 + const postSpy = jest.spyOn(apilib, 'post').mockResolvedValue({ 47 + uri: '', 48 + cid: '', 49 + }) 50 + const toastSpy = jest.spyOn(Toast, 'show') 51 + 52 + const wrapper = render(<ComposePost {...mockedProps} />) 53 + 54 + const composerTextInput = await wrapper.findByTestId('composerTextInput') 55 + fireEvent.changeText(composerTextInput, 'testing publish') 56 + 57 + const composerPublishButton = await wrapper.findByTestId( 58 + 'composerPublishButton', 59 + ) 60 + fireEvent.press(composerPublishButton) 61 + 62 + expect(postSpy).toHaveBeenCalledWith( 63 + mockedRootStore, 64 + 'testing publish', 65 + 'testUri', 66 + [], 67 + new Set<string>(), 68 + expect.anything(), 69 + ) 70 + 71 + // Waits for request to be resolved 72 + await waitFor(() => { 73 + expect(mockedProps.onPost).toHaveBeenCalled() 74 + expect(mockedProps.onClose).toHaveBeenCalled() 75 + expect(toastSpy).toHaveBeenCalledWith('Your reply has been published', { 76 + animation: true, 77 + duration: 3500, 78 + hideOnPress: true, 79 + position: 50, 80 + shadow: true, 81 + }) 82 + }) 83 + }) 84 + 85 + it('selects autocomplete item', async () => { 86 + jest 87 + .spyOn(React, 'useMemo') 88 + .mockReturnValueOnce(mockedAutocompleteViewStore) 89 + 90 + const {findAllByTestId} = render(<ComposePost {...mockedProps} />) 91 + const autocompleteButton = await findAllByTestId('autocompleteButton') 92 + 93 + fireEvent.press(autocompleteButton[0]) 94 + expect(mockedAutocompleteViewStore.setActive).toHaveBeenCalledWith(false) 95 + }) 96 + 97 + it('selects photos', async () => { 98 + const {findByTestId, queryByTestId} = render( 99 + <ComposePost {...mockedProps} />, 100 + ) 101 + let photoCarouselPickerView = queryByTestId('photoCarouselPickerView') 102 + expect(photoCarouselPickerView).toBeFalsy() 103 + 104 + const composerSelectPhotosButton = await findByTestId( 105 + 'composerSelectPhotosButton', 106 + ) 107 + fireEvent.press(composerSelectPhotosButton) 108 + 109 + photoCarouselPickerView = await findByTestId('photoCarouselPickerView') 110 + expect(photoCarouselPickerView).toBeTruthy() 111 + 112 + fireEvent.press(composerSelectPhotosButton) 113 + 114 + photoCarouselPickerView = queryByTestId('photoCarouselPickerView') 115 + expect(photoCarouselPickerView).toBeFalsy() 116 + }) 117 + })
+92
__tests__/view/com/composer/PhotoCarouselPicker.test.tsx
··· 1 + import React from 'react' 2 + import {PhotoCarouselPicker} from '../../../../src/view/com/composer/PhotoCarouselPicker' 3 + import {cleanup, fireEvent, render} from '../../../../jest/test-utils' 4 + import { 5 + openCamera, 6 + openCropper, 7 + openPicker, 8 + } from 'react-native-image-crop-picker' 9 + 10 + describe('PhotoCarouselPicker', () => { 11 + const mockedProps = { 12 + selectedPhotos: ['mock-uri', 'mock-uri-2'], 13 + onSelectPhotos: jest.fn(), 14 + localPhotos: { 15 + photos: [ 16 + { 17 + node: { 18 + image: { 19 + uri: 'mock-uri', 20 + }, 21 + }, 22 + }, 23 + ], 24 + }, 25 + } 26 + 27 + afterAll(() => { 28 + jest.clearAllMocks() 29 + cleanup() 30 + }) 31 + 32 + it('renders carousel picker', async () => { 33 + const {findByTestId} = render(<PhotoCarouselPicker {...mockedProps} />) 34 + const photoCarouselPickerView = await findByTestId( 35 + 'photoCarouselPickerView', 36 + ) 37 + expect(photoCarouselPickerView).toBeTruthy() 38 + }) 39 + 40 + it('triggers openCamera', async () => { 41 + const {findByTestId} = render(<PhotoCarouselPicker {...mockedProps} />) 42 + const openCameraButton = await findByTestId('openCameraButton') 43 + fireEvent.press(openCameraButton) 44 + 45 + expect(openCamera).toHaveBeenCalledWith({ 46 + compressImageQuality: 1, 47 + cropping: true, 48 + forceJpg: true, 49 + freeStyleCropEnabled: true, 50 + height: 1000, 51 + mediaType: 'photo', 52 + width: 1000, 53 + }) 54 + }) 55 + 56 + it('triggers openCropper', async () => { 57 + const {findByTestId} = render(<PhotoCarouselPicker {...mockedProps} />) 58 + const openSelectPhotoButton = await findByTestId('openSelectPhotoButton') 59 + fireEvent.press(openSelectPhotoButton) 60 + 61 + expect(openCropper).toHaveBeenCalledWith({ 62 + compressImageQuality: 1, 63 + forceJpg: true, 64 + freeStyleCropEnabled: true, 65 + height: 1000, 66 + mediaType: 'photo', 67 + path: 'mock-uri', 68 + width: 1000, 69 + }) 70 + }) 71 + 72 + it('triggers openPicker', async () => { 73 + const {findByTestId} = render(<PhotoCarouselPicker {...mockedProps} />) 74 + const openGalleryButton = await findByTestId('openGalleryButton') 75 + fireEvent.press(openGalleryButton) 76 + 77 + expect(openPicker).toHaveBeenCalledWith({ 78 + maxFiles: 2, 79 + mediaType: 'photo', 80 + multiple: true, 81 + }) 82 + expect(openCropper).toHaveBeenCalledWith({ 83 + compressImageQuality: 1, 84 + forceJpg: true, 85 + freeStyleCropEnabled: true, 86 + height: 1000, 87 + mediaType: 'photo', 88 + path: 'mock-uri', 89 + width: 1000, 90 + }) 91 + }) 92 + })
+70
__tests__/view/com/composer/SelectedPhoto.test.tsx
··· 1 + import React from 'react' 2 + import {SelectedPhoto} from '../../../../src/view/com/composer/SelectedPhoto' 3 + import {cleanup, fireEvent, render} from '../../../../jest/test-utils' 4 + 5 + describe('SelectedPhoto', () => { 6 + const mockedProps = { 7 + selectedPhotos: ['mock-uri', 'mock-uri-2'], 8 + onSelectPhotos: jest.fn(), 9 + } 10 + 11 + afterAll(() => { 12 + jest.clearAllMocks() 13 + cleanup() 14 + }) 15 + 16 + it('has no photos to render', () => { 17 + const {queryByTestId} = render( 18 + <SelectedPhoto selectedPhotos={[]} onSelectPhotos={jest.fn()} />, 19 + ) 20 + const selectedPhotosView = queryByTestId('selectedPhotosView') 21 + expect(selectedPhotosView).toBeNull() 22 + 23 + const selectedPhotoImage = queryByTestId('selectedPhotoImage') 24 + expect(selectedPhotoImage).toBeNull() 25 + }) 26 + 27 + it('has 1 photos to render', async () => { 28 + const {findByTestId} = render( 29 + <SelectedPhoto 30 + selectedPhotos={['mock-uri']} 31 + onSelectPhotos={jest.fn()} 32 + />, 33 + ) 34 + const selectedPhotosView = await findByTestId('selectedPhotosView') 35 + expect(selectedPhotosView).toBeTruthy() 36 + 37 + const selectedPhotoImage = await findByTestId('selectedPhotoImage') 38 + expect(selectedPhotoImage).toBeTruthy() 39 + // @ts-expect-error 40 + expect(selectedPhotoImage).toHaveStyle({width: 250}) 41 + }) 42 + 43 + it('has 2 photos to render', async () => { 44 + const {findAllByTestId} = render(<SelectedPhoto {...mockedProps} />) 45 + const selectedPhotoImage = await findAllByTestId('selectedPhotoImage') 46 + expect(selectedPhotoImage[0]).toBeTruthy() 47 + // @ts-expect-error 48 + expect(selectedPhotoImage[0]).toHaveStyle({width: 175}) 49 + }) 50 + 51 + it('has 3 photos to render', async () => { 52 + const {findAllByTestId} = render( 53 + <SelectedPhoto 54 + selectedPhotos={['mock-uri', 'mock-uri-2', 'mock-uri-3']} 55 + onSelectPhotos={jest.fn()} 56 + />, 57 + ) 58 + const selectedPhotoImage = await findAllByTestId('selectedPhotoImage') 59 + expect(selectedPhotoImage[0]).toBeTruthy() 60 + // @ts-expect-error 61 + expect(selectedPhotoImage[0]).toHaveStyle({width: 85}) 62 + }) 63 + 64 + it('removes a photo', async () => { 65 + const {findAllByTestId} = render(<SelectedPhoto {...mockedProps} />) 66 + const removePhotoButton = await findAllByTestId('removePhotoButton') 67 + fireEvent.press(removePhotoButton[0]) 68 + expect(mockedProps.onSelectPhotos).toHaveBeenCalledWith(['mock-uri-2']) 69 + }) 70 + })
+60
__tests__/view/com/login/CreateAccount.test.tsx
··· 1 + import React from 'react' 2 + import {Keyboard} from 'react-native' 3 + import {CreateAccount} from '../../../../src/view/com/login/CreateAccount' 4 + import {cleanup, fireEvent, render} from '../../../../jest/test-utils' 5 + import { 6 + mockedLogStore, 7 + mockedRootStore, 8 + mockedSessionStore, 9 + mockedShellStore, 10 + } from '../../../../__mocks__/state-mock' 11 + 12 + describe('CreateAccount', () => { 13 + const mockedProps = { 14 + onPressBack: jest.fn(), 15 + } 16 + afterAll(() => { 17 + jest.clearAllMocks() 18 + cleanup() 19 + }) 20 + 21 + it('renders form and creates new account', async () => { 22 + const {findByTestId} = render(<CreateAccount {...mockedProps} />) 23 + 24 + const registerEmailInput = await findByTestId('registerEmailInput') 25 + expect(registerEmailInput).toBeTruthy() 26 + fireEvent.changeText(registerEmailInput, 'test@email.com') 27 + 28 + const registerHandleInput = await findByTestId('registerHandleInput') 29 + expect(registerHandleInput).toBeTruthy() 30 + fireEvent.changeText(registerHandleInput, 'test.handle') 31 + 32 + const registerPasswordInput = await findByTestId('registerPasswordInput') 33 + expect(registerPasswordInput).toBeTruthy() 34 + fireEvent.changeText(registerPasswordInput, 'testpass') 35 + 36 + const registerIs13Input = await findByTestId('registerIs13Input') 37 + expect(registerIs13Input).toBeTruthy() 38 + fireEvent.press(registerIs13Input) 39 + 40 + const createAccountButton = await findByTestId('createAccountButton') 41 + expect(createAccountButton).toBeTruthy() 42 + fireEvent.press(createAccountButton) 43 + 44 + expect(mockedSessionStore.createAccount).toHaveBeenCalled() 45 + }) 46 + 47 + it('renders and selects service', async () => { 48 + const keyboardSpy = jest.spyOn(Keyboard, 'dismiss') 49 + const {findByTestId} = render(<CreateAccount {...mockedProps} />) 50 + 51 + const registerSelectServiceButton = await findByTestId( 52 + 'registerSelectServiceButton', 53 + ) 54 + expect(registerSelectServiceButton).toBeTruthy() 55 + fireEvent.press(registerSelectServiceButton) 56 + 57 + expect(mockedShellStore.openModal).toHaveBeenCalled() 58 + expect(keyboardSpy).toHaveBeenCalled() 59 + }) 60 + })
+128
__tests__/view/com/login/Signin.test.tsx
··· 1 + import React from 'react' 2 + import {Signin} from '../../../../src/view/com/login/Signin' 3 + import {cleanup, fireEvent, render} from '../../../../jest/test-utils' 4 + import {SessionServiceClient, sessionClient as AtpApi} from '@atproto/api' 5 + import { 6 + mockedLogStore, 7 + mockedRootStore, 8 + mockedSessionStore, 9 + mockedShellStore, 10 + } from '../../../../__mocks__/state-mock' 11 + import {Keyboard} from 'react-native' 12 + 13 + describe('Signin', () => { 14 + const requestPasswordResetMock = jest.fn() 15 + const resetPasswordMock = jest.fn() 16 + jest.spyOn(AtpApi, 'service').mockReturnValue({ 17 + com: { 18 + atproto: { 19 + account: { 20 + requestPasswordReset: requestPasswordResetMock, 21 + resetPassword: resetPasswordMock, 22 + }, 23 + }, 24 + }, 25 + } as unknown as SessionServiceClient) 26 + const mockedProps = { 27 + onPressBack: jest.fn(), 28 + } 29 + afterAll(() => { 30 + jest.clearAllMocks() 31 + cleanup() 32 + }) 33 + 34 + it('renders logs in form', async () => { 35 + const {findByTestId} = render(<Signin {...mockedProps} />) 36 + 37 + const loginFormView = await findByTestId('loginFormView') 38 + expect(loginFormView).toBeTruthy() 39 + 40 + const loginUsernameInput = await findByTestId('loginUsernameInput') 41 + expect(loginUsernameInput).toBeTruthy() 42 + 43 + fireEvent.changeText(loginUsernameInput, 'testusername') 44 + 45 + const loginPasswordInput = await findByTestId('loginPasswordInput') 46 + expect(loginPasswordInput).toBeTruthy() 47 + 48 + fireEvent.changeText(loginPasswordInput, 'test pass') 49 + 50 + const loginNextButton = await findByTestId('loginNextButton') 51 + expect(loginNextButton).toBeTruthy() 52 + 53 + fireEvent.press(loginNextButton) 54 + 55 + expect(mockedSessionStore.login).toHaveBeenCalled() 56 + }) 57 + 58 + it('renders selects service from login form', async () => { 59 + const keyboardSpy = jest.spyOn(Keyboard, 'dismiss') 60 + const {findByTestId} = render(<Signin {...mockedProps} />) 61 + 62 + const loginSelectServiceButton = await findByTestId( 63 + 'loginSelectServiceButton', 64 + ) 65 + expect(loginSelectServiceButton).toBeTruthy() 66 + 67 + fireEvent.press(loginSelectServiceButton) 68 + 69 + expect(mockedShellStore.openModal).toHaveBeenCalled() 70 + expect(keyboardSpy).toHaveBeenCalled() 71 + }) 72 + 73 + it('renders new password form', async () => { 74 + const {findByTestId} = render(<Signin {...mockedProps} />) 75 + 76 + const forgotPasswordButton = await findByTestId('forgotPasswordButton') 77 + expect(forgotPasswordButton).toBeTruthy() 78 + 79 + fireEvent.press(forgotPasswordButton) 80 + const forgotPasswordView = await findByTestId('forgotPasswordView') 81 + expect(forgotPasswordView).toBeTruthy() 82 + 83 + const forgotPasswordEmail = await findByTestId('forgotPasswordEmail') 84 + expect(forgotPasswordEmail).toBeTruthy() 85 + fireEvent.changeText(forgotPasswordEmail, 'test@email.com') 86 + 87 + const newPasswordButton = await findByTestId('newPasswordButton') 88 + expect(newPasswordButton).toBeTruthy() 89 + fireEvent.press(newPasswordButton) 90 + 91 + expect(requestPasswordResetMock).toHaveBeenCalled() 92 + 93 + const newPasswordView = await findByTestId('newPasswordView') 94 + expect(newPasswordView).toBeTruthy() 95 + 96 + const newPasswordInput = await findByTestId('newPasswordInput') 97 + expect(newPasswordInput).toBeTruthy() 98 + const resetCodeInput = await findByTestId('resetCodeInput') 99 + expect(resetCodeInput).toBeTruthy() 100 + 101 + fireEvent.changeText(newPasswordInput, 'test pass') 102 + fireEvent.changeText(resetCodeInput, 'test reset code') 103 + 104 + const setNewPasswordButton = await findByTestId('setNewPasswordButton') 105 + expect(setNewPasswordButton).toBeTruthy() 106 + 107 + fireEvent.press(setNewPasswordButton) 108 + 109 + expect(resetPasswordMock).toHaveBeenCalled() 110 + }) 111 + 112 + it('renders forgot password form', async () => { 113 + const {findByTestId} = render(<Signin {...mockedProps} />) 114 + 115 + const forgotPasswordButton = await findByTestId('forgotPasswordButton') 116 + expect(forgotPasswordButton).toBeTruthy() 117 + 118 + fireEvent.press(forgotPasswordButton) 119 + const forgotPasswordSelectServiceButton = await findByTestId( 120 + 'forgotPasswordSelectServiceButton', 121 + ) 122 + expect(forgotPasswordSelectServiceButton).toBeTruthy() 123 + 124 + fireEvent.press(forgotPasswordSelectServiceButton) 125 + 126 + expect(mockedShellStore.openModal).toHaveBeenCalled() 127 + }) 128 + })
+109
__tests__/view/com/profile/ProfileHeader.test.tsx
··· 1 + import React from 'react' 2 + import {cleanup, fireEvent, render} from '../../../../jest/test-utils' 3 + import {ProfileViewModel} from '../../../../src/state/models/profile-view' 4 + import {ProfileHeader} from '../../../../src/view/com/profile/ProfileHeader' 5 + import { 6 + mockedNavigationStore, 7 + mockedProfileStore, 8 + mockedShellStore, 9 + } from '../../../../__mocks__/state-mock' 10 + 11 + describe('ProfileHeader', () => { 12 + const mockedProps = { 13 + view: mockedProfileStore, 14 + onRefreshAll: jest.fn(), 15 + } 16 + afterAll(() => { 17 + jest.clearAllMocks() 18 + cleanup() 19 + }) 20 + 21 + it('renders ErrorMessage on error', async () => { 22 + const {findByTestId} = render( 23 + <ProfileHeader 24 + {...{ 25 + view: { 26 + ...mockedProfileStore, 27 + hasError: true, 28 + } as ProfileViewModel, 29 + onRefreshAll: jest.fn(), 30 + }} 31 + />, 32 + ) 33 + 34 + const profileHeaderHasError = await findByTestId('profileHeaderHasError') 35 + expect(profileHeaderHasError).toBeTruthy() 36 + }) 37 + 38 + it('presses and opens edit profile', async () => { 39 + const {findByTestId} = render(<ProfileHeader {...mockedProps} />) 40 + 41 + const profileHeaderEditProfileButton = await findByTestId( 42 + 'profileHeaderEditProfileButton', 43 + ) 44 + expect(profileHeaderEditProfileButton).toBeTruthy() 45 + fireEvent.press(profileHeaderEditProfileButton) 46 + 47 + expect(mockedShellStore.openModal).toHaveBeenCalled() 48 + }) 49 + 50 + it('presses and opens followers page', async () => { 51 + const {findByTestId} = render(<ProfileHeader {...mockedProps} />) 52 + 53 + const profileHeaderFollowersButton = await findByTestId( 54 + 'profileHeaderFollowersButton', 55 + ) 56 + expect(profileHeaderFollowersButton).toBeTruthy() 57 + fireEvent.press(profileHeaderFollowersButton) 58 + 59 + expect(mockedNavigationStore.navigate).toHaveBeenCalledWith( 60 + '/profile/testhandle/followers', 61 + ) 62 + }) 63 + 64 + it('presses and opens avatar modal', async () => { 65 + const {findByTestId} = render(<ProfileHeader {...mockedProps} />) 66 + 67 + const profileHeaderAviButton = await findByTestId('profileHeaderAviButton') 68 + expect(profileHeaderAviButton).toBeTruthy() 69 + fireEvent.press(profileHeaderAviButton) 70 + 71 + expect(mockedShellStore.openLightbox).toHaveBeenCalled() 72 + }) 73 + 74 + it('presses and opens follows page', async () => { 75 + const {findByTestId} = render(<ProfileHeader {...mockedProps} />) 76 + 77 + const profileHeaderFollowsButton = await findByTestId( 78 + 'profileHeaderFollowsButton', 79 + ) 80 + expect(profileHeaderFollowsButton).toBeTruthy() 81 + fireEvent.press(profileHeaderFollowsButton) 82 + 83 + expect(mockedNavigationStore.navigate).toHaveBeenCalledWith( 84 + '/profile/testhandle/follows', 85 + ) 86 + }) 87 + 88 + it('toggles following', async () => { 89 + const {findByTestId} = render( 90 + <ProfileHeader 91 + {...{ 92 + view: { 93 + ...mockedProfileStore, 94 + did: 'test did 2', 95 + } as ProfileViewModel, 96 + onRefreshAll: jest.fn(), 97 + }} 98 + />, 99 + ) 100 + 101 + const profileHeaderToggleFollowButton = await findByTestId( 102 + 'profileHeaderToggleFollowButton', 103 + ) 104 + expect(profileHeaderToggleFollowButton).toBeTruthy() 105 + fireEvent.press(profileHeaderToggleFollowButton) 106 + 107 + expect(mockedProps.view.toggleFollowing).toHaveBeenCalled() 108 + }) 109 + })
+17
__tests__/view/lib/useAnimatedValue.test.tsx
··· 1 + import {renderHook} from '../../../jest/test-utils' 2 + import {useAnimatedValue} from '../../../src/view/lib/hooks/useAnimatedValue' 3 + 4 + describe('useAnimatedValue', () => { 5 + it('creates an Animated.Value with the initial value passed to the hook', () => { 6 + const {result} = renderHook(() => useAnimatedValue(10)) 7 + // @ts-expect-error 8 + expect(result.current.__getValue()).toEqual(10) 9 + }) 10 + 11 + it('returns the same Animated.Value instance on subsequent renders', () => { 12 + const {result, rerender} = renderHook(() => useAnimatedValue(10)) 13 + const firstValue = result.current 14 + rerender({}) 15 + expect(result.current).toBe(firstValue) 16 + }) 17 + })
+49
__tests__/view/lib/useOnMainScroll.test.tsx
··· 1 + import React from 'react' 2 + import {fireEvent, render} from '../../../jest/test-utils' 3 + import {Home} from '../../../src/view/screens/Home' 4 + import {mockedRootStore, mockedShellStore} from '../../../__mocks__/state-mock' 5 + 6 + describe('useOnMainScroll', () => { 7 + const mockedProps = { 8 + navIdx: [0, 0] as [number, number], 9 + params: {}, 10 + visible: true, 11 + } 12 + 13 + it('toggles minimalShellMode to true', () => { 14 + jest.useFakeTimers() 15 + const {getByTestId} = render(<Home {...mockedProps} />) 16 + 17 + fireEvent.scroll(getByTestId('homeFeed'), { 18 + nativeEvent: { 19 + contentOffset: {y: 20}, 20 + contentSize: {height: 100}, 21 + layoutMeasurement: {height: 50}, 22 + }, 23 + }) 24 + 25 + expect(mockedRootStore.shell.setMinimalShellMode).toHaveBeenCalledWith(true) 26 + }) 27 + 28 + it('toggles minimalShellMode to false', () => { 29 + jest.useFakeTimers() 30 + const {getByTestId} = render(<Home {...mockedProps} />, { 31 + ...mockedRootStore, 32 + shell: { 33 + ...mockedShellStore, 34 + minimalShellMode: true, 35 + }, 36 + }) 37 + 38 + fireEvent.scroll(getByTestId('homeFeed'), { 39 + nativeEvent: { 40 + contentOffset: {y: 0}, 41 + contentSize: {height: 100}, 42 + layoutMeasurement: {height: 50}, 43 + }, 44 + }) 45 + expect(mockedRootStore.shell.setMinimalShellMode).toHaveBeenCalledWith( 46 + false, 47 + ) 48 + }) 49 + })
-16
__tests__/view/screens/Contacts.test.tsx
··· 1 - import React from 'react' 2 - import {Contacts} from '../../../src/view/screens/Contacts' 3 - import renderer from 'react-test-renderer' 4 - // import {render} from '../../../../jest/test-utils' 5 - 6 - describe('Contacts', () => { 7 - const mockedProps = { 8 - navIdx: [0, 0] as [number, number], 9 - params: {}, 10 - visible: true, 11 - } 12 - it('renders correctly', () => { 13 - const tree = renderer.create(<Contacts {...mockedProps} />).toJSON() 14 - expect(tree).toMatchSnapshot() 15 - }) 16 - })
-16
__tests__/view/screens/Home.test.tsx
··· 1 - import React from 'react' 2 - import {Home} from '../../../src/view/screens/Home' 3 - import renderer from 'react-test-renderer' 4 - // import {render} from '../../../../jest/test-utils' 5 - 6 - describe('Home', () => { 7 - const mockedProps = { 8 - navIdx: [0, 0] as [number, number], 9 - params: {}, 10 - visible: true, 11 - } 12 - it('renders correctly', () => { 13 - const tree = renderer.create(<Home {...mockedProps} />).toJSON() 14 - expect(tree).toMatchSnapshot() 15 - }) 16 - })
+31 -5
__tests__/view/screens/Login.test.tsx
··· 1 1 import React from 'react' 2 2 import {Login} from '../../../src/view/screens/Login' 3 - import renderer from 'react-test-renderer' 4 - // import {render} from '../../../../jest/test-utils' 3 + import {cleanup, fireEvent, render} from '../../../jest/test-utils' 5 4 6 5 describe('Login', () => { 7 - it('renders correctly', () => { 8 - const tree = renderer.create(<Login />).toJSON() 9 - expect(tree).toMatchSnapshot() 6 + afterAll(() => { 7 + jest.clearAllMocks() 8 + cleanup() 9 + }) 10 + 11 + it('renders initial screen', () => { 12 + const {getByTestId} = render(<Login />) 13 + const signUpScreen = getByTestId('signinOrCreateAccount') 14 + 15 + expect(signUpScreen).toBeTruthy() 16 + }) 17 + 18 + it('renders Signin screen', () => { 19 + const {getByTestId} = render(<Login />) 20 + const signInButton = getByTestId('signInButton') 21 + 22 + fireEvent.press(signInButton) 23 + 24 + const signInScreen = getByTestId('signIn') 25 + expect(signInScreen).toBeTruthy() 26 + }) 27 + 28 + it('renders CreateAccount screen', () => { 29 + const {getByTestId} = render(<Login />) 30 + const createAccountButton = getByTestId('createAccountButton') 31 + 32 + fireEvent.press(createAccountButton) 33 + 34 + const createAccountScreen = getByTestId('createAccount') 35 + expect(createAccountScreen).toBeTruthy() 10 36 }) 11 37 })
+15 -5
__tests__/view/screens/NotFound.test.tsx
··· 1 1 import React from 'react' 2 2 import {NotFound} from '../../../src/view/screens/NotFound' 3 - import renderer from 'react-test-renderer' 4 - // import {render} from '../../../../jest/test-utils' 3 + import {cleanup, fireEvent, render} from '../../../jest/test-utils' 4 + import {mockedNavigationStore} from '../../../__mocks__/state-mock' 5 5 6 6 describe('NotFound', () => { 7 - it('renders correctly', () => { 8 - const tree = renderer.create(<NotFound />).toJSON() 9 - expect(tree).toMatchSnapshot() 7 + afterAll(() => { 8 + jest.clearAllMocks() 9 + cleanup() 10 + }) 11 + 12 + it('navigates home', async () => { 13 + const navigationSpy = jest.spyOn(mockedNavigationStore, 'navigate') 14 + const {getByTestId} = render(<NotFound />) 15 + const navigateHomeButton = getByTestId('navigateHomeButton') 16 + 17 + fireEvent.press(navigateHomeButton) 18 + 19 + expect(navigationSpy).toHaveBeenCalledWith('/') 10 20 }) 11 21 })
-16
__tests__/view/screens/Notifications.test.tsx
··· 1 - import React from 'react' 2 - import {Notifications} from '../../../src/view/screens/Notifications' 3 - import renderer from 'react-test-renderer' 4 - // import {render} from '../../../../jest/test-utils' 5 - 6 - describe('Notifications', () => { 7 - const mockedProps = { 8 - navIdx: [0, 0] as [number, number], 9 - params: {}, 10 - visible: true, 11 - } 12 - it('renders correctly', () => { 13 - const tree = renderer.create(<Notifications {...mockedProps} />).toJSON() 14 - expect(tree).toMatchSnapshot() 15 - }) 16 - })
-11
__tests__/view/screens/Onboard.test.tsx
··· 1 - import React from 'react' 2 - import {Onboard} from '../../../src/view/screens/Onboard' 3 - import renderer from 'react-test-renderer' 4 - // import {render} from '../../../../jest/test-utils' 5 - 6 - describe('Onboard', () => { 7 - it('renders correctly', () => { 8 - const tree = renderer.create(<Onboard />).toJSON() 9 - expect(tree).toMatchSnapshot() 10 - }) 11 - })
-19
__tests__/view/screens/PostDownvotedBy.test.tsx
··· 1 - import React from 'react' 2 - import {PostDownvotedBy} from '../../../src/view/screens/PostDownvotedBy' 3 - import renderer from 'react-test-renderer' 4 - // import {render} from '../../../../jest/test-utils' 5 - 6 - describe('PostDownvotedBy', () => { 7 - const mockedProps = { 8 - navIdx: [0, 0] as [number, number], 9 - params: { 10 - name: 'test name', 11 - rkey: '123123123', 12 - }, 13 - visible: true, 14 - } 15 - it('renders correctly', () => { 16 - const tree = renderer.create(<PostDownvotedBy {...mockedProps} />).toJSON() 17 - expect(tree).toMatchSnapshot() 18 - }) 19 - })
-19
__tests__/view/screens/PostRepostedBy.test.tsx
··· 1 - import React from 'react' 2 - import {PostRepostedBy} from '../../../src/view/screens/PostRepostedBy' 3 - import renderer from 'react-test-renderer' 4 - // import {render} from '../../../../jest/test-utils' 5 - 6 - describe('PostRepostedBy', () => { 7 - const mockedProps = { 8 - navIdx: [0, 0] as [number, number], 9 - params: { 10 - name: 'test name', 11 - rkey: '123123123', 12 - }, 13 - visible: true, 14 - } 15 - it('renders correctly', () => { 16 - const tree = renderer.create(<PostRepostedBy {...mockedProps} />).toJSON() 17 - expect(tree).toMatchSnapshot() 18 - }) 19 - })
-19
__tests__/view/screens/PostThread.test.tsx
··· 1 - import React from 'react' 2 - import {PostThread} from '../../../src/view/screens/PostThread' 3 - import renderer from 'react-test-renderer' 4 - // import {render} from '../../../../jest/test-utils' 5 - 6 - describe('PostThread', () => { 7 - const mockedProps = { 8 - navIdx: [0, 0] as [number, number], 9 - params: { 10 - name: 'test name', 11 - rkey: '123123123', 12 - }, 13 - visible: true, 14 - } 15 - it('renders correctly', () => { 16 - const tree = renderer.create(<PostThread {...mockedProps} />).toJSON() 17 - expect(tree).toMatchSnapshot() 18 - }) 19 - })
-19
__tests__/view/screens/PostUpvotedBy.test.tsx
··· 1 - import React from 'react' 2 - import {PostUpvotedBy} from '../../../src/view/screens/PostUpvotedBy' 3 - import renderer from 'react-test-renderer' 4 - // import {render} from '../../../../jest/test-utils' 5 - 6 - describe('PostUpvotedBy', () => { 7 - const mockedProps = { 8 - navIdx: [0, 0] as [number, number], 9 - params: { 10 - name: 'test name', 11 - rkey: '123123123', 12 - }, 13 - visible: true, 14 - } 15 - it('renders correctly', () => { 16 - const tree = renderer.create(<PostUpvotedBy {...mockedProps} />).toJSON() 17 - expect(tree).toMatchSnapshot() 18 - }) 19 - })
-19
__tests__/view/screens/Profile.test.tsx
··· 1 - import React from 'react' 2 - import {Profile} from '../../../src/view/screens/Profile' 3 - import renderer from 'react-test-renderer' 4 - // import {render} from '../../../../jest/test-utils' 5 - 6 - describe('Profile', () => { 7 - const mockedProps = { 8 - navIdx: [0, 0] as [number, number], 9 - params: { 10 - name: 'test name', 11 - user: 'test.user', 12 - }, 13 - visible: true, 14 - } 15 - it('renders correctly', () => { 16 - const tree = renderer.create(<Profile {...mockedProps} />).toJSON() 17 - expect(tree).toMatchSnapshot() 18 - }) 19 - })
-18
__tests__/view/screens/ProfileFollowers.test.tsx
··· 1 - import React from 'react' 2 - import {ProfileFollowers} from '../../../src/view/screens/ProfileFollowers' 3 - import renderer from 'react-test-renderer' 4 - // import {render} from '../../../../jest/test-utils' 5 - 6 - describe('ProfileFollowers', () => { 7 - const mockedProps = { 8 - navIdx: [0, 0] as [number, number], 9 - params: { 10 - name: 'test name', 11 - }, 12 - visible: true, 13 - } 14 - it('renders correctly', () => { 15 - const tree = renderer.create(<ProfileFollowers {...mockedProps} />).toJSON() 16 - expect(tree).toMatchSnapshot() 17 - }) 18 - })
-18
__tests__/view/screens/ProfileFollows.test.tsx
··· 1 - import React from 'react' 2 - import {ProfileFollows} from '../../../src/view/screens/ProfileFollows' 3 - import renderer from 'react-test-renderer' 4 - // import {render} from '../../../../jest/test-utils' 5 - 6 - describe('ProfileFollows', () => { 7 - const mockedProps = { 8 - navIdx: [0, 0] as [number, number], 9 - params: { 10 - name: 'test name', 11 - }, 12 - visible: true, 13 - } 14 - it('renders correctly', () => { 15 - const tree = renderer.create(<ProfileFollows {...mockedProps} />).toJSON() 16 - expect(tree).toMatchSnapshot() 17 - }) 18 - })
-18
__tests__/view/screens/ProfileMembers.test.tsx
··· 1 - import React from 'react' 2 - import {ProfileMembers} from '../../../src/view/screens/ProfileMembers' 3 - import renderer from 'react-test-renderer' 4 - // import {render} from '../../../../jest/test-utils' 5 - 6 - describe('ProfileMembers', () => { 7 - const mockedProps = { 8 - navIdx: [0, 0] as [number, number], 9 - params: { 10 - name: 'test name', 11 - }, 12 - visible: true, 13 - } 14 - it('renders correctly', () => { 15 - const tree = renderer.create(<ProfileMembers {...mockedProps} />).toJSON() 16 - expect(tree).toMatchSnapshot() 17 - }) 18 - })
+17 -5
__tests__/view/screens/Search.test.tsx
··· 1 1 import React from 'react' 2 2 import {Search} from '../../../src/view/screens/Search' 3 - import renderer from 'react-test-renderer' 4 - // import {render} from '../../../../jest/test-utils' 3 + import {cleanup, fireEvent, render} from '../../../jest/test-utils' 5 4 6 5 describe('Search', () => { 6 + jest.useFakeTimers() 7 7 const mockedProps = { 8 8 navIdx: [0, 0] as [number, number], 9 9 params: { ··· 11 11 }, 12 12 visible: true, 13 13 } 14 - it('renders correctly', () => { 15 - const tree = renderer.create(<Search {...mockedProps} />).toJSON() 16 - expect(tree).toMatchSnapshot() 14 + 15 + afterAll(() => { 16 + jest.clearAllMocks() 17 + cleanup() 18 + }) 19 + 20 + it('renders with query', async () => { 21 + const {findByTestId} = render(<Search {...mockedProps} />) 22 + const searchTextInput = await findByTestId('searchTextInput') 23 + 24 + expect(searchTextInput).toBeTruthy() 25 + fireEvent.changeText(searchTextInput, 'test') 26 + 27 + const searchScrollView = await findByTestId('searchScrollView') 28 + expect(searchScrollView).toBeTruthy() 17 29 }) 18 30 })
-16
__tests__/view/screens/Settings.test.tsx
··· 1 - import React from 'react' 2 - import {Settings} from '../../../src/view/screens/Settings' 3 - import renderer from 'react-test-renderer' 4 - // import {render} from '../../../../jest/test-utils' 5 - 6 - describe('Settings', () => { 7 - const mockedProps = { 8 - navIdx: [0, 0] as [number, number], 9 - params: {}, 10 - visible: true, 11 - } 12 - it('renders correctly', () => { 13 - const tree = renderer.create(<Settings {...mockedProps} />).toJSON() 14 - expect(tree).toMatchSnapshot() 15 - }) 16 - })
-205
__tests__/view/screens/__snapshots__/Contacts.test.tsx.snap
··· 1 - // Jest Snapshot v1, https://goo.gl/fbAQLP 2 - 3 - exports[`Contacts renders correctly 1`] = ` 4 - <View> 5 - <View 6 - style={ 7 - Object { 8 - "backgroundColor": "#ffffff", 9 - } 10 - } 11 - > 12 - <Text 13 - style={ 14 - Array [ 15 - Object { 16 - "color": "#000000", 17 - }, 18 - Object { 19 - "fontSize": 30, 20 - "fontWeight": "bold", 21 - "paddingHorizontal": 12, 22 - "paddingVertical": 6, 23 - }, 24 - ] 25 - } 26 - > 27 - Contacts 28 - </Text> 29 - </View> 30 - <View 31 - style={ 32 - Object { 33 - "backgroundColor": "#ffffff", 34 - } 35 - } 36 - > 37 - <View 38 - style={ 39 - Object { 40 - "backgroundColor": "#f8f3f3", 41 - "borderRadius": 4, 42 - "flexDirection": "row", 43 - "marginBottom": 6, 44 - "marginHorizontal": 10, 45 - "paddingHorizontal": 8, 46 - "paddingVertical": 8, 47 - } 48 - } 49 - > 50 - < 51 - icon="magnifying-glass" 52 - size={16} 53 - style={ 54 - Object { 55 - "color": "#645454", 56 - "marginRight": 8, 57 - } 58 - } 59 - /> 60 - <TextInput 61 - onChangeText={[Function]} 62 - placeholder="Search" 63 - placeholderTextColor="#968d8d" 64 - style={ 65 - Object { 66 - "color": "#000000", 67 - "flex": 1, 68 - } 69 - } 70 - value="" 71 - /> 72 - </View> 73 - </View> 74 - <View 75 - onLayout={[Function]} 76 - style={ 77 - Array [ 78 - Object { 79 - "backgroundColor": "#ffffff", 80 - "flexDirection": "row", 81 - "paddingBottom": 12, 82 - "paddingHorizontal": 14, 83 - "paddingTop": 8, 84 - }, 85 - ] 86 - } 87 - > 88 - <View 89 - collapsable={false} 90 - style={ 91 - Object { 92 - "backgroundColor": "#000000", 93 - "bottom": 0, 94 - "height": 4, 95 - "left": 0, 96 - "position": "absolute", 97 - "width": 0, 98 - } 99 - } 100 - /> 101 - <View 102 - accessible={true} 103 - focusable={true} 104 - onClick={[Function]} 105 - onResponderGrant={[Function]} 106 - onResponderMove={[Function]} 107 - onResponderRelease={[Function]} 108 - onResponderTerminate={[Function]} 109 - onResponderTerminationRequest={[Function]} 110 - onStartShouldSetResponder={[Function]} 111 - style={ 112 - Object { 113 - "marginRight": 14, 114 - "paddingHorizontal": 10, 115 - } 116 - } 117 - > 118 - <Text 119 - style={ 120 - Array [ 121 - Object { 122 - "color": "#000000", 123 - }, 124 - Object { 125 - "color": "#000000", 126 - "fontSize": 16, 127 - "fontWeight": "600", 128 - }, 129 - ] 130 - } 131 - > 132 - All 133 - </Text> 134 - </View> 135 - <View 136 - accessible={true} 137 - focusable={true} 138 - onClick={[Function]} 139 - onResponderGrant={[Function]} 140 - onResponderMove={[Function]} 141 - onResponderRelease={[Function]} 142 - onResponderTerminate={[Function]} 143 - onResponderTerminationRequest={[Function]} 144 - onStartShouldSetResponder={[Function]} 145 - style={ 146 - Object { 147 - "marginRight": 14, 148 - "paddingHorizontal": 10, 149 - } 150 - } 151 - > 152 - <Text 153 - style={ 154 - Array [ 155 - Object { 156 - "color": "#000000", 157 - }, 158 - Object { 159 - "color": "#645454", 160 - "fontSize": 16, 161 - "fontWeight": "600", 162 - }, 163 - ] 164 - } 165 - > 166 - Following 167 - </Text> 168 - </View> 169 - <View 170 - accessible={true} 171 - focusable={true} 172 - onClick={[Function]} 173 - onResponderGrant={[Function]} 174 - onResponderMove={[Function]} 175 - onResponderRelease={[Function]} 176 - onResponderTerminate={[Function]} 177 - onResponderTerminationRequest={[Function]} 178 - onStartShouldSetResponder={[Function]} 179 - style={ 180 - Object { 181 - "marginRight": 14, 182 - "paddingHorizontal": 10, 183 - } 184 - } 185 - > 186 - <Text 187 - style={ 188 - Array [ 189 - Object { 190 - "color": "#000000", 191 - }, 192 - Object { 193 - "color": "#645454", 194 - "fontSize": 16, 195 - "fontWeight": "600", 196 - }, 197 - ] 198 - } 199 - > 200 - Scenes 201 - </Text> 202 - </View> 203 - </View> 204 - </View> 205 - `;
-594
__tests__/view/screens/__snapshots__/Home.test.tsx.snap
··· 1 - // Jest Snapshot v1, https://goo.gl/fbAQLP 2 - 3 - exports[`Home renders correctly 1`] = ` 4 - <View 5 - style={ 6 - Object { 7 - "flex": 1, 8 - } 9 - } 10 - > 11 - <View 12 - style={ 13 - Object { 14 - "alignItems": "center", 15 - "backgroundColor": "#ffffff", 16 - "borderBottomColor": "#f8f3f3", 17 - "borderBottomWidth": 1, 18 - "flexDirection": "row", 19 - "paddingBottom": 6, 20 - "paddingHorizontal": 12, 21 - "paddingTop": 6, 22 - } 23 - } 24 - > 25 - <View 26 - accessible={true} 27 - collapsable={false} 28 - focusable={true} 29 - hitSlop={ 30 - Object { 31 - "bottom": 10, 32 - "left": 10, 33 - "right": 30, 34 - "top": 10, 35 - } 36 - } 37 - onClick={[Function]} 38 - onResponderGrant={[Function]} 39 - onResponderMove={[Function]} 40 - onResponderRelease={[Function]} 41 - onResponderTerminate={[Function]} 42 - onResponderTerminationRequest={[Function]} 43 - onStartShouldSetResponder={[Function]} 44 - style={ 45 - Object { 46 - "height": 30, 47 - "opacity": 1, 48 - "width": 40, 49 - } 50 - } 51 - > 52 - <RNSVGSvgView 53 - align="xMidYMid" 54 - bbHeight={30} 55 - bbWidth={30} 56 - focusable={false} 57 - height={30} 58 - meetOrSlice={0} 59 - minX={0} 60 - minY={0} 61 - style={ 62 - Array [ 63 - Object { 64 - "backgroundColor": "transparent", 65 - "borderWidth": 0, 66 - }, 67 - Object { 68 - "flex": 0, 69 - "height": 30, 70 - "width": 30, 71 - }, 72 - ] 73 - } 74 - vbHeight={100} 75 - vbWidth={100} 76 - width={30} 77 - > 78 - <RNSVGGroup> 79 - <RNSVGDefs> 80 - <RNSVGLinearGradient 81 - gradient={ 82 - Array [ 83 - 0, 84 - -1292135, 85 - 1, 86 - -2424577, 87 - ] 88 - } 89 - gradientTransform={null} 90 - gradientUnits={0} 91 - name="grad" 92 - x1="0" 93 - x2="1" 94 - y1="0" 95 - y2="1" 96 - /> 97 - </RNSVGDefs> 98 - <RNSVGCircle 99 - cx="50" 100 - cy="50" 101 - fill={ 102 - Array [ 103 - 1, 104 - "grad", 105 - ] 106 - } 107 - propList={ 108 - Array [ 109 - "fill", 110 - ] 111 - } 112 - r="50" 113 - /> 114 - <RNSVGText 115 - content={null} 116 - dx={Array []} 117 - dy={Array []} 118 - fill={4294967295} 119 - font={ 120 - Object { 121 - "fontSize": "50", 122 - "fontWeight": "bold", 123 - "textAnchor": "middle", 124 - } 125 - } 126 - propList={ 127 - Array [ 128 - "fill", 129 - ] 130 - } 131 - rotate={Array []} 132 - x={ 133 - Array [ 134 - "50", 135 - ] 136 - } 137 - y={ 138 - Array [ 139 - "67", 140 - ] 141 - } 142 - > 143 - <RNSVGTSpan 144 - content="X" 145 - dx={Array []} 146 - dy={Array []} 147 - font={Object {}} 148 - rotate={Array []} 149 - x={Array []} 150 - y={Array []} 151 - /> 152 - </RNSVGText> 153 - </RNSVGGroup> 154 - </RNSVGSvgView> 155 - </View> 156 - <View 157 - pointerEvents="none" 158 - style={ 159 - Object { 160 - "alignItems": "baseline", 161 - "flexDirection": "row", 162 - "marginRight": "auto", 163 - } 164 - } 165 - > 166 - <Text 167 - style={ 168 - Array [ 169 - Object { 170 - "color": "#000000", 171 - }, 172 - Object { 173 - "color": "#000000", 174 - "fontSize": 21, 175 - "fontWeight": "600", 176 - }, 177 - ] 178 - } 179 - > 180 - Bluesky 181 - </Text> 182 - <Text 183 - numberOfLines={1} 184 - style={ 185 - Array [ 186 - Object { 187 - "color": "#000000", 188 - }, 189 - Object { 190 - "color": "#968d8d", 191 - "fontSize": 18, 192 - "marginLeft": 6, 193 - "maxWidth": 200, 194 - }, 195 - ] 196 - } 197 - > 198 - Private Beta 199 - </Text> 200 - </View> 201 - <View 202 - accessible={true} 203 - collapsable={false} 204 - focusable={true} 205 - hitSlop={ 206 - Object { 207 - "bottom": 10, 208 - "left": 10, 209 - "right": 10, 210 - "top": 10, 211 - } 212 - } 213 - onClick={[Function]} 214 - onResponderGrant={[Function]} 215 - onResponderMove={[Function]} 216 - onResponderRelease={[Function]} 217 - onResponderTerminate={[Function]} 218 - onResponderTerminationRequest={[Function]} 219 - onStartShouldSetResponder={[Function]} 220 - style={ 221 - Object { 222 - "alignItems": "center", 223 - "backgroundColor": "#f8f3f3", 224 - "borderRadius": 20, 225 - "flexDirection": "row", 226 - "height": 36, 227 - "justifyContent": "center", 228 - "opacity": 1, 229 - "width": 36, 230 - } 231 - } 232 - > 233 - < 234 - icon="plus" 235 - size={18} 236 - /> 237 - </View> 238 - <View 239 - accessible={true} 240 - collapsable={false} 241 - focusable={true} 242 - hitSlop={ 243 - Object { 244 - "bottom": 10, 245 - "left": 10, 246 - "right": 10, 247 - "top": 10, 248 - } 249 - } 250 - onClick={[Function]} 251 - onResponderGrant={[Function]} 252 - onResponderMove={[Function]} 253 - onResponderRelease={[Function]} 254 - onResponderTerminate={[Function]} 255 - onResponderTerminationRequest={[Function]} 256 - onStartShouldSetResponder={[Function]} 257 - style={ 258 - Object { 259 - "alignItems": "center", 260 - "backgroundColor": "#f8f3f3", 261 - "borderRadius": 20, 262 - "flexDirection": "row", 263 - "height": 36, 264 - "justifyContent": "center", 265 - "marginLeft": 8, 266 - "opacity": 1, 267 - "width": 36, 268 - } 269 - } 270 - > 271 - <RNSVGSvgView 272 - align="xMidYMid" 273 - bbHeight={18} 274 - bbWidth={18} 275 - color={4278190080} 276 - fill="none" 277 - focusable={false} 278 - height={18} 279 - meetOrSlice={0} 280 - minX={0} 281 - minY={0} 282 - stroke="currentColor" 283 - strokeWidth={3} 284 - style={ 285 - Array [ 286 - Object { 287 - "backgroundColor": "transparent", 288 - "borderWidth": 0, 289 - }, 290 - Object { 291 - "color": "#000000", 292 - "position": "relative", 293 - "top": -1, 294 - }, 295 - Object { 296 - "flex": 0, 297 - "height": 18, 298 - "width": 18, 299 - }, 300 - ] 301 - } 302 - tintColor={4278190080} 303 - vbHeight={24} 304 - vbWidth={24} 305 - width={18} 306 - > 307 - <RNSVGGroup 308 - fill={null} 309 - propList={ 310 - Array [ 311 - "fill", 312 - "stroke", 313 - "strokeWidth", 314 - ] 315 - } 316 - stroke={ 317 - Array [ 318 - 2, 319 - ] 320 - } 321 - strokeWidth={3} 322 - > 323 - <RNSVGPath 324 - d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" 325 - propList={ 326 - Array [ 327 - "strokeLinecap", 328 - "strokeLinejoin", 329 - ] 330 - } 331 - strokeLinecap={1} 332 - strokeLinejoin={1} 333 - /> 334 - </RNSVGGroup> 335 - </RNSVGSvgView> 336 - </View> 337 - <View 338 - accessible={true} 339 - collapsable={false} 340 - focusable={true} 341 - onClick={[Function]} 342 - onResponderGrant={[Function]} 343 - onResponderMove={[Function]} 344 - onResponderRelease={[Function]} 345 - onResponderTerminate={[Function]} 346 - onResponderTerminationRequest={[Function]} 347 - onStartShouldSetResponder={[Function]} 348 - style={ 349 - Object { 350 - "alignItems": "center", 351 - "backgroundColor": "#ffffff", 352 - "borderRadius": 20, 353 - "flexDirection": "row", 354 - "height": 36, 355 - "justifyContent": "center", 356 - "marginLeft": 8, 357 - "opacity": 1, 358 - "width": 36, 359 - } 360 - } 361 - > 362 - < 363 - icon="signal" 364 - size={18} 365 - style={ 366 - Array [ 367 - Object { 368 - "color": "#000000", 369 - }, 370 - ] 371 - } 372 - /> 373 - < 374 - icon="x" 375 - size={12} 376 - style={ 377 - Object { 378 - "backgroundColor": "#ffffff", 379 - "color": "#d1106f", 380 - "left": -4, 381 - "position": "relative", 382 - "top": 6, 383 - } 384 - } 385 - /> 386 - </View> 387 - </View> 388 - <View 389 - style={ 390 - Object { 391 - "flex": 1, 392 - } 393 - } 394 - > 395 - <View 396 - accessible={true} 397 - collapsable={false} 398 - focusable={true} 399 - onClick={[Function]} 400 - onResponderGrant={[Function]} 401 - onResponderMove={[Function]} 402 - onResponderRelease={[Function]} 403 - onResponderTerminate={[Function]} 404 - onResponderTerminationRequest={[Function]} 405 - onStartShouldSetResponder={[Function]} 406 - style={ 407 - Object { 408 - "alignItems": "center", 409 - "backgroundColor": "#ffffff", 410 - "borderRadius": 6, 411 - "flexDirection": "row", 412 - "margin": 2, 413 - "marginBottom": 0, 414 - "opacity": 1, 415 - "paddingHorizontal": 10, 416 - "paddingVertical": 10, 417 - } 418 - } 419 - > 420 - <View 421 - accessible={true} 422 - collapsable={false} 423 - focusable={true} 424 - onClick={[Function]} 425 - onResponderGrant={[Function]} 426 - onResponderMove={[Function]} 427 - onResponderRelease={[Function]} 428 - onResponderTerminate={[Function]} 429 - onResponderTerminationRequest={[Function]} 430 - onStartShouldSetResponder={[Function]} 431 - style={ 432 - Object { 433 - "opacity": 1, 434 - "width": 50, 435 - } 436 - } 437 - > 438 - <RNSVGSvgView 439 - align="xMidYMid" 440 - bbHeight={50} 441 - bbWidth={50} 442 - focusable={false} 443 - height={50} 444 - meetOrSlice={0} 445 - minX={0} 446 - minY={0} 447 - style={ 448 - Array [ 449 - Object { 450 - "backgroundColor": "transparent", 451 - "borderWidth": 0, 452 - }, 453 - Object { 454 - "flex": 0, 455 - "height": 50, 456 - "width": 50, 457 - }, 458 - ] 459 - } 460 - vbHeight={100} 461 - vbWidth={100} 462 - width={50} 463 - > 464 - <RNSVGGroup> 465 - <RNSVGDefs> 466 - <RNSVGLinearGradient 467 - gradient={ 468 - Array [ 469 - 0, 470 - -1292135, 471 - 1, 472 - -2424577, 473 - ] 474 - } 475 - gradientTransform={null} 476 - gradientUnits={0} 477 - name="grad" 478 - x1="0" 479 - x2="1" 480 - y1="0" 481 - y2="1" 482 - /> 483 - </RNSVGDefs> 484 - <RNSVGCircle 485 - cx="50" 486 - cy="50" 487 - fill={ 488 - Array [ 489 - 1, 490 - "grad", 491 - ] 492 - } 493 - propList={ 494 - Array [ 495 - "fill", 496 - ] 497 - } 498 - r="50" 499 - /> 500 - <RNSVGText 501 - content={null} 502 - dx={Array []} 503 - dy={Array []} 504 - fill={4294967295} 505 - font={ 506 - Object { 507 - "fontSize": "50", 508 - "fontWeight": "bold", 509 - "textAnchor": "middle", 510 - } 511 - } 512 - propList={ 513 - Array [ 514 - "fill", 515 - ] 516 - } 517 - rotate={Array []} 518 - x={ 519 - Array [ 520 - "50", 521 - ] 522 - } 523 - y={ 524 - Array [ 525 - "67", 526 - ] 527 - } 528 - > 529 - <RNSVGTSpan 530 - content="X" 531 - dx={Array []} 532 - dy={Array []} 533 - font={Object {}} 534 - rotate={Array []} 535 - x={Array []} 536 - y={Array []} 537 - /> 538 - </RNSVGText> 539 - </RNSVGGroup> 540 - </RNSVGSvgView> 541 - </View> 542 - <View 543 - style={ 544 - Object { 545 - "flex": 1, 546 - "marginLeft": 10, 547 - } 548 - } 549 - > 550 - <Text 551 - style={ 552 - Array [ 553 - Object { 554 - "color": "#000000", 555 - }, 556 - Object { 557 - "color": "#968d8d", 558 - "fontSize": 17, 559 - }, 560 - ] 561 - } 562 - > 563 - What's up? 564 - </Text> 565 - </View> 566 - <View 567 - style={ 568 - Object { 569 - "backgroundColor": "#f8f3f3", 570 - "borderRadius": 30, 571 - "paddingHorizontal": 14, 572 - "paddingVertical": 6, 573 - } 574 - } 575 - > 576 - <Text 577 - style={ 578 - Array [ 579 - Object { 580 - "color": "#000000", 581 - }, 582 - Object { 583 - "color": "#645454", 584 - }, 585 - ] 586 - } 587 - > 588 - Post 589 - </Text> 590 - </View> 591 - </View> 592 - </View> 593 - </View> 594 - `;
-371
__tests__/view/screens/__snapshots__/Login.test.tsx.snap
··· 1 - // Jest Snapshot v1, https://goo.gl/fbAQLP 2 - 3 - exports[`Login renders correctly 1`] = ` 4 - <View 5 - style={ 6 - Object { 7 - "flex": 1, 8 - } 9 - } 10 - > 11 - <View 12 - style={ 13 - Object { 14 - "flex": 2, 15 - "justifyContent": "center", 16 - } 17 - } 18 - > 19 - <View 20 - style={ 21 - Object { 22 - "flexDirection": "row", 23 - "justifyContent": "center", 24 - } 25 - } 26 - > 27 - <RNSVGSvgView 28 - bbHeight="100" 29 - bbWidth="100" 30 - focusable={false} 31 - height="100" 32 - style={ 33 - Array [ 34 - Object { 35 - "backgroundColor": "transparent", 36 - "borderWidth": 0, 37 - }, 38 - Object { 39 - "flex": 0, 40 - "height": 100, 41 - "width": 100, 42 - }, 43 - ] 44 - } 45 - width="100" 46 - > 47 - <RNSVGGroup> 48 - <RNSVGCircle 49 - cx="50" 50 - cy="50" 51 - fill={null} 52 - propList={ 53 - Array [ 54 - "fill", 55 - "stroke", 56 - "strokeWidth", 57 - ] 58 - } 59 - r="46" 60 - stroke={4294967295} 61 - strokeWidth={2} 62 - /> 63 - <RNSVGLine 64 - propList={ 65 - Array [ 66 - "stroke", 67 - "strokeWidth", 68 - ] 69 - } 70 - stroke={4294967295} 71 - strokeWidth={1} 72 - x1="30" 73 - x2="30" 74 - y1="0" 75 - y2="100" 76 - /> 77 - <RNSVGLine 78 - propList={ 79 - Array [ 80 - "stroke", 81 - "strokeWidth", 82 - ] 83 - } 84 - stroke={4294967295} 85 - strokeWidth={1} 86 - x1="74" 87 - x2="74" 88 - y1="0" 89 - y2="100" 90 - /> 91 - <RNSVGLine 92 - propList={ 93 - Array [ 94 - "stroke", 95 - "strokeWidth", 96 - ] 97 - } 98 - stroke={4294967295} 99 - strokeWidth={1} 100 - x1="0" 101 - x2="100" 102 - y1="22" 103 - y2="22" 104 - /> 105 - <RNSVGLine 106 - propList={ 107 - Array [ 108 - "stroke", 109 - "strokeWidth", 110 - ] 111 - } 112 - stroke={4294967295} 113 - strokeWidth={1} 114 - x1="0" 115 - x2="100" 116 - y1="74" 117 - y2="74" 118 - /> 119 - <RNSVGText 120 - content={null} 121 - dx={Array []} 122 - dy={Array []} 123 - fill={null} 124 - font={ 125 - Object { 126 - "fontSize": "60", 127 - "fontWeight": "bold", 128 - "textAnchor": "middle", 129 - } 130 - } 131 - propList={ 132 - Array [ 133 - "fill", 134 - "stroke", 135 - "strokeWidth", 136 - ] 137 - } 138 - rotate={Array []} 139 - stroke={4294967295} 140 - strokeWidth={2} 141 - x={ 142 - Array [ 143 - "52", 144 - ] 145 - } 146 - y={ 147 - Array [ 148 - "70", 149 - ] 150 - } 151 - > 152 - <RNSVGTSpan 153 - content="B" 154 - dx={Array []} 155 - dy={Array []} 156 - font={Object {}} 157 - rotate={Array []} 158 - x={Array []} 159 - y={Array []} 160 - /> 161 - </RNSVGText> 162 - </RNSVGGroup> 163 - </RNSVGSvgView> 164 - </View> 165 - <Text 166 - style={ 167 - Array [ 168 - Object { 169 - "color": "#000000", 170 - }, 171 - Object { 172 - "color": "#ffffff", 173 - "fontSize": 68, 174 - "fontWeight": "bold", 175 - "textAlign": "center", 176 - }, 177 - ] 178 - } 179 - > 180 - Bluesky 181 - </Text> 182 - <Text 183 - style={ 184 - Array [ 185 - Object { 186 - "color": "#000000", 187 - }, 188 - Object { 189 - "color": "#ffffff", 190 - "fontSize": 18, 191 - "textAlign": "center", 192 - }, 193 - ] 194 - } 195 - > 196 - [ private beta ] 197 - </Text> 198 - </View> 199 - <View 200 - style={ 201 - Object { 202 - "flex": 1, 203 - } 204 - } 205 - > 206 - <View 207 - accessible={true} 208 - collapsable={false} 209 - focusable={true} 210 - onClick={[Function]} 211 - onResponderGrant={[Function]} 212 - onResponderMove={[Function]} 213 - onResponderRelease={[Function]} 214 - onResponderTerminate={[Function]} 215 - onResponderTerminationRequest={[Function]} 216 - onStartShouldSetResponder={[Function]} 217 - style={ 218 - Object { 219 - "backgroundColor": "#0085ff", 220 - "borderColor": "#ffffff", 221 - "borderRadius": 10, 222 - "borderWidth": 1, 223 - "marginBottom": 20, 224 - "marginHorizontal": 20, 225 - "opacity": 1, 226 - "paddingVertical": 16, 227 - } 228 - } 229 - > 230 - <Text 231 - style={ 232 - Array [ 233 - Object { 234 - "color": "#000000", 235 - }, 236 - Object { 237 - "color": "#ffffff", 238 - "fontSize": 18, 239 - "fontWeight": "bold", 240 - "textAlign": "center", 241 - }, 242 - ] 243 - } 244 - > 245 - Create a new account 246 - </Text> 247 - </View> 248 - <View 249 - style={ 250 - Object { 251 - "marginBottom": 20, 252 - } 253 - } 254 - > 255 - <RNSVGSvgView 256 - bbHeight="1" 257 - bbWidth={750} 258 - focusable={false} 259 - height="1" 260 - style={ 261 - Array [ 262 - Object { 263 - "backgroundColor": "transparent", 264 - "borderWidth": 0, 265 - }, 266 - Object { 267 - "position": "absolute", 268 - "top": 10, 269 - }, 270 - Object { 271 - "flex": 0, 272 - "height": 1, 273 - "width": 750, 274 - }, 275 - ] 276 - } 277 - width={750} 278 - > 279 - <RNSVGGroup> 280 - <RNSVGLine 281 - propList={ 282 - Array [ 283 - "stroke", 284 - "strokeWidth", 285 - ] 286 - } 287 - stroke={4294967295} 288 - strokeWidth="1" 289 - x1="30" 290 - x2={355} 291 - y1="0" 292 - y2="0" 293 - /> 294 - <RNSVGLine 295 - propList={ 296 - Array [ 297 - "stroke", 298 - "strokeWidth", 299 - ] 300 - } 301 - stroke={4294967295} 302 - strokeWidth="1" 303 - x1={395} 304 - x2={720} 305 - y1="0" 306 - y2="0" 307 - /> 308 - </RNSVGGroup> 309 - </RNSVGSvgView> 310 - <Text 311 - style={ 312 - Array [ 313 - Object { 314 - "color": "#000000", 315 - }, 316 - Object { 317 - "color": "#ffffff", 318 - "fontSize": 16, 319 - "textAlign": "center", 320 - }, 321 - ] 322 - } 323 - > 324 - or 325 - </Text> 326 - </View> 327 - <View 328 - accessible={true} 329 - collapsable={false} 330 - focusable={true} 331 - onClick={[Function]} 332 - onResponderGrant={[Function]} 333 - onResponderMove={[Function]} 334 - onResponderRelease={[Function]} 335 - onResponderTerminate={[Function]} 336 - onResponderTerminationRequest={[Function]} 337 - onStartShouldSetResponder={[Function]} 338 - style={ 339 - Object { 340 - "backgroundColor": "#0085ff", 341 - "borderColor": "#ffffff", 342 - "borderRadius": 10, 343 - "borderWidth": 1, 344 - "marginBottom": 20, 345 - "marginHorizontal": 20, 346 - "opacity": 1, 347 - "paddingVertical": 16, 348 - } 349 - } 350 - > 351 - <Text 352 - style={ 353 - Array [ 354 - Object { 355 - "color": "#000000", 356 - }, 357 - Object { 358 - "color": "#ffffff", 359 - "fontSize": 18, 360 - "fontWeight": "bold", 361 - "textAlign": "center", 362 - }, 363 - ] 364 - } 365 - > 366 - Sign in 367 - </Text> 368 - </View> 369 - </View> 370 - </View> 371 - `;
-431
__tests__/view/screens/__snapshots__/NotFound.test.tsx.snap
··· 1 - // Jest Snapshot v1, https://goo.gl/fbAQLP 2 - 3 - exports[`NotFound renders correctly 1`] = ` 4 - <View> 5 - <View 6 - style={ 7 - Object { 8 - "alignItems": "center", 9 - "backgroundColor": "#ffffff", 10 - "borderBottomColor": "#f8f3f3", 11 - "borderBottomWidth": 1, 12 - "flexDirection": "row", 13 - "paddingBottom": 6, 14 - "paddingHorizontal": 12, 15 - "paddingTop": 6, 16 - } 17 - } 18 - > 19 - <View 20 - accessible={true} 21 - collapsable={false} 22 - focusable={true} 23 - hitSlop={ 24 - Object { 25 - "bottom": 10, 26 - "left": 10, 27 - "right": 30, 28 - "top": 10, 29 - } 30 - } 31 - onClick={[Function]} 32 - onResponderGrant={[Function]} 33 - onResponderMove={[Function]} 34 - onResponderRelease={[Function]} 35 - onResponderTerminate={[Function]} 36 - onResponderTerminationRequest={[Function]} 37 - onStartShouldSetResponder={[Function]} 38 - style={ 39 - Object { 40 - "height": 30, 41 - "opacity": 1, 42 - "width": 40, 43 - } 44 - } 45 - > 46 - <RNSVGSvgView 47 - align="xMidYMid" 48 - bbHeight={30} 49 - bbWidth={30} 50 - focusable={false} 51 - height={30} 52 - meetOrSlice={0} 53 - minX={0} 54 - minY={0} 55 - style={ 56 - Array [ 57 - Object { 58 - "backgroundColor": "transparent", 59 - "borderWidth": 0, 60 - }, 61 - Object { 62 - "flex": 0, 63 - "height": 30, 64 - "width": 30, 65 - }, 66 - ] 67 - } 68 - vbHeight={100} 69 - vbWidth={100} 70 - width={30} 71 - > 72 - <RNSVGGroup> 73 - <RNSVGDefs> 74 - <RNSVGLinearGradient 75 - gradient={ 76 - Array [ 77 - 0, 78 - -1292135, 79 - 1, 80 - -2424577, 81 - ] 82 - } 83 - gradientTransform={null} 84 - gradientUnits={0} 85 - name="grad" 86 - x1="0" 87 - x2="1" 88 - y1="0" 89 - y2="1" 90 - /> 91 - </RNSVGDefs> 92 - <RNSVGCircle 93 - cx="50" 94 - cy="50" 95 - fill={ 96 - Array [ 97 - 1, 98 - "grad", 99 - ] 100 - } 101 - propList={ 102 - Array [ 103 - "fill", 104 - ] 105 - } 106 - r="50" 107 - /> 108 - <RNSVGText 109 - content={null} 110 - dx={Array []} 111 - dy={Array []} 112 - fill={4294967295} 113 - font={ 114 - Object { 115 - "fontSize": "50", 116 - "fontWeight": "bold", 117 - "textAnchor": "middle", 118 - } 119 - } 120 - propList={ 121 - Array [ 122 - "fill", 123 - ] 124 - } 125 - rotate={Array []} 126 - x={ 127 - Array [ 128 - "50", 129 - ] 130 - } 131 - y={ 132 - Array [ 133 - "67", 134 - ] 135 - } 136 - > 137 - <RNSVGTSpan 138 - content="X" 139 - dx={Array []} 140 - dy={Array []} 141 - font={Object {}} 142 - rotate={Array []} 143 - x={Array []} 144 - y={Array []} 145 - /> 146 - </RNSVGText> 147 - </RNSVGGroup> 148 - </RNSVGSvgView> 149 - </View> 150 - <View 151 - pointerEvents="none" 152 - style={ 153 - Object { 154 - "alignItems": "baseline", 155 - "flexDirection": "row", 156 - "marginRight": "auto", 157 - } 158 - } 159 - > 160 - <Text 161 - style={ 162 - Array [ 163 - Object { 164 - "color": "#000000", 165 - }, 166 - Object { 167 - "color": "#000000", 168 - "fontSize": 21, 169 - "fontWeight": "600", 170 - }, 171 - ] 172 - } 173 - > 174 - Page not found 175 - </Text> 176 - </View> 177 - <View 178 - accessible={true} 179 - collapsable={false} 180 - focusable={true} 181 - hitSlop={ 182 - Object { 183 - "bottom": 10, 184 - "left": 10, 185 - "right": 10, 186 - "top": 10, 187 - } 188 - } 189 - onClick={[Function]} 190 - onResponderGrant={[Function]} 191 - onResponderMove={[Function]} 192 - onResponderRelease={[Function]} 193 - onResponderTerminate={[Function]} 194 - onResponderTerminationRequest={[Function]} 195 - onStartShouldSetResponder={[Function]} 196 - style={ 197 - Object { 198 - "alignItems": "center", 199 - "backgroundColor": "#f8f3f3", 200 - "borderRadius": 20, 201 - "flexDirection": "row", 202 - "height": 36, 203 - "justifyContent": "center", 204 - "opacity": 1, 205 - "width": 36, 206 - } 207 - } 208 - > 209 - < 210 - icon="plus" 211 - size={18} 212 - /> 213 - </View> 214 - <View 215 - accessible={true} 216 - collapsable={false} 217 - focusable={true} 218 - hitSlop={ 219 - Object { 220 - "bottom": 10, 221 - "left": 10, 222 - "right": 10, 223 - "top": 10, 224 - } 225 - } 226 - onClick={[Function]} 227 - onResponderGrant={[Function]} 228 - onResponderMove={[Function]} 229 - onResponderRelease={[Function]} 230 - onResponderTerminate={[Function]} 231 - onResponderTerminationRequest={[Function]} 232 - onStartShouldSetResponder={[Function]} 233 - style={ 234 - Object { 235 - "alignItems": "center", 236 - "backgroundColor": "#f8f3f3", 237 - "borderRadius": 20, 238 - "flexDirection": "row", 239 - "height": 36, 240 - "justifyContent": "center", 241 - "marginLeft": 8, 242 - "opacity": 1, 243 - "width": 36, 244 - } 245 - } 246 - > 247 - <RNSVGSvgView 248 - align="xMidYMid" 249 - bbHeight={18} 250 - bbWidth={18} 251 - color={4278190080} 252 - fill="none" 253 - focusable={false} 254 - height={18} 255 - meetOrSlice={0} 256 - minX={0} 257 - minY={0} 258 - stroke="currentColor" 259 - strokeWidth={3} 260 - style={ 261 - Array [ 262 - Object { 263 - "backgroundColor": "transparent", 264 - "borderWidth": 0, 265 - }, 266 - Object { 267 - "color": "#000000", 268 - "position": "relative", 269 - "top": -1, 270 - }, 271 - Object { 272 - "flex": 0, 273 - "height": 18, 274 - "width": 18, 275 - }, 276 - ] 277 - } 278 - tintColor={4278190080} 279 - vbHeight={24} 280 - vbWidth={24} 281 - width={18} 282 - > 283 - <RNSVGGroup 284 - fill={null} 285 - propList={ 286 - Array [ 287 - "fill", 288 - "stroke", 289 - "strokeWidth", 290 - ] 291 - } 292 - stroke={ 293 - Array [ 294 - 2, 295 - ] 296 - } 297 - strokeWidth={3} 298 - > 299 - <RNSVGPath 300 - d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" 301 - propList={ 302 - Array [ 303 - "strokeLinecap", 304 - "strokeLinejoin", 305 - ] 306 - } 307 - strokeLinecap={1} 308 - strokeLinejoin={1} 309 - /> 310 - </RNSVGGroup> 311 - </RNSVGSvgView> 312 - </View> 313 - <View 314 - accessible={true} 315 - collapsable={false} 316 - focusable={true} 317 - onClick={[Function]} 318 - onResponderGrant={[Function]} 319 - onResponderMove={[Function]} 320 - onResponderRelease={[Function]} 321 - onResponderTerminate={[Function]} 322 - onResponderTerminationRequest={[Function]} 323 - onStartShouldSetResponder={[Function]} 324 - style={ 325 - Object { 326 - "alignItems": "center", 327 - "backgroundColor": "#ffffff", 328 - "borderRadius": 20, 329 - "flexDirection": "row", 330 - "height": 36, 331 - "justifyContent": "center", 332 - "marginLeft": 8, 333 - "opacity": 1, 334 - "width": 36, 335 - } 336 - } 337 - > 338 - < 339 - icon="signal" 340 - size={18} 341 - style={ 342 - Array [ 343 - Object { 344 - "color": "#000000", 345 - }, 346 - ] 347 - } 348 - /> 349 - < 350 - icon="x" 351 - size={12} 352 - style={ 353 - Object { 354 - "backgroundColor": "#ffffff", 355 - "color": "#d1106f", 356 - "left": -4, 357 - "position": "relative", 358 - "top": 6, 359 - } 360 - } 361 - /> 362 - </View> 363 - </View> 364 - <View 365 - style={ 366 - Object { 367 - "alignItems": "center", 368 - "justifyContent": "center", 369 - "paddingTop": 100, 370 - } 371 - } 372 - > 373 - <Text 374 - style={ 375 - Array [ 376 - Object { 377 - "color": "#000000", 378 - }, 379 - Object { 380 - "fontSize": 40, 381 - "fontWeight": "bold", 382 - }, 383 - ] 384 - } 385 - > 386 - Page not found 387 - </Text> 388 - <View 389 - accessibilityRole="button" 390 - accessible={true} 391 - collapsable={false} 392 - focusable={true} 393 - onClick={[Function]} 394 - onResponderGrant={[Function]} 395 - onResponderMove={[Function]} 396 - onResponderRelease={[Function]} 397 - onResponderTerminate={[Function]} 398 - onResponderTerminationRequest={[Function]} 399 - onStartShouldSetResponder={[Function]} 400 - style={ 401 - Object { 402 - "opacity": 1, 403 - } 404 - } 405 - > 406 - <View 407 - style={ 408 - Array [ 409 - Object {}, 410 - ] 411 - } 412 - > 413 - <Text 414 - style={ 415 - Array [ 416 - Object { 417 - "color": "#007AFF", 418 - "fontSize": 18, 419 - "margin": 8, 420 - "textAlign": "center", 421 - }, 422 - ] 423 - } 424 - > 425 - Home 426 - </Text> 427 - </View> 428 - </View> 429 - </View> 430 - </View> 431 - `;
-378
__tests__/view/screens/__snapshots__/Notifications.test.tsx.snap
··· 1 - // Jest Snapshot v1, https://goo.gl/fbAQLP 2 - 3 - exports[`Notifications renders correctly 1`] = ` 4 - <View 5 - style={ 6 - Object { 7 - "flex": 1, 8 - } 9 - } 10 - > 11 - <View 12 - style={ 13 - Object { 14 - "alignItems": "center", 15 - "backgroundColor": "#ffffff", 16 - "borderBottomColor": "#f8f3f3", 17 - "borderBottomWidth": 1, 18 - "flexDirection": "row", 19 - "paddingBottom": 6, 20 - "paddingHorizontal": 12, 21 - "paddingTop": 6, 22 - } 23 - } 24 - > 25 - <View 26 - accessible={true} 27 - collapsable={false} 28 - focusable={true} 29 - hitSlop={ 30 - Object { 31 - "bottom": 10, 32 - "left": 10, 33 - "right": 30, 34 - "top": 10, 35 - } 36 - } 37 - onClick={[Function]} 38 - onResponderGrant={[Function]} 39 - onResponderMove={[Function]} 40 - onResponderRelease={[Function]} 41 - onResponderTerminate={[Function]} 42 - onResponderTerminationRequest={[Function]} 43 - onStartShouldSetResponder={[Function]} 44 - style={ 45 - Object { 46 - "height": 30, 47 - "opacity": 1, 48 - "width": 40, 49 - } 50 - } 51 - > 52 - <RNSVGSvgView 53 - align="xMidYMid" 54 - bbHeight={30} 55 - bbWidth={30} 56 - focusable={false} 57 - height={30} 58 - meetOrSlice={0} 59 - minX={0} 60 - minY={0} 61 - style={ 62 - Array [ 63 - Object { 64 - "backgroundColor": "transparent", 65 - "borderWidth": 0, 66 - }, 67 - Object { 68 - "flex": 0, 69 - "height": 30, 70 - "width": 30, 71 - }, 72 - ] 73 - } 74 - vbHeight={100} 75 - vbWidth={100} 76 - width={30} 77 - > 78 - <RNSVGGroup> 79 - <RNSVGDefs> 80 - <RNSVGLinearGradient 81 - gradient={ 82 - Array [ 83 - 0, 84 - -1292135, 85 - 1, 86 - -2424577, 87 - ] 88 - } 89 - gradientTransform={null} 90 - gradientUnits={0} 91 - name="grad" 92 - x1="0" 93 - x2="1" 94 - y1="0" 95 - y2="1" 96 - /> 97 - </RNSVGDefs> 98 - <RNSVGCircle 99 - cx="50" 100 - cy="50" 101 - fill={ 102 - Array [ 103 - 1, 104 - "grad", 105 - ] 106 - } 107 - propList={ 108 - Array [ 109 - "fill", 110 - ] 111 - } 112 - r="50" 113 - /> 114 - <RNSVGText 115 - content={null} 116 - dx={Array []} 117 - dy={Array []} 118 - fill={4294967295} 119 - font={ 120 - Object { 121 - "fontSize": "50", 122 - "fontWeight": "bold", 123 - "textAnchor": "middle", 124 - } 125 - } 126 - propList={ 127 - Array [ 128 - "fill", 129 - ] 130 - } 131 - rotate={Array []} 132 - x={ 133 - Array [ 134 - "50", 135 - ] 136 - } 137 - y={ 138 - Array [ 139 - "67", 140 - ] 141 - } 142 - > 143 - <RNSVGTSpan 144 - content="X" 145 - dx={Array []} 146 - dy={Array []} 147 - font={Object {}} 148 - rotate={Array []} 149 - x={Array []} 150 - y={Array []} 151 - /> 152 - </RNSVGText> 153 - </RNSVGGroup> 154 - </RNSVGSvgView> 155 - </View> 156 - <View 157 - pointerEvents="none" 158 - style={ 159 - Object { 160 - "alignItems": "baseline", 161 - "flexDirection": "row", 162 - "marginRight": "auto", 163 - } 164 - } 165 - > 166 - <Text 167 - style={ 168 - Array [ 169 - Object { 170 - "color": "#000000", 171 - }, 172 - Object { 173 - "color": "#000000", 174 - "fontSize": 21, 175 - "fontWeight": "600", 176 - }, 177 - ] 178 - } 179 - > 180 - Notifications 181 - </Text> 182 - </View> 183 - <View 184 - accessible={true} 185 - collapsable={false} 186 - focusable={true} 187 - hitSlop={ 188 - Object { 189 - "bottom": 10, 190 - "left": 10, 191 - "right": 10, 192 - "top": 10, 193 - } 194 - } 195 - onClick={[Function]} 196 - onResponderGrant={[Function]} 197 - onResponderMove={[Function]} 198 - onResponderRelease={[Function]} 199 - onResponderTerminate={[Function]} 200 - onResponderTerminationRequest={[Function]} 201 - onStartShouldSetResponder={[Function]} 202 - style={ 203 - Object { 204 - "alignItems": "center", 205 - "backgroundColor": "#f8f3f3", 206 - "borderRadius": 20, 207 - "flexDirection": "row", 208 - "height": 36, 209 - "justifyContent": "center", 210 - "opacity": 1, 211 - "width": 36, 212 - } 213 - } 214 - > 215 - < 216 - icon="plus" 217 - size={18} 218 - /> 219 - </View> 220 - <View 221 - accessible={true} 222 - collapsable={false} 223 - focusable={true} 224 - hitSlop={ 225 - Object { 226 - "bottom": 10, 227 - "left": 10, 228 - "right": 10, 229 - "top": 10, 230 - } 231 - } 232 - onClick={[Function]} 233 - onResponderGrant={[Function]} 234 - onResponderMove={[Function]} 235 - onResponderRelease={[Function]} 236 - onResponderTerminate={[Function]} 237 - onResponderTerminationRequest={[Function]} 238 - onStartShouldSetResponder={[Function]} 239 - style={ 240 - Object { 241 - "alignItems": "center", 242 - "backgroundColor": "#f8f3f3", 243 - "borderRadius": 20, 244 - "flexDirection": "row", 245 - "height": 36, 246 - "justifyContent": "center", 247 - "marginLeft": 8, 248 - "opacity": 1, 249 - "width": 36, 250 - } 251 - } 252 - > 253 - <RNSVGSvgView 254 - align="xMidYMid" 255 - bbHeight={18} 256 - bbWidth={18} 257 - color={4278190080} 258 - fill="none" 259 - focusable={false} 260 - height={18} 261 - meetOrSlice={0} 262 - minX={0} 263 - minY={0} 264 - stroke="currentColor" 265 - strokeWidth={3} 266 - style={ 267 - Array [ 268 - Object { 269 - "backgroundColor": "transparent", 270 - "borderWidth": 0, 271 - }, 272 - Object { 273 - "color": "#000000", 274 - "position": "relative", 275 - "top": -1, 276 - }, 277 - Object { 278 - "flex": 0, 279 - "height": 18, 280 - "width": 18, 281 - }, 282 - ] 283 - } 284 - tintColor={4278190080} 285 - vbHeight={24} 286 - vbWidth={24} 287 - width={18} 288 - > 289 - <RNSVGGroup 290 - fill={null} 291 - propList={ 292 - Array [ 293 - "fill", 294 - "stroke", 295 - "strokeWidth", 296 - ] 297 - } 298 - stroke={ 299 - Array [ 300 - 2, 301 - ] 302 - } 303 - strokeWidth={3} 304 - > 305 - <RNSVGPath 306 - d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" 307 - propList={ 308 - Array [ 309 - "strokeLinecap", 310 - "strokeLinejoin", 311 - ] 312 - } 313 - strokeLinecap={1} 314 - strokeLinejoin={1} 315 - /> 316 - </RNSVGGroup> 317 - </RNSVGSvgView> 318 - </View> 319 - <View 320 - accessible={true} 321 - collapsable={false} 322 - focusable={true} 323 - onClick={[Function]} 324 - onResponderGrant={[Function]} 325 - onResponderMove={[Function]} 326 - onResponderRelease={[Function]} 327 - onResponderTerminate={[Function]} 328 - onResponderTerminationRequest={[Function]} 329 - onStartShouldSetResponder={[Function]} 330 - style={ 331 - Object { 332 - "alignItems": "center", 333 - "backgroundColor": "#ffffff", 334 - "borderRadius": 20, 335 - "flexDirection": "row", 336 - "height": 36, 337 - "justifyContent": "center", 338 - "marginLeft": 8, 339 - "opacity": 1, 340 - "width": 36, 341 - } 342 - } 343 - > 344 - < 345 - icon="signal" 346 - size={18} 347 - style={ 348 - Array [ 349 - Object { 350 - "color": "#000000", 351 - }, 352 - ] 353 - } 354 - /> 355 - < 356 - icon="x" 357 - size={12} 358 - style={ 359 - Object { 360 - "backgroundColor": "#ffffff", 361 - "color": "#d1106f", 362 - "left": -4, 363 - "position": "relative", 364 - "top": 6, 365 - } 366 - } 367 - /> 368 - </View> 369 - </View> 370 - <View 371 - style={ 372 - Object { 373 - "flex": 1, 374 - } 375 - } 376 - /> 377 - </View> 378 - `;
-388
__tests__/view/screens/__snapshots__/Onboard.test.tsx.snap
··· 1 - // Jest Snapshot v1, https://goo.gl/fbAQLP 2 - 3 - exports[`Onboard renders correctly 1`] = ` 4 - <View 5 - style={ 6 - Object { 7 - "backgroundColor": "#fff", 8 - "flex": 1, 9 - } 10 - } 11 - > 12 - <RCTSafeAreaView 13 - emulateUnlessSupported={true} 14 - style={ 15 - Object { 16 - "flex": 1, 17 - } 18 - } 19 - > 20 - <View 21 - onLayout={[Function]} 22 - style={ 23 - Array [ 24 - Object { 25 - "flex": 1, 26 - "overflow": "hidden", 27 - }, 28 - undefined, 29 - ] 30 - } 31 - > 32 - <RNCViewPager 33 - collapsable={false} 34 - initialPage={0} 35 - keyboardDismissMode="on-drag" 36 - layout={ 37 - Object { 38 - "height": 0, 39 - "width": 750, 40 - } 41 - } 42 - layoutDirection="ltr" 43 - onMoveShouldSetResponderCapture={[Function]} 44 - onPageScroll={[Function]} 45 - onPageScrollStateChanged={[Function]} 46 - onPageSelected={[Function]} 47 - scrollEnabled={true} 48 - style={ 49 - Object { 50 - "flex": 1, 51 - } 52 - } 53 - > 54 - <View 55 - collapsable={false} 56 - style={ 57 - Object { 58 - "bottom": 0, 59 - "left": 0, 60 - "position": "absolute", 61 - "right": 0, 62 - "top": 0, 63 - } 64 - } 65 - > 66 - <View 67 - accessibilityElementsHidden={false} 68 - importantForAccessibility="auto" 69 - style={ 70 - Array [ 71 - Object { 72 - "flex": 1, 73 - "overflow": "hidden", 74 - }, 75 - Object { 76 - "width": 750, 77 - }, 78 - Array [ 79 - undefined, 80 - Object { 81 - "bottom": 0, 82 - "left": 0, 83 - "position": "absolute", 84 - "right": 0, 85 - "top": 0, 86 - }, 87 - ], 88 - ] 89 - } 90 - > 91 - <View 92 - style={ 93 - Object { 94 - "flex": 1, 95 - "paddingHorizontal": 16, 96 - "paddingTop": 80, 97 - } 98 - } 99 - > 100 - <Text 101 - style={ 102 - Array [ 103 - Object { 104 - "color": "#000000", 105 - }, 106 - Array [ 107 - Object { 108 - "fontSize": 42, 109 - "fontWeight": "bold", 110 - "marginBottom": 16, 111 - "textAlign": "center", 112 - }, 113 - Object { 114 - "fontWeight": "400", 115 - }, 116 - Object { 117 - "lineHeight": 60, 118 - "paddingBottom": 50, 119 - "paddingTop": 50, 120 - }, 121 - ], 122 - ] 123 - } 124 - > 125 - Welcome to 126 - <Text 127 - style={ 128 - Array [ 129 - Object { 130 - "color": "#000000", 131 - }, 132 - Array [ 133 - Object { 134 - "fontWeight": "bold", 135 - }, 136 - Object { 137 - "color": "#0085ff", 138 - }, 139 - Object { 140 - "fontSize": 56, 141 - }, 142 - ], 143 - ] 144 - } 145 - > 146 - Bluesky 147 - </Text> 148 - </Text> 149 - <Text 150 - style={ 151 - Array [ 152 - Object { 153 - "color": "#000000", 154 - }, 155 - Array [ 156 - Object { 157 - "fontSize": 18, 158 - "marginBottom": 16, 159 - "textAlign": "center", 160 - }, 161 - Object { 162 - "fontSize": 24, 163 - }, 164 - ], 165 - ] 166 - } 167 - > 168 - Let's do a quick tour through the new features. 169 - </Text> 170 - </View> 171 - </View> 172 - </View> 173 - <View 174 - collapsable={false} 175 - style={ 176 - Object { 177 - "bottom": 0, 178 - "left": 0, 179 - "position": "absolute", 180 - "right": 0, 181 - "top": 0, 182 - } 183 - } 184 - > 185 - <View 186 - accessibilityElementsHidden={true} 187 - importantForAccessibility="no-hide-descendants" 188 - style={ 189 - Array [ 190 - Object { 191 - "flex": 1, 192 - "overflow": "hidden", 193 - }, 194 - Object { 195 - "width": 750, 196 - }, 197 - Array [ 198 - undefined, 199 - Object { 200 - "bottom": 0, 201 - "left": 0, 202 - "position": "absolute", 203 - "right": 0, 204 - "top": 0, 205 - }, 206 - ], 207 - ] 208 - } 209 - /> 210 - </View> 211 - </RNCViewPager> 212 - <View 213 - style={ 214 - Object { 215 - "flexDirection": "row", 216 - } 217 - } 218 - > 219 - <View 220 - style={ 221 - Object { 222 - "flex": 1, 223 - } 224 - } 225 - /> 226 - <View 227 - accessible={true} 228 - collapsable={false} 229 - focusable={true} 230 - onClick={[Function]} 231 - onResponderGrant={[Function]} 232 - onResponderMove={[Function]} 233 - onResponderRelease={[Function]} 234 - onResponderTerminate={[Function]} 235 - onResponderTerminationRequest={[Function]} 236 - onStartShouldSetResponder={[Function]} 237 - style={ 238 - Object { 239 - "alignItems": "center", 240 - "opacity": 1, 241 - "padding": 16, 242 - } 243 - } 244 - > 245 - <Text 246 - collapsable={false} 247 - style={ 248 - Object { 249 - "opacity": 1, 250 - } 251 - } 252 - > 253 - ° 254 - </Text> 255 - </View> 256 - <View 257 - accessible={true} 258 - collapsable={false} 259 - focusable={true} 260 - onClick={[Function]} 261 - onResponderGrant={[Function]} 262 - onResponderMove={[Function]} 263 - onResponderRelease={[Function]} 264 - onResponderTerminate={[Function]} 265 - onResponderTerminationRequest={[Function]} 266 - onStartShouldSetResponder={[Function]} 267 - style={ 268 - Object { 269 - "alignItems": "center", 270 - "opacity": 1, 271 - "padding": 16, 272 - } 273 - } 274 - > 275 - <Text 276 - collapsable={false} 277 - style={ 278 - Object { 279 - "opacity": 0.5, 280 - } 281 - } 282 - > 283 - ° 284 - </Text> 285 - </View> 286 - <View 287 - style={ 288 - Object { 289 - "flex": 1, 290 - } 291 - } 292 - /> 293 - </View> 294 - </View> 295 - <View 296 - style={ 297 - Object { 298 - "flexDirection": "row", 299 - "paddingBottom": 24, 300 - "paddingHorizontal": 32, 301 - } 302 - } 303 - > 304 - <View 305 - accessible={true} 306 - collapsable={false} 307 - focusable={true} 308 - onClick={[Function]} 309 - onResponderGrant={[Function]} 310 - onResponderMove={[Function]} 311 - onResponderRelease={[Function]} 312 - onResponderTerminate={[Function]} 313 - onResponderTerminationRequest={[Function]} 314 - onStartShouldSetResponder={[Function]} 315 - style={ 316 - Object { 317 - "opacity": 1, 318 - } 319 - } 320 - > 321 - <Text 322 - style={ 323 - Array [ 324 - Object { 325 - "color": "#000000", 326 - }, 327 - Array [ 328 - Object { 329 - "color": "#0085ff", 330 - }, 331 - Object { 332 - "fontSize": 18, 333 - }, 334 - ], 335 - ] 336 - } 337 - > 338 - Skip 339 - </Text> 340 - </View> 341 - <View 342 - style={ 343 - Object { 344 - "flex": 1, 345 - } 346 - } 347 - /> 348 - <View 349 - accessible={true} 350 - collapsable={false} 351 - focusable={true} 352 - onClick={[Function]} 353 - onResponderGrant={[Function]} 354 - onResponderMove={[Function]} 355 - onResponderRelease={[Function]} 356 - onResponderTerminate={[Function]} 357 - onResponderTerminationRequest={[Function]} 358 - onStartShouldSetResponder={[Function]} 359 - style={ 360 - Object { 361 - "opacity": 1, 362 - } 363 - } 364 - > 365 - <Text 366 - style={ 367 - Array [ 368 - Object { 369 - "color": "#000000", 370 - }, 371 - Array [ 372 - Object { 373 - "color": "#0085ff", 374 - }, 375 - Object { 376 - "fontSize": 18, 377 - }, 378 - ], 379 - ] 380 - } 381 - > 382 - Next 383 - </Text> 384 - </View> 385 - </View> 386 - </RCTSafeAreaView> 387 - </View> 388 - `;
-368
__tests__/view/screens/__snapshots__/PostDownvotedBy.test.tsx.snap
··· 1 - // Jest Snapshot v1, https://goo.gl/fbAQLP 2 - 3 - exports[`PostDownvotedBy renders correctly 1`] = ` 4 - <View> 5 - <View 6 - style={ 7 - Object { 8 - "alignItems": "center", 9 - "backgroundColor": "#ffffff", 10 - "borderBottomColor": "#f8f3f3", 11 - "borderBottomWidth": 1, 12 - "flexDirection": "row", 13 - "paddingBottom": 6, 14 - "paddingHorizontal": 12, 15 - "paddingTop": 6, 16 - } 17 - } 18 - > 19 - <View 20 - accessible={true} 21 - collapsable={false} 22 - focusable={true} 23 - hitSlop={ 24 - Object { 25 - "bottom": 10, 26 - "left": 10, 27 - "right": 30, 28 - "top": 10, 29 - } 30 - } 31 - onClick={[Function]} 32 - onResponderGrant={[Function]} 33 - onResponderMove={[Function]} 34 - onResponderRelease={[Function]} 35 - onResponderTerminate={[Function]} 36 - onResponderTerminationRequest={[Function]} 37 - onStartShouldSetResponder={[Function]} 38 - style={ 39 - Object { 40 - "height": 30, 41 - "opacity": 1, 42 - "width": 40, 43 - } 44 - } 45 - > 46 - <RNSVGSvgView 47 - align="xMidYMid" 48 - bbHeight={30} 49 - bbWidth={30} 50 - focusable={false} 51 - height={30} 52 - meetOrSlice={0} 53 - minX={0} 54 - minY={0} 55 - style={ 56 - Array [ 57 - Object { 58 - "backgroundColor": "transparent", 59 - "borderWidth": 0, 60 - }, 61 - Object { 62 - "flex": 0, 63 - "height": 30, 64 - "width": 30, 65 - }, 66 - ] 67 - } 68 - vbHeight={100} 69 - vbWidth={100} 70 - width={30} 71 - > 72 - <RNSVGGroup> 73 - <RNSVGDefs> 74 - <RNSVGLinearGradient 75 - gradient={ 76 - Array [ 77 - 0, 78 - -1292135, 79 - 1, 80 - -2424577, 81 - ] 82 - } 83 - gradientTransform={null} 84 - gradientUnits={0} 85 - name="grad" 86 - x1="0" 87 - x2="1" 88 - y1="0" 89 - y2="1" 90 - /> 91 - </RNSVGDefs> 92 - <RNSVGCircle 93 - cx="50" 94 - cy="50" 95 - fill={ 96 - Array [ 97 - 1, 98 - "grad", 99 - ] 100 - } 101 - propList={ 102 - Array [ 103 - "fill", 104 - ] 105 - } 106 - r="50" 107 - /> 108 - <RNSVGText 109 - content={null} 110 - dx={Array []} 111 - dy={Array []} 112 - fill={4294967295} 113 - font={ 114 - Object { 115 - "fontSize": "50", 116 - "fontWeight": "bold", 117 - "textAnchor": "middle", 118 - } 119 - } 120 - propList={ 121 - Array [ 122 - "fill", 123 - ] 124 - } 125 - rotate={Array []} 126 - x={ 127 - Array [ 128 - "50", 129 - ] 130 - } 131 - y={ 132 - Array [ 133 - "67", 134 - ] 135 - } 136 - > 137 - <RNSVGTSpan 138 - content="X" 139 - dx={Array []} 140 - dy={Array []} 141 - font={Object {}} 142 - rotate={Array []} 143 - x={Array []} 144 - y={Array []} 145 - /> 146 - </RNSVGText> 147 - </RNSVGGroup> 148 - </RNSVGSvgView> 149 - </View> 150 - <View 151 - pointerEvents="none" 152 - style={ 153 - Object { 154 - "alignItems": "baseline", 155 - "flexDirection": "row", 156 - "marginRight": "auto", 157 - } 158 - } 159 - > 160 - <Text 161 - style={ 162 - Array [ 163 - Object { 164 - "color": "#000000", 165 - }, 166 - Object { 167 - "color": "#000000", 168 - "fontSize": 21, 169 - "fontWeight": "600", 170 - }, 171 - ] 172 - } 173 - > 174 - Downvoted by 175 - </Text> 176 - </View> 177 - <View 178 - accessible={true} 179 - collapsable={false} 180 - focusable={true} 181 - hitSlop={ 182 - Object { 183 - "bottom": 10, 184 - "left": 10, 185 - "right": 10, 186 - "top": 10, 187 - } 188 - } 189 - onClick={[Function]} 190 - onResponderGrant={[Function]} 191 - onResponderMove={[Function]} 192 - onResponderRelease={[Function]} 193 - onResponderTerminate={[Function]} 194 - onResponderTerminationRequest={[Function]} 195 - onStartShouldSetResponder={[Function]} 196 - style={ 197 - Object { 198 - "alignItems": "center", 199 - "backgroundColor": "#f8f3f3", 200 - "borderRadius": 20, 201 - "flexDirection": "row", 202 - "height": 36, 203 - "justifyContent": "center", 204 - "opacity": 1, 205 - "width": 36, 206 - } 207 - } 208 - > 209 - < 210 - icon="plus" 211 - size={18} 212 - /> 213 - </View> 214 - <View 215 - accessible={true} 216 - collapsable={false} 217 - focusable={true} 218 - hitSlop={ 219 - Object { 220 - "bottom": 10, 221 - "left": 10, 222 - "right": 10, 223 - "top": 10, 224 - } 225 - } 226 - onClick={[Function]} 227 - onResponderGrant={[Function]} 228 - onResponderMove={[Function]} 229 - onResponderRelease={[Function]} 230 - onResponderTerminate={[Function]} 231 - onResponderTerminationRequest={[Function]} 232 - onStartShouldSetResponder={[Function]} 233 - style={ 234 - Object { 235 - "alignItems": "center", 236 - "backgroundColor": "#f8f3f3", 237 - "borderRadius": 20, 238 - "flexDirection": "row", 239 - "height": 36, 240 - "justifyContent": "center", 241 - "marginLeft": 8, 242 - "opacity": 1, 243 - "width": 36, 244 - } 245 - } 246 - > 247 - <RNSVGSvgView 248 - align="xMidYMid" 249 - bbHeight={18} 250 - bbWidth={18} 251 - color={4278190080} 252 - fill="none" 253 - focusable={false} 254 - height={18} 255 - meetOrSlice={0} 256 - minX={0} 257 - minY={0} 258 - stroke="currentColor" 259 - strokeWidth={3} 260 - style={ 261 - Array [ 262 - Object { 263 - "backgroundColor": "transparent", 264 - "borderWidth": 0, 265 - }, 266 - Object { 267 - "color": "#000000", 268 - "position": "relative", 269 - "top": -1, 270 - }, 271 - Object { 272 - "flex": 0, 273 - "height": 18, 274 - "width": 18, 275 - }, 276 - ] 277 - } 278 - tintColor={4278190080} 279 - vbHeight={24} 280 - vbWidth={24} 281 - width={18} 282 - > 283 - <RNSVGGroup 284 - fill={null} 285 - propList={ 286 - Array [ 287 - "fill", 288 - "stroke", 289 - "strokeWidth", 290 - ] 291 - } 292 - stroke={ 293 - Array [ 294 - 2, 295 - ] 296 - } 297 - strokeWidth={3} 298 - > 299 - <RNSVGPath 300 - d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" 301 - propList={ 302 - Array [ 303 - "strokeLinecap", 304 - "strokeLinejoin", 305 - ] 306 - } 307 - strokeLinecap={1} 308 - strokeLinejoin={1} 309 - /> 310 - </RNSVGGroup> 311 - </RNSVGSvgView> 312 - </View> 313 - <View 314 - accessible={true} 315 - collapsable={false} 316 - focusable={true} 317 - onClick={[Function]} 318 - onResponderGrant={[Function]} 319 - onResponderMove={[Function]} 320 - onResponderRelease={[Function]} 321 - onResponderTerminate={[Function]} 322 - onResponderTerminationRequest={[Function]} 323 - onStartShouldSetResponder={[Function]} 324 - style={ 325 - Object { 326 - "alignItems": "center", 327 - "backgroundColor": "#ffffff", 328 - "borderRadius": 20, 329 - "flexDirection": "row", 330 - "height": 36, 331 - "justifyContent": "center", 332 - "marginLeft": 8, 333 - "opacity": 1, 334 - "width": 36, 335 - } 336 - } 337 - > 338 - < 339 - icon="signal" 340 - size={18} 341 - style={ 342 - Array [ 343 - Object { 344 - "color": "#000000", 345 - }, 346 - ] 347 - } 348 - /> 349 - < 350 - icon="x" 351 - size={12} 352 - style={ 353 - Object { 354 - "backgroundColor": "#ffffff", 355 - "color": "#d1106f", 356 - "left": -4, 357 - "position": "relative", 358 - "top": 6, 359 - } 360 - } 361 - /> 362 - </View> 363 - </View> 364 - <View> 365 - <ActivityIndicator /> 366 - </View> 367 - </View> 368 - `;
-368
__tests__/view/screens/__snapshots__/PostRepostedBy.test.tsx.snap
··· 1 - // Jest Snapshot v1, https://goo.gl/fbAQLP 2 - 3 - exports[`PostRepostedBy renders correctly 1`] = ` 4 - <View> 5 - <View 6 - style={ 7 - Object { 8 - "alignItems": "center", 9 - "backgroundColor": "#ffffff", 10 - "borderBottomColor": "#f8f3f3", 11 - "borderBottomWidth": 1, 12 - "flexDirection": "row", 13 - "paddingBottom": 6, 14 - "paddingHorizontal": 12, 15 - "paddingTop": 6, 16 - } 17 - } 18 - > 19 - <View 20 - accessible={true} 21 - collapsable={false} 22 - focusable={true} 23 - hitSlop={ 24 - Object { 25 - "bottom": 10, 26 - "left": 10, 27 - "right": 30, 28 - "top": 10, 29 - } 30 - } 31 - onClick={[Function]} 32 - onResponderGrant={[Function]} 33 - onResponderMove={[Function]} 34 - onResponderRelease={[Function]} 35 - onResponderTerminate={[Function]} 36 - onResponderTerminationRequest={[Function]} 37 - onStartShouldSetResponder={[Function]} 38 - style={ 39 - Object { 40 - "height": 30, 41 - "opacity": 1, 42 - "width": 40, 43 - } 44 - } 45 - > 46 - <RNSVGSvgView 47 - align="xMidYMid" 48 - bbHeight={30} 49 - bbWidth={30} 50 - focusable={false} 51 - height={30} 52 - meetOrSlice={0} 53 - minX={0} 54 - minY={0} 55 - style={ 56 - Array [ 57 - Object { 58 - "backgroundColor": "transparent", 59 - "borderWidth": 0, 60 - }, 61 - Object { 62 - "flex": 0, 63 - "height": 30, 64 - "width": 30, 65 - }, 66 - ] 67 - } 68 - vbHeight={100} 69 - vbWidth={100} 70 - width={30} 71 - > 72 - <RNSVGGroup> 73 - <RNSVGDefs> 74 - <RNSVGLinearGradient 75 - gradient={ 76 - Array [ 77 - 0, 78 - -1292135, 79 - 1, 80 - -2424577, 81 - ] 82 - } 83 - gradientTransform={null} 84 - gradientUnits={0} 85 - name="grad" 86 - x1="0" 87 - x2="1" 88 - y1="0" 89 - y2="1" 90 - /> 91 - </RNSVGDefs> 92 - <RNSVGCircle 93 - cx="50" 94 - cy="50" 95 - fill={ 96 - Array [ 97 - 1, 98 - "grad", 99 - ] 100 - } 101 - propList={ 102 - Array [ 103 - "fill", 104 - ] 105 - } 106 - r="50" 107 - /> 108 - <RNSVGText 109 - content={null} 110 - dx={Array []} 111 - dy={Array []} 112 - fill={4294967295} 113 - font={ 114 - Object { 115 - "fontSize": "50", 116 - "fontWeight": "bold", 117 - "textAnchor": "middle", 118 - } 119 - } 120 - propList={ 121 - Array [ 122 - "fill", 123 - ] 124 - } 125 - rotate={Array []} 126 - x={ 127 - Array [ 128 - "50", 129 - ] 130 - } 131 - y={ 132 - Array [ 133 - "67", 134 - ] 135 - } 136 - > 137 - <RNSVGTSpan 138 - content="X" 139 - dx={Array []} 140 - dy={Array []} 141 - font={Object {}} 142 - rotate={Array []} 143 - x={Array []} 144 - y={Array []} 145 - /> 146 - </RNSVGText> 147 - </RNSVGGroup> 148 - </RNSVGSvgView> 149 - </View> 150 - <View 151 - pointerEvents="none" 152 - style={ 153 - Object { 154 - "alignItems": "baseline", 155 - "flexDirection": "row", 156 - "marginRight": "auto", 157 - } 158 - } 159 - > 160 - <Text 161 - style={ 162 - Array [ 163 - Object { 164 - "color": "#000000", 165 - }, 166 - Object { 167 - "color": "#000000", 168 - "fontSize": 21, 169 - "fontWeight": "600", 170 - }, 171 - ] 172 - } 173 - > 174 - Reposted by 175 - </Text> 176 - </View> 177 - <View 178 - accessible={true} 179 - collapsable={false} 180 - focusable={true} 181 - hitSlop={ 182 - Object { 183 - "bottom": 10, 184 - "left": 10, 185 - "right": 10, 186 - "top": 10, 187 - } 188 - } 189 - onClick={[Function]} 190 - onResponderGrant={[Function]} 191 - onResponderMove={[Function]} 192 - onResponderRelease={[Function]} 193 - onResponderTerminate={[Function]} 194 - onResponderTerminationRequest={[Function]} 195 - onStartShouldSetResponder={[Function]} 196 - style={ 197 - Object { 198 - "alignItems": "center", 199 - "backgroundColor": "#f8f3f3", 200 - "borderRadius": 20, 201 - "flexDirection": "row", 202 - "height": 36, 203 - "justifyContent": "center", 204 - "opacity": 1, 205 - "width": 36, 206 - } 207 - } 208 - > 209 - < 210 - icon="plus" 211 - size={18} 212 - /> 213 - </View> 214 - <View 215 - accessible={true} 216 - collapsable={false} 217 - focusable={true} 218 - hitSlop={ 219 - Object { 220 - "bottom": 10, 221 - "left": 10, 222 - "right": 10, 223 - "top": 10, 224 - } 225 - } 226 - onClick={[Function]} 227 - onResponderGrant={[Function]} 228 - onResponderMove={[Function]} 229 - onResponderRelease={[Function]} 230 - onResponderTerminate={[Function]} 231 - onResponderTerminationRequest={[Function]} 232 - onStartShouldSetResponder={[Function]} 233 - style={ 234 - Object { 235 - "alignItems": "center", 236 - "backgroundColor": "#f8f3f3", 237 - "borderRadius": 20, 238 - "flexDirection": "row", 239 - "height": 36, 240 - "justifyContent": "center", 241 - "marginLeft": 8, 242 - "opacity": 1, 243 - "width": 36, 244 - } 245 - } 246 - > 247 - <RNSVGSvgView 248 - align="xMidYMid" 249 - bbHeight={18} 250 - bbWidth={18} 251 - color={4278190080} 252 - fill="none" 253 - focusable={false} 254 - height={18} 255 - meetOrSlice={0} 256 - minX={0} 257 - minY={0} 258 - stroke="currentColor" 259 - strokeWidth={3} 260 - style={ 261 - Array [ 262 - Object { 263 - "backgroundColor": "transparent", 264 - "borderWidth": 0, 265 - }, 266 - Object { 267 - "color": "#000000", 268 - "position": "relative", 269 - "top": -1, 270 - }, 271 - Object { 272 - "flex": 0, 273 - "height": 18, 274 - "width": 18, 275 - }, 276 - ] 277 - } 278 - tintColor={4278190080} 279 - vbHeight={24} 280 - vbWidth={24} 281 - width={18} 282 - > 283 - <RNSVGGroup 284 - fill={null} 285 - propList={ 286 - Array [ 287 - "fill", 288 - "stroke", 289 - "strokeWidth", 290 - ] 291 - } 292 - stroke={ 293 - Array [ 294 - 2, 295 - ] 296 - } 297 - strokeWidth={3} 298 - > 299 - <RNSVGPath 300 - d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" 301 - propList={ 302 - Array [ 303 - "strokeLinecap", 304 - "strokeLinejoin", 305 - ] 306 - } 307 - strokeLinecap={1} 308 - strokeLinejoin={1} 309 - /> 310 - </RNSVGGroup> 311 - </RNSVGSvgView> 312 - </View> 313 - <View 314 - accessible={true} 315 - collapsable={false} 316 - focusable={true} 317 - onClick={[Function]} 318 - onResponderGrant={[Function]} 319 - onResponderMove={[Function]} 320 - onResponderRelease={[Function]} 321 - onResponderTerminate={[Function]} 322 - onResponderTerminationRequest={[Function]} 323 - onStartShouldSetResponder={[Function]} 324 - style={ 325 - Object { 326 - "alignItems": "center", 327 - "backgroundColor": "#ffffff", 328 - "borderRadius": 20, 329 - "flexDirection": "row", 330 - "height": 36, 331 - "justifyContent": "center", 332 - "marginLeft": 8, 333 - "opacity": 1, 334 - "width": 36, 335 - } 336 - } 337 - > 338 - < 339 - icon="signal" 340 - size={18} 341 - style={ 342 - Array [ 343 - Object { 344 - "color": "#000000", 345 - }, 346 - ] 347 - } 348 - /> 349 - < 350 - icon="x" 351 - size={12} 352 - style={ 353 - Object { 354 - "backgroundColor": "#ffffff", 355 - "color": "#d1106f", 356 - "left": -4, 357 - "position": "relative", 358 - "top": 6, 359 - } 360 - } 361 - /> 362 - </View> 363 - </View> 364 - <View> 365 - <ActivityIndicator /> 366 - </View> 367 - </View> 368 - `;
-437
__tests__/view/screens/__snapshots__/PostThread.test.tsx.snap
··· 1 - // Jest Snapshot v1, https://goo.gl/fbAQLP 2 - 3 - exports[`PostThread renders correctly 1`] = ` 4 - <View 5 - style={ 6 - Object { 7 - "flex": 1, 8 - } 9 - } 10 - > 11 - <View 12 - style={ 13 - Object { 14 - "alignItems": "center", 15 - "backgroundColor": "#ffffff", 16 - "borderBottomColor": "#f8f3f3", 17 - "borderBottomWidth": 1, 18 - "flexDirection": "row", 19 - "paddingBottom": 6, 20 - "paddingHorizontal": 12, 21 - "paddingTop": 6, 22 - } 23 - } 24 - > 25 - <View 26 - accessible={true} 27 - collapsable={false} 28 - focusable={true} 29 - hitSlop={ 30 - Object { 31 - "bottom": 10, 32 - "left": 10, 33 - "right": 30, 34 - "top": 10, 35 - } 36 - } 37 - onClick={[Function]} 38 - onResponderGrant={[Function]} 39 - onResponderMove={[Function]} 40 - onResponderRelease={[Function]} 41 - onResponderTerminate={[Function]} 42 - onResponderTerminationRequest={[Function]} 43 - onStartShouldSetResponder={[Function]} 44 - style={ 45 - Object { 46 - "height": 30, 47 - "opacity": 1, 48 - "width": 40, 49 - } 50 - } 51 - > 52 - <RNSVGSvgView 53 - align="xMidYMid" 54 - bbHeight={30} 55 - bbWidth={30} 56 - focusable={false} 57 - height={30} 58 - meetOrSlice={0} 59 - minX={0} 60 - minY={0} 61 - style={ 62 - Array [ 63 - Object { 64 - "backgroundColor": "transparent", 65 - "borderWidth": 0, 66 - }, 67 - Object { 68 - "flex": 0, 69 - "height": 30, 70 - "width": 30, 71 - }, 72 - ] 73 - } 74 - vbHeight={100} 75 - vbWidth={100} 76 - width={30} 77 - > 78 - <RNSVGGroup> 79 - <RNSVGDefs> 80 - <RNSVGLinearGradient 81 - gradient={ 82 - Array [ 83 - 0, 84 - -1292135, 85 - 1, 86 - -2424577, 87 - ] 88 - } 89 - gradientTransform={null} 90 - gradientUnits={0} 91 - name="grad" 92 - x1="0" 93 - x2="1" 94 - y1="0" 95 - y2="1" 96 - /> 97 - </RNSVGDefs> 98 - <RNSVGCircle 99 - cx="50" 100 - cy="50" 101 - fill={ 102 - Array [ 103 - 1, 104 - "grad", 105 - ] 106 - } 107 - propList={ 108 - Array [ 109 - "fill", 110 - ] 111 - } 112 - r="50" 113 - /> 114 - <RNSVGText 115 - content={null} 116 - dx={Array []} 117 - dy={Array []} 118 - fill={4294967295} 119 - font={ 120 - Object { 121 - "fontSize": "50", 122 - "fontWeight": "bold", 123 - "textAnchor": "middle", 124 - } 125 - } 126 - propList={ 127 - Array [ 128 - "fill", 129 - ] 130 - } 131 - rotate={Array []} 132 - x={ 133 - Array [ 134 - "50", 135 - ] 136 - } 137 - y={ 138 - Array [ 139 - "67", 140 - ] 141 - } 142 - > 143 - <RNSVGTSpan 144 - content="X" 145 - dx={Array []} 146 - dy={Array []} 147 - font={Object {}} 148 - rotate={Array []} 149 - x={Array []} 150 - y={Array []} 151 - /> 152 - </RNSVGText> 153 - </RNSVGGroup> 154 - </RNSVGSvgView> 155 - </View> 156 - <View 157 - pointerEvents="none" 158 - style={ 159 - Object { 160 - "alignItems": "baseline", 161 - "flexDirection": "row", 162 - "marginRight": "auto", 163 - } 164 - } 165 - > 166 - <Text 167 - style={ 168 - Array [ 169 - Object { 170 - "color": "#000000", 171 - }, 172 - Object { 173 - "color": "#000000", 174 - "fontSize": 21, 175 - "fontWeight": "600", 176 - }, 177 - ] 178 - } 179 - > 180 - Post 181 - </Text> 182 - <Text 183 - numberOfLines={1} 184 - style={ 185 - Array [ 186 - Object { 187 - "color": "#000000", 188 - }, 189 - Object { 190 - "color": "#968d8d", 191 - "fontSize": 18, 192 - "marginLeft": 6, 193 - "maxWidth": 200, 194 - }, 195 - ] 196 - } 197 - > 198 - by test name 199 - </Text> 200 - </View> 201 - <View 202 - accessible={true} 203 - collapsable={false} 204 - focusable={true} 205 - hitSlop={ 206 - Object { 207 - "bottom": 10, 208 - "left": 10, 209 - "right": 10, 210 - "top": 10, 211 - } 212 - } 213 - onClick={[Function]} 214 - onResponderGrant={[Function]} 215 - onResponderMove={[Function]} 216 - onResponderRelease={[Function]} 217 - onResponderTerminate={[Function]} 218 - onResponderTerminationRequest={[Function]} 219 - onStartShouldSetResponder={[Function]} 220 - style={ 221 - Object { 222 - "alignItems": "center", 223 - "backgroundColor": "#f8f3f3", 224 - "borderRadius": 20, 225 - "flexDirection": "row", 226 - "height": 36, 227 - "justifyContent": "center", 228 - "opacity": 1, 229 - "width": 36, 230 - } 231 - } 232 - > 233 - < 234 - icon="plus" 235 - size={18} 236 - /> 237 - </View> 238 - <View 239 - accessible={true} 240 - collapsable={false} 241 - focusable={true} 242 - hitSlop={ 243 - Object { 244 - "bottom": 10, 245 - "left": 10, 246 - "right": 10, 247 - "top": 10, 248 - } 249 - } 250 - onClick={[Function]} 251 - onResponderGrant={[Function]} 252 - onResponderMove={[Function]} 253 - onResponderRelease={[Function]} 254 - onResponderTerminate={[Function]} 255 - onResponderTerminationRequest={[Function]} 256 - onStartShouldSetResponder={[Function]} 257 - style={ 258 - Object { 259 - "alignItems": "center", 260 - "backgroundColor": "#f8f3f3", 261 - "borderRadius": 20, 262 - "flexDirection": "row", 263 - "height": 36, 264 - "justifyContent": "center", 265 - "marginLeft": 8, 266 - "opacity": 1, 267 - "width": 36, 268 - } 269 - } 270 - > 271 - <RNSVGSvgView 272 - align="xMidYMid" 273 - bbHeight={18} 274 - bbWidth={18} 275 - color={4278190080} 276 - fill="none" 277 - focusable={false} 278 - height={18} 279 - meetOrSlice={0} 280 - minX={0} 281 - minY={0} 282 - stroke="currentColor" 283 - strokeWidth={3} 284 - style={ 285 - Array [ 286 - Object { 287 - "backgroundColor": "transparent", 288 - "borderWidth": 0, 289 - }, 290 - Object { 291 - "color": "#000000", 292 - "position": "relative", 293 - "top": -1, 294 - }, 295 - Object { 296 - "flex": 0, 297 - "height": 18, 298 - "width": 18, 299 - }, 300 - ] 301 - } 302 - tintColor={4278190080} 303 - vbHeight={24} 304 - vbWidth={24} 305 - width={18} 306 - > 307 - <RNSVGGroup 308 - fill={null} 309 - propList={ 310 - Array [ 311 - "fill", 312 - "stroke", 313 - "strokeWidth", 314 - ] 315 - } 316 - stroke={ 317 - Array [ 318 - 2, 319 - ] 320 - } 321 - strokeWidth={3} 322 - > 323 - <RNSVGPath 324 - d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" 325 - propList={ 326 - Array [ 327 - "strokeLinecap", 328 - "strokeLinejoin", 329 - ] 330 - } 331 - strokeLinecap={1} 332 - strokeLinejoin={1} 333 - /> 334 - </RNSVGGroup> 335 - </RNSVGSvgView> 336 - </View> 337 - <View 338 - accessible={true} 339 - collapsable={false} 340 - focusable={true} 341 - onClick={[Function]} 342 - onResponderGrant={[Function]} 343 - onResponderMove={[Function]} 344 - onResponderRelease={[Function]} 345 - onResponderTerminate={[Function]} 346 - onResponderTerminationRequest={[Function]} 347 - onStartShouldSetResponder={[Function]} 348 - style={ 349 - Object { 350 - "alignItems": "center", 351 - "backgroundColor": "#ffffff", 352 - "borderRadius": 20, 353 - "flexDirection": "row", 354 - "height": 36, 355 - "justifyContent": "center", 356 - "marginLeft": 8, 357 - "opacity": 1, 358 - "width": 36, 359 - } 360 - } 361 - > 362 - < 363 - icon="signal" 364 - size={18} 365 - style={ 366 - Array [ 367 - Object { 368 - "color": "#000000", 369 - }, 370 - ] 371 - } 372 - /> 373 - < 374 - icon="x" 375 - size={12} 376 - style={ 377 - Object { 378 - "backgroundColor": "#ffffff", 379 - "color": "#d1106f", 380 - "left": -4, 381 - "position": "relative", 382 - "top": 6, 383 - } 384 - } 385 - /> 386 - </View> 387 - </View> 388 - <View 389 - style={ 390 - Object { 391 - "flex": 1, 392 - } 393 - } 394 - > 395 - <RCTScrollView 396 - contentContainerStyle={ 397 - Object { 398 - "paddingBottom": 200, 399 - } 400 - } 401 - data={Array []} 402 - getItem={[Function]} 403 - getItemCount={[Function]} 404 - keyExtractor={[Function]} 405 - onContentSizeChange={[Function]} 406 - onLayout={[Function]} 407 - onMomentumScrollBegin={[Function]} 408 - onMomentumScrollEnd={[Function]} 409 - onRefresh={[Function]} 410 - onScroll={[Function]} 411 - onScrollBeginDrag={[Function]} 412 - onScrollEndDrag={[Function]} 413 - onScrollToIndexFailed={[Function]} 414 - refreshControl={ 415 - <RefreshControlMock 416 - onRefresh={[Function]} 417 - refreshing={false} 418 - /> 419 - } 420 - refreshing={false} 421 - removeClippedSubviews={false} 422 - renderItem={[Function]} 423 - scrollEventThrottle={50} 424 - stickyHeaderIndices={Array []} 425 - style={ 426 - Object { 427 - "flex": 1, 428 - } 429 - } 430 - viewabilityConfigCallbackPairs={Array []} 431 - > 432 - <RCTRefreshControl /> 433 - <View /> 434 - </RCTScrollView> 435 - </View> 436 - </View> 437 - `;
-368
__tests__/view/screens/__snapshots__/PostUpvotedBy.test.tsx.snap
··· 1 - // Jest Snapshot v1, https://goo.gl/fbAQLP 2 - 3 - exports[`PostUpvotedBy renders correctly 1`] = ` 4 - <View> 5 - <View 6 - style={ 7 - Object { 8 - "alignItems": "center", 9 - "backgroundColor": "#ffffff", 10 - "borderBottomColor": "#f8f3f3", 11 - "borderBottomWidth": 1, 12 - "flexDirection": "row", 13 - "paddingBottom": 6, 14 - "paddingHorizontal": 12, 15 - "paddingTop": 6, 16 - } 17 - } 18 - > 19 - <View 20 - accessible={true} 21 - collapsable={false} 22 - focusable={true} 23 - hitSlop={ 24 - Object { 25 - "bottom": 10, 26 - "left": 10, 27 - "right": 30, 28 - "top": 10, 29 - } 30 - } 31 - onClick={[Function]} 32 - onResponderGrant={[Function]} 33 - onResponderMove={[Function]} 34 - onResponderRelease={[Function]} 35 - onResponderTerminate={[Function]} 36 - onResponderTerminationRequest={[Function]} 37 - onStartShouldSetResponder={[Function]} 38 - style={ 39 - Object { 40 - "height": 30, 41 - "opacity": 1, 42 - "width": 40, 43 - } 44 - } 45 - > 46 - <RNSVGSvgView 47 - align="xMidYMid" 48 - bbHeight={30} 49 - bbWidth={30} 50 - focusable={false} 51 - height={30} 52 - meetOrSlice={0} 53 - minX={0} 54 - minY={0} 55 - style={ 56 - Array [ 57 - Object { 58 - "backgroundColor": "transparent", 59 - "borderWidth": 0, 60 - }, 61 - Object { 62 - "flex": 0, 63 - "height": 30, 64 - "width": 30, 65 - }, 66 - ] 67 - } 68 - vbHeight={100} 69 - vbWidth={100} 70 - width={30} 71 - > 72 - <RNSVGGroup> 73 - <RNSVGDefs> 74 - <RNSVGLinearGradient 75 - gradient={ 76 - Array [ 77 - 0, 78 - -1292135, 79 - 1, 80 - -2424577, 81 - ] 82 - } 83 - gradientTransform={null} 84 - gradientUnits={0} 85 - name="grad" 86 - x1="0" 87 - x2="1" 88 - y1="0" 89 - y2="1" 90 - /> 91 - </RNSVGDefs> 92 - <RNSVGCircle 93 - cx="50" 94 - cy="50" 95 - fill={ 96 - Array [ 97 - 1, 98 - "grad", 99 - ] 100 - } 101 - propList={ 102 - Array [ 103 - "fill", 104 - ] 105 - } 106 - r="50" 107 - /> 108 - <RNSVGText 109 - content={null} 110 - dx={Array []} 111 - dy={Array []} 112 - fill={4294967295} 113 - font={ 114 - Object { 115 - "fontSize": "50", 116 - "fontWeight": "bold", 117 - "textAnchor": "middle", 118 - } 119 - } 120 - propList={ 121 - Array [ 122 - "fill", 123 - ] 124 - } 125 - rotate={Array []} 126 - x={ 127 - Array [ 128 - "50", 129 - ] 130 - } 131 - y={ 132 - Array [ 133 - "67", 134 - ] 135 - } 136 - > 137 - <RNSVGTSpan 138 - content="X" 139 - dx={Array []} 140 - dy={Array []} 141 - font={Object {}} 142 - rotate={Array []} 143 - x={Array []} 144 - y={Array []} 145 - /> 146 - </RNSVGText> 147 - </RNSVGGroup> 148 - </RNSVGSvgView> 149 - </View> 150 - <View 151 - pointerEvents="none" 152 - style={ 153 - Object { 154 - "alignItems": "baseline", 155 - "flexDirection": "row", 156 - "marginRight": "auto", 157 - } 158 - } 159 - > 160 - <Text 161 - style={ 162 - Array [ 163 - Object { 164 - "color": "#000000", 165 - }, 166 - Object { 167 - "color": "#000000", 168 - "fontSize": 21, 169 - "fontWeight": "600", 170 - }, 171 - ] 172 - } 173 - > 174 - Upvoted by 175 - </Text> 176 - </View> 177 - <View 178 - accessible={true} 179 - collapsable={false} 180 - focusable={true} 181 - hitSlop={ 182 - Object { 183 - "bottom": 10, 184 - "left": 10, 185 - "right": 10, 186 - "top": 10, 187 - } 188 - } 189 - onClick={[Function]} 190 - onResponderGrant={[Function]} 191 - onResponderMove={[Function]} 192 - onResponderRelease={[Function]} 193 - onResponderTerminate={[Function]} 194 - onResponderTerminationRequest={[Function]} 195 - onStartShouldSetResponder={[Function]} 196 - style={ 197 - Object { 198 - "alignItems": "center", 199 - "backgroundColor": "#f8f3f3", 200 - "borderRadius": 20, 201 - "flexDirection": "row", 202 - "height": 36, 203 - "justifyContent": "center", 204 - "opacity": 1, 205 - "width": 36, 206 - } 207 - } 208 - > 209 - < 210 - icon="plus" 211 - size={18} 212 - /> 213 - </View> 214 - <View 215 - accessible={true} 216 - collapsable={false} 217 - focusable={true} 218 - hitSlop={ 219 - Object { 220 - "bottom": 10, 221 - "left": 10, 222 - "right": 10, 223 - "top": 10, 224 - } 225 - } 226 - onClick={[Function]} 227 - onResponderGrant={[Function]} 228 - onResponderMove={[Function]} 229 - onResponderRelease={[Function]} 230 - onResponderTerminate={[Function]} 231 - onResponderTerminationRequest={[Function]} 232 - onStartShouldSetResponder={[Function]} 233 - style={ 234 - Object { 235 - "alignItems": "center", 236 - "backgroundColor": "#f8f3f3", 237 - "borderRadius": 20, 238 - "flexDirection": "row", 239 - "height": 36, 240 - "justifyContent": "center", 241 - "marginLeft": 8, 242 - "opacity": 1, 243 - "width": 36, 244 - } 245 - } 246 - > 247 - <RNSVGSvgView 248 - align="xMidYMid" 249 - bbHeight={18} 250 - bbWidth={18} 251 - color={4278190080} 252 - fill="none" 253 - focusable={false} 254 - height={18} 255 - meetOrSlice={0} 256 - minX={0} 257 - minY={0} 258 - stroke="currentColor" 259 - strokeWidth={3} 260 - style={ 261 - Array [ 262 - Object { 263 - "backgroundColor": "transparent", 264 - "borderWidth": 0, 265 - }, 266 - Object { 267 - "color": "#000000", 268 - "position": "relative", 269 - "top": -1, 270 - }, 271 - Object { 272 - "flex": 0, 273 - "height": 18, 274 - "width": 18, 275 - }, 276 - ] 277 - } 278 - tintColor={4278190080} 279 - vbHeight={24} 280 - vbWidth={24} 281 - width={18} 282 - > 283 - <RNSVGGroup 284 - fill={null} 285 - propList={ 286 - Array [ 287 - "fill", 288 - "stroke", 289 - "strokeWidth", 290 - ] 291 - } 292 - stroke={ 293 - Array [ 294 - 2, 295 - ] 296 - } 297 - strokeWidth={3} 298 - > 299 - <RNSVGPath 300 - d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" 301 - propList={ 302 - Array [ 303 - "strokeLinecap", 304 - "strokeLinejoin", 305 - ] 306 - } 307 - strokeLinecap={1} 308 - strokeLinejoin={1} 309 - /> 310 - </RNSVGGroup> 311 - </RNSVGSvgView> 312 - </View> 313 - <View 314 - accessible={true} 315 - collapsable={false} 316 - focusable={true} 317 - onClick={[Function]} 318 - onResponderGrant={[Function]} 319 - onResponderMove={[Function]} 320 - onResponderRelease={[Function]} 321 - onResponderTerminate={[Function]} 322 - onResponderTerminationRequest={[Function]} 323 - onStartShouldSetResponder={[Function]} 324 - style={ 325 - Object { 326 - "alignItems": "center", 327 - "backgroundColor": "#ffffff", 328 - "borderRadius": 20, 329 - "flexDirection": "row", 330 - "height": 36, 331 - "justifyContent": "center", 332 - "marginLeft": 8, 333 - "opacity": 1, 334 - "width": 36, 335 - } 336 - } 337 - > 338 - < 339 - icon="signal" 340 - size={18} 341 - style={ 342 - Array [ 343 - Object { 344 - "color": "#000000", 345 - }, 346 - ] 347 - } 348 - /> 349 - < 350 - icon="x" 351 - size={12} 352 - style={ 353 - Object { 354 - "backgroundColor": "#ffffff", 355 - "color": "#d1106f", 356 - "left": -4, 357 - "position": "relative", 358 - "top": 6, 359 - } 360 - } 361 - /> 362 - </View> 363 - </View> 364 - <View> 365 - <ActivityIndicator /> 366 - </View> 367 - </View> 368 - `;
-513
__tests__/view/screens/__snapshots__/Profile.test.tsx.snap
··· 1 - // Jest Snapshot v1, https://goo.gl/fbAQLP 2 - 3 - exports[`Profile renders correctly 1`] = ` 4 - <View 5 - style={ 6 - Object { 7 - "flexDirection": "column", 8 - "height": "100%", 9 - } 10 - } 11 - > 12 - <View 13 - style={ 14 - Object { 15 - "alignItems": "center", 16 - "backgroundColor": "#ffffff", 17 - "borderBottomColor": "#f8f3f3", 18 - "borderBottomWidth": 1, 19 - "flexDirection": "row", 20 - "paddingBottom": 6, 21 - "paddingHorizontal": 12, 22 - "paddingTop": 6, 23 - } 24 - } 25 - > 26 - <View 27 - accessible={true} 28 - collapsable={false} 29 - focusable={true} 30 - hitSlop={ 31 - Object { 32 - "bottom": 10, 33 - "left": 10, 34 - "right": 30, 35 - "top": 10, 36 - } 37 - } 38 - onClick={[Function]} 39 - onResponderGrant={[Function]} 40 - onResponderMove={[Function]} 41 - onResponderRelease={[Function]} 42 - onResponderTerminate={[Function]} 43 - onResponderTerminationRequest={[Function]} 44 - onStartShouldSetResponder={[Function]} 45 - style={ 46 - Object { 47 - "height": 30, 48 - "opacity": 1, 49 - "width": 40, 50 - } 51 - } 52 - > 53 - <RNSVGSvgView 54 - align="xMidYMid" 55 - bbHeight={30} 56 - bbWidth={30} 57 - focusable={false} 58 - height={30} 59 - meetOrSlice={0} 60 - minX={0} 61 - minY={0} 62 - style={ 63 - Array [ 64 - Object { 65 - "backgroundColor": "transparent", 66 - "borderWidth": 0, 67 - }, 68 - Object { 69 - "flex": 0, 70 - "height": 30, 71 - "width": 30, 72 - }, 73 - ] 74 - } 75 - vbHeight={100} 76 - vbWidth={100} 77 - width={30} 78 - > 79 - <RNSVGGroup> 80 - <RNSVGDefs> 81 - <RNSVGLinearGradient 82 - gradient={ 83 - Array [ 84 - 0, 85 - -1292135, 86 - 1, 87 - -2424577, 88 - ] 89 - } 90 - gradientTransform={null} 91 - gradientUnits={0} 92 - name="grad" 93 - x1="0" 94 - x2="1" 95 - y1="0" 96 - y2="1" 97 - /> 98 - </RNSVGDefs> 99 - <RNSVGCircle 100 - cx="50" 101 - cy="50" 102 - fill={ 103 - Array [ 104 - 1, 105 - "grad", 106 - ] 107 - } 108 - propList={ 109 - Array [ 110 - "fill", 111 - ] 112 - } 113 - r="50" 114 - /> 115 - <RNSVGText 116 - content={null} 117 - dx={Array []} 118 - dy={Array []} 119 - fill={4294967295} 120 - font={ 121 - Object { 122 - "fontSize": "50", 123 - "fontWeight": "bold", 124 - "textAnchor": "middle", 125 - } 126 - } 127 - propList={ 128 - Array [ 129 - "fill", 130 - ] 131 - } 132 - rotate={Array []} 133 - x={ 134 - Array [ 135 - "50", 136 - ] 137 - } 138 - y={ 139 - Array [ 140 - "67", 141 - ] 142 - } 143 - > 144 - <RNSVGTSpan 145 - content="X" 146 - dx={Array []} 147 - dy={Array []} 148 - font={Object {}} 149 - rotate={Array []} 150 - x={Array []} 151 - y={Array []} 152 - /> 153 - </RNSVGText> 154 - </RNSVGGroup> 155 - </RNSVGSvgView> 156 - </View> 157 - <View 158 - pointerEvents="none" 159 - style={ 160 - Object { 161 - "alignItems": "baseline", 162 - "flexDirection": "row", 163 - "marginRight": "auto", 164 - } 165 - } 166 - > 167 - <Text 168 - style={ 169 - Array [ 170 - Object { 171 - "color": "#000000", 172 - }, 173 - Object { 174 - "color": "#000000", 175 - "fontSize": 21, 176 - "fontWeight": "600", 177 - }, 178 - ] 179 - } 180 - > 181 - test name 182 - </Text> 183 - </View> 184 - <View 185 - accessible={true} 186 - collapsable={false} 187 - focusable={true} 188 - hitSlop={ 189 - Object { 190 - "bottom": 10, 191 - "left": 10, 192 - "right": 10, 193 - "top": 10, 194 - } 195 - } 196 - onClick={[Function]} 197 - onResponderGrant={[Function]} 198 - onResponderMove={[Function]} 199 - onResponderRelease={[Function]} 200 - onResponderTerminate={[Function]} 201 - onResponderTerminationRequest={[Function]} 202 - onStartShouldSetResponder={[Function]} 203 - style={ 204 - Object { 205 - "alignItems": "center", 206 - "backgroundColor": "#f8f3f3", 207 - "borderRadius": 20, 208 - "flexDirection": "row", 209 - "height": 36, 210 - "justifyContent": "center", 211 - "opacity": 1, 212 - "width": 36, 213 - } 214 - } 215 - > 216 - < 217 - icon="plus" 218 - size={18} 219 - /> 220 - </View> 221 - <View 222 - accessible={true} 223 - collapsable={false} 224 - focusable={true} 225 - hitSlop={ 226 - Object { 227 - "bottom": 10, 228 - "left": 10, 229 - "right": 10, 230 - "top": 10, 231 - } 232 - } 233 - onClick={[Function]} 234 - onResponderGrant={[Function]} 235 - onResponderMove={[Function]} 236 - onResponderRelease={[Function]} 237 - onResponderTerminate={[Function]} 238 - onResponderTerminationRequest={[Function]} 239 - onStartShouldSetResponder={[Function]} 240 - style={ 241 - Object { 242 - "alignItems": "center", 243 - "backgroundColor": "#f8f3f3", 244 - "borderRadius": 20, 245 - "flexDirection": "row", 246 - "height": 36, 247 - "justifyContent": "center", 248 - "marginLeft": 8, 249 - "opacity": 1, 250 - "width": 36, 251 - } 252 - } 253 - > 254 - <RNSVGSvgView 255 - align="xMidYMid" 256 - bbHeight={18} 257 - bbWidth={18} 258 - color={4278190080} 259 - fill="none" 260 - focusable={false} 261 - height={18} 262 - meetOrSlice={0} 263 - minX={0} 264 - minY={0} 265 - stroke="currentColor" 266 - strokeWidth={3} 267 - style={ 268 - Array [ 269 - Object { 270 - "backgroundColor": "transparent", 271 - "borderWidth": 0, 272 - }, 273 - Object { 274 - "color": "#000000", 275 - "position": "relative", 276 - "top": -1, 277 - }, 278 - Object { 279 - "flex": 0, 280 - "height": 18, 281 - "width": 18, 282 - }, 283 - ] 284 - } 285 - tintColor={4278190080} 286 - vbHeight={24} 287 - vbWidth={24} 288 - width={18} 289 - > 290 - <RNSVGGroup 291 - fill={null} 292 - propList={ 293 - Array [ 294 - "fill", 295 - "stroke", 296 - "strokeWidth", 297 - ] 298 - } 299 - stroke={ 300 - Array [ 301 - 2, 302 - ] 303 - } 304 - strokeWidth={3} 305 - > 306 - <RNSVGPath 307 - d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" 308 - propList={ 309 - Array [ 310 - "strokeLinecap", 311 - "strokeLinejoin", 312 - ] 313 - } 314 - strokeLinecap={1} 315 - strokeLinejoin={1} 316 - /> 317 - </RNSVGGroup> 318 - </RNSVGSvgView> 319 - </View> 320 - <View 321 - accessible={true} 322 - collapsable={false} 323 - focusable={true} 324 - onClick={[Function]} 325 - onResponderGrant={[Function]} 326 - onResponderMove={[Function]} 327 - onResponderRelease={[Function]} 328 - onResponderTerminate={[Function]} 329 - onResponderTerminationRequest={[Function]} 330 - onStartShouldSetResponder={[Function]} 331 - style={ 332 - Object { 333 - "alignItems": "center", 334 - "backgroundColor": "#ffffff", 335 - "borderRadius": 20, 336 - "flexDirection": "row", 337 - "height": 36, 338 - "justifyContent": "center", 339 - "marginLeft": 8, 340 - "opacity": 1, 341 - "width": 36, 342 - } 343 - } 344 - > 345 - < 346 - icon="signal" 347 - size={18} 348 - style={ 349 - Array [ 350 - Object { 351 - "color": "#000000", 352 - }, 353 - ] 354 - } 355 - /> 356 - < 357 - icon="x" 358 - size={12} 359 - style={ 360 - Object { 361 - "backgroundColor": "#ffffff", 362 - "color": "#d1106f", 363 - "left": -4, 364 - "position": "relative", 365 - "top": 6, 366 - } 367 - } 368 - /> 369 - </View> 370 - </View> 371 - <View 372 - style={ 373 - Object { 374 - "backgroundColor": "#ffffff", 375 - } 376 - } 377 - > 378 - <View 379 - style={ 380 - Array [ 381 - Object { 382 - "backgroundColor": "#e7e9ea", 383 - "borderRadius": 6, 384 - "height": 120, 385 - "overflow": "hidden", 386 - "width": "100%", 387 - }, 388 - undefined, 389 - ] 390 - } 391 - > 392 - <View 393 - style={ 394 - Object { 395 - "backgroundColor": "#e7e9ea", 396 - "height": 120, 397 - "width": "100%", 398 - } 399 - } 400 - /> 401 - </View> 402 - <View 403 - style={ 404 - Object { 405 - "backgroundColor": "#ffffff", 406 - "borderColor": "#ffffff", 407 - "borderRadius": 42, 408 - "borderWidth": 2, 409 - "height": 84, 410 - "left": 10, 411 - "position": "absolute", 412 - "top": 80, 413 - "width": 84, 414 - } 415 - } 416 - > 417 - <View 418 - style={ 419 - Array [ 420 - Object { 421 - "backgroundColor": "#e7e9ea", 422 - "borderRadius": 6, 423 - "height": 80, 424 - "overflow": "hidden", 425 - "width": 80, 426 - }, 427 - Object { 428 - "borderRadius": 40, 429 - }, 430 - ] 431 - } 432 - > 433 - <View 434 - style={ 435 - Object { 436 - "backgroundColor": "#e7e9ea", 437 - "height": 80, 438 - "width": 80, 439 - } 440 - } 441 - /> 442 - </View> 443 - </View> 444 - <View 445 - style={ 446 - Object { 447 - "paddingBottom": 4, 448 - "paddingHorizontal": 14, 449 - "paddingTop": 8, 450 - } 451 - } 452 - > 453 - <View 454 - style={ 455 - Array [ 456 - Object { 457 - "flexDirection": "row", 458 - "marginBottom": 12, 459 - "marginLeft": "auto", 460 - }, 461 - ] 462 - } 463 - > 464 - <View 465 - style={ 466 - Array [ 467 - Object { 468 - "backgroundColor": "#e7e9ea", 469 - "borderRadius": 6, 470 - "height": 31, 471 - "overflow": "hidden", 472 - "width": 100, 473 - }, 474 - Object { 475 - "borderRadius": 50, 476 - }, 477 - ] 478 - } 479 - > 480 - <View 481 - style={ 482 - Object { 483 - "backgroundColor": "#e7e9ea", 484 - "height": 31, 485 - "width": 100, 486 - } 487 - } 488 - /> 489 - </View> 490 - </View> 491 - <View 492 - style={Object {}} 493 - > 494 - <Text 495 - style={ 496 - Array [ 497 - Object { 498 - "color": "#000000", 499 - }, 500 - Object { 501 - "fontSize": 28, 502 - "fontWeight": "bold", 503 - }, 504 - ] 505 - } 506 - > 507 - 508 - </Text> 509 - </View> 510 - </View> 511 - </View> 512 - </View> 513 - `;
-386
__tests__/view/screens/__snapshots__/ProfileFollowers.test.tsx.snap
··· 1 - // Jest Snapshot v1, https://goo.gl/fbAQLP 2 - 3 - exports[`ProfileFollowers renders correctly 1`] = ` 4 - <View> 5 - <View 6 - style={ 7 - Object { 8 - "alignItems": "center", 9 - "backgroundColor": "#ffffff", 10 - "borderBottomColor": "#f8f3f3", 11 - "borderBottomWidth": 1, 12 - "flexDirection": "row", 13 - "paddingBottom": 6, 14 - "paddingHorizontal": 12, 15 - "paddingTop": 6, 16 - } 17 - } 18 - > 19 - <View 20 - accessible={true} 21 - collapsable={false} 22 - focusable={true} 23 - hitSlop={ 24 - Object { 25 - "bottom": 10, 26 - "left": 10, 27 - "right": 30, 28 - "top": 10, 29 - } 30 - } 31 - onClick={[Function]} 32 - onResponderGrant={[Function]} 33 - onResponderMove={[Function]} 34 - onResponderRelease={[Function]} 35 - onResponderTerminate={[Function]} 36 - onResponderTerminationRequest={[Function]} 37 - onStartShouldSetResponder={[Function]} 38 - style={ 39 - Object { 40 - "height": 30, 41 - "opacity": 1, 42 - "width": 40, 43 - } 44 - } 45 - > 46 - <RNSVGSvgView 47 - align="xMidYMid" 48 - bbHeight={30} 49 - bbWidth={30} 50 - focusable={false} 51 - height={30} 52 - meetOrSlice={0} 53 - minX={0} 54 - minY={0} 55 - style={ 56 - Array [ 57 - Object { 58 - "backgroundColor": "transparent", 59 - "borderWidth": 0, 60 - }, 61 - Object { 62 - "flex": 0, 63 - "height": 30, 64 - "width": 30, 65 - }, 66 - ] 67 - } 68 - vbHeight={100} 69 - vbWidth={100} 70 - width={30} 71 - > 72 - <RNSVGGroup> 73 - <RNSVGDefs> 74 - <RNSVGLinearGradient 75 - gradient={ 76 - Array [ 77 - 0, 78 - -1292135, 79 - 1, 80 - -2424577, 81 - ] 82 - } 83 - gradientTransform={null} 84 - gradientUnits={0} 85 - name="grad" 86 - x1="0" 87 - x2="1" 88 - y1="0" 89 - y2="1" 90 - /> 91 - </RNSVGDefs> 92 - <RNSVGCircle 93 - cx="50" 94 - cy="50" 95 - fill={ 96 - Array [ 97 - 1, 98 - "grad", 99 - ] 100 - } 101 - propList={ 102 - Array [ 103 - "fill", 104 - ] 105 - } 106 - r="50" 107 - /> 108 - <RNSVGText 109 - content={null} 110 - dx={Array []} 111 - dy={Array []} 112 - fill={4294967295} 113 - font={ 114 - Object { 115 - "fontSize": "50", 116 - "fontWeight": "bold", 117 - "textAnchor": "middle", 118 - } 119 - } 120 - propList={ 121 - Array [ 122 - "fill", 123 - ] 124 - } 125 - rotate={Array []} 126 - x={ 127 - Array [ 128 - "50", 129 - ] 130 - } 131 - y={ 132 - Array [ 133 - "67", 134 - ] 135 - } 136 - > 137 - <RNSVGTSpan 138 - content="X" 139 - dx={Array []} 140 - dy={Array []} 141 - font={Object {}} 142 - rotate={Array []} 143 - x={Array []} 144 - y={Array []} 145 - /> 146 - </RNSVGText> 147 - </RNSVGGroup> 148 - </RNSVGSvgView> 149 - </View> 150 - <View 151 - pointerEvents="none" 152 - style={ 153 - Object { 154 - "alignItems": "baseline", 155 - "flexDirection": "row", 156 - "marginRight": "auto", 157 - } 158 - } 159 - > 160 - <Text 161 - style={ 162 - Array [ 163 - Object { 164 - "color": "#000000", 165 - }, 166 - Object { 167 - "color": "#000000", 168 - "fontSize": 21, 169 - "fontWeight": "600", 170 - }, 171 - ] 172 - } 173 - > 174 - Followers 175 - </Text> 176 - <Text 177 - numberOfLines={1} 178 - style={ 179 - Array [ 180 - Object { 181 - "color": "#000000", 182 - }, 183 - Object { 184 - "color": "#968d8d", 185 - "fontSize": 18, 186 - "marginLeft": 6, 187 - "maxWidth": 200, 188 - }, 189 - ] 190 - } 191 - > 192 - of test name 193 - </Text> 194 - </View> 195 - <View 196 - accessible={true} 197 - collapsable={false} 198 - focusable={true} 199 - hitSlop={ 200 - Object { 201 - "bottom": 10, 202 - "left": 10, 203 - "right": 10, 204 - "top": 10, 205 - } 206 - } 207 - onClick={[Function]} 208 - onResponderGrant={[Function]} 209 - onResponderMove={[Function]} 210 - onResponderRelease={[Function]} 211 - onResponderTerminate={[Function]} 212 - onResponderTerminationRequest={[Function]} 213 - onStartShouldSetResponder={[Function]} 214 - style={ 215 - Object { 216 - "alignItems": "center", 217 - "backgroundColor": "#f8f3f3", 218 - "borderRadius": 20, 219 - "flexDirection": "row", 220 - "height": 36, 221 - "justifyContent": "center", 222 - "opacity": 1, 223 - "width": 36, 224 - } 225 - } 226 - > 227 - < 228 - icon="plus" 229 - size={18} 230 - /> 231 - </View> 232 - <View 233 - accessible={true} 234 - collapsable={false} 235 - focusable={true} 236 - hitSlop={ 237 - Object { 238 - "bottom": 10, 239 - "left": 10, 240 - "right": 10, 241 - "top": 10, 242 - } 243 - } 244 - onClick={[Function]} 245 - onResponderGrant={[Function]} 246 - onResponderMove={[Function]} 247 - onResponderRelease={[Function]} 248 - onResponderTerminate={[Function]} 249 - onResponderTerminationRequest={[Function]} 250 - onStartShouldSetResponder={[Function]} 251 - style={ 252 - Object { 253 - "alignItems": "center", 254 - "backgroundColor": "#f8f3f3", 255 - "borderRadius": 20, 256 - "flexDirection": "row", 257 - "height": 36, 258 - "justifyContent": "center", 259 - "marginLeft": 8, 260 - "opacity": 1, 261 - "width": 36, 262 - } 263 - } 264 - > 265 - <RNSVGSvgView 266 - align="xMidYMid" 267 - bbHeight={18} 268 - bbWidth={18} 269 - color={4278190080} 270 - fill="none" 271 - focusable={false} 272 - height={18} 273 - meetOrSlice={0} 274 - minX={0} 275 - minY={0} 276 - stroke="currentColor" 277 - strokeWidth={3} 278 - style={ 279 - Array [ 280 - Object { 281 - "backgroundColor": "transparent", 282 - "borderWidth": 0, 283 - }, 284 - Object { 285 - "color": "#000000", 286 - "position": "relative", 287 - "top": -1, 288 - }, 289 - Object { 290 - "flex": 0, 291 - "height": 18, 292 - "width": 18, 293 - }, 294 - ] 295 - } 296 - tintColor={4278190080} 297 - vbHeight={24} 298 - vbWidth={24} 299 - width={18} 300 - > 301 - <RNSVGGroup 302 - fill={null} 303 - propList={ 304 - Array [ 305 - "fill", 306 - "stroke", 307 - "strokeWidth", 308 - ] 309 - } 310 - stroke={ 311 - Array [ 312 - 2, 313 - ] 314 - } 315 - strokeWidth={3} 316 - > 317 - <RNSVGPath 318 - d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" 319 - propList={ 320 - Array [ 321 - "strokeLinecap", 322 - "strokeLinejoin", 323 - ] 324 - } 325 - strokeLinecap={1} 326 - strokeLinejoin={1} 327 - /> 328 - </RNSVGGroup> 329 - </RNSVGSvgView> 330 - </View> 331 - <View 332 - accessible={true} 333 - collapsable={false} 334 - focusable={true} 335 - onClick={[Function]} 336 - onResponderGrant={[Function]} 337 - onResponderMove={[Function]} 338 - onResponderRelease={[Function]} 339 - onResponderTerminate={[Function]} 340 - onResponderTerminationRequest={[Function]} 341 - onStartShouldSetResponder={[Function]} 342 - style={ 343 - Object { 344 - "alignItems": "center", 345 - "backgroundColor": "#ffffff", 346 - "borderRadius": 20, 347 - "flexDirection": "row", 348 - "height": 36, 349 - "justifyContent": "center", 350 - "marginLeft": 8, 351 - "opacity": 1, 352 - "width": 36, 353 - } 354 - } 355 - > 356 - < 357 - icon="signal" 358 - size={18} 359 - style={ 360 - Array [ 361 - Object { 362 - "color": "#000000", 363 - }, 364 - ] 365 - } 366 - /> 367 - < 368 - icon="x" 369 - size={12} 370 - style={ 371 - Object { 372 - "backgroundColor": "#ffffff", 373 - "color": "#d1106f", 374 - "left": -4, 375 - "position": "relative", 376 - "top": 6, 377 - } 378 - } 379 - /> 380 - </View> 381 - </View> 382 - <View> 383 - <ActivityIndicator /> 384 - </View> 385 - </View> 386 - `;
-386
__tests__/view/screens/__snapshots__/ProfileFollows.test.tsx.snap
··· 1 - // Jest Snapshot v1, https://goo.gl/fbAQLP 2 - 3 - exports[`ProfileFollows renders correctly 1`] = ` 4 - <View> 5 - <View 6 - style={ 7 - Object { 8 - "alignItems": "center", 9 - "backgroundColor": "#ffffff", 10 - "borderBottomColor": "#f8f3f3", 11 - "borderBottomWidth": 1, 12 - "flexDirection": "row", 13 - "paddingBottom": 6, 14 - "paddingHorizontal": 12, 15 - "paddingTop": 6, 16 - } 17 - } 18 - > 19 - <View 20 - accessible={true} 21 - collapsable={false} 22 - focusable={true} 23 - hitSlop={ 24 - Object { 25 - "bottom": 10, 26 - "left": 10, 27 - "right": 30, 28 - "top": 10, 29 - } 30 - } 31 - onClick={[Function]} 32 - onResponderGrant={[Function]} 33 - onResponderMove={[Function]} 34 - onResponderRelease={[Function]} 35 - onResponderTerminate={[Function]} 36 - onResponderTerminationRequest={[Function]} 37 - onStartShouldSetResponder={[Function]} 38 - style={ 39 - Object { 40 - "height": 30, 41 - "opacity": 1, 42 - "width": 40, 43 - } 44 - } 45 - > 46 - <RNSVGSvgView 47 - align="xMidYMid" 48 - bbHeight={30} 49 - bbWidth={30} 50 - focusable={false} 51 - height={30} 52 - meetOrSlice={0} 53 - minX={0} 54 - minY={0} 55 - style={ 56 - Array [ 57 - Object { 58 - "backgroundColor": "transparent", 59 - "borderWidth": 0, 60 - }, 61 - Object { 62 - "flex": 0, 63 - "height": 30, 64 - "width": 30, 65 - }, 66 - ] 67 - } 68 - vbHeight={100} 69 - vbWidth={100} 70 - width={30} 71 - > 72 - <RNSVGGroup> 73 - <RNSVGDefs> 74 - <RNSVGLinearGradient 75 - gradient={ 76 - Array [ 77 - 0, 78 - -1292135, 79 - 1, 80 - -2424577, 81 - ] 82 - } 83 - gradientTransform={null} 84 - gradientUnits={0} 85 - name="grad" 86 - x1="0" 87 - x2="1" 88 - y1="0" 89 - y2="1" 90 - /> 91 - </RNSVGDefs> 92 - <RNSVGCircle 93 - cx="50" 94 - cy="50" 95 - fill={ 96 - Array [ 97 - 1, 98 - "grad", 99 - ] 100 - } 101 - propList={ 102 - Array [ 103 - "fill", 104 - ] 105 - } 106 - r="50" 107 - /> 108 - <RNSVGText 109 - content={null} 110 - dx={Array []} 111 - dy={Array []} 112 - fill={4294967295} 113 - font={ 114 - Object { 115 - "fontSize": "50", 116 - "fontWeight": "bold", 117 - "textAnchor": "middle", 118 - } 119 - } 120 - propList={ 121 - Array [ 122 - "fill", 123 - ] 124 - } 125 - rotate={Array []} 126 - x={ 127 - Array [ 128 - "50", 129 - ] 130 - } 131 - y={ 132 - Array [ 133 - "67", 134 - ] 135 - } 136 - > 137 - <RNSVGTSpan 138 - content="X" 139 - dx={Array []} 140 - dy={Array []} 141 - font={Object {}} 142 - rotate={Array []} 143 - x={Array []} 144 - y={Array []} 145 - /> 146 - </RNSVGText> 147 - </RNSVGGroup> 148 - </RNSVGSvgView> 149 - </View> 150 - <View 151 - pointerEvents="none" 152 - style={ 153 - Object { 154 - "alignItems": "baseline", 155 - "flexDirection": "row", 156 - "marginRight": "auto", 157 - } 158 - } 159 - > 160 - <Text 161 - style={ 162 - Array [ 163 - Object { 164 - "color": "#000000", 165 - }, 166 - Object { 167 - "color": "#000000", 168 - "fontSize": 21, 169 - "fontWeight": "600", 170 - }, 171 - ] 172 - } 173 - > 174 - Followed 175 - </Text> 176 - <Text 177 - numberOfLines={1} 178 - style={ 179 - Array [ 180 - Object { 181 - "color": "#000000", 182 - }, 183 - Object { 184 - "color": "#968d8d", 185 - "fontSize": 18, 186 - "marginLeft": 6, 187 - "maxWidth": 200, 188 - }, 189 - ] 190 - } 191 - > 192 - by test name 193 - </Text> 194 - </View> 195 - <View 196 - accessible={true} 197 - collapsable={false} 198 - focusable={true} 199 - hitSlop={ 200 - Object { 201 - "bottom": 10, 202 - "left": 10, 203 - "right": 10, 204 - "top": 10, 205 - } 206 - } 207 - onClick={[Function]} 208 - onResponderGrant={[Function]} 209 - onResponderMove={[Function]} 210 - onResponderRelease={[Function]} 211 - onResponderTerminate={[Function]} 212 - onResponderTerminationRequest={[Function]} 213 - onStartShouldSetResponder={[Function]} 214 - style={ 215 - Object { 216 - "alignItems": "center", 217 - "backgroundColor": "#f8f3f3", 218 - "borderRadius": 20, 219 - "flexDirection": "row", 220 - "height": 36, 221 - "justifyContent": "center", 222 - "opacity": 1, 223 - "width": 36, 224 - } 225 - } 226 - > 227 - < 228 - icon="plus" 229 - size={18} 230 - /> 231 - </View> 232 - <View 233 - accessible={true} 234 - collapsable={false} 235 - focusable={true} 236 - hitSlop={ 237 - Object { 238 - "bottom": 10, 239 - "left": 10, 240 - "right": 10, 241 - "top": 10, 242 - } 243 - } 244 - onClick={[Function]} 245 - onResponderGrant={[Function]} 246 - onResponderMove={[Function]} 247 - onResponderRelease={[Function]} 248 - onResponderTerminate={[Function]} 249 - onResponderTerminationRequest={[Function]} 250 - onStartShouldSetResponder={[Function]} 251 - style={ 252 - Object { 253 - "alignItems": "center", 254 - "backgroundColor": "#f8f3f3", 255 - "borderRadius": 20, 256 - "flexDirection": "row", 257 - "height": 36, 258 - "justifyContent": "center", 259 - "marginLeft": 8, 260 - "opacity": 1, 261 - "width": 36, 262 - } 263 - } 264 - > 265 - <RNSVGSvgView 266 - align="xMidYMid" 267 - bbHeight={18} 268 - bbWidth={18} 269 - color={4278190080} 270 - fill="none" 271 - focusable={false} 272 - height={18} 273 - meetOrSlice={0} 274 - minX={0} 275 - minY={0} 276 - stroke="currentColor" 277 - strokeWidth={3} 278 - style={ 279 - Array [ 280 - Object { 281 - "backgroundColor": "transparent", 282 - "borderWidth": 0, 283 - }, 284 - Object { 285 - "color": "#000000", 286 - "position": "relative", 287 - "top": -1, 288 - }, 289 - Object { 290 - "flex": 0, 291 - "height": 18, 292 - "width": 18, 293 - }, 294 - ] 295 - } 296 - tintColor={4278190080} 297 - vbHeight={24} 298 - vbWidth={24} 299 - width={18} 300 - > 301 - <RNSVGGroup 302 - fill={null} 303 - propList={ 304 - Array [ 305 - "fill", 306 - "stroke", 307 - "strokeWidth", 308 - ] 309 - } 310 - stroke={ 311 - Array [ 312 - 2, 313 - ] 314 - } 315 - strokeWidth={3} 316 - > 317 - <RNSVGPath 318 - d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" 319 - propList={ 320 - Array [ 321 - "strokeLinecap", 322 - "strokeLinejoin", 323 - ] 324 - } 325 - strokeLinecap={1} 326 - strokeLinejoin={1} 327 - /> 328 - </RNSVGGroup> 329 - </RNSVGSvgView> 330 - </View> 331 - <View 332 - accessible={true} 333 - collapsable={false} 334 - focusable={true} 335 - onClick={[Function]} 336 - onResponderGrant={[Function]} 337 - onResponderMove={[Function]} 338 - onResponderRelease={[Function]} 339 - onResponderTerminate={[Function]} 340 - onResponderTerminationRequest={[Function]} 341 - onStartShouldSetResponder={[Function]} 342 - style={ 343 - Object { 344 - "alignItems": "center", 345 - "backgroundColor": "#ffffff", 346 - "borderRadius": 20, 347 - "flexDirection": "row", 348 - "height": 36, 349 - "justifyContent": "center", 350 - "marginLeft": 8, 351 - "opacity": 1, 352 - "width": 36, 353 - } 354 - } 355 - > 356 - < 357 - icon="signal" 358 - size={18} 359 - style={ 360 - Array [ 361 - Object { 362 - "color": "#000000", 363 - }, 364 - ] 365 - } 366 - /> 367 - < 368 - icon="x" 369 - size={12} 370 - style={ 371 - Object { 372 - "backgroundColor": "#ffffff", 373 - "color": "#d1106f", 374 - "left": -4, 375 - "position": "relative", 376 - "top": 6, 377 - } 378 - } 379 - /> 380 - </View> 381 - </View> 382 - <View> 383 - <ActivityIndicator /> 384 - </View> 385 - </View> 386 - `;
-386
__tests__/view/screens/__snapshots__/ProfileMembers.test.tsx.snap
··· 1 - // Jest Snapshot v1, https://goo.gl/fbAQLP 2 - 3 - exports[`ProfileMembers renders correctly 1`] = ` 4 - <View> 5 - <View 6 - style={ 7 - Object { 8 - "alignItems": "center", 9 - "backgroundColor": "#ffffff", 10 - "borderBottomColor": "#f8f3f3", 11 - "borderBottomWidth": 1, 12 - "flexDirection": "row", 13 - "paddingBottom": 6, 14 - "paddingHorizontal": 12, 15 - "paddingTop": 6, 16 - } 17 - } 18 - > 19 - <View 20 - accessible={true} 21 - collapsable={false} 22 - focusable={true} 23 - hitSlop={ 24 - Object { 25 - "bottom": 10, 26 - "left": 10, 27 - "right": 30, 28 - "top": 10, 29 - } 30 - } 31 - onClick={[Function]} 32 - onResponderGrant={[Function]} 33 - onResponderMove={[Function]} 34 - onResponderRelease={[Function]} 35 - onResponderTerminate={[Function]} 36 - onResponderTerminationRequest={[Function]} 37 - onStartShouldSetResponder={[Function]} 38 - style={ 39 - Object { 40 - "height": 30, 41 - "opacity": 1, 42 - "width": 40, 43 - } 44 - } 45 - > 46 - <RNSVGSvgView 47 - align="xMidYMid" 48 - bbHeight={30} 49 - bbWidth={30} 50 - focusable={false} 51 - height={30} 52 - meetOrSlice={0} 53 - minX={0} 54 - minY={0} 55 - style={ 56 - Array [ 57 - Object { 58 - "backgroundColor": "transparent", 59 - "borderWidth": 0, 60 - }, 61 - Object { 62 - "flex": 0, 63 - "height": 30, 64 - "width": 30, 65 - }, 66 - ] 67 - } 68 - vbHeight={100} 69 - vbWidth={100} 70 - width={30} 71 - > 72 - <RNSVGGroup> 73 - <RNSVGDefs> 74 - <RNSVGLinearGradient 75 - gradient={ 76 - Array [ 77 - 0, 78 - -1292135, 79 - 1, 80 - -2424577, 81 - ] 82 - } 83 - gradientTransform={null} 84 - gradientUnits={0} 85 - name="grad" 86 - x1="0" 87 - x2="1" 88 - y1="0" 89 - y2="1" 90 - /> 91 - </RNSVGDefs> 92 - <RNSVGCircle 93 - cx="50" 94 - cy="50" 95 - fill={ 96 - Array [ 97 - 1, 98 - "grad", 99 - ] 100 - } 101 - propList={ 102 - Array [ 103 - "fill", 104 - ] 105 - } 106 - r="50" 107 - /> 108 - <RNSVGText 109 - content={null} 110 - dx={Array []} 111 - dy={Array []} 112 - fill={4294967295} 113 - font={ 114 - Object { 115 - "fontSize": "50", 116 - "fontWeight": "bold", 117 - "textAnchor": "middle", 118 - } 119 - } 120 - propList={ 121 - Array [ 122 - "fill", 123 - ] 124 - } 125 - rotate={Array []} 126 - x={ 127 - Array [ 128 - "50", 129 - ] 130 - } 131 - y={ 132 - Array [ 133 - "67", 134 - ] 135 - } 136 - > 137 - <RNSVGTSpan 138 - content="X" 139 - dx={Array []} 140 - dy={Array []} 141 - font={Object {}} 142 - rotate={Array []} 143 - x={Array []} 144 - y={Array []} 145 - /> 146 - </RNSVGText> 147 - </RNSVGGroup> 148 - </RNSVGSvgView> 149 - </View> 150 - <View 151 - pointerEvents="none" 152 - style={ 153 - Object { 154 - "alignItems": "baseline", 155 - "flexDirection": "row", 156 - "marginRight": "auto", 157 - } 158 - } 159 - > 160 - <Text 161 - style={ 162 - Array [ 163 - Object { 164 - "color": "#000000", 165 - }, 166 - Object { 167 - "color": "#000000", 168 - "fontSize": 21, 169 - "fontWeight": "600", 170 - }, 171 - ] 172 - } 173 - > 174 - Members 175 - </Text> 176 - <Text 177 - numberOfLines={1} 178 - style={ 179 - Array [ 180 - Object { 181 - "color": "#000000", 182 - }, 183 - Object { 184 - "color": "#968d8d", 185 - "fontSize": 18, 186 - "marginLeft": 6, 187 - "maxWidth": 200, 188 - }, 189 - ] 190 - } 191 - > 192 - of test name 193 - </Text> 194 - </View> 195 - <View 196 - accessible={true} 197 - collapsable={false} 198 - focusable={true} 199 - hitSlop={ 200 - Object { 201 - "bottom": 10, 202 - "left": 10, 203 - "right": 10, 204 - "top": 10, 205 - } 206 - } 207 - onClick={[Function]} 208 - onResponderGrant={[Function]} 209 - onResponderMove={[Function]} 210 - onResponderRelease={[Function]} 211 - onResponderTerminate={[Function]} 212 - onResponderTerminationRequest={[Function]} 213 - onStartShouldSetResponder={[Function]} 214 - style={ 215 - Object { 216 - "alignItems": "center", 217 - "backgroundColor": "#f8f3f3", 218 - "borderRadius": 20, 219 - "flexDirection": "row", 220 - "height": 36, 221 - "justifyContent": "center", 222 - "opacity": 1, 223 - "width": 36, 224 - } 225 - } 226 - > 227 - < 228 - icon="plus" 229 - size={18} 230 - /> 231 - </View> 232 - <View 233 - accessible={true} 234 - collapsable={false} 235 - focusable={true} 236 - hitSlop={ 237 - Object { 238 - "bottom": 10, 239 - "left": 10, 240 - "right": 10, 241 - "top": 10, 242 - } 243 - } 244 - onClick={[Function]} 245 - onResponderGrant={[Function]} 246 - onResponderMove={[Function]} 247 - onResponderRelease={[Function]} 248 - onResponderTerminate={[Function]} 249 - onResponderTerminationRequest={[Function]} 250 - onStartShouldSetResponder={[Function]} 251 - style={ 252 - Object { 253 - "alignItems": "center", 254 - "backgroundColor": "#f8f3f3", 255 - "borderRadius": 20, 256 - "flexDirection": "row", 257 - "height": 36, 258 - "justifyContent": "center", 259 - "marginLeft": 8, 260 - "opacity": 1, 261 - "width": 36, 262 - } 263 - } 264 - > 265 - <RNSVGSvgView 266 - align="xMidYMid" 267 - bbHeight={18} 268 - bbWidth={18} 269 - color={4278190080} 270 - fill="none" 271 - focusable={false} 272 - height={18} 273 - meetOrSlice={0} 274 - minX={0} 275 - minY={0} 276 - stroke="currentColor" 277 - strokeWidth={3} 278 - style={ 279 - Array [ 280 - Object { 281 - "backgroundColor": "transparent", 282 - "borderWidth": 0, 283 - }, 284 - Object { 285 - "color": "#000000", 286 - "position": "relative", 287 - "top": -1, 288 - }, 289 - Object { 290 - "flex": 0, 291 - "height": 18, 292 - "width": 18, 293 - }, 294 - ] 295 - } 296 - tintColor={4278190080} 297 - vbHeight={24} 298 - vbWidth={24} 299 - width={18} 300 - > 301 - <RNSVGGroup 302 - fill={null} 303 - propList={ 304 - Array [ 305 - "fill", 306 - "stroke", 307 - "strokeWidth", 308 - ] 309 - } 310 - stroke={ 311 - Array [ 312 - 2, 313 - ] 314 - } 315 - strokeWidth={3} 316 - > 317 - <RNSVGPath 318 - d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" 319 - propList={ 320 - Array [ 321 - "strokeLinecap", 322 - "strokeLinejoin", 323 - ] 324 - } 325 - strokeLinecap={1} 326 - strokeLinejoin={1} 327 - /> 328 - </RNSVGGroup> 329 - </RNSVGSvgView> 330 - </View> 331 - <View 332 - accessible={true} 333 - collapsable={false} 334 - focusable={true} 335 - onClick={[Function]} 336 - onResponderGrant={[Function]} 337 - onResponderMove={[Function]} 338 - onResponderRelease={[Function]} 339 - onResponderTerminate={[Function]} 340 - onResponderTerminationRequest={[Function]} 341 - onStartShouldSetResponder={[Function]} 342 - style={ 343 - Object { 344 - "alignItems": "center", 345 - "backgroundColor": "#ffffff", 346 - "borderRadius": 20, 347 - "flexDirection": "row", 348 - "height": 36, 349 - "justifyContent": "center", 350 - "marginLeft": 8, 351 - "opacity": 1, 352 - "width": 36, 353 - } 354 - } 355 - > 356 - < 357 - icon="signal" 358 - size={18} 359 - style={ 360 - Array [ 361 - Object { 362 - "color": "#000000", 363 - }, 364 - ] 365 - } 366 - /> 367 - < 368 - icon="x" 369 - size={12} 370 - style={ 371 - Object { 372 - "backgroundColor": "#ffffff", 373 - "color": "#d1106f", 374 - "left": -4, 375 - "position": "relative", 376 - "top": 6, 377 - } 378 - } 379 - /> 380 - </View> 381 - </View> 382 - <View> 383 - <ActivityIndicator /> 384 - </View> 385 - </View> 386 - `;
-514
__tests__/view/screens/__snapshots__/Search.test.tsx.snap
··· 1 - // Jest Snapshot v1, https://goo.gl/fbAQLP 2 - 3 - exports[`Search renders correctly 1`] = ` 4 - <View 5 - style={ 6 - Object { 7 - "backgroundColor": "#ffffff", 8 - "flex": 1, 9 - } 10 - } 11 - > 12 - <View 13 - style={ 14 - Object { 15 - "alignItems": "center", 16 - "backgroundColor": "#ffffff", 17 - "borderBottomColor": "#f8f3f3", 18 - "borderBottomWidth": 1, 19 - "flexDirection": "row", 20 - "paddingBottom": 6, 21 - "paddingHorizontal": 12, 22 - "paddingTop": 6, 23 - } 24 - } 25 - > 26 - <View 27 - accessible={true} 28 - collapsable={false} 29 - focusable={true} 30 - hitSlop={ 31 - Object { 32 - "bottom": 10, 33 - "left": 10, 34 - "right": 30, 35 - "top": 10, 36 - } 37 - } 38 - onClick={[Function]} 39 - onResponderGrant={[Function]} 40 - onResponderMove={[Function]} 41 - onResponderRelease={[Function]} 42 - onResponderTerminate={[Function]} 43 - onResponderTerminationRequest={[Function]} 44 - onStartShouldSetResponder={[Function]} 45 - style={ 46 - Object { 47 - "height": 30, 48 - "opacity": 1, 49 - "width": 40, 50 - } 51 - } 52 - > 53 - <RNSVGSvgView 54 - align="xMidYMid" 55 - bbHeight={30} 56 - bbWidth={30} 57 - focusable={false} 58 - height={30} 59 - meetOrSlice={0} 60 - minX={0} 61 - minY={0} 62 - style={ 63 - Array [ 64 - Object { 65 - "backgroundColor": "transparent", 66 - "borderWidth": 0, 67 - }, 68 - Object { 69 - "flex": 0, 70 - "height": 30, 71 - "width": 30, 72 - }, 73 - ] 74 - } 75 - vbHeight={100} 76 - vbWidth={100} 77 - width={30} 78 - > 79 - <RNSVGGroup> 80 - <RNSVGDefs> 81 - <RNSVGLinearGradient 82 - gradient={ 83 - Array [ 84 - 0, 85 - -1292135, 86 - 1, 87 - -2424577, 88 - ] 89 - } 90 - gradientTransform={null} 91 - gradientUnits={0} 92 - name="grad" 93 - x1="0" 94 - x2="1" 95 - y1="0" 96 - y2="1" 97 - /> 98 - </RNSVGDefs> 99 - <RNSVGCircle 100 - cx="50" 101 - cy="50" 102 - fill={ 103 - Array [ 104 - 1, 105 - "grad", 106 - ] 107 - } 108 - propList={ 109 - Array [ 110 - "fill", 111 - ] 112 - } 113 - r="50" 114 - /> 115 - <RNSVGText 116 - content={null} 117 - dx={Array []} 118 - dy={Array []} 119 - fill={4294967295} 120 - font={ 121 - Object { 122 - "fontSize": "50", 123 - "fontWeight": "bold", 124 - "textAnchor": "middle", 125 - } 126 - } 127 - propList={ 128 - Array [ 129 - "fill", 130 - ] 131 - } 132 - rotate={Array []} 133 - x={ 134 - Array [ 135 - "50", 136 - ] 137 - } 138 - y={ 139 - Array [ 140 - "67", 141 - ] 142 - } 143 - > 144 - <RNSVGTSpan 145 - content="X" 146 - dx={Array []} 147 - dy={Array []} 148 - font={Object {}} 149 - rotate={Array []} 150 - x={Array []} 151 - y={Array []} 152 - /> 153 - </RNSVGText> 154 - </RNSVGGroup> 155 - </RNSVGSvgView> 156 - </View> 157 - <View 158 - pointerEvents="none" 159 - style={ 160 - Object { 161 - "alignItems": "baseline", 162 - "flexDirection": "row", 163 - "marginRight": "auto", 164 - } 165 - } 166 - > 167 - <Text 168 - style={ 169 - Array [ 170 - Object { 171 - "color": "#000000", 172 - }, 173 - Object { 174 - "color": "#000000", 175 - "fontSize": 21, 176 - "fontWeight": "600", 177 - }, 178 - ] 179 - } 180 - > 181 - Search 182 - </Text> 183 - </View> 184 - <View 185 - accessible={true} 186 - collapsable={false} 187 - focusable={true} 188 - hitSlop={ 189 - Object { 190 - "bottom": 10, 191 - "left": 10, 192 - "right": 10, 193 - "top": 10, 194 - } 195 - } 196 - onClick={[Function]} 197 - onResponderGrant={[Function]} 198 - onResponderMove={[Function]} 199 - onResponderRelease={[Function]} 200 - onResponderTerminate={[Function]} 201 - onResponderTerminationRequest={[Function]} 202 - onStartShouldSetResponder={[Function]} 203 - style={ 204 - Object { 205 - "alignItems": "center", 206 - "backgroundColor": "#f8f3f3", 207 - "borderRadius": 20, 208 - "flexDirection": "row", 209 - "height": 36, 210 - "justifyContent": "center", 211 - "opacity": 1, 212 - "width": 36, 213 - } 214 - } 215 - > 216 - < 217 - icon="plus" 218 - size={18} 219 - /> 220 - </View> 221 - <View 222 - accessible={true} 223 - collapsable={false} 224 - focusable={true} 225 - hitSlop={ 226 - Object { 227 - "bottom": 10, 228 - "left": 10, 229 - "right": 10, 230 - "top": 10, 231 - } 232 - } 233 - onClick={[Function]} 234 - onResponderGrant={[Function]} 235 - onResponderMove={[Function]} 236 - onResponderRelease={[Function]} 237 - onResponderTerminate={[Function]} 238 - onResponderTerminationRequest={[Function]} 239 - onStartShouldSetResponder={[Function]} 240 - style={ 241 - Object { 242 - "alignItems": "center", 243 - "backgroundColor": "#f8f3f3", 244 - "borderRadius": 20, 245 - "flexDirection": "row", 246 - "height": 36, 247 - "justifyContent": "center", 248 - "marginLeft": 8, 249 - "opacity": 1, 250 - "width": 36, 251 - } 252 - } 253 - > 254 - <RNSVGSvgView 255 - align="xMidYMid" 256 - bbHeight={18} 257 - bbWidth={18} 258 - color={4278190080} 259 - fill="none" 260 - focusable={false} 261 - height={18} 262 - meetOrSlice={0} 263 - minX={0} 264 - minY={0} 265 - stroke="currentColor" 266 - strokeWidth={3} 267 - style={ 268 - Array [ 269 - Object { 270 - "backgroundColor": "transparent", 271 - "borderWidth": 0, 272 - }, 273 - Object { 274 - "color": "#000000", 275 - "position": "relative", 276 - "top": -1, 277 - }, 278 - Object { 279 - "flex": 0, 280 - "height": 18, 281 - "width": 18, 282 - }, 283 - ] 284 - } 285 - tintColor={4278190080} 286 - vbHeight={24} 287 - vbWidth={24} 288 - width={18} 289 - > 290 - <RNSVGGroup 291 - fill={null} 292 - propList={ 293 - Array [ 294 - "fill", 295 - "stroke", 296 - "strokeWidth", 297 - ] 298 - } 299 - stroke={ 300 - Array [ 301 - 2, 302 - ] 303 - } 304 - strokeWidth={3} 305 - > 306 - <RNSVGPath 307 - d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" 308 - propList={ 309 - Array [ 310 - "strokeLinecap", 311 - "strokeLinejoin", 312 - ] 313 - } 314 - strokeLinecap={1} 315 - strokeLinejoin={1} 316 - /> 317 - </RNSVGGroup> 318 - </RNSVGSvgView> 319 - </View> 320 - <View 321 - accessible={true} 322 - collapsable={false} 323 - focusable={true} 324 - onClick={[Function]} 325 - onResponderGrant={[Function]} 326 - onResponderMove={[Function]} 327 - onResponderRelease={[Function]} 328 - onResponderTerminate={[Function]} 329 - onResponderTerminationRequest={[Function]} 330 - onStartShouldSetResponder={[Function]} 331 - style={ 332 - Object { 333 - "alignItems": "center", 334 - "backgroundColor": "#ffffff", 335 - "borderRadius": 20, 336 - "flexDirection": "row", 337 - "height": 36, 338 - "justifyContent": "center", 339 - "marginLeft": 8, 340 - "opacity": 1, 341 - "width": 36, 342 - } 343 - } 344 - > 345 - < 346 - icon="signal" 347 - size={18} 348 - style={ 349 - Array [ 350 - Object { 351 - "color": "#000000", 352 - }, 353 - ] 354 - } 355 - /> 356 - < 357 - icon="x" 358 - size={12} 359 - style={ 360 - Object { 361 - "backgroundColor": "#ffffff", 362 - "color": "#d1106f", 363 - "left": -4, 364 - "position": "relative", 365 - "top": 6, 366 - } 367 - } 368 - /> 369 - </View> 370 - </View> 371 - <View 372 - style={ 373 - Object { 374 - "borderBottomColor": "#f8f3f3", 375 - "borderBottomWidth": 1, 376 - "flexDirection": "row", 377 - "paddingHorizontal": 16, 378 - "paddingVertical": 16, 379 - } 380 - } 381 - > 382 - <RNSVGSvgView 383 - align="xMidYMid" 384 - bbHeight={24} 385 - bbWidth={24} 386 - color={4290886073} 387 - fill="none" 388 - focusable={false} 389 - height={24} 390 - meetOrSlice={0} 391 - minX={0} 392 - minY={0} 393 - stroke="currentColor" 394 - strokeWidth={2} 395 - style={ 396 - Array [ 397 - Object { 398 - "backgroundColor": "transparent", 399 - "borderWidth": 0, 400 - }, 401 - Object { 402 - "alignSelf": "center", 403 - "color": "#c1b9b9", 404 - "marginRight": 10, 405 - }, 406 - Object { 407 - "flex": 0, 408 - "height": 24, 409 - "width": 24, 410 - }, 411 - ] 412 - } 413 - tintColor={4290886073} 414 - vbHeight={24} 415 - vbWidth={24} 416 - width={24} 417 - > 418 - <RNSVGGroup 419 - fill={null} 420 - propList={ 421 - Array [ 422 - "fill", 423 - "stroke", 424 - "strokeWidth", 425 - ] 426 - } 427 - stroke={ 428 - Array [ 429 - 2, 430 - ] 431 - } 432 - strokeWidth={2} 433 - > 434 - <RNSVGPath 435 - d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" 436 - propList={ 437 - Array [ 438 - "strokeLinecap", 439 - "strokeLinejoin", 440 - ] 441 - } 442 - strokeLinecap={1} 443 - strokeLinejoin={1} 444 - /> 445 - </RNSVGGroup> 446 - </RNSVGSvgView> 447 - <TextInput 448 - onChangeText={[Function]} 449 - placeholder="Type your query here..." 450 - placeholderTextColor="#968d8d" 451 - returnKeyType="search" 452 - selectTextOnFocus={true} 453 - style={ 454 - Object { 455 - "color": "#000000", 456 - "flex": 1, 457 - "fontSize": 16, 458 - } 459 - } 460 - /> 461 - </View> 462 - <View 463 - style={ 464 - Object { 465 - "backgroundColor": "#f8f3f3", 466 - "flex": 1, 467 - } 468 - } 469 - > 470 - <View 471 - style={ 472 - Object { 473 - "flex": 1, 474 - } 475 - } 476 - > 477 - <View 478 - style={ 479 - Object { 480 - "backgroundColor": "#f8f3f3", 481 - "flex": 1, 482 - } 483 - } 484 - > 485 - <RCTScrollView 486 - data={Array []} 487 - getItem={[Function]} 488 - getItemCount={[Function]} 489 - keyExtractor={[Function]} 490 - onContentSizeChange={[Function]} 491 - onLayout={[Function]} 492 - onMomentumScrollBegin={[Function]} 493 - onMomentumScrollEnd={[Function]} 494 - onScroll={[Function]} 495 - onScrollBeginDrag={[Function]} 496 - onScrollEndDrag={[Function]} 497 - removeClippedSubviews={false} 498 - renderItem={[Function]} 499 - scrollEventThrottle={50} 500 - stickyHeaderIndices={Array []} 501 - style={ 502 - Object { 503 - "flex": 1, 504 - } 505 - } 506 - viewabilityConfigCallbackPairs={Array []} 507 - > 508 - <View /> 509 - </RCTScrollView> 510 - </View> 511 - </View> 512 - </View> 513 - </View> 514 - `;
-631
__tests__/view/screens/__snapshots__/Settings.test.tsx.snap
··· 1 - // Jest Snapshot v1, https://goo.gl/fbAQLP 2 - 3 - exports[`Settings renders correctly 1`] = ` 4 - <View 5 - style={ 6 - Array [ 7 - Object { 8 - "flex": 1, 9 - }, 10 - ] 11 - } 12 - > 13 - <View 14 - style={ 15 - Object { 16 - "alignItems": "center", 17 - "backgroundColor": "#ffffff", 18 - "borderBottomColor": "#f8f3f3", 19 - "borderBottomWidth": 1, 20 - "flexDirection": "row", 21 - "paddingBottom": 6, 22 - "paddingHorizontal": 12, 23 - "paddingTop": 6, 24 - } 25 - } 26 - > 27 - <View 28 - accessible={true} 29 - collapsable={false} 30 - focusable={true} 31 - hitSlop={ 32 - Object { 33 - "bottom": 10, 34 - "left": 10, 35 - "right": 30, 36 - "top": 10, 37 - } 38 - } 39 - onClick={[Function]} 40 - onResponderGrant={[Function]} 41 - onResponderMove={[Function]} 42 - onResponderRelease={[Function]} 43 - onResponderTerminate={[Function]} 44 - onResponderTerminationRequest={[Function]} 45 - onStartShouldSetResponder={[Function]} 46 - style={ 47 - Object { 48 - "height": 30, 49 - "opacity": 1, 50 - "width": 40, 51 - } 52 - } 53 - > 54 - <RNSVGSvgView 55 - align="xMidYMid" 56 - bbHeight={30} 57 - bbWidth={30} 58 - focusable={false} 59 - height={30} 60 - meetOrSlice={0} 61 - minX={0} 62 - minY={0} 63 - style={ 64 - Array [ 65 - Object { 66 - "backgroundColor": "transparent", 67 - "borderWidth": 0, 68 - }, 69 - Object { 70 - "flex": 0, 71 - "height": 30, 72 - "width": 30, 73 - }, 74 - ] 75 - } 76 - vbHeight={100} 77 - vbWidth={100} 78 - width={30} 79 - > 80 - <RNSVGGroup> 81 - <RNSVGDefs> 82 - <RNSVGLinearGradient 83 - gradient={ 84 - Array [ 85 - 0, 86 - -1292135, 87 - 1, 88 - -2424577, 89 - ] 90 - } 91 - gradientTransform={null} 92 - gradientUnits={0} 93 - name="grad" 94 - x1="0" 95 - x2="1" 96 - y1="0" 97 - y2="1" 98 - /> 99 - </RNSVGDefs> 100 - <RNSVGCircle 101 - cx="50" 102 - cy="50" 103 - fill={ 104 - Array [ 105 - 1, 106 - "grad", 107 - ] 108 - } 109 - propList={ 110 - Array [ 111 - "fill", 112 - ] 113 - } 114 - r="50" 115 - /> 116 - <RNSVGText 117 - content={null} 118 - dx={Array []} 119 - dy={Array []} 120 - fill={4294967295} 121 - font={ 122 - Object { 123 - "fontSize": "50", 124 - "fontWeight": "bold", 125 - "textAnchor": "middle", 126 - } 127 - } 128 - propList={ 129 - Array [ 130 - "fill", 131 - ] 132 - } 133 - rotate={Array []} 134 - x={ 135 - Array [ 136 - "50", 137 - ] 138 - } 139 - y={ 140 - Array [ 141 - "67", 142 - ] 143 - } 144 - > 145 - <RNSVGTSpan 146 - content="X" 147 - dx={Array []} 148 - dy={Array []} 149 - font={Object {}} 150 - rotate={Array []} 151 - x={Array []} 152 - y={Array []} 153 - /> 154 - </RNSVGText> 155 - </RNSVGGroup> 156 - </RNSVGSvgView> 157 - </View> 158 - <View 159 - pointerEvents="none" 160 - style={ 161 - Object { 162 - "alignItems": "baseline", 163 - "flexDirection": "row", 164 - "marginRight": "auto", 165 - } 166 - } 167 - > 168 - <Text 169 - style={ 170 - Array [ 171 - Object { 172 - "color": "#000000", 173 - }, 174 - Object { 175 - "color": "#000000", 176 - "fontSize": 21, 177 - "fontWeight": "600", 178 - }, 179 - ] 180 - } 181 - > 182 - Settings 183 - </Text> 184 - </View> 185 - <View 186 - accessible={true} 187 - collapsable={false} 188 - focusable={true} 189 - hitSlop={ 190 - Object { 191 - "bottom": 10, 192 - "left": 10, 193 - "right": 10, 194 - "top": 10, 195 - } 196 - } 197 - onClick={[Function]} 198 - onResponderGrant={[Function]} 199 - onResponderMove={[Function]} 200 - onResponderRelease={[Function]} 201 - onResponderTerminate={[Function]} 202 - onResponderTerminationRequest={[Function]} 203 - onStartShouldSetResponder={[Function]} 204 - style={ 205 - Object { 206 - "alignItems": "center", 207 - "backgroundColor": "#f8f3f3", 208 - "borderRadius": 20, 209 - "flexDirection": "row", 210 - "height": 36, 211 - "justifyContent": "center", 212 - "opacity": 1, 213 - "width": 36, 214 - } 215 - } 216 - > 217 - < 218 - icon="plus" 219 - size={18} 220 - /> 221 - </View> 222 - <View 223 - accessible={true} 224 - collapsable={false} 225 - focusable={true} 226 - hitSlop={ 227 - Object { 228 - "bottom": 10, 229 - "left": 10, 230 - "right": 10, 231 - "top": 10, 232 - } 233 - } 234 - onClick={[Function]} 235 - onResponderGrant={[Function]} 236 - onResponderMove={[Function]} 237 - onResponderRelease={[Function]} 238 - onResponderTerminate={[Function]} 239 - onResponderTerminationRequest={[Function]} 240 - onStartShouldSetResponder={[Function]} 241 - style={ 242 - Object { 243 - "alignItems": "center", 244 - "backgroundColor": "#f8f3f3", 245 - "borderRadius": 20, 246 - "flexDirection": "row", 247 - "height": 36, 248 - "justifyContent": "center", 249 - "marginLeft": 8, 250 - "opacity": 1, 251 - "width": 36, 252 - } 253 - } 254 - > 255 - <RNSVGSvgView 256 - align="xMidYMid" 257 - bbHeight={18} 258 - bbWidth={18} 259 - color={4278190080} 260 - fill="none" 261 - focusable={false} 262 - height={18} 263 - meetOrSlice={0} 264 - minX={0} 265 - minY={0} 266 - stroke="currentColor" 267 - strokeWidth={3} 268 - style={ 269 - Array [ 270 - Object { 271 - "backgroundColor": "transparent", 272 - "borderWidth": 0, 273 - }, 274 - Object { 275 - "color": "#000000", 276 - "position": "relative", 277 - "top": -1, 278 - }, 279 - Object { 280 - "flex": 0, 281 - "height": 18, 282 - "width": 18, 283 - }, 284 - ] 285 - } 286 - tintColor={4278190080} 287 - vbHeight={24} 288 - vbWidth={24} 289 - width={18} 290 - > 291 - <RNSVGGroup 292 - fill={null} 293 - propList={ 294 - Array [ 295 - "fill", 296 - "stroke", 297 - "strokeWidth", 298 - ] 299 - } 300 - stroke={ 301 - Array [ 302 - 2, 303 - ] 304 - } 305 - strokeWidth={3} 306 - > 307 - <RNSVGPath 308 - d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" 309 - propList={ 310 - Array [ 311 - "strokeLinecap", 312 - "strokeLinejoin", 313 - ] 314 - } 315 - strokeLinecap={1} 316 - strokeLinejoin={1} 317 - /> 318 - </RNSVGGroup> 319 - </RNSVGSvgView> 320 - </View> 321 - <View 322 - accessible={true} 323 - collapsable={false} 324 - focusable={true} 325 - onClick={[Function]} 326 - onResponderGrant={[Function]} 327 - onResponderMove={[Function]} 328 - onResponderRelease={[Function]} 329 - onResponderTerminate={[Function]} 330 - onResponderTerminationRequest={[Function]} 331 - onStartShouldSetResponder={[Function]} 332 - style={ 333 - Object { 334 - "alignItems": "center", 335 - "backgroundColor": "#ffffff", 336 - "borderRadius": 20, 337 - "flexDirection": "row", 338 - "height": 36, 339 - "justifyContent": "center", 340 - "marginLeft": 8, 341 - "opacity": 1, 342 - "width": 36, 343 - } 344 - } 345 - > 346 - < 347 - icon="signal" 348 - size={18} 349 - style={ 350 - Array [ 351 - Object { 352 - "color": "#000000", 353 - }, 354 - ] 355 - } 356 - /> 357 - < 358 - icon="x" 359 - size={12} 360 - style={ 361 - Object { 362 - "backgroundColor": "#ffffff", 363 - "color": "#d1106f", 364 - "left": -4, 365 - "position": "relative", 366 - "top": 6, 367 - } 368 - } 369 - /> 370 - </View> 371 - </View> 372 - <View 373 - style={ 374 - Array [ 375 - Object { 376 - "marginTop": 10, 377 - }, 378 - Object { 379 - "paddingLeft": 10, 380 - }, 381 - Object { 382 - "paddingRight": 10, 383 - }, 384 - ] 385 - } 386 - > 387 - <View 388 - style={ 389 - Array [ 390 - Object { 391 - "flexDirection": "row", 392 - }, 393 - ] 394 - } 395 - > 396 - <Text 397 - style={ 398 - Array [ 399 - Object { 400 - "color": "#000000", 401 - }, 402 - Object { 403 - "color": "#000000", 404 - }, 405 - ] 406 - } 407 - > 408 - Signed in as 409 - </Text> 410 - <View 411 - style={ 412 - Object { 413 - "flex": 1, 414 - } 415 - } 416 - /> 417 - <View 418 - accessible={true} 419 - collapsable={false} 420 - focusable={true} 421 - onClick={[Function]} 422 - onResponderGrant={[Function]} 423 - onResponderMove={[Function]} 424 - onResponderRelease={[Function]} 425 - onResponderTerminate={[Function]} 426 - onResponderTerminationRequest={[Function]} 427 - onStartShouldSetResponder={[Function]} 428 - style={ 429 - Object { 430 - "opacity": 1, 431 - } 432 - } 433 - > 434 - <Text 435 - style={ 436 - Array [ 437 - Object { 438 - "color": "#000000", 439 - }, 440 - Array [ 441 - Object { 442 - "color": "#0085ff", 443 - }, 444 - Object { 445 - "fontWeight": "bold", 446 - }, 447 - ], 448 - ] 449 - } 450 - > 451 - Sign out 452 - </Text> 453 - </View> 454 - </View> 455 - <View 456 - accessible={true} 457 - focusable={true} 458 - onClick={[Function]} 459 - onResponderGrant={[Function]} 460 - onResponderMove={[Function]} 461 - onResponderRelease={[Function]} 462 - onResponderTerminate={[Function]} 463 - onResponderTerminationRequest={[Function]} 464 - onStartShouldSetResponder={[Function]} 465 - > 466 - <View 467 - style={ 468 - Object { 469 - "backgroundColor": "#ffffff", 470 - "borderRadius": 4, 471 - "flexDirection": "row", 472 - "marginVertical": 6, 473 - "paddingHorizontal": 10, 474 - "paddingVertical": 10, 475 - } 476 - } 477 - > 478 - <RNSVGSvgView 479 - align="xMidYMid" 480 - bbHeight={40} 481 - bbWidth={40} 482 - focusable={false} 483 - height={40} 484 - meetOrSlice={0} 485 - minX={0} 486 - minY={0} 487 - style={ 488 - Array [ 489 - Object { 490 - "backgroundColor": "transparent", 491 - "borderWidth": 0, 492 - }, 493 - Object { 494 - "flex": 0, 495 - "height": 40, 496 - "width": 40, 497 - }, 498 - ] 499 - } 500 - vbHeight={100} 501 - vbWidth={100} 502 - width={40} 503 - > 504 - <RNSVGGroup> 505 - <RNSVGDefs> 506 - <RNSVGLinearGradient 507 - gradient={ 508 - Array [ 509 - 0, 510 - -1292135, 511 - 1, 512 - -2424577, 513 - ] 514 - } 515 - gradientTransform={null} 516 - gradientUnits={0} 517 - name="grad" 518 - x1="0" 519 - x2="1" 520 - y1="0" 521 - y2="1" 522 - /> 523 - </RNSVGDefs> 524 - <RNSVGCircle 525 - cx="50" 526 - cy="50" 527 - fill={ 528 - Array [ 529 - 1, 530 - "grad", 531 - ] 532 - } 533 - propList={ 534 - Array [ 535 - "fill", 536 - ] 537 - } 538 - r="50" 539 - /> 540 - <RNSVGText 541 - content={null} 542 - dx={Array []} 543 - dy={Array []} 544 - fill={4294967295} 545 - font={ 546 - Object { 547 - "fontSize": "50", 548 - "fontWeight": "bold", 549 - "textAnchor": "middle", 550 - } 551 - } 552 - propList={ 553 - Array [ 554 - "fill", 555 - ] 556 - } 557 - rotate={Array []} 558 - x={ 559 - Array [ 560 - "50", 561 - ] 562 - } 563 - y={ 564 - Array [ 565 - "67", 566 - ] 567 - } 568 - > 569 - <RNSVGTSpan 570 - content="X" 571 - dx={Array []} 572 - dy={Array []} 573 - font={Object {}} 574 - rotate={Array []} 575 - x={Array []} 576 - y={Array []} 577 - /> 578 - </RNSVGText> 579 - </RNSVGGroup> 580 - </RNSVGSvgView> 581 - <View 582 - style={ 583 - Array [ 584 - Object { 585 - "marginLeft": 10, 586 - }, 587 - ] 588 - } 589 - > 590 - <Text 591 - style={ 592 - Array [ 593 - Object { 594 - "color": "#000000", 595 - }, 596 - Array [ 597 - Object { 598 - "fontSize": 18, 599 - }, 600 - Object { 601 - "color": "#000000", 602 - }, 603 - ], 604 - ] 605 - } 606 - > 607 - 608 - </Text> 609 - <Text 610 - style={ 611 - Array [ 612 - Object { 613 - "color": "#000000", 614 - }, 615 - Array [ 616 - Object { 617 - "color": "#645454", 618 - }, 619 - ], 620 - ] 621 - } 622 - > 623 - @ 624 - 625 - </Text> 626 - </View> 627 - </View> 628 - </View> 629 - </View> 630 - </View> 631 - `;
-23
__tests__/view/shell/mobile/Composer.test.tsx
··· 1 - import React from 'react' 2 - import {Composer} from '../../../../src/view/shell/mobile/Composer' 3 - import renderer from 'react-test-renderer' 4 - // import {render} from '../../../../jest/test-utils' 5 - 6 - describe('Composer', () => { 7 - const mockedProps = { 8 - active: true, 9 - winHeight: 844, 10 - replyTo: { 11 - author: {avatar: undefined, displayName: 'Alice', handle: 'alice.test'}, 12 - cid: 'bafyreieucrv36ylxrut4dr4jj264q2jj2vt2vfvhjfchgw3vua4gksvzia', 13 - text: 'Captain, maybe we ought to turn on the searchlights now. No… that’s just what they’ll be expecting us to do.', 14 - uri: 'at://did:plc:v3xz273ea2dzjpu2szsjzfue/app.bsky.feed.post/3jkcir3fhqv2u', 15 - }, 16 - onPost: jest.fn(), 17 - onClose: jest.fn(), 18 - } 19 - it('renders correctly', () => { 20 - const tree = renderer.create(<Composer {...mockedProps} />).toJSON() 21 - expect(tree).toMatchSnapshot() 22 - }) 23 - })
+61 -6
__tests__/view/shell/mobile/Menu.test.tsx
··· 1 1 import React from 'react' 2 2 import {Menu} from '../../../../src/view/shell/mobile/Menu' 3 - import renderer from 'react-test-renderer' 4 - // import {render} from '../../../../jest/test-utils' 3 + import {cleanup, fireEvent, render} from '../../../../jest/test-utils' 4 + import { 5 + mockedNavigationStore, 6 + mockedShellStore, 7 + } from '../../../../__mocks__/state-mock' 5 8 6 9 describe('Menu', () => { 10 + const onCloseMock = jest.fn() 11 + 7 12 const mockedProps = { 8 13 visible: true, 9 - onClose: jest.fn(), 14 + onClose: onCloseMock, 10 15 } 11 - it('renders correctly', () => { 12 - const tree = renderer.create(<Menu {...mockedProps} />).toJSON() 13 - expect(tree).toMatchSnapshot() 16 + 17 + afterAll(() => { 18 + jest.clearAllMocks() 19 + cleanup() 20 + }) 21 + 22 + it('renders menu', () => { 23 + const {getByTestId} = render(<Menu {...mockedProps} />) 24 + 25 + const menuView = getByTestId('menuView') 26 + 27 + expect(menuView).toBeTruthy() 28 + }) 29 + 30 + it('presses profile card button', () => { 31 + const {getByTestId} = render(<Menu {...mockedProps} />) 32 + 33 + const profileCardButton = getByTestId('profileCardButton') 34 + fireEvent.press(profileCardButton) 35 + 36 + expect(onCloseMock).toHaveBeenCalled() 37 + expect(mockedNavigationStore.switchTo).toHaveBeenCalledWith(0, true) 38 + }) 39 + 40 + it('presses search button', () => { 41 + const {getByTestId} = render(<Menu {...mockedProps} />) 42 + 43 + const searchBtn = getByTestId('searchBtn') 44 + fireEvent.press(searchBtn) 45 + 46 + expect(onCloseMock).toHaveBeenCalled() 47 + expect(mockedNavigationStore.switchTo).toHaveBeenCalledWith(0, true) 48 + expect(mockedNavigationStore.navigate).toHaveBeenCalledWith('/search') 49 + }) 50 + 51 + it("presses notifications menu item' button", () => { 52 + const {getAllByTestId} = render(<Menu {...mockedProps} />) 53 + 54 + const menuItemButton = getAllByTestId('menuItemButton') 55 + fireEvent.press(menuItemButton[1]) 56 + 57 + expect(onCloseMock).toHaveBeenCalled() 58 + expect(mockedNavigationStore.switchTo).toHaveBeenCalledWith(1, true) 59 + }) 60 + 61 + it('presses new scene button', () => { 62 + const {getAllByTestId} = render(<Menu {...mockedProps} />) 63 + 64 + const menuItemButton = getAllByTestId('menuItemButton') 65 + fireEvent.press(menuItemButton[3]) 66 + 67 + expect(onCloseMock).toHaveBeenCalled() 68 + expect(mockedShellStore.openModal).toHaveBeenCalled() 14 69 }) 15 70 })
+89 -7
__tests__/view/shell/mobile/TabsSelector.test.tsx
··· 1 1 import React from 'react' 2 - import {Animated} from 'react-native' 3 - import renderer from 'react-test-renderer' 2 + import {Animated, Share} from 'react-native' 4 3 import {TabsSelector} from '../../../../src/view/shell/mobile/TabsSelector' 5 - // import {render} from '../../../../jest/test-utils' 4 + import {cleanup, fireEvent, render} from '../../../../jest/test-utils' 5 + import {mockedNavigationStore} from '../../../../__mocks__/state-mock' 6 6 7 7 describe('TabsSelector', () => { 8 + const onCloseMock = jest.fn() 9 + 8 10 const mockedProps = { 9 11 active: true, 10 12 tabMenuInterp: new Animated.Value(0), 11 - onClose: jest.fn(), 13 + onClose: onCloseMock, 12 14 } 13 - it('renders correctly', () => { 14 - const tree = renderer.create(<TabsSelector {...mockedProps} />).toJSON() 15 - expect(tree).toMatchSnapshot() 15 + 16 + afterAll(() => { 17 + jest.clearAllMocks() 18 + cleanup() 19 + }) 20 + 21 + it('renders tabs selector', () => { 22 + const {getByTestId} = render(<TabsSelector {...mockedProps} />) 23 + 24 + const tabsSelectorView = getByTestId('tabsSelectorView') 25 + 26 + expect(tabsSelectorView).toBeTruthy() 27 + }) 28 + 29 + it('renders nothing if inactive', () => { 30 + const {getByTestId} = render( 31 + <TabsSelector {...{...mockedProps, active: false}} />, 32 + ) 33 + 34 + const emptyView = getByTestId('emptyView') 35 + 36 + expect(emptyView).toBeTruthy() 37 + }) 38 + 39 + it('presses share button', () => { 40 + const shareSpy = jest.spyOn(Share, 'share') 41 + const {getByTestId} = render(<TabsSelector {...mockedProps} />) 42 + 43 + const shareButton = getByTestId('shareButton') 44 + fireEvent.press(shareButton) 45 + 46 + expect(onCloseMock).toHaveBeenCalled() 47 + expect(shareSpy).toHaveBeenCalledWith({url: 'https://bsky.app/'}) 48 + }) 49 + 50 + it('presses clone button', () => { 51 + const {getByTestId} = render(<TabsSelector {...mockedProps} />) 52 + 53 + const cloneButton = getByTestId('cloneButton') 54 + fireEvent.press(cloneButton) 55 + 56 + expect(onCloseMock).toHaveBeenCalled() 57 + expect(mockedNavigationStore.newTab).toHaveBeenCalled() 58 + }) 59 + 60 + it('presses new tab button', () => { 61 + const {getByTestId} = render(<TabsSelector {...mockedProps} />) 62 + 63 + const newTabButton = getByTestId('newTabButton') 64 + fireEvent.press(newTabButton) 65 + 66 + expect(onCloseMock).toHaveBeenCalled() 67 + expect(mockedNavigationStore.newTab).toHaveBeenCalledWith('/') 68 + }) 69 + 70 + it('presses change tab button', () => { 71 + const {getAllByTestId} = render(<TabsSelector {...mockedProps} />) 72 + 73 + const changeTabButton = getAllByTestId('changeTabButton') 74 + fireEvent.press(changeTabButton[0]) 75 + 76 + expect(onCloseMock).toHaveBeenCalled() 77 + expect(mockedNavigationStore.newTab).toHaveBeenCalledWith('/') 78 + }) 79 + 80 + it('presses close tab button', () => { 81 + const {getAllByTestId} = render(<TabsSelector {...mockedProps} />) 82 + 83 + const closeTabButton = getAllByTestId('closeTabButton') 84 + fireEvent.press(closeTabButton[0]) 85 + 86 + expect(onCloseMock).toHaveBeenCalled() 87 + expect(mockedNavigationStore.setActiveTab).toHaveBeenCalledWith(0) 88 + }) 89 + 90 + it('presses swipes to close the tab', () => { 91 + const {getByTestId} = render(<TabsSelector {...mockedProps} />) 92 + 93 + const tabsSwipable = getByTestId('tabsSwipable') 94 + fireEvent(tabsSwipable, 'swipeableRightOpen') 95 + 96 + expect(onCloseMock).toHaveBeenCalled() 97 + expect(mockedNavigationStore.setActiveTab).toHaveBeenCalledWith(0) 16 98 }) 17 99 })
-659
__tests__/view/shell/mobile/__snapshots__/Composer.test.tsx.snap
··· 1 - // Jest Snapshot v1, https://goo.gl/fbAQLP 2 - 3 - exports[`Composer renders correctly 1`] = ` 4 - <View 5 - collapsable={false} 6 - style={ 7 - Object { 8 - "backgroundColor": "#fff", 9 - "bottom": 0, 10 - "paddingTop": 24, 11 - "position": "absolute", 12 - "top": 0, 13 - "transform": Array [ 14 - Object { 15 - "translateY": 844, 16 - }, 17 - ], 18 - "width": "100%", 19 - } 20 - } 21 - > 22 - <View 23 - onLayout={[Function]} 24 - style={ 25 - Array [ 26 - Object { 27 - "backgroundColor": "#fff", 28 - "flex": 1, 29 - "flexDirection": "column", 30 - "height": "100%", 31 - "padding": 15, 32 - "paddingBottom": 0, 33 - }, 34 - Object { 35 - "paddingBottom": 0, 36 - }, 37 - ] 38 - } 39 - > 40 - <RCTSafeAreaView 41 - emulateUnlessSupported={true} 42 - style={ 43 - Object { 44 - "flex": 1, 45 - } 46 - } 47 - > 48 - <View 49 - style={ 50 - Object { 51 - "alignItems": "center", 52 - "flexDirection": "row", 53 - "height": 55, 54 - "paddingBottom": 10, 55 - "paddingHorizontal": 5, 56 - } 57 - } 58 - > 59 - <View 60 - accessible={true} 61 - collapsable={false} 62 - focusable={true} 63 - onClick={[Function]} 64 - onResponderGrant={[Function]} 65 - onResponderMove={[Function]} 66 - onResponderRelease={[Function]} 67 - onResponderTerminate={[Function]} 68 - onResponderTerminationRequest={[Function]} 69 - onStartShouldSetResponder={[Function]} 70 - style={ 71 - Object { 72 - "opacity": 1, 73 - } 74 - } 75 - > 76 - <Text 77 - style={ 78 - Array [ 79 - Object { 80 - "color": "#000000", 81 - }, 82 - Array [ 83 - Object { 84 - "color": "#0085ff", 85 - }, 86 - Object { 87 - "fontSize": 18, 88 - }, 89 - ], 90 - ] 91 - } 92 - > 93 - Cancel 94 - </Text> 95 - </View> 96 - <View 97 - style={ 98 - Object { 99 - "flex": 1, 100 - } 101 - } 102 - /> 103 - <View 104 - accessible={true} 105 - collapsable={false} 106 - focusable={true} 107 - onClick={[Function]} 108 - onResponderGrant={[Function]} 109 - onResponderMove={[Function]} 110 - onResponderRelease={[Function]} 111 - onResponderTerminate={[Function]} 112 - onResponderTerminationRequest={[Function]} 113 - onStartShouldSetResponder={[Function]} 114 - style={ 115 - Object { 116 - "opacity": 1, 117 - } 118 - } 119 - > 120 - <BVLinearGradient 121 - colors={ 122 - Array [ 123 - 4292542719, 124 - 4294901882, 125 - ] 126 - } 127 - endPoint={ 128 - Object { 129 - "x": 1, 130 - "y": 1, 131 - } 132 - } 133 - locations={null} 134 - startPoint={ 135 - Object { 136 - "x": 0, 137 - "y": 0, 138 - } 139 - } 140 - style={ 141 - Object { 142 - "borderRadius": 20, 143 - "paddingHorizontal": 20, 144 - "paddingVertical": 6, 145 - } 146 - } 147 - > 148 - <Text 149 - style={ 150 - Array [ 151 - Object { 152 - "color": "#000000", 153 - }, 154 - Array [ 155 - Object { 156 - "color": "#ffffff", 157 - }, 158 - Object { 159 - "fontSize": 16, 160 - }, 161 - Object { 162 - "fontWeight": "bold", 163 - }, 164 - ], 165 - ] 166 - } 167 - > 168 - Reply 169 - </Text> 170 - </BVLinearGradient> 171 - </View> 172 - </View> 173 - <RCTScrollView 174 - style={ 175 - Object { 176 - "flex": 1, 177 - } 178 - } 179 - > 180 - <View> 181 - <View 182 - style={ 183 - Object { 184 - "borderTopColor": "#e4e2e2", 185 - "borderTopWidth": 1, 186 - "flexDirection": "row", 187 - "paddingBottom": 16, 188 - "paddingTop": 16, 189 - } 190 - } 191 - > 192 - <RNSVGSvgView 193 - align="xMidYMid" 194 - bbHeight={50} 195 - bbWidth={50} 196 - focusable={false} 197 - height={50} 198 - meetOrSlice={0} 199 - minX={0} 200 - minY={0} 201 - style={ 202 - Array [ 203 - Object { 204 - "backgroundColor": "transparent", 205 - "borderWidth": 0, 206 - }, 207 - Object { 208 - "flex": 0, 209 - "height": 50, 210 - "width": 50, 211 - }, 212 - ] 213 - } 214 - vbHeight={100} 215 - vbWidth={100} 216 - width={50} 217 - > 218 - <RNSVGGroup> 219 - <RNSVGDefs> 220 - <RNSVGLinearGradient 221 - gradient={ 222 - Array [ 223 - 0, 224 - -16742913, 225 - 1, 226 - -14631929, 227 - ] 228 - } 229 - gradientTransform={null} 230 - gradientUnits={0} 231 - name="grad" 232 - x1="0" 233 - x2="1" 234 - y1="0" 235 - y2="1" 236 - /> 237 - </RNSVGDefs> 238 - <RNSVGCircle 239 - cx="50" 240 - cy="50" 241 - fill={ 242 - Array [ 243 - 1, 244 - "grad", 245 - ] 246 - } 247 - propList={ 248 - Array [ 249 - "fill", 250 - ] 251 - } 252 - r="50" 253 - /> 254 - <RNSVGText 255 - content={null} 256 - dx={Array []} 257 - dy={Array []} 258 - fill={4294967295} 259 - font={ 260 - Object { 261 - "fontSize": "50", 262 - "fontWeight": "bold", 263 - "textAnchor": "middle", 264 - } 265 - } 266 - propList={ 267 - Array [ 268 - "fill", 269 - ] 270 - } 271 - rotate={Array []} 272 - x={ 273 - Array [ 274 - "50", 275 - ] 276 - } 277 - y={ 278 - Array [ 279 - "67", 280 - ] 281 - } 282 - > 283 - <RNSVGTSpan 284 - content="A" 285 - dx={Array []} 286 - dy={Array []} 287 - font={Object {}} 288 - rotate={Array []} 289 - x={Array []} 290 - y={Array []} 291 - /> 292 - </RNSVGText> 293 - </RNSVGGroup> 294 - </RNSVGSvgView> 295 - <View 296 - style={ 297 - Object { 298 - "flex": 1, 299 - "paddingLeft": 13, 300 - "paddingRight": 8, 301 - } 302 - } 303 - > 304 - <Text 305 - onLongPress={[Function]} 306 - onPress={[Function]} 307 - style={ 308 - Array [ 309 - Object { 310 - "color": "#000000", 311 - }, 312 - Array [ 313 - Object { 314 - "fontSize": 16, 315 - }, 316 - Object { 317 - "fontWeight": "bold", 318 - }, 319 - Object { 320 - "color": "#000000", 321 - }, 322 - ], 323 - ] 324 - } 325 - > 326 - Alice 327 - </Text> 328 - <Text 329 - numberOfLines={6} 330 - style={ 331 - Array [ 332 - Object { 333 - "color": "#000000", 334 - }, 335 - Array [ 336 - Object { 337 - "fontSize": 16, 338 - }, 339 - Object { 340 - "lineHeight": 20.8, 341 - }, 342 - Object { 343 - "color": "#000000", 344 - }, 345 - ], 346 - ] 347 - } 348 - > 349 - Captain, maybe we ought to turn on the searchlights now. No… that’s just what they’ll be expecting us to do. 350 - </Text> 351 - </View> 352 - </View> 353 - <View 354 - style={ 355 - Array [ 356 - Object { 357 - "borderTopColor": "#e4e2e2", 358 - "borderTopWidth": 1, 359 - "flexDirection": "row", 360 - "paddingTop": 16, 361 - }, 362 - Object { 363 - "flex": 1, 364 - }, 365 - ] 366 - } 367 - > 368 - <RNSVGSvgView 369 - align="xMidYMid" 370 - bbHeight={50} 371 - bbWidth={50} 372 - focusable={false} 373 - height={50} 374 - meetOrSlice={0} 375 - minX={0} 376 - minY={0} 377 - style={ 378 - Array [ 379 - Object { 380 - "backgroundColor": "transparent", 381 - "borderWidth": 0, 382 - }, 383 - Object { 384 - "flex": 0, 385 - "height": 50, 386 - "width": 50, 387 - }, 388 - ] 389 - } 390 - vbHeight={100} 391 - vbWidth={100} 392 - width={50} 393 - > 394 - <RNSVGGroup> 395 - <RNSVGDefs> 396 - <RNSVGLinearGradient 397 - gradient={ 398 - Array [ 399 - 0, 400 - -1292135, 401 - 1, 402 - -2424577, 403 - ] 404 - } 405 - gradientTransform={null} 406 - gradientUnits={0} 407 - name="grad" 408 - x1="0" 409 - x2="1" 410 - y1="0" 411 - y2="1" 412 - /> 413 - </RNSVGDefs> 414 - <RNSVGCircle 415 - cx="50" 416 - cy="50" 417 - fill={ 418 - Array [ 419 - 1, 420 - "grad", 421 - ] 422 - } 423 - propList={ 424 - Array [ 425 - "fill", 426 - ] 427 - } 428 - r="50" 429 - /> 430 - <RNSVGText 431 - content={null} 432 - dx={Array []} 433 - dy={Array []} 434 - fill={4294967295} 435 - font={ 436 - Object { 437 - "fontSize": "50", 438 - "fontWeight": "bold", 439 - "textAnchor": "middle", 440 - } 441 - } 442 - propList={ 443 - Array [ 444 - "fill", 445 - ] 446 - } 447 - rotate={Array []} 448 - x={ 449 - Array [ 450 - "50", 451 - ] 452 - } 453 - y={ 454 - Array [ 455 - "67", 456 - ] 457 - } 458 - > 459 - <RNSVGTSpan 460 - content="X" 461 - dx={Array []} 462 - dy={Array []} 463 - font={Object {}} 464 - rotate={Array []} 465 - x={Array []} 466 - y={Array []} 467 - /> 468 - </RNSVGText> 469 - </RNSVGGroup> 470 - </RNSVGSvgView> 471 - <TextInput 472 - multiline={true} 473 - onChangeText={[Function]} 474 - placeholder="Write your reply" 475 - placeholderTextColor="#968d8d" 476 - scrollEnabled={true} 477 - style={ 478 - Object { 479 - "alignSelf": "flex-start", 480 - "color": "#000000", 481 - "flex": 1, 482 - "fontSize": 18, 483 - "marginLeft": 8, 484 - "padding": 5, 485 - } 486 - } 487 - /> 488 - </View> 489 - </View> 490 - </RCTScrollView> 491 - <View 492 - style={ 493 - Object { 494 - "alignItems": "center", 495 - "backgroundColor": "#ffffff", 496 - "borderTopColor": "#e4e2e2", 497 - "borderTopWidth": 1, 498 - "flexDirection": "row", 499 - "paddingRight": 5, 500 - "paddingVertical": 10, 501 - } 502 - } 503 - > 504 - <View 505 - accessible={true} 506 - collapsable={false} 507 - focusable={true} 508 - hitSlop={ 509 - Object { 510 - "bottom": 10, 511 - "left": 10, 512 - "right": 10, 513 - "top": 10, 514 - } 515 - } 516 - onClick={[Function]} 517 - onResponderGrant={[Function]} 518 - onResponderMove={[Function]} 519 - onResponderRelease={[Function]} 520 - onResponderTerminate={[Function]} 521 - onResponderTerminationRequest={[Function]} 522 - onStartShouldSetResponder={[Function]} 523 - style={ 524 - Object { 525 - "opacity": 1, 526 - "paddingLeft": 5, 527 - } 528 - } 529 - > 530 - < 531 - icon={ 532 - Array [ 533 - "far", 534 - "image", 535 - ] 536 - } 537 - size={24} 538 - style={ 539 - Object { 540 - "color": "#0085ff", 541 - } 542 - } 543 - /> 544 - </View> 545 - <View 546 - style={ 547 - Object { 548 - "flex": 1, 549 - } 550 - } 551 - /> 552 - <Text 553 - style={ 554 - Array [ 555 - Object { 556 - "color": "#000000", 557 - }, 558 - Array [ 559 - Object { 560 - "marginRight": 10, 561 - }, 562 - Object { 563 - "color": undefined, 564 - }, 565 - ], 566 - ] 567 - } 568 - > 569 - 256 570 - </Text> 571 - <View> 572 - <View 573 - indeterminateAnimationDuration={1000} 574 - style={ 575 - Array [ 576 - Object { 577 - "backgroundColor": "transparent", 578 - "overflow": "hidden", 579 - }, 580 - undefined, 581 - ] 582 - } 583 - > 584 - <RNSVGSvgView 585 - bbHeight={30} 586 - bbWidth={30} 587 - collapsable={false} 588 - focusable={false} 589 - height={30} 590 - style={ 591 - Array [ 592 - Object { 593 - "backgroundColor": "transparent", 594 - "borderWidth": 0, 595 - }, 596 - Object {}, 597 - Object { 598 - "flex": 0, 599 - "height": 30, 600 - "width": 30, 601 - }, 602 - ] 603 - } 604 - width={30} 605 - > 606 - <RNSVGGroup> 607 - <RNSVGPath 608 - d="M15 2.5 609 - A12.5 12.5 0 0 1 15 2.5" 610 - propList={ 611 - Array [ 612 - "stroke", 613 - "strokeWidth", 614 - "strokeLinecap", 615 - ] 616 - } 617 - stroke={4278221567} 618 - strokeLinecap={0} 619 - strokeWidth={3} 620 - /> 621 - <RNSVGPath 622 - d="M15 0.5 623 - a14.5 14.5 0 0 1 0 29 624 - a14.5 14.5 0 0 1 0 -29" 625 - propList={ 626 - Array [ 627 - "stroke", 628 - "strokeWidth", 629 - "strokeLinecap", 630 - ] 631 - } 632 - stroke={4293190370} 633 - strokeLinecap={0} 634 - strokeWidth={1} 635 - /> 636 - </RNSVGGroup> 637 - </RNSVGSvgView> 638 - </View> 639 - </View> 640 - </View> 641 - <View 642 - collapsable={false} 643 - style={ 644 - Object { 645 - "backgroundColor": "#ffffff", 646 - "borderTopColor": "#e4e2e2", 647 - "borderTopWidth": 1, 648 - "bottom": 0, 649 - "left": 0, 650 - "position": "absolute", 651 - "right": 0, 652 - "top": 1334, 653 - } 654 - } 655 - /> 656 - </RCTSafeAreaView> 657 - </View> 658 - </View> 659 - `;
-837
__tests__/view/shell/mobile/__snapshots__/Menu.test.tsx.snap
··· 1 - // Jest Snapshot v1, https://goo.gl/fbAQLP 2 - 3 - exports[`Menu renders correctly 1`] = ` 4 - <View 5 - style={ 6 - Object { 7 - "backgroundColor": "#ffffff", 8 - "flex": 1, 9 - } 10 - } 11 - > 12 - <View 13 - accessible={true} 14 - collapsable={false} 15 - focusable={true} 16 - onClick={[Function]} 17 - onResponderGrant={[Function]} 18 - onResponderMove={[Function]} 19 - onResponderRelease={[Function]} 20 - onResponderTerminate={[Function]} 21 - onResponderTerminationRequest={[Function]} 22 - onStartShouldSetResponder={[Function]} 23 - style={ 24 - Object { 25 - "alignItems": "center", 26 - "flexDirection": "row", 27 - "margin": 10, 28 - "marginBottom": 6, 29 - "opacity": 1, 30 - } 31 - } 32 - > 33 - <RNSVGSvgView 34 - align="xMidYMid" 35 - bbHeight={60} 36 - bbWidth={60} 37 - focusable={false} 38 - height={60} 39 - meetOrSlice={0} 40 - minX={0} 41 - minY={0} 42 - style={ 43 - Array [ 44 - Object { 45 - "backgroundColor": "transparent", 46 - "borderWidth": 0, 47 - }, 48 - Object { 49 - "flex": 0, 50 - "height": 60, 51 - "width": 60, 52 - }, 53 - ] 54 - } 55 - vbHeight={100} 56 - vbWidth={100} 57 - width={60} 58 - > 59 - <RNSVGGroup> 60 - <RNSVGDefs> 61 - <RNSVGLinearGradient 62 - gradient={ 63 - Array [ 64 - 0, 65 - -1292135, 66 - 1, 67 - -2424577, 68 - ] 69 - } 70 - gradientTransform={null} 71 - gradientUnits={0} 72 - name="grad" 73 - x1="0" 74 - x2="1" 75 - y1="0" 76 - y2="1" 77 - /> 78 - </RNSVGDefs> 79 - <RNSVGCircle 80 - cx="50" 81 - cy="50" 82 - fill={ 83 - Array [ 84 - 1, 85 - "grad", 86 - ] 87 - } 88 - propList={ 89 - Array [ 90 - "fill", 91 - ] 92 - } 93 - r="50" 94 - /> 95 - <RNSVGText 96 - content={null} 97 - dx={Array []} 98 - dy={Array []} 99 - fill={4294967295} 100 - font={ 101 - Object { 102 - "fontSize": "50", 103 - "fontWeight": "bold", 104 - "textAnchor": "middle", 105 - } 106 - } 107 - propList={ 108 - Array [ 109 - "fill", 110 - ] 111 - } 112 - rotate={Array []} 113 - x={ 114 - Array [ 115 - "50", 116 - ] 117 - } 118 - y={ 119 - Array [ 120 - "67", 121 - ] 122 - } 123 - > 124 - <RNSVGTSpan 125 - content="X" 126 - dx={Array []} 127 - dy={Array []} 128 - font={Object {}} 129 - rotate={Array []} 130 - x={Array []} 131 - y={Array []} 132 - /> 133 - </RNSVGText> 134 - </RNSVGGroup> 135 - </RNSVGSvgView> 136 - <View 137 - style={ 138 - Object { 139 - "flex": 1, 140 - } 141 - } 142 - > 143 - <Text 144 - style={ 145 - Array [ 146 - Object { 147 - "color": "#000000", 148 - }, 149 - Object { 150 - "color": "#2D2626", 151 - "fontSize": 24, 152 - "fontWeight": "bold", 153 - "marginLeft": 12, 154 - }, 155 - ] 156 - } 157 - > 158 - 159 - </Text> 160 - <Text 161 - style={ 162 - Array [ 163 - Object { 164 - "color": "#000000", 165 - }, 166 - Object { 167 - "color": "#423737", 168 - "fontSize": 18, 169 - "marginLeft": 12, 170 - }, 171 - ] 172 - } 173 - > 174 - 175 - </Text> 176 - </View> 177 - </View> 178 - <View 179 - accessible={true} 180 - collapsable={false} 181 - focusable={true} 182 - onClick={[Function]} 183 - onResponderGrant={[Function]} 184 - onResponderMove={[Function]} 185 - onResponderRelease={[Function]} 186 - onResponderTerminate={[Function]} 187 - onResponderTerminationRequest={[Function]} 188 - onStartShouldSetResponder={[Function]} 189 - style={ 190 - Object { 191 - "backgroundColor": "#f8f3f3", 192 - "borderRadius": 8, 193 - "flexDirection": "row", 194 - "margin": 10, 195 - "marginBottom": 0, 196 - "opacity": 1, 197 - "paddingHorizontal": 12, 198 - "paddingVertical": 10, 199 - } 200 - } 201 - > 202 - <RNSVGSvgView 203 - align="xMidYMid" 204 - bbHeight={25} 205 - bbWidth={25} 206 - color={4284765268} 207 - fill="none" 208 - focusable={false} 209 - height={25} 210 - meetOrSlice={0} 211 - minX={0} 212 - minY={0} 213 - stroke="currentColor" 214 - strokeWidth={2} 215 - style={ 216 - Array [ 217 - Object { 218 - "backgroundColor": "transparent", 219 - "borderWidth": 0, 220 - }, 221 - Object { 222 - "color": "#645454", 223 - }, 224 - Object { 225 - "flex": 0, 226 - "height": 25, 227 - "width": 25, 228 - }, 229 - ] 230 - } 231 - tintColor={4284765268} 232 - vbHeight={24} 233 - vbWidth={24} 234 - width={25} 235 - > 236 - <RNSVGGroup 237 - fill={null} 238 - propList={ 239 - Array [ 240 - "fill", 241 - "stroke", 242 - "strokeWidth", 243 - ] 244 - } 245 - stroke={ 246 - Array [ 247 - 2, 248 - ] 249 - } 250 - strokeWidth={2} 251 - > 252 - <RNSVGPath 253 - d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" 254 - propList={ 255 - Array [ 256 - "strokeLinecap", 257 - "strokeLinejoin", 258 - ] 259 - } 260 - strokeLinecap={1} 261 - strokeLinejoin={1} 262 - /> 263 - </RNSVGGroup> 264 - </RNSVGSvgView> 265 - <Text 266 - style={ 267 - Array [ 268 - Object { 269 - "color": "#000000", 270 - }, 271 - Object { 272 - "color": "#423737", 273 - "fontSize": 19, 274 - "marginLeft": 8, 275 - }, 276 - ] 277 - } 278 - > 279 - Search 280 - </Text> 281 - </View> 282 - <View 283 - style={ 284 - Object { 285 - "borderBottomColor": "#f8f3f3", 286 - "borderBottomWidth": 1, 287 - "paddingBottom": 10, 288 - "paddingHorizontal": 10, 289 - "paddingTop": 10, 290 - } 291 - } 292 - > 293 - <View 294 - accessible={true} 295 - collapsable={false} 296 - focusable={true} 297 - onClick={[Function]} 298 - onResponderGrant={[Function]} 299 - onResponderMove={[Function]} 300 - onResponderRelease={[Function]} 301 - onResponderTerminate={[Function]} 302 - onResponderTerminationRequest={[Function]} 303 - onStartShouldSetResponder={[Function]} 304 - style={ 305 - Object { 306 - "alignItems": "center", 307 - "flexDirection": "row", 308 - "opacity": 1, 309 - "paddingHorizontal": 6, 310 - "paddingVertical": 8, 311 - } 312 - } 313 - > 314 - <View 315 - style={ 316 - Array [ 317 - Object { 318 - "alignItems": "center", 319 - "height": 36, 320 - "justifyContent": "center", 321 - "marginRight": 12, 322 - "width": 36, 323 - }, 324 - ] 325 - } 326 - > 327 - <RNSVGSvgView 328 - align="xMidYMid" 329 - bbHeight="26" 330 - bbWidth="26" 331 - color={4282529591} 332 - focusable={false} 333 - height="26" 334 - meetOrSlice={0} 335 - minX={0} 336 - minY={0} 337 - stroke="currentColor" 338 - style={ 339 - Array [ 340 - Object { 341 - "backgroundColor": "transparent", 342 - "borderWidth": 0, 343 - }, 344 - Object { 345 - "color": "#423737", 346 - }, 347 - Object { 348 - "flex": 0, 349 - "height": 26, 350 - "width": 26, 351 - }, 352 - ] 353 - } 354 - tintColor={4282529591} 355 - vbHeight={48} 356 - vbWidth={48} 357 - width="26" 358 - > 359 - <RNSVGGroup 360 - propList={ 361 - Array [ 362 - "stroke", 363 - ] 364 - } 365 - stroke={ 366 - Array [ 367 - 2, 368 - ] 369 - } 370 - > 371 - <RNSVGPath 372 - d="M 23.951 2 C 23.631 2.011 23.323 2.124 23.072 2.322 L 8.859 13.52 C 7.055 14.941 6 17.114 6 19.41 L 6 38.5 C 6 39.864 7.136 41 8.5 41 L 18.5 41 C 19.864 41 21 39.864 21 38.5 L 21 28.5 C 21 28.205 21.205 28 21.5 28 L 26.5 28 C 26.795 28 27 28.205 27 28.5 L 27 38.5 C 27 39.864 28.136 41 29.5 41 L 39.5 41 C 40.864 41 42 39.864 42 38.5 L 42 19.41 C 42 17.114 40.945 14.941 39.141 13.52 L 24.928 2.322 C 24.65 2.103 24.304 1.989 23.951 2 Z" 373 - propList={ 374 - Array [ 375 - "strokeWidth", 376 - ] 377 - } 378 - strokeWidth={4} 379 - /> 380 - </RNSVGGroup> 381 - </RNSVGSvgView> 382 - </View> 383 - <Text 384 - numberOfLines={1} 385 - style={ 386 - Array [ 387 - Object { 388 - "color": "#000000", 389 - }, 390 - Array [ 391 - Object { 392 - "color": "#2D2626", 393 - "fontSize": 19, 394 - }, 395 - undefined, 396 - ], 397 - ] 398 - } 399 - > 400 - Home 401 - </Text> 402 - </View> 403 - <View 404 - accessible={true} 405 - collapsable={false} 406 - focusable={true} 407 - onClick={[Function]} 408 - onResponderGrant={[Function]} 409 - onResponderMove={[Function]} 410 - onResponderRelease={[Function]} 411 - onResponderTerminate={[Function]} 412 - onResponderTerminationRequest={[Function]} 413 - onStartShouldSetResponder={[Function]} 414 - style={ 415 - Object { 416 - "alignItems": "center", 417 - "flexDirection": "row", 418 - "opacity": 1, 419 - "paddingHorizontal": 6, 420 - "paddingVertical": 8, 421 - } 422 - } 423 - > 424 - <View 425 - style={ 426 - Array [ 427 - Object { 428 - "alignItems": "center", 429 - "height": 36, 430 - "justifyContent": "center", 431 - "marginRight": 12, 432 - "width": 36, 433 - }, 434 - ] 435 - } 436 - > 437 - <RNSVGSvgView 438 - align="xMidYMid" 439 - bbHeight="28" 440 - bbWidth="28" 441 - color={4282529591} 442 - fill="none" 443 - focusable={false} 444 - height="28" 445 - meetOrSlice={0} 446 - minX={0} 447 - minY={0} 448 - style={ 449 - Array [ 450 - Object { 451 - "backgroundColor": "transparent", 452 - "borderWidth": 0, 453 - }, 454 - Object { 455 - "color": "#423737", 456 - }, 457 - Object { 458 - "flex": 0, 459 - "height": 28, 460 - "width": 28, 461 - }, 462 - ] 463 - } 464 - tintColor={4282529591} 465 - vbHeight={24} 466 - vbWidth={24} 467 - width="28" 468 - > 469 - <RNSVGGroup 470 - fill={null} 471 - propList={ 472 - Array [ 473 - "fill", 474 - ] 475 - } 476 - > 477 - <RNSVGPath 478 - d="M0 0h24v24H0z" 479 - fill={null} 480 - propList={ 481 - Array [ 482 - "fill", 483 - ] 484 - } 485 - /> 486 - <RNSVGPath 487 - d="M20 17h2v2H2v-2h2v-7a8 8 0 1 1 16 0v7zm-2 0v-7a6 6 0 1 0-12 0v7h12zm-9 4h6v2H9v-2z" 488 - fill={ 489 - Array [ 490 - 2, 491 - ] 492 - } 493 - propList={ 494 - Array [ 495 - "fill", 496 - ] 497 - } 498 - /> 499 - </RNSVGGroup> 500 - </RNSVGSvgView> 501 - </View> 502 - <Text 503 - numberOfLines={1} 504 - style={ 505 - Array [ 506 - Object { 507 - "color": "#000000", 508 - }, 509 - Array [ 510 - Object { 511 - "color": "#2D2626", 512 - "fontSize": 19, 513 - }, 514 - undefined, 515 - ], 516 - ] 517 - } 518 - > 519 - Notifications 520 - </Text> 521 - </View> 522 - </View> 523 - <View 524 - style={ 525 - Object { 526 - "borderBottomColor": "#f8f3f3", 527 - "borderBottomWidth": 1, 528 - "paddingBottom": 10, 529 - "paddingHorizontal": 10, 530 - "paddingTop": 10, 531 - } 532 - } 533 - > 534 - <Text 535 - style={ 536 - Array [ 537 - Object { 538 - "color": "#000000", 539 - }, 540 - Object { 541 - "fontSize": 16, 542 - "fontWeight": "bold", 543 - "paddingHorizontal": 4, 544 - "paddingVertical": 8, 545 - }, 546 - ] 547 - } 548 - > 549 - Scenes 550 - </Text> 551 - </View> 552 - <View 553 - style={ 554 - Object { 555 - "borderBottomColor": "#f8f3f3", 556 - "borderBottomWidth": 1, 557 - "paddingBottom": 10, 558 - "paddingHorizontal": 10, 559 - "paddingTop": 10, 560 - } 561 - } 562 - > 563 - <View 564 - accessible={true} 565 - collapsable={false} 566 - focusable={true} 567 - onClick={[Function]} 568 - onResponderGrant={[Function]} 569 - onResponderMove={[Function]} 570 - onResponderRelease={[Function]} 571 - onResponderTerminate={[Function]} 572 - onResponderTerminationRequest={[Function]} 573 - onStartShouldSetResponder={[Function]} 574 - style={ 575 - Object { 576 - "alignItems": "center", 577 - "flexDirection": "row", 578 - "opacity": 1, 579 - "paddingHorizontal": 6, 580 - "paddingVertical": 8, 581 - } 582 - } 583 - > 584 - <View 585 - style={ 586 - Array [ 587 - Object { 588 - "alignItems": "center", 589 - "height": 36, 590 - "justifyContent": "center", 591 - "marginRight": 12, 592 - "width": 36, 593 - }, 594 - ] 595 - } 596 - > 597 - <RNSVGSvgView 598 - align="xMidYMid" 599 - bbHeight="30" 600 - bbWidth="30" 601 - color={4282529591} 602 - fill="none" 603 - focusable={false} 604 - height="30" 605 - meetOrSlice={0} 606 - minX={0} 607 - minY={0} 608 - stroke="currentColor" 609 - strokeWidth={2} 610 - style={ 611 - Array [ 612 - Object { 613 - "backgroundColor": "transparent", 614 - "borderWidth": 0, 615 - }, 616 - Object { 617 - "color": "#423737", 618 - }, 619 - Object { 620 - "flex": 0, 621 - "height": 30, 622 - "width": 30, 623 - }, 624 - ] 625 - } 626 - tintColor={4282529591} 627 - vbHeight={24} 628 - vbWidth={24} 629 - width="30" 630 - > 631 - <RNSVGGroup 632 - fill={null} 633 - propList={ 634 - Array [ 635 - "fill", 636 - "stroke", 637 - "strokeWidth", 638 - ] 639 - } 640 - stroke={ 641 - Array [ 642 - 2, 643 - ] 644 - } 645 - strokeWidth={2} 646 - > 647 - <RNSVGPath 648 - d="M18 18.72a9.094 9.094 0 003.741-.479 3 3 0 00-4.682-2.72m.94 3.198l.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0112 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 016 18.719m12 0a5.971 5.971 0 00-.941-3.197m0 0A5.995 5.995 0 0012 12.75a5.995 5.995 0 00-5.058 2.772m0 0a3 3 0 00-4.681 2.72 8.986 8.986 0 003.74.477m.94-3.197a5.971 5.971 0 00-.94 3.197M15 6.75a3 3 0 11-6 0 3 3 0 016 0zm6 3a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0zm-13.5 0a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0z" 649 - propList={ 650 - Array [ 651 - "strokeLinecap", 652 - "strokeLinejoin", 653 - ] 654 - } 655 - strokeLinecap={1} 656 - strokeLinejoin={1} 657 - /> 658 - </RNSVGGroup> 659 - </RNSVGSvgView> 660 - </View> 661 - <Text 662 - numberOfLines={1} 663 - style={ 664 - Array [ 665 - Object { 666 - "color": "#000000", 667 - }, 668 - Array [ 669 - Object { 670 - "color": "#2D2626", 671 - "fontSize": 19, 672 - }, 673 - undefined, 674 - ], 675 - ] 676 - } 677 - > 678 - Create a scene 679 - </Text> 680 - </View> 681 - <View 682 - accessible={true} 683 - collapsable={false} 684 - focusable={true} 685 - onClick={[Function]} 686 - onResponderGrant={[Function]} 687 - onResponderMove={[Function]} 688 - onResponderRelease={[Function]} 689 - onResponderTerminate={[Function]} 690 - onResponderTerminationRequest={[Function]} 691 - onStartShouldSetResponder={[Function]} 692 - style={ 693 - Object { 694 - "alignItems": "center", 695 - "flexDirection": "row", 696 - "opacity": 1, 697 - "paddingHorizontal": 6, 698 - "paddingVertical": 8, 699 - } 700 - } 701 - > 702 - <View 703 - style={ 704 - Array [ 705 - Object { 706 - "alignItems": "center", 707 - "height": 36, 708 - "justifyContent": "center", 709 - "marginRight": 12, 710 - "width": 36, 711 - }, 712 - ] 713 - } 714 - > 715 - <RNSVGSvgView 716 - align="xMidYMid" 717 - bbHeight="30" 718 - bbWidth="30" 719 - color={4282529591} 720 - fill="none" 721 - focusable={false} 722 - height="30" 723 - meetOrSlice={0} 724 - minX={0} 725 - minY={0} 726 - stroke="currentColor" 727 - strokeWidth={2} 728 - style={ 729 - Array [ 730 - Object { 731 - "backgroundColor": "transparent", 732 - "borderWidth": 0, 733 - }, 734 - Object { 735 - "color": "#423737", 736 - }, 737 - Object { 738 - "flex": 0, 739 - "height": 30, 740 - "width": 30, 741 - }, 742 - ] 743 - } 744 - tintColor={4282529591} 745 - vbHeight={24} 746 - vbWidth={24} 747 - width="30" 748 - > 749 - <RNSVGGroup 750 - fill={null} 751 - propList={ 752 - Array [ 753 - "fill", 754 - "stroke", 755 - "strokeWidth", 756 - ] 757 - } 758 - stroke={ 759 - Array [ 760 - 2, 761 - ] 762 - } 763 - strokeWidth={2} 764 - > 765 - <RNSVGPath 766 - d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z" 767 - propList={ 768 - Array [ 769 - "strokeLinecap", 770 - "strokeLinejoin", 771 - ] 772 - } 773 - strokeLinecap={1} 774 - strokeLinejoin={1} 775 - /> 776 - <RNSVGPath 777 - d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" 778 - propList={ 779 - Array [ 780 - "strokeLinecap", 781 - "strokeLinejoin", 782 - ] 783 - } 784 - strokeLinecap={1} 785 - strokeLinejoin={1} 786 - /> 787 - </RNSVGGroup> 788 - </RNSVGSvgView> 789 - </View> 790 - <Text 791 - numberOfLines={1} 792 - style={ 793 - Array [ 794 - Object { 795 - "color": "#000000", 796 - }, 797 - Array [ 798 - Object { 799 - "color": "#2D2626", 800 - "fontSize": 19, 801 - }, 802 - undefined, 803 - ], 804 - ] 805 - } 806 - > 807 - Settings 808 - </Text> 809 - </View> 810 - </View> 811 - <View 812 - style={ 813 - Object { 814 - "paddingHorizontal": 14, 815 - "paddingVertical": 18, 816 - } 817 - } 818 - > 819 - <Text 820 - style={ 821 - Array [ 822 - Object { 823 - "color": "#000000", 824 - }, 825 - Object { 826 - "color": "#968d8d", 827 - }, 828 - ] 829 - } 830 - > 831 - Build version 832 - ( 833 - ) 834 - </Text> 835 - </View> 836 - </View> 837 - `;
-651
__tests__/view/shell/mobile/__snapshots__/TabsSelector.test.tsx.snap
··· 1 - // Jest Snapshot v1, https://goo.gl/fbAQLP 2 - 3 - exports[`TabsSelector renders correctly 1`] = ` 4 - <View 5 - collapsable={false} 6 - style={ 7 - Object { 8 - "backgroundColor": "#fff", 9 - "borderTopColor": "#e4e2e2", 10 - "borderTopWidth": 1, 11 - "bottom": 55, 12 - "height": 320, 13 - "opacity": 1, 14 - "position": "absolute", 15 - "transform": Array [ 16 - Object { 17 - "translateY": 320, 18 - }, 19 - ], 20 - "width": "100%", 21 - } 22 - } 23 - > 24 - <View 25 - onLayout={[Function]} 26 - > 27 - <View 28 - style={ 29 - Array [ 30 - Object { 31 - "padding": 10, 32 - }, 33 - Object { 34 - "borderBottomColor": "#e4e2e2", 35 - "borderBottomWidth": 1, 36 - }, 37 - ] 38 - } 39 - > 40 - <View 41 - style={ 42 - Object { 43 - "flexDirection": "row", 44 - "paddingTop": 2, 45 - } 46 - } 47 - > 48 - <View 49 - accessible={true} 50 - focusable={true} 51 - onClick={[Function]} 52 - onResponderGrant={[Function]} 53 - onResponderMove={[Function]} 54 - onResponderRelease={[Function]} 55 - onResponderTerminate={[Function]} 56 - onResponderTerminationRequest={[Function]} 57 - onStartShouldSetResponder={[Function]} 58 - style={ 59 - Array [ 60 - Object { 61 - "alignItems": "center", 62 - "backgroundColor": "#f8f3f3", 63 - "borderRadius": 4, 64 - "flex": 1, 65 - "flexDirection": "row", 66 - "justifyContent": "center", 67 - "marginRight": 5, 68 - "paddingLeft": 12, 69 - "paddingRight": 16, 70 - "paddingVertical": 10, 71 - }, 72 - ] 73 - } 74 - > 75 - <View 76 - style={ 77 - Object { 78 - "marginRight": 8, 79 - } 80 - } 81 - > 82 - < 83 - icon="share" 84 - size={16} 85 - /> 86 - </View> 87 - <Text 88 - style={ 89 - Array [ 90 - Object { 91 - "color": "#000000", 92 - }, 93 - Object { 94 - "fontSize": 16, 95 - "fontWeight": "500", 96 - }, 97 - ] 98 - } 99 - > 100 - Share 101 - </Text> 102 - </View> 103 - <View 104 - accessible={true} 105 - focusable={true} 106 - onClick={[Function]} 107 - onResponderGrant={[Function]} 108 - onResponderMove={[Function]} 109 - onResponderRelease={[Function]} 110 - onResponderTerminate={[Function]} 111 - onResponderTerminationRequest={[Function]} 112 - onStartShouldSetResponder={[Function]} 113 - style={ 114 - Array [ 115 - Object { 116 - "alignItems": "center", 117 - "backgroundColor": "#f8f3f3", 118 - "borderRadius": 4, 119 - "flex": 1, 120 - "flexDirection": "row", 121 - "justifyContent": "center", 122 - "marginRight": 5, 123 - "paddingLeft": 12, 124 - "paddingRight": 16, 125 - "paddingVertical": 10, 126 - }, 127 - ] 128 - } 129 - > 130 - <View 131 - style={ 132 - Object { 133 - "marginRight": 8, 134 - } 135 - } 136 - > 137 - < 138 - icon={ 139 - Array [ 140 - "far", 141 - "clone", 142 - ] 143 - } 144 - size={16} 145 - /> 146 - </View> 147 - <Text 148 - style={ 149 - Array [ 150 - Object { 151 - "color": "#000000", 152 - }, 153 - Object { 154 - "fontSize": 16, 155 - "fontWeight": "500", 156 - }, 157 - ] 158 - } 159 - > 160 - Clone tab 161 - </Text> 162 - </View> 163 - <View 164 - accessible={true} 165 - focusable={true} 166 - onClick={[Function]} 167 - onResponderGrant={[Function]} 168 - onResponderMove={[Function]} 169 - onResponderRelease={[Function]} 170 - onResponderTerminate={[Function]} 171 - onResponderTerminationRequest={[Function]} 172 - onStartShouldSetResponder={[Function]} 173 - style={ 174 - Array [ 175 - Object { 176 - "alignItems": "center", 177 - "backgroundColor": "#f8f3f3", 178 - "borderRadius": 4, 179 - "flex": 1, 180 - "flexDirection": "row", 181 - "justifyContent": "center", 182 - "marginRight": 5, 183 - "paddingLeft": 12, 184 - "paddingRight": 16, 185 - "paddingVertical": 10, 186 - }, 187 - ] 188 - } 189 - > 190 - <View 191 - style={ 192 - Object { 193 - "marginRight": 8, 194 - } 195 - } 196 - > 197 - < 198 - icon="plus" 199 - size={16} 200 - /> 201 - </View> 202 - <Text 203 - style={ 204 - Array [ 205 - Object { 206 - "color": "#000000", 207 - }, 208 - Object { 209 - "fontSize": 16, 210 - "fontWeight": "500", 211 - }, 212 - ] 213 - } 214 - > 215 - New tab 216 - </Text> 217 - </View> 218 - </View> 219 - </View> 220 - <View 221 - style={ 222 - Array [ 223 - Object { 224 - "padding": 10, 225 - }, 226 - Object { 227 - "borderBottomColor": "#e4e2e2", 228 - "borderBottomWidth": 1, 229 - }, 230 - Object { 231 - "backgroundColor": "#f8f3f3", 232 - }, 233 - ] 234 - } 235 - > 236 - <RCTScrollView 237 - style={ 238 - Object { 239 - "height": 240, 240 - } 241 - } 242 - > 243 - <View> 244 - <View 245 - collapsable={false} 246 - forwardedRef={[Function]} 247 - handlerTag={1} 248 - handlerType="PanGestureHandler" 249 - onGestureHandlerEvent={[Function]} 250 - onGestureHandlerStateChange={[Function]} 251 - onLayout={[Function]} 252 - style={ 253 - Object { 254 - "overflow": "hidden", 255 - } 256 - } 257 - > 258 - <View 259 - collapsable={false} 260 - style={ 261 - Object { 262 - "bottom": 0, 263 - "flexDirection": "row", 264 - "left": 0, 265 - "position": "absolute", 266 - "right": 0, 267 - "top": 0, 268 - "transform": Array [ 269 - Object { 270 - "translateX": -10000, 271 - }, 272 - ], 273 - } 274 - } 275 - > 276 - <View 277 - style={ 278 - Array [ 279 - Object { 280 - "padding": 2, 281 - }, 282 - ] 283 - } 284 - /> 285 - <View 286 - onLayout={[Function]} 287 - /> 288 - </View> 289 - <View 290 - collapsable={false} 291 - style={ 292 - Object { 293 - "bottom": 0, 294 - "flexDirection": "row-reverse", 295 - "left": 0, 296 - "position": "absolute", 297 - "right": 0, 298 - "top": 0, 299 - "transform": Array [ 300 - Object { 301 - "translateX": -10000, 302 - }, 303 - ], 304 - } 305 - } 306 - > 307 - <View 308 - style={ 309 - Array [ 310 - Object { 311 - "padding": 2, 312 - }, 313 - ] 314 - } 315 - /> 316 - <View 317 - onLayout={[Function]} 318 - /> 319 - </View> 320 - <View 321 - collapsable={false} 322 - forwardedRef={[Function]} 323 - handlerTag={2} 324 - handlerType="TapGestureHandler" 325 - onGestureHandlerEvent={[Function]} 326 - onGestureHandlerStateChange={[Function]} 327 - pointerEvents="auto" 328 - style={ 329 - Object { 330 - "transform": Array [ 331 - Object { 332 - "translateX": -0, 333 - }, 334 - ], 335 - } 336 - } 337 - > 338 - <View 339 - collapsable={false} 340 - style={ 341 - Object { 342 - "height": 46, 343 - "overflow": "hidden", 344 - } 345 - } 346 - > 347 - <View 348 - collapsable={false} 349 - forwardedRef={[Function]} 350 - style={ 351 - Object { 352 - "alignItems": "center", 353 - "backgroundColor": "#ffffff", 354 - "borderColor": "#000000", 355 - "borderRadius": 4, 356 - "borderWidth": 1, 357 - "flexDirection": "row", 358 - "height": 42, 359 - } 360 - } 361 - > 362 - <View 363 - accessible={true} 364 - focusable={true} 365 - onClick={[Function]} 366 - onResponderGrant={[Function]} 367 - onResponderMove={[Function]} 368 - onResponderRelease={[Function]} 369 - onResponderTerminate={[Function]} 370 - onResponderTerminationRequest={[Function]} 371 - onStartShouldSetResponder={[Function]} 372 - style={ 373 - Object { 374 - "alignItems": "center", 375 - "flex": 1, 376 - "flexDirection": "row", 377 - "paddingLeft": 12, 378 - "paddingVertical": 12, 379 - } 380 - } 381 - > 382 - <View 383 - style={Object {}} 384 - > 385 - < 386 - icon="house" 387 - size={20} 388 - /> 389 - </View> 390 - <Text 391 - ellipsizeMode="tail" 392 - numberOfLines={1} 393 - style={ 394 - Array [ 395 - Object { 396 - "color": "#000000", 397 - }, 398 - Array [ 399 - Object { 400 - "flex": 1, 401 - "fontSize": 16, 402 - "paddingHorizontal": 10, 403 - }, 404 - Object { 405 - "fontWeight": "500", 406 - }, 407 - ], 408 - ] 409 - } 410 - suppressHighlighting={true} 411 - > 412 - / 413 - </Text> 414 - </View> 415 - <View 416 - accessible={true} 417 - focusable={true} 418 - onClick={[Function]} 419 - onResponderGrant={[Function]} 420 - onResponderMove={[Function]} 421 - onResponderRelease={[Function]} 422 - onResponderTerminate={[Function]} 423 - onResponderTerminationRequest={[Function]} 424 - onStartShouldSetResponder={[Function]} 425 - style={ 426 - Object { 427 - "paddingRight": 16, 428 - "paddingVertical": 16, 429 - } 430 - } 431 - > 432 - < 433 - icon="x" 434 - size={14} 435 - style={ 436 - Object { 437 - "color": "#655", 438 - } 439 - } 440 - /> 441 - </View> 442 - </View> 443 - </View> 444 - </View> 445 - </View> 446 - <View 447 - collapsable={false} 448 - forwardedRef={[Function]} 449 - handlerTag={3} 450 - handlerType="PanGestureHandler" 451 - onGestureHandlerEvent={[Function]} 452 - onGestureHandlerStateChange={[Function]} 453 - onLayout={[Function]} 454 - style={ 455 - Object { 456 - "overflow": "hidden", 457 - } 458 - } 459 - > 460 - <View 461 - collapsable={false} 462 - style={ 463 - Object { 464 - "bottom": 0, 465 - "flexDirection": "row", 466 - "left": 0, 467 - "position": "absolute", 468 - "right": 0, 469 - "top": 0, 470 - "transform": Array [ 471 - Object { 472 - "translateX": -10000, 473 - }, 474 - ], 475 - } 476 - } 477 - > 478 - <View 479 - style={ 480 - Array [ 481 - Object { 482 - "padding": 2, 483 - }, 484 - ] 485 - } 486 - /> 487 - <View 488 - onLayout={[Function]} 489 - /> 490 - </View> 491 - <View 492 - collapsable={false} 493 - style={ 494 - Object { 495 - "bottom": 0, 496 - "flexDirection": "row-reverse", 497 - "left": 0, 498 - "position": "absolute", 499 - "right": 0, 500 - "top": 0, 501 - "transform": Array [ 502 - Object { 503 - "translateX": -10000, 504 - }, 505 - ], 506 - } 507 - } 508 - > 509 - <View 510 - style={ 511 - Array [ 512 - Object { 513 - "padding": 2, 514 - }, 515 - ] 516 - } 517 - /> 518 - <View 519 - onLayout={[Function]} 520 - /> 521 - </View> 522 - <View 523 - collapsable={false} 524 - forwardedRef={[Function]} 525 - handlerTag={4} 526 - handlerType="TapGestureHandler" 527 - onGestureHandlerEvent={[Function]} 528 - onGestureHandlerStateChange={[Function]} 529 - pointerEvents="auto" 530 - style={ 531 - Object { 532 - "transform": Array [ 533 - Object { 534 - "translateX": -0, 535 - }, 536 - ], 537 - } 538 - } 539 - > 540 - <View 541 - collapsable={false} 542 - style={ 543 - Object { 544 - "height": 46, 545 - "overflow": "hidden", 546 - } 547 - } 548 - > 549 - <View 550 - collapsable={false} 551 - forwardedRef={[Function]} 552 - style={ 553 - Object { 554 - "alignItems": "center", 555 - "backgroundColor": "#f8f3f3", 556 - "borderColor": "#968d8d", 557 - "borderRadius": 4, 558 - "borderWidth": 1, 559 - "flexDirection": "row", 560 - "height": 42, 561 - } 562 - } 563 - > 564 - <View 565 - accessible={true} 566 - focusable={true} 567 - onClick={[Function]} 568 - onResponderGrant={[Function]} 569 - onResponderMove={[Function]} 570 - onResponderRelease={[Function]} 571 - onResponderTerminate={[Function]} 572 - onResponderTerminationRequest={[Function]} 573 - onStartShouldSetResponder={[Function]} 574 - style={ 575 - Object { 576 - "alignItems": "center", 577 - "flex": 1, 578 - "flexDirection": "row", 579 - "paddingLeft": 12, 580 - "paddingVertical": 12, 581 - } 582 - } 583 - > 584 - <View 585 - style={Object {}} 586 - > 587 - < 588 - icon="bell" 589 - size={20} 590 - /> 591 - </View> 592 - <Text 593 - ellipsizeMode="tail" 594 - numberOfLines={1} 595 - style={ 596 - Array [ 597 - Object { 598 - "color": "#000000", 599 - }, 600 - Array [ 601 - Object { 602 - "flex": 1, 603 - "fontSize": 16, 604 - "paddingHorizontal": 10, 605 - }, 606 - false, 607 - ], 608 - ] 609 - } 610 - suppressHighlighting={true} 611 - > 612 - /notifications 613 - </Text> 614 - </View> 615 - <View 616 - accessible={true} 617 - focusable={true} 618 - onClick={[Function]} 619 - onResponderGrant={[Function]} 620 - onResponderMove={[Function]} 621 - onResponderRelease={[Function]} 622 - onResponderTerminate={[Function]} 623 - onResponderTerminationRequest={[Function]} 624 - onStartShouldSetResponder={[Function]} 625 - style={ 626 - Object { 627 - "paddingRight": 16, 628 - "paddingVertical": 16, 629 - } 630 - } 631 - > 632 - < 633 - icon="x" 634 - size={14} 635 - style={ 636 - Object { 637 - "color": "#655", 638 - } 639 - } 640 - /> 641 - </View> 642 - </View> 643 - </View> 644 - </View> 645 - </View> 646 - </View> 647 - </RCTScrollView> 648 - </View> 649 - </View> 650 - </View> 651 - `;
-421
__tests__/view/shell/mobile/__snapshots__/index.test.tsx.snap
··· 1 - // Jest Snapshot v1, https://goo.gl/fbAQLP 2 - 3 - exports[`MobileShell renders correctly 1`] = ` 4 - <BVLinearGradient 5 - colors={ 6 - Array [ 7 - 4278222079, 8 - 4278238463, 9 - ] 10 - } 11 - endPoint={ 12 - Object { 13 - "x": 0, 14 - "y": 1, 15 - } 16 - } 17 - locations={null} 18 - startPoint={ 19 - Object { 20 - "x": 0, 21 - "y": 0.8, 22 - } 23 - } 24 - style={ 25 - Object { 26 - "flex": 1, 27 - "height": "100%", 28 - } 29 - } 30 - > 31 - <RCTSafeAreaView 32 - emulateUnlessSupported={true} 33 - style={ 34 - Object { 35 - "flex": 1, 36 - } 37 - } 38 - > 39 - <View 40 - style={ 41 - Object { 42 - "flex": 1, 43 - } 44 - } 45 - > 46 - <View 47 - style={ 48 - Object { 49 - "flex": 2, 50 - "justifyContent": "center", 51 - } 52 - } 53 - > 54 - <View 55 - style={ 56 - Object { 57 - "flexDirection": "row", 58 - "justifyContent": "center", 59 - } 60 - } 61 - > 62 - <RNSVGSvgView 63 - bbHeight="100" 64 - bbWidth="100" 65 - focusable={false} 66 - height="100" 67 - style={ 68 - Array [ 69 - Object { 70 - "backgroundColor": "transparent", 71 - "borderWidth": 0, 72 - }, 73 - Object { 74 - "flex": 0, 75 - "height": 100, 76 - "width": 100, 77 - }, 78 - ] 79 - } 80 - width="100" 81 - > 82 - <RNSVGGroup> 83 - <RNSVGCircle 84 - cx="50" 85 - cy="50" 86 - fill={null} 87 - propList={ 88 - Array [ 89 - "fill", 90 - "stroke", 91 - "strokeWidth", 92 - ] 93 - } 94 - r="46" 95 - stroke={4294967295} 96 - strokeWidth={2} 97 - /> 98 - <RNSVGLine 99 - propList={ 100 - Array [ 101 - "stroke", 102 - "strokeWidth", 103 - ] 104 - } 105 - stroke={4294967295} 106 - strokeWidth={1} 107 - x1="30" 108 - x2="30" 109 - y1="0" 110 - y2="100" 111 - /> 112 - <RNSVGLine 113 - propList={ 114 - Array [ 115 - "stroke", 116 - "strokeWidth", 117 - ] 118 - } 119 - stroke={4294967295} 120 - strokeWidth={1} 121 - x1="74" 122 - x2="74" 123 - y1="0" 124 - y2="100" 125 - /> 126 - <RNSVGLine 127 - propList={ 128 - Array [ 129 - "stroke", 130 - "strokeWidth", 131 - ] 132 - } 133 - stroke={4294967295} 134 - strokeWidth={1} 135 - x1="0" 136 - x2="100" 137 - y1="22" 138 - y2="22" 139 - /> 140 - <RNSVGLine 141 - propList={ 142 - Array [ 143 - "stroke", 144 - "strokeWidth", 145 - ] 146 - } 147 - stroke={4294967295} 148 - strokeWidth={1} 149 - x1="0" 150 - x2="100" 151 - y1="74" 152 - y2="74" 153 - /> 154 - <RNSVGText 155 - content={null} 156 - dx={Array []} 157 - dy={Array []} 158 - fill={null} 159 - font={ 160 - Object { 161 - "fontSize": "60", 162 - "fontWeight": "bold", 163 - "textAnchor": "middle", 164 - } 165 - } 166 - propList={ 167 - Array [ 168 - "fill", 169 - "stroke", 170 - "strokeWidth", 171 - ] 172 - } 173 - rotate={Array []} 174 - stroke={4294967295} 175 - strokeWidth={2} 176 - x={ 177 - Array [ 178 - "52", 179 - ] 180 - } 181 - y={ 182 - Array [ 183 - "70", 184 - ] 185 - } 186 - > 187 - <RNSVGTSpan 188 - content="B" 189 - dx={Array []} 190 - dy={Array []} 191 - font={Object {}} 192 - rotate={Array []} 193 - x={Array []} 194 - y={Array []} 195 - /> 196 - </RNSVGText> 197 - </RNSVGGroup> 198 - </RNSVGSvgView> 199 - </View> 200 - <Text 201 - style={ 202 - Array [ 203 - Object { 204 - "color": "#000000", 205 - }, 206 - Object { 207 - "color": "#ffffff", 208 - "fontSize": 68, 209 - "fontWeight": "bold", 210 - "textAlign": "center", 211 - }, 212 - ] 213 - } 214 - > 215 - Bluesky 216 - </Text> 217 - <Text 218 - style={ 219 - Array [ 220 - Object { 221 - "color": "#000000", 222 - }, 223 - Object { 224 - "color": "#ffffff", 225 - "fontSize": 18, 226 - "textAlign": "center", 227 - }, 228 - ] 229 - } 230 - > 231 - [ private beta ] 232 - </Text> 233 - </View> 234 - <View 235 - style={ 236 - Object { 237 - "flex": 1, 238 - } 239 - } 240 - > 241 - <View 242 - accessible={true} 243 - collapsable={false} 244 - focusable={true} 245 - onClick={[Function]} 246 - onResponderGrant={[Function]} 247 - onResponderMove={[Function]} 248 - onResponderRelease={[Function]} 249 - onResponderTerminate={[Function]} 250 - onResponderTerminationRequest={[Function]} 251 - onStartShouldSetResponder={[Function]} 252 - style={ 253 - Object { 254 - "backgroundColor": "#0085ff", 255 - "borderColor": "#ffffff", 256 - "borderRadius": 10, 257 - "borderWidth": 1, 258 - "marginBottom": 20, 259 - "marginHorizontal": 20, 260 - "opacity": 1, 261 - "paddingVertical": 16, 262 - } 263 - } 264 - > 265 - <Text 266 - style={ 267 - Array [ 268 - Object { 269 - "color": "#000000", 270 - }, 271 - Object { 272 - "color": "#ffffff", 273 - "fontSize": 18, 274 - "fontWeight": "bold", 275 - "textAlign": "center", 276 - }, 277 - ] 278 - } 279 - > 280 - Create a new account 281 - </Text> 282 - </View> 283 - <View 284 - style={ 285 - Object { 286 - "marginBottom": 20, 287 - } 288 - } 289 - > 290 - <RNSVGSvgView 291 - bbHeight="1" 292 - bbWidth={750} 293 - focusable={false} 294 - height="1" 295 - style={ 296 - Array [ 297 - Object { 298 - "backgroundColor": "transparent", 299 - "borderWidth": 0, 300 - }, 301 - Object { 302 - "position": "absolute", 303 - "top": 10, 304 - }, 305 - Object { 306 - "flex": 0, 307 - "height": 1, 308 - "width": 750, 309 - }, 310 - ] 311 - } 312 - width={750} 313 - > 314 - <RNSVGGroup> 315 - <RNSVGLine 316 - propList={ 317 - Array [ 318 - "stroke", 319 - "strokeWidth", 320 - ] 321 - } 322 - stroke={4294967295} 323 - strokeWidth="1" 324 - x1="30" 325 - x2={355} 326 - y1="0" 327 - y2="0" 328 - /> 329 - <RNSVGLine 330 - propList={ 331 - Array [ 332 - "stroke", 333 - "strokeWidth", 334 - ] 335 - } 336 - stroke={4294967295} 337 - strokeWidth="1" 338 - x1={395} 339 - x2={720} 340 - y1="0" 341 - y2="0" 342 - /> 343 - </RNSVGGroup> 344 - </RNSVGSvgView> 345 - <Text 346 - style={ 347 - Array [ 348 - Object { 349 - "color": "#000000", 350 - }, 351 - Object { 352 - "color": "#ffffff", 353 - "fontSize": 16, 354 - "textAlign": "center", 355 - }, 356 - ] 357 - } 358 - > 359 - or 360 - </Text> 361 - </View> 362 - <View 363 - accessible={true} 364 - collapsable={false} 365 - focusable={true} 366 - onClick={[Function]} 367 - onResponderGrant={[Function]} 368 - onResponderMove={[Function]} 369 - onResponderRelease={[Function]} 370 - onResponderTerminate={[Function]} 371 - onResponderTerminationRequest={[Function]} 372 - onStartShouldSetResponder={[Function]} 373 - style={ 374 - Object { 375 - "backgroundColor": "#0085ff", 376 - "borderColor": "#ffffff", 377 - "borderRadius": 10, 378 - "borderWidth": 1, 379 - "marginBottom": 20, 380 - "marginHorizontal": 20, 381 - "opacity": 1, 382 - "paddingVertical": 16, 383 - } 384 - } 385 - > 386 - <Text 387 - style={ 388 - Array [ 389 - Object { 390 - "color": "#000000", 391 - }, 392 - Object { 393 - "color": "#ffffff", 394 - "fontSize": 18, 395 - "fontWeight": "bold", 396 - "textAlign": "center", 397 - }, 398 - ] 399 - } 400 - > 401 - Sign in 402 - </Text> 403 - </View> 404 - </View> 405 - </View> 406 - </RCTSafeAreaView> 407 - <View 408 - enablePanDownToClose={true} 409 - index={-1} 410 - keyboardBehavior="fillParent" 411 - onChange={[Function]} 412 - snapPoints={ 413 - Array [ 414 - "10%", 415 - ] 416 - } 417 - > 418 - <View /> 419 - </View> 420 - </BVLinearGradient> 421 - `;
-18
__tests__/view/shell/mobile/index.test.tsx
··· 1 - import React from 'react' 2 - import {MobileShell} from '../../../../src/view/shell/mobile' 3 - import renderer from 'react-test-renderer' 4 - import {SafeAreaProvider} from 'react-native-safe-area-context' 5 - // import {render} from '../../../../jest/test-utils' 6 - 7 - describe('MobileShell', () => { 8 - it('renders correctly', () => { 9 - const tree = renderer 10 - .create( 11 - <SafeAreaProvider> 12 - <MobileShell /> 13 - </SafeAreaProvider>, 14 - ) 15 - .toJSON() 16 - expect(tree).toMatchSnapshot() 17 - }) 18 - })
+34 -34
ios/app.xcodeproj/project.pbxproj
··· 11 11 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 12 12 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13 13 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 14 - 56F0250941FE75DA8CF8094A /* libPods-app-appTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F5D2424078D205E2F98F0707 /* libPods-app-appTests.a */; }; 14 + 5698CA584FD738B2091BD18F /* libPods-app-appTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C0C7BDE7769B84011D3747DC /* libPods-app-appTests.a */; }; 15 + 67BF1AE6AABFC881715B2D6A /* libPods-app.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8789F612EDA2C48C6064ADD6 /* libPods-app.a */; }; 15 16 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; 16 - BFADB63545C91424F7C8293A /* libPods-app.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C668306DD1C0A63684EDCB0 /* libPods-app.a */; }; 17 17 E4BBD590292C1F5200296224 /* app.entitlements in Resources */ = {isa = PBXBuildFile; fileRef = E4437C9E28581FA7006DA9E7 /* app.entitlements */; }; 18 18 /* End PBXBuildFile section */ 19 19 ··· 37 37 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = app/Images.xcassets; sourceTree = "<group>"; }; 38 38 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = app/Info.plist; sourceTree = "<group>"; }; 39 39 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = app/main.m; sourceTree = "<group>"; }; 40 - 3D3D4D80CD734363E3EADE03 /* Pods-app.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app.release.xcconfig"; path = "Target Support Files/Pods-app/Pods-app.release.xcconfig"; sourceTree = "<group>"; }; 41 - 65D2EDDD9D88DA37994C7743 /* Pods-app-appTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app-appTests.debug.xcconfig"; path = "Target Support Files/Pods-app-appTests/Pods-app-appTests.debug.xcconfig"; sourceTree = "<group>"; }; 40 + 53DBA218C184B95B107AC33E /* Pods-app.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app.release.xcconfig"; path = "Target Support Files/Pods-app/Pods-app.release.xcconfig"; sourceTree = "<group>"; }; 42 41 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = app/LaunchScreen.storyboard; sourceTree = "<group>"; }; 43 - 9C668306DD1C0A63684EDCB0 /* libPods-app.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-app.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 44 - A79BD0E1A3F5B868AD4F5D68 /* Pods-app.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app.debug.xcconfig"; path = "Target Support Files/Pods-app/Pods-app.debug.xcconfig"; sourceTree = "<group>"; }; 45 - AA0AD1B60CF7C90FFDB948B9 /* Pods-app-appTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app-appTests.release.xcconfig"; path = "Target Support Files/Pods-app-appTests/Pods-app-appTests.release.xcconfig"; sourceTree = "<group>"; }; 42 + 8789F612EDA2C48C6064ADD6 /* libPods-app.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-app.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 43 + 8BB4EDB104E125B8A1913E74 /* Pods-app.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app.debug.xcconfig"; path = "Target Support Files/Pods-app/Pods-app.debug.xcconfig"; sourceTree = "<group>"; }; 44 + A8E093A0B5DA947150924A68 /* Pods-app-appTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app-appTests.release.xcconfig"; path = "Target Support Files/Pods-app-appTests/Pods-app-appTests.release.xcconfig"; sourceTree = "<group>"; }; 45 + C01FB6762BC17DADC0319338 /* Pods-app-appTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-app-appTests.debug.xcconfig"; path = "Target Support Files/Pods-app-appTests/Pods-app-appTests.debug.xcconfig"; sourceTree = "<group>"; }; 46 + C0C7BDE7769B84011D3747DC /* libPods-app-appTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-app-appTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 46 47 E4437C9E28581FA7006DA9E7 /* app.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = app.entitlements; path = app/app.entitlements; sourceTree = "<group>"; }; 47 48 ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; 48 - F5D2424078D205E2F98F0707 /* libPods-app-appTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-app-appTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 49 49 /* End PBXFileReference section */ 50 50 51 51 /* Begin PBXFrameworksBuildPhase section */ ··· 53 53 isa = PBXFrameworksBuildPhase; 54 54 buildActionMask = 2147483647; 55 55 files = ( 56 - 56F0250941FE75DA8CF8094A /* libPods-app-appTests.a in Frameworks */, 56 + 5698CA584FD738B2091BD18F /* libPods-app-appTests.a in Frameworks */, 57 57 ); 58 58 runOnlyForDeploymentPostprocessing = 0; 59 59 }; ··· 61 61 isa = PBXFrameworksBuildPhase; 62 62 buildActionMask = 2147483647; 63 63 files = ( 64 - BFADB63545C91424F7C8293A /* libPods-app.a in Frameworks */, 64 + 67BF1AE6AABFC881715B2D6A /* libPods-app.a in Frameworks */, 65 65 ); 66 66 runOnlyForDeploymentPostprocessing = 0; 67 67 }; ··· 103 103 isa = PBXGroup; 104 104 children = ( 105 105 ED297162215061F000B7C4FE /* JavaScriptCore.framework */, 106 - 9C668306DD1C0A63684EDCB0 /* libPods-app.a */, 107 - F5D2424078D205E2F98F0707 /* libPods-app-appTests.a */, 106 + 8789F612EDA2C48C6064ADD6 /* libPods-app.a */, 107 + C0C7BDE7769B84011D3747DC /* libPods-app-appTests.a */, 108 108 ); 109 109 name = Frameworks; 110 110 sourceTree = "<group>"; ··· 143 143 BBD78D7AC51CEA395F1C20DB /* Pods */ = { 144 144 isa = PBXGroup; 145 145 children = ( 146 - A79BD0E1A3F5B868AD4F5D68 /* Pods-app.debug.xcconfig */, 147 - 3D3D4D80CD734363E3EADE03 /* Pods-app.release.xcconfig */, 148 - 65D2EDDD9D88DA37994C7743 /* Pods-app-appTests.debug.xcconfig */, 149 - AA0AD1B60CF7C90FFDB948B9 /* Pods-app-appTests.release.xcconfig */, 146 + 8BB4EDB104E125B8A1913E74 /* Pods-app.debug.xcconfig */, 147 + 53DBA218C184B95B107AC33E /* Pods-app.release.xcconfig */, 148 + C01FB6762BC17DADC0319338 /* Pods-app-appTests.debug.xcconfig */, 149 + A8E093A0B5DA947150924A68 /* Pods-app-appTests.release.xcconfig */, 150 150 ); 151 151 path = Pods; 152 152 sourceTree = "<group>"; ··· 158 158 isa = PBXNativeTarget; 159 159 buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "appTests" */; 160 160 buildPhases = ( 161 - A8646FFAA087C80271BB2CC6 /* [CP] Check Pods Manifest.lock */, 161 + A6849EFFDCB214D4F4EAE972 /* [CP] Check Pods Manifest.lock */, 162 162 00E356EA1AD99517003FC87E /* Sources */, 163 163 00E356EB1AD99517003FC87E /* Frameworks */, 164 164 00E356EC1AD99517003FC87E /* Resources */, 165 - 8DC349844744C81F79F94A1E /* [CP] Copy Pods Resources */, 165 + DFA0C2B14E2F369C4B2337CE /* [CP] Copy Pods Resources */, 166 166 ); 167 167 buildRules = ( 168 168 ); ··· 178 178 isa = PBXNativeTarget; 179 179 buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "app" */; 180 180 buildPhases = ( 181 - AFA1F7779F8B1AF36C3A7914 /* [CP] Check Pods Manifest.lock */, 181 + DDF15D430A078CE70E577FDA /* [CP] Check Pods Manifest.lock */, 182 182 FD10A7F022414F080027D42C /* Start Packager */, 183 183 13B07F871A680F5B00A75B9A /* Sources */, 184 184 13B07F8C1A680F5B00A75B9A /* Frameworks */, 185 185 13B07F8E1A680F5B00A75B9A /* Resources */, 186 186 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 187 - EEF3465D9B31EDDCEB2438EA /* [CP] Copy Pods Resources */, 187 + 45E56D79C207C80AF89FBAA2 /* [CP] Copy Pods Resources */, 188 188 ); 189 189 buildRules = ( 190 190 ); ··· 266 266 shellPath = /bin/sh; 267 267 shellScript = "set -e\n\nexport NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n"; 268 268 }; 269 - 8DC349844744C81F79F94A1E /* [CP] Copy Pods Resources */ = { 269 + 45E56D79C207C80AF89FBAA2 /* [CP] Copy Pods Resources */ = { 270 270 isa = PBXShellScriptBuildPhase; 271 271 buildActionMask = 2147483647; 272 272 files = ( 273 273 ); 274 274 inputFileListPaths = ( 275 - "${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-resources-${CONFIGURATION}-input-files.xcfilelist", 275 + "${PODS_ROOT}/Target Support Files/Pods-app/Pods-app-resources-${CONFIGURATION}-input-files.xcfilelist", 276 276 ); 277 277 name = "[CP] Copy Pods Resources"; 278 278 outputFileListPaths = ( 279 - "${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-resources-${CONFIGURATION}-output-files.xcfilelist", 279 + "${PODS_ROOT}/Target Support Files/Pods-app/Pods-app-resources-${CONFIGURATION}-output-files.xcfilelist", 280 280 ); 281 281 runOnlyForDeploymentPostprocessing = 0; 282 282 shellPath = /bin/sh; 283 - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-resources.sh\"\n"; 283 + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-app/Pods-app-resources.sh\"\n"; 284 284 showEnvVarsInLog = 0; 285 285 }; 286 - A8646FFAA087C80271BB2CC6 /* [CP] Check Pods Manifest.lock */ = { 286 + A6849EFFDCB214D4F4EAE972 /* [CP] Check Pods Manifest.lock */ = { 287 287 isa = PBXShellScriptBuildPhase; 288 288 buildActionMask = 2147483647; 289 289 files = ( ··· 305 305 shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 306 306 showEnvVarsInLog = 0; 307 307 }; 308 - AFA1F7779F8B1AF36C3A7914 /* [CP] Check Pods Manifest.lock */ = { 308 + DDF15D430A078CE70E577FDA /* [CP] Check Pods Manifest.lock */ = { 309 309 isa = PBXShellScriptBuildPhase; 310 310 buildActionMask = 2147483647; 311 311 files = ( ··· 327 327 shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 328 328 showEnvVarsInLog = 0; 329 329 }; 330 - EEF3465D9B31EDDCEB2438EA /* [CP] Copy Pods Resources */ = { 330 + DFA0C2B14E2F369C4B2337CE /* [CP] Copy Pods Resources */ = { 331 331 isa = PBXShellScriptBuildPhase; 332 332 buildActionMask = 2147483647; 333 333 files = ( 334 334 ); 335 335 inputFileListPaths = ( 336 - "${PODS_ROOT}/Target Support Files/Pods-app/Pods-app-resources-${CONFIGURATION}-input-files.xcfilelist", 336 + "${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-resources-${CONFIGURATION}-input-files.xcfilelist", 337 337 ); 338 338 name = "[CP] Copy Pods Resources"; 339 339 outputFileListPaths = ( 340 - "${PODS_ROOT}/Target Support Files/Pods-app/Pods-app-resources-${CONFIGURATION}-output-files.xcfilelist", 340 + "${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-resources-${CONFIGURATION}-output-files.xcfilelist", 341 341 ); 342 342 runOnlyForDeploymentPostprocessing = 0; 343 343 shellPath = /bin/sh; 344 - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-app/Pods-app-resources.sh\"\n"; 344 + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-app-appTests/Pods-app-appTests-resources.sh\"\n"; 345 345 showEnvVarsInLog = 0; 346 346 }; 347 347 FD10A7F022414F080027D42C /* Start Packager */ = { ··· 396 396 /* Begin XCBuildConfiguration section */ 397 397 00E356F61AD99517003FC87E /* Debug */ = { 398 398 isa = XCBuildConfiguration; 399 - baseConfigurationReference = 65D2EDDD9D88DA37994C7743 /* Pods-app-appTests.debug.xcconfig */; 399 + baseConfigurationReference = C01FB6762BC17DADC0319338 /* Pods-app-appTests.debug.xcconfig */; 400 400 buildSettings = { 401 401 ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 402 402 BUNDLE_LOADER = "$(TEST_HOST)"; ··· 424 424 }; 425 425 00E356F71AD99517003FC87E /* Release */ = { 426 426 isa = XCBuildConfiguration; 427 - baseConfigurationReference = AA0AD1B60CF7C90FFDB948B9 /* Pods-app-appTests.release.xcconfig */; 427 + baseConfigurationReference = A8E093A0B5DA947150924A68 /* Pods-app-appTests.release.xcconfig */; 428 428 buildSettings = { 429 429 ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 430 430 BUNDLE_LOADER = "$(TEST_HOST)"; ··· 449 449 }; 450 450 13B07F941A680F5B00A75B9A /* Debug */ = { 451 451 isa = XCBuildConfiguration; 452 - baseConfigurationReference = A79BD0E1A3F5B868AD4F5D68 /* Pods-app.debug.xcconfig */; 452 + baseConfigurationReference = 8BB4EDB104E125B8A1913E74 /* Pods-app.debug.xcconfig */; 453 453 buildSettings = { 454 454 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 455 455 CLANG_ENABLE_MODULES = YES; ··· 479 479 }; 480 480 13B07F951A680F5B00A75B9A /* Release */ = { 481 481 isa = XCBuildConfiguration; 482 - baseConfigurationReference = 3D3D4D80CD734363E3EADE03 /* Pods-app.release.xcconfig */; 482 + baseConfigurationReference = 53DBA218C184B95B107AC33E /* Pods-app.release.xcconfig */; 483 483 buildSettings = { 484 484 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 485 485 CLANG_ENABLE_MODULES = YES;
+20 -6
jest/jestSetup.js
··· 1 + import 'react-native-gesture-handler/jestSetup' 1 2 jest.mock('@react-native-async-storage/async-storage', () => 2 3 require('@react-native-async-storage/async-storage/jest/async-storage-mock'), 3 4 ) 4 5 jest.mock('react-native/Libraries/EventEmitter/NativeEventEmitter') 6 + 7 + // Silence the warning: Animated: `useNativeDriver` is not supported 8 + jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper') 9 + require('react-native-reanimated/lib/reanimated2/jestUtils').setUpTests() 5 10 6 11 jest.mock('@fortawesome/react-native-fontawesome', () => ({ 7 12 FontAwesomeIcon: '', 8 13 })) 9 - 10 - require('react-native-reanimated/lib/reanimated2/jestUtils').setUpTests() 11 - 12 - // Silence the warning: Animated: `useNativeDriver` is not supported 13 - jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper') 14 14 15 15 jest.mock('react-native-safe-area-context', () => { 16 16 const inset = {top: 0, right: 0, bottom: 0, left: 0} ··· 36 36 } 37 37 }) 38 38 39 - jest.useFakeTimers() 39 + jest.mock('rn-fetch-blob', () => ({ 40 + config: jest.fn().mockReturnThis(), 41 + cancel: jest.fn(), 42 + fetch: jest.fn(), 43 + })) 44 + 45 + jest.mock('@bam.tech/react-native-image-resizer', () => ({ 46 + createResizedImage: jest.fn(), 47 + })) 48 + 49 + import {View as mockedView} from 'react-native' 50 + jest.mock('react-native-tab-view', () => ({ 51 + ...jest.requireActual('react-native-tab-view'), 52 + TabView: mockedView, 53 + }))
+13 -15
jest/test-utils.tsx
··· 1 1 import React from 'react' 2 - import RN from 'react-native' 3 2 import {render} from '@testing-library/react-native' 4 3 import {GestureHandlerRootView} from 'react-native-gesture-handler' 5 4 import {RootSiblingParent} from 'react-native-root-siblings' 6 5 import {SafeAreaProvider} from 'react-native-safe-area-context' 7 - import {DEFAULT_SERVICE, RootStoreModel, RootStoreProvider} from '../src/state' 8 - import {SessionServiceClient} from '../src/third-party/api/src' 9 - import {sessionClient as AtpApi} from '../src/third-party/api' 6 + import {RootStoreProvider} from '../src/state' 7 + import {mockedRootStore} from '../__mocks__/state-mock' 10 8 11 - const WrappedComponent = ({children}: any) => { 12 - const api = AtpApi.service(DEFAULT_SERVICE) as SessionServiceClient 13 - const rootStore = new RootStoreModel(api) 14 - return ( 9 + const customRender = (ui: any, storeMock?: any) => 10 + render( 11 + // eslint-disable-next-line react-native/no-inline-styles 15 12 <GestureHandlerRootView style={{flex: 1}}> 16 13 <RootSiblingParent> 17 - <RootStoreProvider value={rootStore}> 18 - <SafeAreaProvider>{children}</SafeAreaProvider> 14 + <RootStoreProvider 15 + value={ 16 + storeMock != null 17 + ? {...mockedRootStore, ...storeMock} 18 + : mockedRootStore 19 + }> 20 + <SafeAreaProvider>{ui}</SafeAreaProvider> 19 21 </RootStoreProvider> 20 22 </RootSiblingParent> 21 - </GestureHandlerRootView> 23 + </GestureHandlerRootView>, 22 24 ) 23 - } 24 - 25 - const customRender = (ui: any, options?: any) => 26 - render(ui, {wrapper: WrappedComponent, ...options}) 27 25 28 26 // re-export everything 29 27 export * from '@testing-library/react-native'
+3 -3
package.json
··· 9 9 "start": "react-native start", 10 10 "clean-cache": "rm -rf node_modules/.cache/babel-loader/*", 11 11 "test": "jest --coverage", 12 - "lint": "eslint . --ext .js,.jsx,.ts,.tsx", 13 - "postinstall": "patch-package" 12 + "lint": "eslint . --ext .js,.jsx,.ts,.tsx" 14 13 }, 15 14 "dependencies": { 16 15 "@atproto/api": "^0.0.6", ··· 34 33 "lru_map": "^0.4.1", 35 34 "mobx": "^6.6.1", 36 35 "mobx-react-lite": "^3.4.0", 37 - "patch-package": "^6.5.0", 38 36 "react": "17.0.2", 39 37 "react-circular-progressbar": "^2.1.0", 40 38 "react-dom": "17.0.2", ··· 112 110 "<rootDir>/node_modules/", 113 111 "<rootDir>/src/platform", 114 112 "<rootDir>/src/third-party", 113 + "<rootDir>/src/view/com/util", 114 + "<rootDir>/src/state/lib", 115 115 "<rootDir>/__tests__/test-utils.js" 116 116 ] 117 117 },
-125
patches/react-native-pager-view+5.4.1.patch
··· 1 - # HOTFIX - https://github.com/satya164/react-native-tab-view/issues/1104 2 - 3 - diff --git a/node_modules/react-native-pager-view/lib/commonjs/PagerView.js b/node_modules/react-native-pager-view/lib/commonjs/PagerView.js 4 - index 40afb41..850c151 100644 5 - --- a/node_modules/react-native-pager-view/lib/commonjs/PagerView.js 6 - +++ b/node_modules/react-native-pager-view/lib/commonjs/PagerView.js 7 - @@ -131,17 +131,20 @@ class PagerView extends _react.default.Component { 8 - } 9 - 10 - render() { 11 - - return /*#__PURE__*/_react.default.createElement(_PagerViewNative.PagerViewViewManager, _extends({}, this.props, { 12 - - ref: this.PagerView 13 - - /** TODO: Fix ref type */ 14 - - , 15 - + const { 16 - + children, 17 - + forwardedRef, 18 - + ...rest 19 - + } = this.props; 20 - + return /*#__PURE__*/_react.default.createElement(_PagerViewNative.PagerViewViewManager, _extends({}, rest, { 21 - + // ref={this.PagerView as any /** TODO: Fix ref type */} 22 - style: this.props.style, 23 - layoutDirection: this.deducedLayoutDirection, 24 - onPageScroll: this._onPageScroll, 25 - onPageScrollStateChanged: this._onPageScrollStateChanged, 26 - onPageSelected: this._onPageSelected, 27 - onMoveShouldSetResponderCapture: this._onMoveShouldSetResponderCapture, 28 - - children: (0, _utils.childrenWithOverriddenStyle)(this.props.children) 29 - + children: (0, _utils.childrenWithOverriddenStyle)(children) 30 - })); 31 - } 32 - 33 - diff --git a/node_modules/react-native-pager-view/lib/commonjs/PagerView.js.map b/node_modules/react-native-pager-view/lib/commonjs/PagerView.js.map 34 - index ce9ff7f..c55d898 100644 35 - --- a/node_modules/react-native-pager-view/lib/commonjs/PagerView.js.map 36 - +++ b/node_modules/react-native-pager-view/lib/commonjs/PagerView.js.map 37 - @@ -1 +1 @@ 38 - -{"version":3,"sources":["PagerView.tsx"],"names":["PagerView","React","Component","createRef","current","getInnerViewNode","e","props","onPageScroll","Platform","OS","keyboardDismissMode","Keyboard","dismiss","onPageScrollStateChanged","isScrolling","nativeEvent","pageScrollState","onPageSelected","selectedPage","UIManager","dispatchViewManagerCommand","ReactNative","findNodeHandle","Commands","setPage","setPageWithoutAnimation","scrollEnabled","setScrollEnabled","deducedLayoutDirection","shouldUseDeviceRtlSetup","layoutDirection","I18nManager","isRTL","render","style","_onPageScroll","_onPageScrollStateChanged","_onPageSelected","_onMoveShouldSetResponderCapture","children"],"mappings":";;;;;;;AAAA;;AACA;;AASA;;AACA;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEO,MAAMA,SAAN,SAAwBC,eAAMC,SAA9B,CAAwD;AAAA;AAAA;;AAAA,yCACvC,KADuC;;AAAA,oDAEzCD,eAAME,SAAN,EAFyC;;AAAA,8CAInC,MAAoB;AAC5C,aAAO,KAAKH,SAAL,CAAeI,OAAf,CAAwBC,gBAAxB,EAAP;AACD,KAN4D;;AAAA,2CAQpCC,CAAD,IAAmC;AACzD,UAAI,KAAKC,KAAL,CAAWC,YAAf,EAA6B;AAC3B,aAAKD,KAAL,CAAWC,YAAX,CAAwBF,CAAxB;AACD,OAHwD,CAIzD;;;AACA,UAAIG,sBAASC,EAAT,KAAgB,SAApB,EAA+B;AAC7B,YAAI,KAAKH,KAAL,CAAWI,mBAAX,KAAmC,SAAvC,EAAkD;AAChDC,gCAASC,OAAT;AACD;AACF;AACF,KAlB4D;;AAAA,uDAqB3DP,CADkC,IAE/B;AACH,UAAI,KAAKC,KAAL,CAAWO,wBAAf,EAAyC;AACvC,aAAKP,KAAL,CAAWO,wBAAX,CAAoCR,CAApC;AACD;;AACD,WAAKS,WAAL,GAAmBT,CAAC,CAACU,WAAF,CAAcC,eAAd,KAAkC,UAArD;AACD,KA3B4D;;AAAA,6CA6BlCX,CAAD,IAAqC;AAC7D,UAAI,KAAKC,KAAL,CAAWW,cAAf,EAA+B;AAC7B,aAAKX,KAAL,CAAWW,cAAX,CAA0BZ,CAA1B;AACD;AACF,KAjC4D;;AAAA,qCAuC3Ca,YAAD,IAA0B;AACzCC,6BAAUC,0BAAV,CACEC,qBAAYC,cAAZ,CAA2B,IAA3B,CADF,EAEE,6CAAuBC,QAAvB,CAAgCC,OAFlC,EAGE,CAACN,YAAD,CAHF;AAKD,KA7C4D;;AAAA,qDAmD3BA,YAAD,IAA0B;AACzDC,6BAAUC,0BAAV,CACEC,qBAAYC,cAAZ,CAA2B,IAA3B,CADF,EAEE,6CAAuBC,QAAvB,CAAgCE,uBAFlC,EAGE,CAACP,YAAD,CAHF;AAKD,KAzD4D;;AAAA,8CAgElCQ,aAAD,IAA4B;AACpDP,6BAAUC,0BAAV,CACEC,qBAAYC,cAAZ,CAA2B,IAA3B,CADF,EAEE,6CAAuBC,QAAvB,CAAgCI,gBAFlC,EAGE,CAACD,aAAD,CAHF;AAKD,KAtE4D;;AAAA,8DAwElB,MAAM;AAC/C,aAAO,KAAKZ,WAAZ;AACD,KA1E4D;AAAA;;AA4E3B,MAAtBc,sBAAsB,GAAG;AACnC,UAAMC,uBAAuB,GAC3B,CAAC,KAAKvB,KAAL,CAAWwB,eAAZ,IAA+B,KAAKxB,KAAL,CAAWwB,eAAX,KAA+B,QADhE;;AAGA,QAAID,uBAAJ,EAA6B;AAC3B,aAAOE,yBAAYC,KAAZ,GAAoB,KAApB,GAA4B,KAAnC;AACD,KAFD,MAEO;AACL,aAAO,KAAK1B,KAAL,CAAWwB,eAAlB;AACD;AACF;;AAEDG,EAAAA,MAAM,GAAG;AACP,wBACE,6BAAC,qCAAD,eACM,KAAK3B,KADX;AAEE,MAAA,GAAG,EAAE,KAAKP;AAAiB;AAF7B;AAGE,MAAA,KAAK,EAAE,KAAKO,KAAL,CAAW4B,KAHpB;AAIE,MAAA,eAAe,EAAE,KAAKN,sBAJxB;AAKE,MAAA,YAAY,EAAE,KAAKO,aALrB;AAME,MAAA,wBAAwB,EAAE,KAAKC,yBANjC;AAOE,MAAA,cAAc,EAAE,KAAKC,eAPvB;AAQE,MAAA,+BAA+B,EAAE,KAAKC,gCARxC;AASE,MAAA,QAAQ,EAAE,wCAA4B,KAAKhC,KAAL,CAAWiC,QAAvC;AATZ,OADF;AAaD;;AArG4D","sourcesContent":["import React, { ReactElement } from 'react';\nimport { Platform, UIManager, Keyboard } from 'react-native';\nimport ReactNative, { I18nManager } from 'react-native';\nimport type {\n PagerViewOnPageScrollEvent,\n PagerViewOnPageSelectedEvent,\n PageScrollStateChangedNativeEvent,\n PagerViewProps,\n} from './types';\n\nimport { childrenWithOverriddenStyle } from './utils';\nimport { getViewManagerConfig, PagerViewViewManager } from './PagerViewNative';\n\n/**\n * Container that allows to flip left and right between child views. Each\n * child view of the `PagerView` will be treated as a separate page\n * and will be stretched to fill the `PagerView`.\n *\n * It is important all children are `<View>`s and not composite components.\n * You can set style properties like `padding` or `backgroundColor` for each\n * child. It is also important that each child have a `key` prop.\n *\n * Example:\n *\n * ```\n * render: function() {\n * return (\n * <PagerView\n * style={styles.PagerView}\n * initialPage={0}>\n * <View style={styles.pageStyle} key=\"1\">\n * <Text>First page</Text>\n * </View>\n * <View style={styles.pageStyle} key=\"2\">\n * <Text>Second page</Text>\n * </View>\n * </PagerView>\n * );\n * }\n *\n * ...\n *\n * var styles = {\n * ...\n * PagerView: {\n * flex: 1\n * },\n * pageStyle: {\n * alignItems: 'center',\n * padding: 20,\n * }\n * }\n * ```\n */\n\nexport class PagerView extends React.Component<PagerViewProps> {\n private isScrolling = false;\n private PagerView = React.createRef<typeof PagerViewViewManager>();\n\n public getInnerViewNode = (): ReactElement => {\n return this.PagerView.current!.getInnerViewNode();\n };\n\n private _onPageScroll = (e: PagerViewOnPageScrollEvent) => {\n if (this.props.onPageScroll) {\n this.props.onPageScroll(e);\n }\n // Not implemented on iOS yet\n if (Platform.OS === 'android') {\n if (this.props.keyboardDismissMode === 'on-drag') {\n Keyboard.dismiss();\n }\n }\n };\n\n private _onPageScrollStateChanged = (\n e: PageScrollStateChangedNativeEvent\n ) => {\n if (this.props.onPageScrollStateChanged) {\n this.props.onPageScrollStateChanged(e);\n }\n this.isScrolling = e.nativeEvent.pageScrollState === 'dragging';\n };\n\n private _onPageSelected = (e: PagerViewOnPageSelectedEvent) => {\n if (this.props.onPageSelected) {\n this.props.onPageSelected(e);\n }\n };\n\n /**\n * A helper function to scroll to a specific page in the PagerView.\n * The transition between pages will be animated.\n */\n public setPage = (selectedPage: number) => {\n UIManager.dispatchViewManagerCommand(\n ReactNative.findNodeHandle(this),\n getViewManagerConfig().Commands.setPage,\n [selectedPage]\n );\n };\n\n /**\n * A helper function to scroll to a specific page in the PagerView.\n * The transition between pages will *not* be animated.\n */\n public setPageWithoutAnimation = (selectedPage: number) => {\n UIManager.dispatchViewManagerCommand(\n ReactNative.findNodeHandle(this),\n getViewManagerConfig().Commands.setPageWithoutAnimation,\n [selectedPage]\n );\n };\n\n /**\n * A helper function to enable/disable scroll imperatively\n * The recommended way is using the scrollEnabled prop, however, there might be a case where a\n * imperative solution is more useful (e.g. for not blocking an animation)\n */\n public setScrollEnabled = (scrollEnabled: boolean) => {\n UIManager.dispatchViewManagerCommand(\n ReactNative.findNodeHandle(this),\n getViewManagerConfig().Commands.setScrollEnabled,\n [scrollEnabled]\n );\n };\n\n private _onMoveShouldSetResponderCapture = () => {\n return this.isScrolling;\n };\n\n private get deducedLayoutDirection() {\n const shouldUseDeviceRtlSetup =\n !this.props.layoutDirection || this.props.layoutDirection === 'locale';\n\n if (shouldUseDeviceRtlSetup) {\n return I18nManager.isRTL ? 'rtl' : 'ltr';\n } else {\n return this.props.layoutDirection;\n }\n }\n\n render() {\n return (\n <PagerViewViewManager\n {...this.props}\n ref={this.PagerView as any /** TODO: Fix ref type */}\n style={this.props.style}\n layoutDirection={this.deducedLayoutDirection}\n onPageScroll={this._onPageScroll}\n onPageScrollStateChanged={this._onPageScrollStateChanged}\n onPageSelected={this._onPageSelected}\n onMoveShouldSetResponderCapture={this._onMoveShouldSetResponderCapture}\n children={childrenWithOverriddenStyle(this.props.children)}\n />\n );\n }\n}\n"]} 39 - \ No newline at end of file 40 - +{"version":3,"sources":["PagerView.tsx"],"names":["PagerView","React","Component","createRef","current","getInnerViewNode","e","props","onPageScroll","Platform","OS","keyboardDismissMode","Keyboard","dismiss","onPageScrollStateChanged","isScrolling","nativeEvent","pageScrollState","onPageSelected","selectedPage","UIManager","dispatchViewManagerCommand","ReactNative","findNodeHandle","Commands","setPage","setPageWithoutAnimation","scrollEnabled","setScrollEnabled","deducedLayoutDirection","shouldUseDeviceRtlSetup","layoutDirection","I18nManager","isRTL","render","children","forwardedRef","rest","style","_onPageScroll","_onPageScrollStateChanged","_onPageSelected","_onMoveShouldSetResponderCapture"],"mappings":";;;;;;;AAAA;;AACA;;AASA;;AACA;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEO,MAAMA,SAAN,SAAwBC,eAAMC,SAA9B,CAAgF;AAAA;AAAA;;AAAA,yCAC/D,KAD+D;;AAAA,oDAEjED,eAAME,SAAN,EAFiE;;AAAA,8CAI3D,MAAoB;AAC5C,aAAO,KAAKH,SAAL,CAAeI,OAAf,CAAwBC,gBAAxB,EAAP;AACD,KANoF;;AAAA,2CAQ5DC,CAAD,IAAmC;AACzD,UAAI,KAAKC,KAAL,CAAWC,YAAf,EAA6B;AAC3B,aAAKD,KAAL,CAAWC,YAAX,CAAwBF,CAAxB;AACD,OAHwD,CAIzD;;;AACA,UAAIG,sBAASC,EAAT,KAAgB,SAApB,EAA+B;AAC7B,YAAI,KAAKH,KAAL,CAAWI,mBAAX,KAAmC,SAAvC,EAAkD;AAChDC,gCAASC,OAAT;AACD;AACF;AACF,KAlBoF;;AAAA,uDAqBnFP,CADkC,IAE/B;AACH,UAAI,KAAKC,KAAL,CAAWO,wBAAf,EAAyC;AACvC,aAAKP,KAAL,CAAWO,wBAAX,CAAoCR,CAApC;AACD;;AACD,WAAKS,WAAL,GAAmBT,CAAC,CAACU,WAAF,CAAcC,eAAd,KAAkC,UAArD;AACD,KA3BoF;;AAAA,6CA6B1DX,CAAD,IAAqC;AAC7D,UAAI,KAAKC,KAAL,CAAWW,cAAf,EAA+B;AAC7B,aAAKX,KAAL,CAAWW,cAAX,CAA0BZ,CAA1B;AACD;AACF,KAjCoF;;AAAA,qCAuCnEa,YAAD,IAA0B;AACzCC,6BAAUC,0BAAV,CACEC,qBAAYC,cAAZ,CAA2B,IAA3B,CADF,EAEE,6CAAuBC,QAAvB,CAAgCC,OAFlC,EAGE,CAACN,YAAD,CAHF;AAKD,KA7CoF;;AAAA,qDAmDnDA,YAAD,IAA0B;AACzDC,6BAAUC,0BAAV,CACEC,qBAAYC,cAAZ,CAA2B,IAA3B,CADF,EAEE,6CAAuBC,QAAvB,CAAgCE,uBAFlC,EAGE,CAACP,YAAD,CAHF;AAKD,KAzDoF;;AAAA,8CAgE1DQ,aAAD,IAA4B;AACpDP,6BAAUC,0BAAV,CACEC,qBAAYC,cAAZ,CAA2B,IAA3B,CADF,EAEE,6CAAuBC,QAAvB,CAAgCI,gBAFlC,EAGE,CAACD,aAAD,CAHF;AAKD,KAtEoF;;AAAA,8DAwE1C,MAAM;AAC/C,aAAO,KAAKZ,WAAZ;AACD,KA1EoF;AAAA;;AA4EnD,MAAtBc,sBAAsB,GAAG;AACnC,UAAMC,uBAAuB,GAC3B,CAAC,KAAKvB,KAAL,CAAWwB,eAAZ,IAA+B,KAAKxB,KAAL,CAAWwB,eAAX,KAA+B,QADhE;;AAGA,QAAID,uBAAJ,EAA6B;AAC3B,aAAOE,yBAAYC,KAAZ,GAAoB,KAApB,GAA4B,KAAnC;AACD,KAFD,MAEO;AACL,aAAO,KAAK1B,KAAL,CAAWwB,eAAlB;AACD;AACF;;AAEDG,EAAAA,MAAM,GAAG;AACP,UAAM;AAAEC,MAAAA,QAAF;AAAYC,MAAAA,YAAZ;AAA0B,SAAGC;AAA7B,QAAsC,KAAK9B,KAAjD;AAEA,wBACE,6BAAC,qCAAD,eACM8B,IADN;AAEE;AACA,MAAA,KAAK,EAAE,KAAK9B,KAAL,CAAW+B,KAHpB;AAIE,MAAA,eAAe,EAAE,KAAKT,sBAJxB;AAKE,MAAA,YAAY,EAAE,KAAKU,aALrB;AAME,MAAA,wBAAwB,EAAE,KAAKC,yBANjC;AAOE,MAAA,cAAc,EAAE,KAAKC,eAPvB;AAQE,MAAA,+BAA+B,EAAE,KAAKC,gCARxC;AASE,MAAA,QAAQ,EAAE,wCAA4BP,QAA5B;AATZ,OADF;AAaD;;AAvGoF","sourcesContent":["import React, { ReactElement } from 'react';\nimport { Platform, UIManager, Keyboard } from 'react-native';\nimport ReactNative, { I18nManager } from 'react-native';\nimport type {\n PagerViewOnPageScrollEvent,\n PagerViewOnPageSelectedEvent,\n PageScrollStateChangedNativeEvent,\n PagerViewProps,\n} from './types';\n\nimport { childrenWithOverriddenStyle } from './utils';\nimport { getViewManagerConfig, PagerViewViewManager } from './PagerViewNative';\n\n/**\n * Container that allows to flip left and right between child views. Each\n * child view of the `PagerView` will be treated as a separate page\n * and will be stretched to fill the `PagerView`.\n *\n * It is important all children are `<View>`s and not composite components.\n * You can set style properties like `padding` or `backgroundColor` for each\n * child. It is also important that each child have a `key` prop.\n *\n * Example:\n *\n * ```\n * render: function() {\n * return (\n * <PagerView\n * style={styles.PagerView}\n * initialPage={0}>\n * <View style={styles.pageStyle} key=\"1\">\n * <Text>First page</Text>\n * </View>\n * <View style={styles.pageStyle} key=\"2\">\n * <Text>Second page</Text>\n * </View>\n * </PagerView>\n * );\n * }\n *\n * ...\n *\n * var styles = {\n * ...\n * PagerView: {\n * flex: 1\n * },\n * pageStyle: {\n * alignItems: 'center',\n * padding: 20,\n * }\n * }\n * ```\n */\n\nexport class PagerView extends React.Component<PagerViewProps, { forwardedRef?: any }> {\n private isScrolling = false;\n private PagerView = React.createRef<typeof PagerViewViewManager>();\n\n public getInnerViewNode = (): ReactElement => {\n return this.PagerView.current!.getInnerViewNode();\n };\n\n private _onPageScroll = (e: PagerViewOnPageScrollEvent) => {\n if (this.props.onPageScroll) {\n this.props.onPageScroll(e);\n }\n // Not implemented on iOS yet\n if (Platform.OS === 'android') {\n if (this.props.keyboardDismissMode === 'on-drag') {\n Keyboard.dismiss();\n }\n }\n };\n\n private _onPageScrollStateChanged = (\n e: PageScrollStateChangedNativeEvent\n ) => {\n if (this.props.onPageScrollStateChanged) {\n this.props.onPageScrollStateChanged(e);\n }\n this.isScrolling = e.nativeEvent.pageScrollState === 'dragging';\n };\n\n private _onPageSelected = (e: PagerViewOnPageSelectedEvent) => {\n if (this.props.onPageSelected) {\n this.props.onPageSelected(e);\n }\n };\n\n /**\n * A helper function to scroll to a specific page in the PagerView.\n * The transition between pages will be animated.\n */\n public setPage = (selectedPage: number) => {\n UIManager.dispatchViewManagerCommand(\n ReactNative.findNodeHandle(this),\n getViewManagerConfig().Commands.setPage,\n [selectedPage]\n );\n };\n\n /**\n * A helper function to scroll to a specific page in the PagerView.\n * The transition between pages will *not* be animated.\n */\n public setPageWithoutAnimation = (selectedPage: number) => {\n UIManager.dispatchViewManagerCommand(\n ReactNative.findNodeHandle(this),\n getViewManagerConfig().Commands.setPageWithoutAnimation,\n [selectedPage]\n );\n };\n\n /**\n * A helper function to enable/disable scroll imperatively\n * The recommended way is using the scrollEnabled prop, however, there might be a case where a\n * imperative solution is more useful (e.g. for not blocking an animation)\n */\n public setScrollEnabled = (scrollEnabled: boolean) => {\n UIManager.dispatchViewManagerCommand(\n ReactNative.findNodeHandle(this),\n getViewManagerConfig().Commands.setScrollEnabled,\n [scrollEnabled]\n );\n };\n\n private _onMoveShouldSetResponderCapture = () => {\n return this.isScrolling;\n };\n\n private get deducedLayoutDirection() {\n const shouldUseDeviceRtlSetup =\n !this.props.layoutDirection || this.props.layoutDirection === 'locale';\n\n if (shouldUseDeviceRtlSetup) {\n return I18nManager.isRTL ? 'rtl' : 'ltr';\n } else {\n return this.props.layoutDirection;\n }\n }\n\n render() {\n const { children, forwardedRef, ...rest } = this.props;\n\n return (\n <PagerViewViewManager\n {...rest}\n // ref={this.PagerView as any /** TODO: Fix ref type */}\n style={this.props.style}\n layoutDirection={this.deducedLayoutDirection}\n onPageScroll={this._onPageScroll}\n onPageScrollStateChanged={this._onPageScrollStateChanged}\n onPageSelected={this._onPageSelected}\n onMoveShouldSetResponderCapture={this._onMoveShouldSetResponderCapture}\n children={childrenWithOverriddenStyle(children)}\n />\n );\n }\n}\n"]} 41 - \ No newline at end of file 42 - diff --git a/node_modules/react-native-pager-view/lib/module/PagerView.js b/node_modules/react-native-pager-view/lib/module/PagerView.js 43 - index dc1ddc5..f95b242 100644 44 - --- a/node_modules/react-native-pager-view/lib/module/PagerView.js 45 - +++ b/node_modules/react-native-pager-view/lib/module/PagerView.js 46 - @@ -116,17 +116,20 @@ export class PagerView extends React.Component { 47 - } 48 - 49 - render() { 50 - - return /*#__PURE__*/React.createElement(PagerViewViewManager, _extends({}, this.props, { 51 - - ref: this.PagerView 52 - - /** TODO: Fix ref type */ 53 - - , 54 - + const { 55 - + children, 56 - + forwardedRef, 57 - + ...rest 58 - + } = this.props; 59 - + return /*#__PURE__*/React.createElement(PagerViewViewManager, _extends({}, rest, { 60 - + // ref={this.PagerView as any /** TODO: Fix ref type */} 61 - style: this.props.style, 62 - layoutDirection: this.deducedLayoutDirection, 63 - onPageScroll: this._onPageScroll, 64 - onPageScrollStateChanged: this._onPageScrollStateChanged, 65 - onPageSelected: this._onPageSelected, 66 - onMoveShouldSetResponderCapture: this._onMoveShouldSetResponderCapture, 67 - - children: childrenWithOverriddenStyle(this.props.children) 68 - + children: childrenWithOverriddenStyle(children) 69 - })); 70 - } 71 - 72 - diff --git a/node_modules/react-native-pager-view/lib/module/PagerView.js.map b/node_modules/react-native-pager-view/lib/module/PagerView.js.map 73 - index 6c26c01..ea08ccc 100644 74 - --- a/node_modules/react-native-pager-view/lib/module/PagerView.js.map 75 - +++ b/node_modules/react-native-pager-view/lib/module/PagerView.js.map 76 - @@ -1 +1 @@ 77 - -{"version":3,"sources":["PagerView.tsx"],"names":["React","Platform","UIManager","Keyboard","ReactNative","I18nManager","childrenWithOverriddenStyle","getViewManagerConfig","PagerViewViewManager","PagerView","Component","createRef","current","getInnerViewNode","e","props","onPageScroll","OS","keyboardDismissMode","dismiss","onPageScrollStateChanged","isScrolling","nativeEvent","pageScrollState","onPageSelected","selectedPage","dispatchViewManagerCommand","findNodeHandle","Commands","setPage","setPageWithoutAnimation","scrollEnabled","setScrollEnabled","deducedLayoutDirection","shouldUseDeviceRtlSetup","layoutDirection","isRTL","render","style","_onPageScroll","_onPageScrollStateChanged","_onPageSelected","_onMoveShouldSetResponderCapture","children"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAoC,OAApC;AACA,SAASC,QAAT,EAAmBC,SAAnB,EAA8BC,QAA9B,QAA8C,cAA9C;AACA,OAAOC,WAAP,IAAsBC,WAAtB,QAAyC,cAAzC;AAQA,SAASC,2BAAT,QAA4C,SAA5C;AACA,SAASC,oBAAT,EAA+BC,oBAA/B,QAA2D,mBAA3D;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMC,SAAN,SAAwBT,KAAK,CAACU,SAA9B,CAAwD;AAAA;AAAA;;AAAA,yCACvC,KADuC;;AAAA,oDAEzCV,KAAK,CAACW,SAAN,EAFyC;;AAAA,8CAInC,MAAoB;AAC5C,aAAO,KAAKF,SAAL,CAAeG,OAAf,CAAwBC,gBAAxB,EAAP;AACD,KAN4D;;AAAA,2CAQpCC,CAAD,IAAmC;AACzD,UAAI,KAAKC,KAAL,CAAWC,YAAf,EAA6B;AAC3B,aAAKD,KAAL,CAAWC,YAAX,CAAwBF,CAAxB;AACD,OAHwD,CAIzD;;;AACA,UAAIb,QAAQ,CAACgB,EAAT,KAAgB,SAApB,EAA+B;AAC7B,YAAI,KAAKF,KAAL,CAAWG,mBAAX,KAAmC,SAAvC,EAAkD;AAChDf,UAAAA,QAAQ,CAACgB,OAAT;AACD;AACF;AACF,KAlB4D;;AAAA,uDAqB3DL,CADkC,IAE/B;AACH,UAAI,KAAKC,KAAL,CAAWK,wBAAf,EAAyC;AACvC,aAAKL,KAAL,CAAWK,wBAAX,CAAoCN,CAApC;AACD;;AACD,WAAKO,WAAL,GAAmBP,CAAC,CAACQ,WAAF,CAAcC,eAAd,KAAkC,UAArD;AACD,KA3B4D;;AAAA,6CA6BlCT,CAAD,IAAqC;AAC7D,UAAI,KAAKC,KAAL,CAAWS,cAAf,EAA+B;AAC7B,aAAKT,KAAL,CAAWS,cAAX,CAA0BV,CAA1B;AACD;AACF,KAjC4D;;AAAA,qCAuC3CW,YAAD,IAA0B;AACzCvB,MAAAA,SAAS,CAACwB,0BAAV,CACEtB,WAAW,CAACuB,cAAZ,CAA2B,IAA3B,CADF,EAEEpB,oBAAoB,GAAGqB,QAAvB,CAAgCC,OAFlC,EAGE,CAACJ,YAAD,CAHF;AAKD,KA7C4D;;AAAA,qDAmD3BA,YAAD,IAA0B;AACzDvB,MAAAA,SAAS,CAACwB,0BAAV,CACEtB,WAAW,CAACuB,cAAZ,CAA2B,IAA3B,CADF,EAEEpB,oBAAoB,GAAGqB,QAAvB,CAAgCE,uBAFlC,EAGE,CAACL,YAAD,CAHF;AAKD,KAzD4D;;AAAA,8CAgElCM,aAAD,IAA4B;AACpD7B,MAAAA,SAAS,CAACwB,0BAAV,CACEtB,WAAW,CAACuB,cAAZ,CAA2B,IAA3B,CADF,EAEEpB,oBAAoB,GAAGqB,QAAvB,CAAgCI,gBAFlC,EAGE,CAACD,aAAD,CAHF;AAKD,KAtE4D;;AAAA,8DAwElB,MAAM;AAC/C,aAAO,KAAKV,WAAZ;AACD,KA1E4D;AAAA;;AA4E3B,MAAtBY,sBAAsB,GAAG;AACnC,UAAMC,uBAAuB,GAC3B,CAAC,KAAKnB,KAAL,CAAWoB,eAAZ,IAA+B,KAAKpB,KAAL,CAAWoB,eAAX,KAA+B,QADhE;;AAGA,QAAID,uBAAJ,EAA6B;AAC3B,aAAO7B,WAAW,CAAC+B,KAAZ,GAAoB,KAApB,GAA4B,KAAnC;AACD,KAFD,MAEO;AACL,aAAO,KAAKrB,KAAL,CAAWoB,eAAlB;AACD;AACF;;AAEDE,EAAAA,MAAM,GAAG;AACP,wBACE,oBAAC,oBAAD,eACM,KAAKtB,KADX;AAEE,MAAA,GAAG,EAAE,KAAKN;AAAiB;AAF7B;AAGE,MAAA,KAAK,EAAE,KAAKM,KAAL,CAAWuB,KAHpB;AAIE,MAAA,eAAe,EAAE,KAAKL,sBAJxB;AAKE,MAAA,YAAY,EAAE,KAAKM,aALrB;AAME,MAAA,wBAAwB,EAAE,KAAKC,yBANjC;AAOE,MAAA,cAAc,EAAE,KAAKC,eAPvB;AAQE,MAAA,+BAA+B,EAAE,KAAKC,gCARxC;AASE,MAAA,QAAQ,EAAEpC,2BAA2B,CAAC,KAAKS,KAAL,CAAW4B,QAAZ;AATvC,OADF;AAaD;;AArG4D","sourcesContent":["import React, { ReactElement } from 'react';\nimport { Platform, UIManager, Keyboard } from 'react-native';\nimport ReactNative, { I18nManager } from 'react-native';\nimport type {\n PagerViewOnPageScrollEvent,\n PagerViewOnPageSelectedEvent,\n PageScrollStateChangedNativeEvent,\n PagerViewProps,\n} from './types';\n\nimport { childrenWithOverriddenStyle } from './utils';\nimport { getViewManagerConfig, PagerViewViewManager } from './PagerViewNative';\n\n/**\n * Container that allows to flip left and right between child views. Each\n * child view of the `PagerView` will be treated as a separate page\n * and will be stretched to fill the `PagerView`.\n *\n * It is important all children are `<View>`s and not composite components.\n * You can set style properties like `padding` or `backgroundColor` for each\n * child. It is also important that each child have a `key` prop.\n *\n * Example:\n *\n * ```\n * render: function() {\n * return (\n * <PagerView\n * style={styles.PagerView}\n * initialPage={0}>\n * <View style={styles.pageStyle} key=\"1\">\n * <Text>First page</Text>\n * </View>\n * <View style={styles.pageStyle} key=\"2\">\n * <Text>Second page</Text>\n * </View>\n * </PagerView>\n * );\n * }\n *\n * ...\n *\n * var styles = {\n * ...\n * PagerView: {\n * flex: 1\n * },\n * pageStyle: {\n * alignItems: 'center',\n * padding: 20,\n * }\n * }\n * ```\n */\n\nexport class PagerView extends React.Component<PagerViewProps> {\n private isScrolling = false;\n private PagerView = React.createRef<typeof PagerViewViewManager>();\n\n public getInnerViewNode = (): ReactElement => {\n return this.PagerView.current!.getInnerViewNode();\n };\n\n private _onPageScroll = (e: PagerViewOnPageScrollEvent) => {\n if (this.props.onPageScroll) {\n this.props.onPageScroll(e);\n }\n // Not implemented on iOS yet\n if (Platform.OS === 'android') {\n if (this.props.keyboardDismissMode === 'on-drag') {\n Keyboard.dismiss();\n }\n }\n };\n\n private _onPageScrollStateChanged = (\n e: PageScrollStateChangedNativeEvent\n ) => {\n if (this.props.onPageScrollStateChanged) {\n this.props.onPageScrollStateChanged(e);\n }\n this.isScrolling = e.nativeEvent.pageScrollState === 'dragging';\n };\n\n private _onPageSelected = (e: PagerViewOnPageSelectedEvent) => {\n if (this.props.onPageSelected) {\n this.props.onPageSelected(e);\n }\n };\n\n /**\n * A helper function to scroll to a specific page in the PagerView.\n * The transition between pages will be animated.\n */\n public setPage = (selectedPage: number) => {\n UIManager.dispatchViewManagerCommand(\n ReactNative.findNodeHandle(this),\n getViewManagerConfig().Commands.setPage,\n [selectedPage]\n );\n };\n\n /**\n * A helper function to scroll to a specific page in the PagerView.\n * The transition between pages will *not* be animated.\n */\n public setPageWithoutAnimation = (selectedPage: number) => {\n UIManager.dispatchViewManagerCommand(\n ReactNative.findNodeHandle(this),\n getViewManagerConfig().Commands.setPageWithoutAnimation,\n [selectedPage]\n );\n };\n\n /**\n * A helper function to enable/disable scroll imperatively\n * The recommended way is using the scrollEnabled prop, however, there might be a case where a\n * imperative solution is more useful (e.g. for not blocking an animation)\n */\n public setScrollEnabled = (scrollEnabled: boolean) => {\n UIManager.dispatchViewManagerCommand(\n ReactNative.findNodeHandle(this),\n getViewManagerConfig().Commands.setScrollEnabled,\n [scrollEnabled]\n );\n };\n\n private _onMoveShouldSetResponderCapture = () => {\n return this.isScrolling;\n };\n\n private get deducedLayoutDirection() {\n const shouldUseDeviceRtlSetup =\n !this.props.layoutDirection || this.props.layoutDirection === 'locale';\n\n if (shouldUseDeviceRtlSetup) {\n return I18nManager.isRTL ? 'rtl' : 'ltr';\n } else {\n return this.props.layoutDirection;\n }\n }\n\n render() {\n return (\n <PagerViewViewManager\n {...this.props}\n ref={this.PagerView as any /** TODO: Fix ref type */}\n style={this.props.style}\n layoutDirection={this.deducedLayoutDirection}\n onPageScroll={this._onPageScroll}\n onPageScrollStateChanged={this._onPageScrollStateChanged}\n onPageSelected={this._onPageSelected}\n onMoveShouldSetResponderCapture={this._onMoveShouldSetResponderCapture}\n children={childrenWithOverriddenStyle(this.props.children)}\n />\n );\n }\n}\n"]} 78 - \ No newline at end of file 79 - +{"version":3,"sources":["PagerView.tsx"],"names":["React","Platform","UIManager","Keyboard","ReactNative","I18nManager","childrenWithOverriddenStyle","getViewManagerConfig","PagerViewViewManager","PagerView","Component","createRef","current","getInnerViewNode","e","props","onPageScroll","OS","keyboardDismissMode","dismiss","onPageScrollStateChanged","isScrolling","nativeEvent","pageScrollState","onPageSelected","selectedPage","dispatchViewManagerCommand","findNodeHandle","Commands","setPage","setPageWithoutAnimation","scrollEnabled","setScrollEnabled","deducedLayoutDirection","shouldUseDeviceRtlSetup","layoutDirection","isRTL","render","children","forwardedRef","rest","style","_onPageScroll","_onPageScrollStateChanged","_onPageSelected","_onMoveShouldSetResponderCapture"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAoC,OAApC;AACA,SAASC,QAAT,EAAmBC,SAAnB,EAA8BC,QAA9B,QAA8C,cAA9C;AACA,OAAOC,WAAP,IAAsBC,WAAtB,QAAyC,cAAzC;AAQA,SAASC,2BAAT,QAA4C,SAA5C;AACA,SAASC,oBAAT,EAA+BC,oBAA/B,QAA2D,mBAA3D;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMC,SAAN,SAAwBT,KAAK,CAACU,SAA9B,CAAgF;AAAA;AAAA;;AAAA,yCAC/D,KAD+D;;AAAA,oDAEjEV,KAAK,CAACW,SAAN,EAFiE;;AAAA,8CAI3D,MAAoB;AAC5C,aAAO,KAAKF,SAAL,CAAeG,OAAf,CAAwBC,gBAAxB,EAAP;AACD,KANoF;;AAAA,2CAQ5DC,CAAD,IAAmC;AACzD,UAAI,KAAKC,KAAL,CAAWC,YAAf,EAA6B;AAC3B,aAAKD,KAAL,CAAWC,YAAX,CAAwBF,CAAxB;AACD,OAHwD,CAIzD;;;AACA,UAAIb,QAAQ,CAACgB,EAAT,KAAgB,SAApB,EAA+B;AAC7B,YAAI,KAAKF,KAAL,CAAWG,mBAAX,KAAmC,SAAvC,EAAkD;AAChDf,UAAAA,QAAQ,CAACgB,OAAT;AACD;AACF;AACF,KAlBoF;;AAAA,uDAqBnFL,CADkC,IAE/B;AACH,UAAI,KAAKC,KAAL,CAAWK,wBAAf,EAAyC;AACvC,aAAKL,KAAL,CAAWK,wBAAX,CAAoCN,CAApC;AACD;;AACD,WAAKO,WAAL,GAAmBP,CAAC,CAACQ,WAAF,CAAcC,eAAd,KAAkC,UAArD;AACD,KA3BoF;;AAAA,6CA6B1DT,CAAD,IAAqC;AAC7D,UAAI,KAAKC,KAAL,CAAWS,cAAf,EAA+B;AAC7B,aAAKT,KAAL,CAAWS,cAAX,CAA0BV,CAA1B;AACD;AACF,KAjCoF;;AAAA,qCAuCnEW,YAAD,IAA0B;AACzCvB,MAAAA,SAAS,CAACwB,0BAAV,CACEtB,WAAW,CAACuB,cAAZ,CAA2B,IAA3B,CADF,EAEEpB,oBAAoB,GAAGqB,QAAvB,CAAgCC,OAFlC,EAGE,CAACJ,YAAD,CAHF;AAKD,KA7CoF;;AAAA,qDAmDnDA,YAAD,IAA0B;AACzDvB,MAAAA,SAAS,CAACwB,0BAAV,CACEtB,WAAW,CAACuB,cAAZ,CAA2B,IAA3B,CADF,EAEEpB,oBAAoB,GAAGqB,QAAvB,CAAgCE,uBAFlC,EAGE,CAACL,YAAD,CAHF;AAKD,KAzDoF;;AAAA,8CAgE1DM,aAAD,IAA4B;AACpD7B,MAAAA,SAAS,CAACwB,0BAAV,CACEtB,WAAW,CAACuB,cAAZ,CAA2B,IAA3B,CADF,EAEEpB,oBAAoB,GAAGqB,QAAvB,CAAgCI,gBAFlC,EAGE,CAACD,aAAD,CAHF;AAKD,KAtEoF;;AAAA,8DAwE1C,MAAM;AAC/C,aAAO,KAAKV,WAAZ;AACD,KA1EoF;AAAA;;AA4EnD,MAAtBY,sBAAsB,GAAG;AACnC,UAAMC,uBAAuB,GAC3B,CAAC,KAAKnB,KAAL,CAAWoB,eAAZ,IAA+B,KAAKpB,KAAL,CAAWoB,eAAX,KAA+B,QADhE;;AAGA,QAAID,uBAAJ,EAA6B;AAC3B,aAAO7B,WAAW,CAAC+B,KAAZ,GAAoB,KAApB,GAA4B,KAAnC;AACD,KAFD,MAEO;AACL,aAAO,KAAKrB,KAAL,CAAWoB,eAAlB;AACD;AACF;;AAEDE,EAAAA,MAAM,GAAG;AACP,UAAM;AAAEC,MAAAA,QAAF;AAAYC,MAAAA,YAAZ;AAA0B,SAAGC;AAA7B,QAAsC,KAAKzB,KAAjD;AAEA,wBACE,oBAAC,oBAAD,eACMyB,IADN;AAEE;AACA,MAAA,KAAK,EAAE,KAAKzB,KAAL,CAAW0B,KAHpB;AAIE,MAAA,eAAe,EAAE,KAAKR,sBAJxB;AAKE,MAAA,YAAY,EAAE,KAAKS,aALrB;AAME,MAAA,wBAAwB,EAAE,KAAKC,yBANjC;AAOE,MAAA,cAAc,EAAE,KAAKC,eAPvB;AAQE,MAAA,+BAA+B,EAAE,KAAKC,gCARxC;AASE,MAAA,QAAQ,EAAEvC,2BAA2B,CAACgC,QAAD;AATvC,OADF;AAaD;;AAvGoF","sourcesContent":["import React, { ReactElement } from 'react';\nimport { Platform, UIManager, Keyboard } from 'react-native';\nimport ReactNative, { I18nManager } from 'react-native';\nimport type {\n PagerViewOnPageScrollEvent,\n PagerViewOnPageSelectedEvent,\n PageScrollStateChangedNativeEvent,\n PagerViewProps,\n} from './types';\n\nimport { childrenWithOverriddenStyle } from './utils';\nimport { getViewManagerConfig, PagerViewViewManager } from './PagerViewNative';\n\n/**\n * Container that allows to flip left and right between child views. Each\n * child view of the `PagerView` will be treated as a separate page\n * and will be stretched to fill the `PagerView`.\n *\n * It is important all children are `<View>`s and not composite components.\n * You can set style properties like `padding` or `backgroundColor` for each\n * child. It is also important that each child have a `key` prop.\n *\n * Example:\n *\n * ```\n * render: function() {\n * return (\n * <PagerView\n * style={styles.PagerView}\n * initialPage={0}>\n * <View style={styles.pageStyle} key=\"1\">\n * <Text>First page</Text>\n * </View>\n * <View style={styles.pageStyle} key=\"2\">\n * <Text>Second page</Text>\n * </View>\n * </PagerView>\n * );\n * }\n *\n * ...\n *\n * var styles = {\n * ...\n * PagerView: {\n * flex: 1\n * },\n * pageStyle: {\n * alignItems: 'center',\n * padding: 20,\n * }\n * }\n * ```\n */\n\nexport class PagerView extends React.Component<PagerViewProps, { forwardedRef?: any }> {\n private isScrolling = false;\n private PagerView = React.createRef<typeof PagerViewViewManager>();\n\n public getInnerViewNode = (): ReactElement => {\n return this.PagerView.current!.getInnerViewNode();\n };\n\n private _onPageScroll = (e: PagerViewOnPageScrollEvent) => {\n if (this.props.onPageScroll) {\n this.props.onPageScroll(e);\n }\n // Not implemented on iOS yet\n if (Platform.OS === 'android') {\n if (this.props.keyboardDismissMode === 'on-drag') {\n Keyboard.dismiss();\n }\n }\n };\n\n private _onPageScrollStateChanged = (\n e: PageScrollStateChangedNativeEvent\n ) => {\n if (this.props.onPageScrollStateChanged) {\n this.props.onPageScrollStateChanged(e);\n }\n this.isScrolling = e.nativeEvent.pageScrollState === 'dragging';\n };\n\n private _onPageSelected = (e: PagerViewOnPageSelectedEvent) => {\n if (this.props.onPageSelected) {\n this.props.onPageSelected(e);\n }\n };\n\n /**\n * A helper function to scroll to a specific page in the PagerView.\n * The transition between pages will be animated.\n */\n public setPage = (selectedPage: number) => {\n UIManager.dispatchViewManagerCommand(\n ReactNative.findNodeHandle(this),\n getViewManagerConfig().Commands.setPage,\n [selectedPage]\n );\n };\n\n /**\n * A helper function to scroll to a specific page in the PagerView.\n * The transition between pages will *not* be animated.\n */\n public setPageWithoutAnimation = (selectedPage: number) => {\n UIManager.dispatchViewManagerCommand(\n ReactNative.findNodeHandle(this),\n getViewManagerConfig().Commands.setPageWithoutAnimation,\n [selectedPage]\n );\n };\n\n /**\n * A helper function to enable/disable scroll imperatively\n * The recommended way is using the scrollEnabled prop, however, there might be a case where a\n * imperative solution is more useful (e.g. for not blocking an animation)\n */\n public setScrollEnabled = (scrollEnabled: boolean) => {\n UIManager.dispatchViewManagerCommand(\n ReactNative.findNodeHandle(this),\n getViewManagerConfig().Commands.setScrollEnabled,\n [scrollEnabled]\n );\n };\n\n private _onMoveShouldSetResponderCapture = () => {\n return this.isScrolling;\n };\n\n private get deducedLayoutDirection() {\n const shouldUseDeviceRtlSetup =\n !this.props.layoutDirection || this.props.layoutDirection === 'locale';\n\n if (shouldUseDeviceRtlSetup) {\n return I18nManager.isRTL ? 'rtl' : 'ltr';\n } else {\n return this.props.layoutDirection;\n }\n }\n\n render() {\n const { children, forwardedRef, ...rest } = this.props;\n\n return (\n <PagerViewViewManager\n {...rest}\n // ref={this.PagerView as any /** TODO: Fix ref type */}\n style={this.props.style}\n layoutDirection={this.deducedLayoutDirection}\n onPageScroll={this._onPageScroll}\n onPageScrollStateChanged={this._onPageScrollStateChanged}\n onPageSelected={this._onPageSelected}\n onMoveShouldSetResponderCapture={this._onMoveShouldSetResponderCapture}\n children={childrenWithOverriddenStyle(children)}\n />\n );\n }\n}\n"]} 80 - \ No newline at end of file 81 - diff --git a/node_modules/react-native-pager-view/lib/typescript/PagerView.d.ts b/node_modules/react-native-pager-view/lib/typescript/PagerView.d.ts 82 - index f70d3bc..5610963 100644 83 - --- a/node_modules/react-native-pager-view/lib/typescript/PagerView.d.ts 84 - +++ b/node_modules/react-native-pager-view/lib/typescript/PagerView.d.ts 85 - @@ -41,7 +41,9 @@ import type { PagerViewProps } from './types'; 86 - * } 87 - * ``` 88 - */ 89 - -export declare class PagerView extends React.Component<PagerViewProps> { 90 - +export declare class PagerView extends React.Component<PagerViewProps, { 91 - + forwardedRef?: any; 92 - +}> { 93 - private isScrolling; 94 - private PagerView; 95 - getInnerViewNode: () => ReactElement; 96 - diff --git a/node_modules/react-native-pager-view/lib/typescript/__tests__/index.test.d.ts b/node_modules/react-native-pager-view/lib/typescript/__tests__/index.test.d.ts 97 - new file mode 100644 98 - index 0000000..e69de29 99 - diff --git a/node_modules/react-native-pager-view/src/PagerView.tsx b/node_modules/react-native-pager-view/src/PagerView.tsx 100 - index f7585d5..ee9843b 100644 101 - --- a/node_modules/react-native-pager-view/src/PagerView.tsx 102 - +++ b/node_modules/react-native-pager-view/src/PagerView.tsx 103 - @@ -141,17 +141,19 @@ export class PagerView extends React.Component<PagerViewProps> { 104 - } 105 - 106 - render() { 107 - + const {children, forwardedRef, ...rest} = this.props; 108 - + 109 - return ( 110 - <PagerViewViewManager 111 - - {...this.props} 112 - - ref={this.PagerView as any /** TODO: Fix ref type */} 113 - + {...rest} 114 - + // ref={this.PagerView as any /** TODO: Fix ref type */} 115 - style={this.props.style} 116 - layoutDirection={this.deducedLayoutDirection} 117 - onPageScroll={this._onPageScroll} 118 - onPageScrollStateChanged={this._onPageScrollStateChanged} 119 - onPageSelected={this._onPageSelected} 120 - onMoveShouldSetResponderCapture={this._onMoveShouldSetResponderCapture} 121 - - children={childrenWithOverriddenStyle(this.props.children)} 122 - + children={childrenWithOverriddenStyle(children)} 123 - /> 124 - ); 125 - }
+1
src/view/com/composer/Autocomplete.tsx
··· 46 46 <Animated.View style={[styles.outer, pal.view, pal.border, topAnimStyle]}> 47 47 {items.map((item, i) => ( 48 48 <TouchableOpacity 49 + testID="autocompleteButton" 49 50 key={i} 50 51 style={[pal.border, styles.item]} 51 52 onPress={() => onSelect(item.handle)}>
+12 -4
src/view/com/composer/ComposePost.tsx
··· 56 56 const [isSelectingPhotos, setIsSelectingPhotos] = useState(false) 57 57 const [selectedPhotos, setSelectedPhotos] = useState<string[]>([]) 58 58 59 - const autocompleteView = useMemo<UserAutocompleteViewModel>( 59 + // Using default import (React.use...) instead of named import (use...) to be able to mock store's data in jest environment 60 + const autocompleteView = React.useMemo<UserAutocompleteViewModel>( 60 61 () => new UserAutocompleteViewModel(store), 61 62 [store], 62 63 ) 63 - const localPhotos = useMemo<UserLocalPhotosModel>( 64 + const localPhotos = React.useMemo<UserLocalPhotosModel>( 64 65 () => new UserLocalPhotosModel(store), 65 66 [store], 66 67 ) ··· 179 180 180 181 return ( 181 182 <KeyboardAvoidingView 183 + testID="composePostView" 182 184 behavior={Platform.OS === 'ios' ? 'padding' : 'height'} 183 185 style={[pal.view, styles.outer]}> 184 186 <SafeAreaView style={s.flex1}> 185 187 <View style={styles.topbar}> 186 - <TouchableOpacity onPress={onPressCancel}> 188 + <TouchableOpacity 189 + testID="composerCancelButton" 190 + onPress={onPressCancel}> 187 191 <Text style={[pal.link, s.f18]}>Cancel</Text> 188 192 </TouchableOpacity> 189 193 <View style={s.flex1} /> ··· 192 196 <ActivityIndicator /> 193 197 </View> 194 198 ) : canPost ? ( 195 - <TouchableOpacity onPress={onPressPublish}> 199 + <TouchableOpacity 200 + testID="composerPublishButton" 201 + onPress={onPressPublish}> 196 202 <LinearGradient 197 203 colors={[gradients.primary.start, gradients.primary.end]} 198 204 start={{x: 0, y: 0}} ··· 257 263 size={50} 258 264 /> 259 265 <TextInput 266 + testID="composerTextInput" 260 267 ref={textInput} 261 268 multiline 262 269 scrollEnabled ··· 283 290 )} 284 291 <View style={[pal.border, styles.bottomBar]}> 285 292 <TouchableOpacity 293 + testID="composerSelectPhotosButton" 286 294 onPress={onPressSelectPhotos} 287 295 style={[s.pl5]} 288 296 hitSlop={HITSLOP}>
+4
src/view/com/composer/PhotoCarouselPicker.tsx
··· 85 85 86 86 return ( 87 87 <ScrollView 88 + testID="photoCarouselPickerView" 88 89 horizontal 89 90 style={[pal.view, styles.photosContainer]} 90 91 showsHorizontalScrollIndicator={false}> 91 92 <TouchableOpacity 93 + testID="openCameraButton" 92 94 style={[styles.galleryButton, pal.border, styles.photo]} 93 95 onPress={handleOpenCamera}> 94 96 <FontAwesomeIcon icon="camera" size={24} style={pal.link} /> 95 97 </TouchableOpacity> 96 98 <TouchableOpacity 99 + testID="openGalleryButton" 97 100 style={[styles.galleryButton, pal.border, styles.photo]} 98 101 onPress={handleOpenGallery}> 99 102 <FontAwesomeIcon icon="image" style={pal.link} size={24} /> 100 103 </TouchableOpacity> 101 104 {localPhotos.photos.map((item: any, index: number) => ( 102 105 <TouchableOpacity 106 + testID="openSelectPhotoButton" 103 107 key={`local-image-${index}`} 104 108 style={[pal.border, styles.photoButton]} 105 109 onPress={() => handleSelectPhoto(item.node.image.uri)}>
+1
src/view/com/composer/Prompt.tsx
··· 17 17 const pal = usePalette('default') 18 18 return ( 19 19 <TouchableOpacity 20 + testID="composePromptButton" 20 21 style={[ 21 22 pal.view, 22 23 pal.border,
+7 -2
src/view/com/composer/SelectedPhoto.tsx
··· 25 25 ) 26 26 27 27 return selectedPhotos.length !== 0 ? ( 28 - <View style={styles.imageContainer}> 28 + <View testID="selectedPhotosView" style={styles.imageContainer}> 29 29 {selectedPhotos.length !== 0 && 30 30 selectedPhotos.map((item, index) => ( 31 31 <View 32 32 key={`selected-image-${index}`} 33 33 style={[styles.image, imageStyle]}> 34 34 <TouchableOpacity 35 + testID="removePhotoButton" 35 36 onPress={() => handleRemovePhoto(item)} 36 37 style={styles.removePhotoButton}> 37 38 <FontAwesomeIcon ··· 41 42 /> 42 43 </TouchableOpacity> 43 44 44 - <Image style={[styles.image, imageStyle]} source={{uri: item}} /> 45 + <Image 46 + testID="selectedPhotoImage" 47 + style={[styles.image, imageStyle]} 48 + source={{uri: item}} 49 + /> 45 50 </View> 46 51 ))} 47 52 </View>
+3 -2
src/view/com/discover/SuggestedFollows.tsx
··· 1 - import React, {useMemo, useEffect, useState} from 'react' 1 + import React, {useEffect, useState} from 'react' 2 2 import { 3 3 ActivityIndicator, 4 4 FlatList, ··· 36 36 const store = useStores() 37 37 const [follows, setFollows] = useState<Record<string, string>>({}) 38 38 39 - const view = useMemo<SuggestedActorsViewModel>( 39 + // Using default import (React.use...) instead of named import (use...) to be able to mock store's data in jest environment 40 + const view = React.useMemo<SuggestedActorsViewModel>( 40 41 () => new SuggestedActorsViewModel(store), 41 42 [], 42 43 )
+12 -3
src/view/com/login/CreateAccount.tsx
··· 171 171 172 172 const isReady = !!email && !!password && !!handle && is13 173 173 return ( 174 - <ScrollView style={{flex: 1}}> 174 + <ScrollView testID="createAccount" style={{flex: 1}}> 175 175 <KeyboardAvoidingView behavior="padding" style={{flex: 1}}> 176 176 <View style={styles.logoHero}> 177 177 <Logo /> ··· 193 193 <View style={styles.groupContent}> 194 194 <FontAwesomeIcon icon="globe" style={styles.groupContentIcon} /> 195 195 <TouchableOpacity 196 + testID="registerSelectServiceButton" 196 197 style={styles.textBtn} 197 198 onPress={onPressSelectService}> 198 199 <Text style={styles.textBtnLabel}> ··· 235 236 style={styles.groupContentIcon} 236 237 /> 237 238 <TextInput 239 + testID="registerEmailInput" 238 240 style={[styles.textInput]} 239 241 placeholder="Email address" 240 242 placeholderTextColor={colors.blue0} ··· 248 250 <View style={styles.groupContent}> 249 251 <FontAwesomeIcon icon="lock" style={styles.groupContentIcon} /> 250 252 <TextInput 253 + testID="registerPasswordInput" 251 254 style={[styles.textInput]} 252 255 placeholder="Choose your password" 253 256 placeholderTextColor={colors.blue0} ··· 273 276 <View style={styles.groupContent}> 274 277 <FontAwesomeIcon icon="at" style={styles.groupContentIcon} /> 275 278 <TextInput 279 + testID="registerHandleInput" 276 280 style={[styles.textInput]} 277 281 placeholder="eg alice" 278 282 placeholderTextColor={colors.blue0} ··· 317 321 </View> 318 322 <View style={styles.groupContent}> 319 323 <TouchableOpacity 324 + testID="registerIs13Input" 320 325 style={styles.textBtn} 321 326 onPress={() => setIs13(!is13)}> 322 327 <View style={is13 ? styles.checkboxFilled : styles.checkbox}> ··· 339 344 </TouchableOpacity> 340 345 <View style={s.flex1} /> 341 346 {isReady ? ( 342 - <TouchableOpacity onPress={onPressNext}> 347 + <TouchableOpacity 348 + testID="createAccountButton" 349 + onPress={onPressNext}> 343 350 {isProcessing ? ( 344 351 <ActivityIndicator color="#fff" /> 345 352 ) : ( ··· 347 354 )} 348 355 </TouchableOpacity> 349 356 ) : !serviceDescription && error ? ( 350 - <TouchableOpacity onPress={onPressRetryConnect}> 357 + <TouchableOpacity 358 + testID="registerRetryButton" 359 + onPress={onPressRetryConnect}> 351 360 <Text style={[s.white, s.f18, s.bold, s.pr5]}>Retry</Text> 352 361 </TouchableOpacity> 353 362 ) : !serviceDescription ? (
+18 -8
src/view/com/login/Signin.tsx
··· 69 69 const onPressRetryConnect = () => setRetryDescribeTrigger({}) 70 70 71 71 return ( 72 - <KeyboardAvoidingView behavior="padding" style={{flex: 1}}> 72 + <KeyboardAvoidingView testID="signIn" behavior="padding" style={{flex: 1}}> 73 73 <View style={styles.logoHero}> 74 74 <Logo /> 75 75 </View> ··· 194 194 const isReady = !!serviceDescription && !!handle && !!password 195 195 return ( 196 196 <> 197 - <View style={styles.group}> 197 + <View testID="loginFormView" style={styles.group}> 198 198 <TouchableOpacity 199 + testID="loginSelectServiceButton" 199 200 style={[styles.groupTitle, {paddingRight: 0, paddingVertical: 6}]} 200 201 onPress={onPressSelectService}> 201 202 <Text style={[s.flex1, s.white, s.f18, s.bold]} numberOfLines={1}> ··· 213 214 <View style={styles.groupContent}> 214 215 <FontAwesomeIcon icon="at" style={styles.groupContentIcon} /> 215 216 <TextInput 217 + testID="loginUsernameInput" 216 218 style={styles.textInput} 217 219 placeholder="Username" 218 220 placeholderTextColor={colors.blue0} ··· 227 229 <View style={styles.groupContent}> 228 230 <FontAwesomeIcon icon="lock" style={styles.groupContentIcon} /> 229 231 <TextInput 232 + testID="loginPasswordInput" 230 233 style={styles.textInput} 231 234 placeholder="Password" 232 235 placeholderTextColor={colors.blue0} ··· 238 241 editable={!isProcessing} 239 242 /> 240 243 <TouchableOpacity 244 + testID="forgotPasswordButton" 241 245 style={styles.textInputInnerBtn} 242 246 onPress={onPressForgotPassword}> 243 247 <Text style={styles.textInputInnerBtnLabel}>Forgot</Text> ··· 260 264 </TouchableOpacity> 261 265 <View style={s.flex1} /> 262 266 {!serviceDescription && error ? ( 263 - <TouchableOpacity onPress={onPressRetryConnect}> 267 + <TouchableOpacity 268 + testID="loginRetryButton" 269 + onPress={onPressRetryConnect}> 264 270 <Text style={[s.white, s.f18, s.bold, s.pr5]}>Retry</Text> 265 271 </TouchableOpacity> 266 272 ) : !serviceDescription ? ( ··· 271 277 ) : isProcessing ? ( 272 278 <ActivityIndicator color="#fff" /> 273 279 ) : isReady ? ( 274 - <TouchableOpacity onPress={onPressNext}> 280 + <TouchableOpacity testID="loginNextButton" onPress={onPressNext}> 275 281 <Text style={[s.white, s.f18, s.bold, s.pr5]}>Next</Text> 276 282 </TouchableOpacity> 277 283 ) : undefined} ··· 339 345 Enter the email you used to create your account. We'll send you a "reset 340 346 code" so you can set a new password. 341 347 </Text> 342 - <View style={styles.group}> 348 + <View testID="forgotPasswordView" style={styles.group}> 343 349 <TouchableOpacity 350 + testID="forgotPasswordSelectServiceButton" 344 351 style={[styles.groupContent, {borderTopWidth: 0}]} 345 352 onPress={onPressSelectService}> 346 353 <FontAwesomeIcon icon="globe" style={styles.groupContentIcon} /> ··· 359 366 <View style={styles.groupContent}> 360 367 <FontAwesomeIcon icon="envelope" style={styles.groupContentIcon} /> 361 368 <TextInput 369 + testID="forgotPasswordEmail" 362 370 style={styles.textInput} 363 371 placeholder="Email address" 364 372 placeholderTextColor={colors.blue0} ··· 391 399 ) : !email ? ( 392 400 <Text style={[s.blue1, s.f18, s.bold, s.pr5]}>Next</Text> 393 401 ) : ( 394 - <TouchableOpacity onPress={onPressNext}> 402 + <TouchableOpacity testID="newPasswordButton" onPress={onPressNext}> 395 403 <Text style={[s.white, s.f18, s.bold, s.pr5]}>Next</Text> 396 404 </TouchableOpacity> 397 405 )} ··· 451 459 You will receive an email with a "reset code." Enter that code here, 452 460 then enter your new password. 453 461 </Text> 454 - <View style={styles.group}> 462 + <View testID="newPasswordView" style={styles.group}> 455 463 <View style={[styles.groupContent, {borderTopWidth: 0}]}> 456 464 <FontAwesomeIcon icon="ticket" style={styles.groupContentIcon} /> 457 465 <TextInput 466 + testID="resetCodeInput" 458 467 style={[styles.textInput]} 459 468 placeholder="Reset code" 460 469 placeholderTextColor={colors.blue0} ··· 469 478 <View style={styles.groupContent}> 470 479 <FontAwesomeIcon icon="lock" style={styles.groupContentIcon} /> 471 480 <TextInput 481 + testID="newPasswordInput" 472 482 style={styles.textInput} 473 483 placeholder="New password" 474 484 placeholderTextColor={colors.blue0} ··· 501 511 ) : !resetCode || !password ? ( 502 512 <Text style={[s.blue1, s.f18, s.bold, s.pr5]}>Next</Text> 503 513 ) : ( 504 - <TouchableOpacity onPress={onPressNext}> 514 + <TouchableOpacity testID="setNewPasswordButton" onPress={onPressNext}> 505 515 <Text style={[s.white, s.f18, s.bold, s.pr5]}>Next</Text> 506 516 </TouchableOpacity> 507 517 )}
+5 -4
src/view/com/notifications/InviteAccepter.tsx
··· 1 - import React, {useState} from 'react' 1 + import React from 'react' 2 2 import {StyleSheet, TouchableOpacity, View} from 'react-native' 3 3 import LinearGradient from 'react-native-linear-gradient' 4 4 import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' ··· 13 13 14 14 export function InviteAccepter({item}: {item: NotificationsViewItemModel}) { 15 15 const store = useStores() 16 - const [confirmationUri, setConfirmationUri] = useState<string>('') 16 + // Using default import (React.use...) instead of named import (use...) to be able to mock store's data in jest environment 17 + const [confirmationUri, setConfirmationUri] = React.useState<string>('') 17 18 const isMember = 18 19 confirmationUri !== '' || store.me.memberships?.isMemberOf(item.author.did) 19 20 const onPressAccept = async () => { ··· 54 55 return ( 55 56 <View style={styles.container}> 56 57 {!isMember ? ( 57 - <TouchableOpacity onPress={onPressAccept}> 58 + <TouchableOpacity testID="acceptInviteButton" onPress={onPressAccept}> 58 59 <LinearGradient 59 60 colors={[gradients.primary.start, gradients.primary.end]} 60 61 start={{x: 0, y: 0}} ··· 64 65 </LinearGradient> 65 66 </TouchableOpacity> 66 67 ) : ( 67 - <View style={styles.inviteAccepted}> 68 + <View testID="inviteAccepted" style={styles.inviteAccepted}> 68 69 <FontAwesomeIcon icon="check" size={14} style={s.mr5} /> 69 70 <Text style={[s.gray5, s.f15]}>Invite accepted</Text> 70 71 </View>
+3 -2
src/view/com/post-thread/PostRepostedBy.tsx
··· 1 - import React, {useState, useEffect} from 'react' 1 + import React, {useEffect} from 'react' 2 2 import {observer} from 'mobx-react-lite' 3 3 import {ActivityIndicator, FlatList, StyleSheet, View} from 'react-native' 4 4 import { ··· 18 18 uri: string 19 19 }) { 20 20 const store = useStores() 21 - const [view, setView] = useState<RepostedByViewModel | undefined>() 21 + // Using default import (React.use...) instead of named import (use...) to be able to mock store's data in jest environment 22 + const [view, setView] = React.useState<RepostedByViewModel | undefined>() 22 23 23 24 useEffect(() => { 24 25 if (view?.params.uri === uri) {
+2 -2
src/view/com/post-thread/PostVotedBy.tsx
··· 1 - import React, {useState, useEffect} from 'react' 1 + import React, {useEffect} from 'react' 2 2 import {observer} from 'mobx-react-lite' 3 3 import {ActivityIndicator, FlatList, StyleSheet, View} from 'react-native' 4 4 import { ··· 20 20 direction: 'up' | 'down' 21 21 }) { 22 22 const store = useStores() 23 - const [view, setView] = useState<VotesViewModel | undefined>() 23 + const [view, setView] = React.useState<VotesViewModel | undefined>() 24 24 25 25 useEffect(() => { 26 26 if (view?.params.uri === uri) {
+3 -1
src/view/com/posts/Feed.tsx
··· 25 25 onPressCompose, 26 26 onPressTryAgain, 27 27 onScroll, 28 + testID, 28 29 }: { 29 30 feed: FeedModel 30 31 style?: StyleProp<ViewStyle> ··· 32 33 onPressCompose: () => void 33 34 onPressTryAgain?: () => void 34 35 onScroll?: OnScrollCb 36 + testID?: string 35 37 }) { 36 38 // TODO optimize renderItem or FeedItem, we're getting this notice from RN: -prf 37 39 // VirtualizedList: You have a large list that is slow to update - make sure your ··· 83 85 <View /> 84 86 ) 85 87 return ( 86 - <View style={style}> 88 + <View testID={testID} style={style}> 87 89 {!data && <ComposePrompt onPressCompose={onPressCompose} />} 88 90 {feed.isLoading && !data && <PostFeedLoadingPlaceholder />} 89 91 {feed.hasError && (
+2 -2
src/view/com/profile/ProfileFollowers.tsx
··· 1 - import React, {useState, useEffect} from 'react' 1 + import React, {useEffect} from 'react' 2 2 import {observer} from 'mobx-react-lite' 3 3 import {ActivityIndicator, FlatList, StyleSheet, View} from 'react-native' 4 4 import { ··· 19 19 name: string 20 20 }) { 21 21 const store = useStores() 22 - const [view, setView] = useState<UserFollowersViewModel | undefined>() 22 + const [view, setView] = React.useState<UserFollowersViewModel | undefined>() 23 23 24 24 useEffect(() => { 25 25 if (view?.params.user === name) {
+3 -3
src/view/com/profile/ProfileFollows.tsx
··· 1 - import React, {useState, useEffect} from 'react' 1 + import React, {useEffect} from 'react' 2 2 import {observer} from 'mobx-react-lite' 3 3 import {ActivityIndicator, FlatList, StyleSheet, View} from 'react-native' 4 4 import { ··· 10 10 import {Text} from '../util/text/Text' 11 11 import {ErrorMessage} from '../util/error/ErrorMessage' 12 12 import {UserAvatar} from '../util/UserAvatar' 13 - import {s, colors} from '../../lib/styles' 13 + import {s} from '../../lib/styles' 14 14 import {usePalette} from '../../lib/hooks/usePalette' 15 15 16 16 export const ProfileFollows = observer(function ProfileFollows({ ··· 19 19 name: string 20 20 }) { 21 21 const store = useStores() 22 - const [view, setView] = useState<UserFollowsViewModel | undefined>() 22 + const [view, setView] = React.useState<UserFollowsViewModel | undefined>() 23 23 24 24 useEffect(() => { 25 25 if (view?.params.user === name) {
+12 -3
src/view/com/profile/ProfileHeader.tsx
··· 147 147 // = 148 148 if (view.hasError) { 149 149 return ( 150 - <View> 150 + <View testID="profileHeaderHasError"> 151 151 <Text>{view.error}</Text> 152 152 </View> 153 153 ) ··· 192 192 <View style={[styles.buttonsLine]}> 193 193 {isMe ? ( 194 194 <TouchableOpacity 195 + testID="profileHeaderEditProfileButton" 195 196 onPress={onPressEditProfile} 196 197 style={[styles.btn, styles.mainBtn, pal.btn]}> 197 198 <Text type="button" style={pal.text}> ··· 214 215 </Text> 215 216 </TouchableOpacity> 216 217 ) : ( 217 - <TouchableOpacity onPress={onPressToggleFollow}> 218 + <TouchableOpacity 219 + testID="profileHeaderToggleFollowButton" 220 + onPress={onPressToggleFollow}> 218 221 <LinearGradient 219 222 colors={[gradient[1], gradient[0]]} 220 223 start={{x: 0, y: 0}} ··· 257 260 </View> 258 261 <View style={styles.metricsLine}> 259 262 <TouchableOpacity 263 + testID="profileHeaderFollowersButton" 260 264 style={[s.flexRow, s.mr10]} 261 265 onPress={onPressFollowers}> 262 266 <Text type="body2" style={[s.bold, s.mr2, pal.text]}> ··· 268 272 </TouchableOpacity> 269 273 {view.isUser ? ( 270 274 <TouchableOpacity 275 + testID="profileHeaderFollowsButton" 271 276 style={[s.flexRow, s.mr10]} 272 277 onPress={onPressFollows}> 273 278 <Text type="body2" style={[s.bold, s.mr2, pal.text]}> ··· 280 285 ) : undefined} 281 286 {view.isScene ? ( 282 287 <TouchableOpacity 288 + testID="profileHeaderMembersButton" 283 289 style={[s.flexRow, s.mr10]} 284 290 onPress={onPressMembers}> 285 291 <Text type="body2" style={[s.bold, s.mr2, pal.text]}> ··· 350 356 </View> 351 357 {view.isScene && view.creator === store.me.did ? ( 352 358 <View style={[styles.sceneAdminContainer, pal.border]}> 353 - <TouchableOpacity onPress={onPressInviteMembers}> 359 + <TouchableOpacity 360 + testID="profileHeaderInviteMembersButton" 361 + onPress={onPressInviteMembers}> 354 362 <LinearGradient 355 363 colors={[gradient[1], gradient[0]]} 356 364 start={{x: 0, y: 0}} ··· 369 377 </View> 370 378 ) : undefined} 371 379 <TouchableOpacity 380 + testID="profileHeaderAviButton" 372 381 style={[pal.view, {borderColor: pal.colors.background}, styles.avi]} 373 382 onPress={onPressAvi}> 374 383 <UserAvatar
+5 -4
src/view/com/profile/ProfileMembers.tsx
··· 1 - import React, {useState, useEffect} from 'react' 1 + import React, {useEffect} from 'react' 2 2 import {observer} from 'mobx-react-lite' 3 3 import {ActivityIndicator, FlatList, View} from 'react-native' 4 4 import {MembersViewModel, MemberItem} from '../../../state/models/members-view' ··· 12 12 name: string 13 13 }) { 14 14 const store = useStores() 15 - const [view, setView] = useState<MembersViewModel | undefined>() 15 + // Using default import (React.use...) instead of named import (use...) to be able to mock store's data in jest environment 16 + const [view, setView] = React.useState<MembersViewModel | undefined>() 16 17 17 18 useEffect(() => { 18 19 if (view?.params.actor === name) { ··· 37 38 view.params.actor !== name 38 39 ) { 39 40 return ( 40 - <View> 41 + <View testID="profileMembersActivityIndicatorView"> 41 42 <ActivityIndicator /> 42 43 </View> 43 44 ) ··· 68 69 /> 69 70 ) 70 71 return ( 71 - <View> 72 + <View testID="profileMembersFlatList"> 72 73 <FlatList 73 74 data={view.members} 74 75 keyExtractor={item => item._reactKey}
+3
src/view/com/util/PostCtrls.tsx
··· 115 115 <View style={[styles.ctrls, opts.style]}> 116 116 <View style={s.flex1}> 117 117 <TouchableOpacity 118 + testID="postCtrlsReplyButton" 118 119 style={styles.ctrl} 119 120 hitSlop={HITSLOP} 120 121 onPress={opts.onPressReply}> ··· 130 131 </View> 131 132 <View style={s.flex1}> 132 133 <TouchableOpacity 134 + testID="postCtrlsToggleRepostButton" 133 135 hitSlop={HITSLOP} 134 136 onPress={onPressToggleRepostWrapper} 135 137 style={styles.ctrl}> ··· 156 158 </View> 157 159 <View style={s.flex1}> 158 160 <TouchableOpacity 161 + testID="postCtrlsToggleUpvoteButton" 159 162 style={styles.ctrl} 160 163 hitSlop={HITSLOP} 161 164 onPress={onPressToggleUpvoteWrapper}>
+5 -3
src/view/com/util/error/ErrorMessage.tsx
··· 8 8 } from 'react-native' 9 9 import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' 10 10 import {Text} from '../text/Text' 11 - import {colors} from '../../../lib/styles' 12 11 import {useTheme} from '../../../lib/ThemeContext' 13 12 import {usePalette} from '../../../lib/hooks/usePalette' 14 13 ··· 26 25 const theme = useTheme() 27 26 const pal = usePalette('error') 28 27 return ( 29 - <View style={[styles.outer, pal.view, style]}> 28 + <View testID="errorMessageView" style={[styles.outer, pal.view, style]}> 30 29 <View 31 30 style={[styles.errorIcon, {backgroundColor: theme.palette.error.icon}]}> 32 31 <FontAwesomeIcon icon="exclamation" style={pal.text} size={16} /> ··· 38 37 {message} 39 38 </Text> 40 39 {onPressTryAgain && ( 41 - <TouchableOpacity style={styles.btn} onPress={onPressTryAgain}> 40 + <TouchableOpacity 41 + testID="errorMessageTryAgainButton" 42 + style={styles.btn} 43 + onPress={onPressTryAgain}> 42 44 <FontAwesomeIcon 43 45 icon="arrows-rotate" 44 46 style={{color: theme.palette.error.icon}}
+5 -1
src/view/com/util/error/ErrorScreen.tsx
··· 11 11 message, 12 12 details, 13 13 onPressTryAgain, 14 + testID, 14 15 }: { 15 16 title: string 16 17 message: string 17 18 details?: string 18 19 onPressTryAgain?: () => void 20 + testID?: string 19 21 }) { 20 22 const theme = useTheme() 21 23 const pal = usePalette('error') 22 24 return ( 23 - <View style={[styles.outer, pal.view]}> 25 + <View testID={testID} style={[styles.outer, pal.view]}> 24 26 <View style={styles.errorIconContainer}> 25 27 <View 26 28 style={[ ··· 40 42 <Text style={[styles.message, pal.textLight]}>{message}</Text> 41 43 {details && ( 42 44 <Text 45 + testID={`${testID}-details`} 43 46 type="body2" 44 47 style={[ 45 48 styles.details, ··· 52 55 {onPressTryAgain && ( 53 56 <View style={styles.btnContainer}> 54 57 <TouchableOpacity 58 + testID="errorScreenTryAgainButton" 55 59 style={[styles.btn, {backgroundColor: theme.palette.error.icon}]} 56 60 onPress={onPressTryAgain}> 57 61 <FontAwesomeIcon icon="arrows-rotate" style={pal.text} size={16} />
+2 -1
src/view/com/util/forms/DropdownButton.tsx
··· 75 75 style={style} 76 76 onPress={onPress} 77 77 hitSlop={HITSLOP} 78 - ref={ref}> 78 + // Fix an issue where specific references cause runtime error in jest environment 79 + ref={process.env.JEST_WORKER_ID != null ? null : ref}> 79 80 {children} 80 81 </TouchableOpacity> 81 82 )
+4 -1
src/view/screens/Contacts.tsx
··· 25 25 return ( 26 26 <View> 27 27 <View style={styles.section}> 28 - <Text style={styles.title}>Contacts</Text> 28 + <Text testID="contactsTitle" style={styles.title}> 29 + Contacts 30 + </Text> 29 31 </View> 30 32 <View style={styles.section}> 31 33 <View style={styles.searchContainer}> ··· 35 37 style={styles.searchIcon} 36 38 /> 37 39 <TextInput 40 + testID="contactsTextInput" 38 41 ref={inputRef} 39 42 value={searchText} 40 43 style={styles.searchInput}
+27 -26
src/view/screens/Home.tsx
··· 1 - import React, {useState, useEffect} from 'react' 1 + import React, {useEffect} from 'react' 2 2 import {StyleSheet, TouchableOpacity, View} from 'react-native' 3 3 import {observer} from 'mobx-react-lite' 4 4 import useAppState from 'react-native-appstate-hook' ··· 24 24 const store = useStores() 25 25 const onMainScroll = useOnMainScroll(store) 26 26 const safeAreaInsets = useSafeAreaInsets() 27 - const [hasSetup, setHasSetup] = useState<boolean>(false) 27 + const [wasVisible, setWasVisible] = React.useState<boolean>(false) 28 28 const {appState} = useAppState({ 29 29 onForeground: () => doPoll(true), 30 30 }) 31 31 32 - const doPoll = (knownActive = false) => { 33 - if ((!knownActive && appState !== 'active') || !visible) { 34 - return 35 - } 36 - if (store.me.mainFeed.isLoading) { 37 - return 38 - } 39 - store.log.debug('Polling home feed') 40 - store.me.mainFeed.checkForLatest().catch(e => { 41 - store.log.error('Failed to poll feed', e) 42 - }) 43 - } 32 + const doPoll = React.useCallback( 33 + (knownActive = false) => { 34 + if ((!knownActive && appState !== 'active') || !visible) { 35 + return 36 + } 37 + if (store.me.mainFeed.isLoading) { 38 + return 39 + } 40 + store.log.debug('Polling home feed') 41 + store.me.mainFeed.checkForLatest().catch(e => { 42 + store.log.error('Failed to poll feed', e) 43 + }) 44 + }, 45 + [appState, visible, store], 46 + ) 44 47 45 48 useEffect(() => { 46 - let aborted = false 47 49 const pollInterval = setInterval(() => doPoll(), 15e3) 48 50 if (!visible) { 51 + setWasVisible(false) 52 + return 53 + } else if (wasVisible) { 49 54 return 50 55 } 56 + setWasVisible(true) 51 57 52 - if (hasSetup) { 53 - store.log.debug('Updating home feed') 58 + store.nav.setTitle(navIdx, 'Home') 59 + store.log.debug('Updating home feed') 60 + if (store.me.mainFeed.hasContent) { 54 61 store.me.mainFeed.update() 55 - doPoll() 56 62 } else { 57 - store.nav.setTitle(navIdx, 'Home') 58 - store.log.debug('Fetching home feed') 59 - store.me.mainFeed.setup().then(() => { 60 - if (aborted) return 61 - setHasSetup(true) 62 - }) 63 + store.me.mainFeed.setup() 63 64 } 64 65 return () => { 65 66 clearInterval(pollInterval) 66 - aborted = true 67 67 } 68 - }, [visible, store]) 68 + }, [visible, store, navIdx, doPoll, wasVisible]) 69 69 70 70 const onPressCompose = () => { 71 71 store.shell.openComposer({}) ··· 82 82 <View style={s.flex1}> 83 83 <ViewHeader title="Bluesky" subtitle="Private Beta" canGoBack={false} /> 84 84 <Feed 85 + testID="homeFeed" 85 86 key="default" 86 87 feed={store.me.mainFeed} 87 88 scrollElRef={scrollElRef}
+9 -3
src/view/screens/Login.tsx
··· 35 35 <Text style={styles.title}>Bluesky</Text> 36 36 <Text style={styles.subtitle}>[ private beta ]</Text> 37 37 </View> 38 - <View style={s.flex1}> 39 - <TouchableOpacity style={styles.btn} onPress={onPressCreateAccount}> 38 + <View testID="signinOrCreateAccount" style={s.flex1}> 39 + <TouchableOpacity 40 + testID="createAccountButton" 41 + style={styles.btn} 42 + onPress={onPressCreateAccount}> 40 43 <Text style={styles.btnLabel}>Create a new account</Text> 41 44 </TouchableOpacity> 42 45 <View style={styles.or}> ··· 60 63 </Svg> 61 64 <Text style={styles.orLabel}>or</Text> 62 65 </View> 63 - <TouchableOpacity style={styles.btn} onPress={onPressSignin}> 66 + <TouchableOpacity 67 + testID="signInButton" 68 + style={styles.btn} 69 + onPress={onPressSignin}> 64 70 <Text style={styles.btnLabel}>Sign in</Text> 65 71 </TouchableOpacity> 66 72 </View>
+6 -2
src/view/screens/NotFound.tsx
··· 7 7 export const NotFound = () => { 8 8 const stores = useStores() 9 9 return ( 10 - <View> 10 + <View testID="notFoundView"> 11 11 <ViewHeader title="Page not found" /> 12 12 <View 13 13 style={{ ··· 16 16 paddingTop: 100, 17 17 }}> 18 18 <Text style={{fontSize: 40, fontWeight: 'bold'}}>Page not found</Text> 19 - <Button title="Home" onPress={() => stores.nav.navigate('/')} /> 19 + <Button 20 + testID="navigateHomeButton" 21 + title="Home" 22 + onPress={() => stores.nav.navigate('/')} 23 + /> 20 24 </View> 21 25 </View> 22 26 )
+5 -3
src/view/screens/Profile.tsx
··· 1 - import React, {useEffect, useState, useMemo} from 'react' 1 + import React, {useEffect, useState} from 'react' 2 2 import {ActivityIndicator, StyleSheet, View} from 'react-native' 3 3 import {observer} from 'mobx-react-lite' 4 4 import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' ··· 30 30 const store = useStores() 31 31 const onMainScroll = useOnMainScroll(store) 32 32 const [hasSetup, setHasSetup] = useState<boolean>(false) 33 - const uiState = useMemo( 33 + const uiState = React.useMemo( 34 34 () => new ProfileUiModel(store, {user: params.name}), 35 35 [params.user], 36 36 ) ··· 201 201 ? () => ( 202 202 <> 203 203 <FontAwesomeIcon 204 + testID="shouldAdminButton" 204 205 icon="user-xmark" 205 206 style={[s.mr5]} 206 207 size={14} ··· 242 243 const title = 243 244 uiState.profile.displayName || uiState.profile.handle || params.name 244 245 return ( 245 - <View style={styles.container}> 246 + <View testID="profileView" style={styles.container}> 246 247 <ViewHeader title={title} /> 247 248 {uiState.profile.hasError ? ( 248 249 <ErrorScreen 250 + testID="profileErrorScreen" 249 251 title="Failed to load profile" 250 252 message={`There was an issue when attempting to load ${params.name}`} 251 253 details={uiState.profile.error}
+2 -1
src/view/screens/Search.tsx
··· 57 57 <View style={[pal.view, pal.border, styles.inputContainer]}> 58 58 <MagnifyingGlassIcon style={[pal.text, styles.inputIcon]} /> 59 59 <TextInput 60 + testID="searchTextInput" 60 61 ref={textInput} 61 62 placeholder="Type your query here..." 62 63 placeholderTextColor={pal.colors.textLight} ··· 68 69 </View> 69 70 <View style={styles.outputContainer}> 70 71 {query ? ( 71 - <ScrollView onScroll={Keyboard.dismiss}> 72 + <ScrollView testID="searchScrollView" onScroll={Keyboard.dismiss}> 72 73 {autocompleteView.searchRes.map((item, i) => ( 73 74 <TouchableOpacity 74 75 key={i}
+4 -1
src/view/shell/mobile/Menu.tsx
··· 75 75 onPress?: () => void 76 76 }) => ( 77 77 <TouchableOpacity 78 + testID="menuItemButton" 78 79 style={styles.menuItem} 79 80 onPress={onPress ? onPress : () => onNavigate(url || '/')}> 80 81 <View style={[styles.menuItemIconWrapper]}> ··· 98 99 ) 99 100 100 101 return ( 101 - <ScrollView style={[styles.view, pal.view]}> 102 + <ScrollView testID="menuView" style={[styles.view, pal.view]}> 102 103 <TouchableOpacity 104 + testID="profileCardButton" 103 105 onPress={() => onNavigate(`/profile/${store.me.handle}`)} 104 106 style={styles.profileCard}> 105 107 <UserAvatar ··· 123 125 </View> 124 126 </TouchableOpacity> 125 127 <TouchableOpacity 128 + testID="searchBtn" 126 129 style={[styles.searchBtn, pal.btn]} 127 130 onPress={() => onNavigate('/search')}> 128 131 <MagnifyingGlassIcon
+14 -4
src/view/shell/mobile/TabsSelector.tsx
··· 116 116 } 117 117 118 118 if (!active) { 119 - return <View /> 119 + return <View testID="emptyView" /> 120 120 } 121 121 122 122 return ( 123 123 <Animated.View 124 + testID="tabsSelectorView" 124 125 style={[ 125 126 styles.wrapper, 126 127 {bottom: insets.bottom + 55}, ··· 129 130 <View onLayout={onLayout}> 130 131 <View style={[s.p10, styles.section]}> 131 132 <View style={styles.btns}> 132 - <TouchableWithoutFeedback onPress={onPressShareTab}> 133 + <TouchableWithoutFeedback 134 + testID="shareButton" 135 + onPress={onPressShareTab}> 133 136 <View style={[styles.btn]}> 134 137 <View style={styles.btnIcon}> 135 138 <FontAwesomeIcon size={16} icon="share" /> ··· 137 140 <Text style={styles.btnText}>Share</Text> 138 141 </View> 139 142 </TouchableWithoutFeedback> 140 - <TouchableWithoutFeedback onPress={onPressCloneTab}> 143 + <TouchableWithoutFeedback 144 + testID="cloneButton" 145 + onPress={onPressCloneTab}> 141 146 <View style={[styles.btn]}> 142 147 <View style={styles.btnIcon}> 143 148 <FontAwesomeIcon size={16} icon={['far', 'clone']} /> ··· 145 150 <Text style={styles.btnText}>Clone tab</Text> 146 151 </View> 147 152 </TouchableWithoutFeedback> 148 - <TouchableWithoutFeedback onPress={onPressNewTab}> 153 + <TouchableWithoutFeedback 154 + testID="newTabButton" 155 + onPress={onPressNewTab}> 149 156 <View style={[styles.btn]}> 150 157 <View style={styles.btnIcon}> 151 158 <FontAwesomeIcon size={16} icon="plus" /> ··· 164 171 return ( 165 172 <Swipeable 166 173 key={tab.id} 174 + testID="tabsSwipable" 167 175 renderLeftActions={renderSwipeActions} 168 176 renderRightActions={renderSwipeActions} 169 177 leftThreshold={100} ··· 185 193 isActive && styles.active, 186 194 ]}> 187 195 <TouchableWithoutFeedback 196 + testID="changeTabButton" 188 197 onPress={() => onPressChangeTab(tabIndex)}> 189 198 <View style={styles.tabInner}> 190 199 <View style={styles.tabIcon}> ··· 203 212 </View> 204 213 </TouchableWithoutFeedback> 205 214 <TouchableWithoutFeedback 215 + testID="closeTabButton" 206 216 onPress={() => onCloseTab(tabIndex)}> 207 217 <View style={styles.tabClose}> 208 218 <FontAwesomeIcon
+3 -3
src/view/shell/mobile/index.tsx
··· 327 327 start={{x: 0, y: 0.8}} 328 328 end={{x: 0, y: 1}} 329 329 style={styles.outerContainer}> 330 - <SafeAreaView style={styles.innerContainer}> 330 + <SafeAreaView testID="noSessionView" style={styles.innerContainer}> 331 331 <ErrorBoundary> 332 332 <Login /> 333 333 </ErrorBoundary> ··· 338 338 } 339 339 if (store.onboard.isOnboarding) { 340 340 return ( 341 - <View style={styles.outerContainer}> 341 + <View testID="onboardOuterView" style={styles.outerContainer}> 342 342 <View style={styles.innerContainer}> 343 343 <ErrorBoundary> 344 344 <Onboard /> ··· 355 355 backgroundColor: theme.colorScheme === 'dark' ? colors.gray7 : colors.gray1, 356 356 } 357 357 return ( 358 - <View style={[styles.outerContainer, pal.view]}> 358 + <View testID="mobileShellView" style={[styles.outerContainer, pal.view]}> 359 359 <StatusBar 360 360 barStyle={ 361 361 theme.colorScheme === 'dark' ? 'light-content' : 'dark-content'
+4 -63
yarn.lock
··· 3027 3027 resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" 3028 3028 integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== 3029 3029 3030 - "@yarnpkg/lockfile@^1.1.0": 3031 - version "1.1.0" 3032 - resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" 3033 - integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== 3034 - 3035 3030 "@zxing/text-encoding@^0.9.0": 3036 3031 version "0.9.0" 3037 3032 resolved "https://registry.yarnpkg.com/@zxing/text-encoding/-/text-encoding-0.9.0.tgz#fb50ffabc6c7c66a0c96b4c03e3d9be74864b70b" ··· 4389 4384 dependencies: 4390 4385 node-fetch "2.6.7" 4391 4386 4392 - cross-spawn@^6.0.0, cross-spawn@^6.0.5: 4387 + cross-spawn@^6.0.0: 4393 4388 version "6.0.5" 4394 4389 resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" 4395 4390 integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== ··· 5930 5925 locate-path "^6.0.0" 5931 5926 path-exists "^4.0.0" 5932 5927 5933 - find-yarn-workspace-root@^2.0.0: 5934 - version "2.0.0" 5935 - resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz#f47fb8d239c900eb78179aa81b66673eac88f7bd" 5936 - integrity sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ== 5937 - dependencies: 5938 - micromatch "^4.0.2" 5939 - 5940 5928 flat-cache@^3.0.4: 5941 5929 version "3.0.4" 5942 5930 resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" ··· 6999 6987 resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" 7000 6988 integrity sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw== 7001 6989 7002 - is-wsl@^2.1.1, is-wsl@^2.2.0: 6990 + is-wsl@^2.2.0: 7003 6991 version "2.2.0" 7004 6992 resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" 7005 6993 integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== ··· 8177 8165 resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" 8178 8166 integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== 8179 8167 8180 - klaw-sync@^6.0.0: 8181 - version "6.0.0" 8182 - resolved "https://registry.yarnpkg.com/klaw-sync/-/klaw-sync-6.0.0.tgz#1fd2cfd56ebb6250181114f0a581167099c2b28c" 8183 - integrity sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ== 8184 - dependencies: 8185 - graceful-fs "^4.1.11" 8186 - 8187 8168 klaw@^1.0.0: 8188 8169 version "1.3.1" 8189 8170 resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" ··· 9217 9198 dependencies: 9218 9199 is-wsl "^1.1.0" 9219 9200 9220 - open@^7.4.2: 9221 - version "7.4.2" 9222 - resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" 9223 - integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== 9224 - dependencies: 9225 - is-docker "^2.0.0" 9226 - is-wsl "^2.1.1" 9227 - 9228 9201 open@^8.0.9, open@^8.4.0: 9229 9202 version "8.4.0" 9230 9203 resolved "https://registry.yarnpkg.com/open/-/open-8.4.0.tgz#345321ae18f8138f82565a910fdc6b39e8c244f8" ··· 9290 9263 strip-ansi "^6.0.0" 9291 9264 wcwidth "^1.0.1" 9292 9265 9293 - os-tmpdir@^1.0.0, os-tmpdir@~1.0.2: 9266 + os-tmpdir@^1.0.0: 9294 9267 version "1.0.2" 9295 9268 resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" 9296 9269 integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== ··· 9409 9382 resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" 9410 9383 integrity sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw== 9411 9384 9412 - patch-package@^6.5.0: 9413 - version "6.5.1" 9414 - resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-6.5.1.tgz#3e5d00c16997e6160291fee06a521c42ac99b621" 9415 - integrity sha512-I/4Zsalfhc6bphmJTlrLoOcAF87jcxko4q0qsv4bGcurbr8IskEOtdnt9iCmsQVGL1B+iUhSQqweyTLJfCF9rA== 9416 - dependencies: 9417 - "@yarnpkg/lockfile" "^1.1.0" 9418 - chalk "^4.1.2" 9419 - cross-spawn "^6.0.5" 9420 - find-yarn-workspace-root "^2.0.0" 9421 - fs-extra "^9.0.0" 9422 - is-ci "^2.0.0" 9423 - klaw-sync "^6.0.0" 9424 - minimist "^1.2.6" 9425 - open "^7.4.2" 9426 - rimraf "^2.6.3" 9427 - semver "^5.6.0" 9428 - slash "^2.0.0" 9429 - tmp "^0.0.33" 9430 - yaml "^1.10.2" 9431 - 9432 9385 path-exists@^3.0.0: 9433 9386 version "3.0.0" 9434 9387 resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" ··· 10973 10926 resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" 10974 10927 integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== 10975 10928 10976 - rimraf@^2.5.4, rimraf@^2.6.3: 10929 + rimraf@^2.5.4: 10977 10930 version "2.7.1" 10978 10931 resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" 10979 10932 integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== ··· 11347 11300 version "1.0.5" 11348 11301 resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" 11349 11302 integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== 11350 - 11351 - slash@^2.0.0: 11352 - version "2.0.0" 11353 - resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" 11354 - integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== 11355 11303 11356 11304 slash@^3.0.0: 11357 11305 version "3.0.0" ··· 11990 11938 version "1.236.0" 11991 11939 resolved "https://registry.yarnpkg.com/tlds/-/tlds-1.236.0.tgz#a118eebe33261c577e3a3025144faeabb7dd813c" 11992 11940 integrity sha512-oP2PZ3KeGlgpHgsEfrtva3/K9kzsJUNliQSbCfrJ7JMCWFoCdtG+9YMq/g2AnADQ1v5tVlbtvKJZ4KLpy/P6MA== 11993 - 11994 - tmp@^0.0.33: 11995 - version "0.0.33" 11996 - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" 11997 - integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== 11998 - dependencies: 11999 - os-tmpdir "~1.0.2" 12000 11941 12001 11942 tmpl@1.0.5: 12002 11943 version "1.0.5"