Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Splitting Profile in separate components for accessibility snapshot testing #4

Merged
merged 1 commit into from Apr 19, 2023

Conversation

DimitarNestorov
Copy link
Collaborator

@DimitarNestorov DimitarNestorov commented Apr 19, 2023

A SnapshotTest native module was created to register every component from the JavaScript thread instead of having to modify Swift files every time

The new snapshots:

Stats Picture Buttons
Stats Picture Buttons


function ProfilePicture({picture = tomProfilePicture}: {picture?: string}) {
return (
<>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fragments were used in order to have a simpler diff

A `SnapshotTest` native module was created to register every component from the JavaScript thread instead of having to modify Swift files every time
@DimitarNestorov DimitarNestorov merged commit 274acc1 into main Apr 19, 2023
1 check failed
@DimitarNestorov DimitarNestorov deleted the chore/multiple-snapshots branch April 19, 2023 19:10
for item in items {
let expectation = expectation(description: "Wait for content to appear")
let observer = Observer(expectation)
let profileView = RCTRootView(frame: .init(x: 0, y: 0, width: 300, height: 700),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let profileView = RCTRootView(frame: .init(x: 0, y: 0, width: 300, height: 700),
let view = RCTRootView(frame: .init(x: 0, y: 0, width: 300, height: 700),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant