Commit Graph

10 Commits

Author SHA1 Message Date
Pritesh Nandgaonkar
566f2bf96e Do not use custom serializer for all the plugins
Summary:
This diff solves the problem where the export for the graphql plugin was super super super sloooooowwww...... The reason being that the graphql plugin had chunky graphql responses which were json blob which was being serialized by our custom serializer. Instead of serializing those with custom serializer we can directly serialize them as they won't have any map's, sets, classes etc.

This diff adds the two static functions on the plugin which will provide the serialized and deserialized object for the persistedstate. As the plugin knows the structure of its state it can optimize the serialization and deserialization of its data.

This change solves the slow export issue and makes it blazing fast..... 🏎

Bug:

{F206550514}

Reviewed By: danielbuechele

Differential Revision: D17166054

fbshipit-source-id: 058b903c03c12c9194702162c46763ef5b5e7283
2019-09-09 06:13:39 -07:00
John Knox
f1d0ca7edf Fix layout snapshot test
Summary:
The test didn't run when the sample app was updated with an extra button, so that change snuck in and caused subsequent runs to fail.

The stacked diff makes sure it will run all the time.

Reviewed By: passy

Differential Revision: D16898015

fbshipit-source-id: 0fd9ce7eaef293465d87b283b3c9bfe1fba928e5
2019-08-20 09:14:39 -07:00
John Knox
2a903d56c3 Skip layout snapshot test
Reviewed By: priteshrnandgaonkar

Differential Revision: D16897208

fbshipit-source-id: 9f2a2c5234196522e24bb62ab450f5ac56bd68e6
2019-08-19 11:10:37 -07:00
Sara Valderrama
f591475f85 A few mini-fixes for the accessibility layout inspector
Summary:
- fix mutual selection of elements in ax and non-ax tree (simplifies linkedNode logic as well)
- remove unneeded extraInfo attributes (focused, nonAXwithAXchild, & hasAXNode were not/no longer being used)
- use 50/50 fixed width view for trees when both are visible

Reviewed By: jknoxville

Differential Revision: D16390355

fbshipit-source-id: bbf9ea887f8f1035df8b4b0562ddcc4de291f004
2019-08-01 22:03:26 -07:00
John Knox
71784b1d64 Headless tests - Include flipper logs in test output
Summary: Useful for debugging test failures.

Reviewed By: bnelo12

Differential Revision: D16419182

fbshipit-source-id: 651eaded54aa001765aadcf966a2ce93e89f2854
2019-07-23 02:43:31 -07:00
John Knox
df6c485b6b Fix test failure message when headless out isn't json
Summary: Jest expects any promise rejections to be errors, not strings.

Reviewed By: passy

Differential Revision: D16200876

fbshipit-source-id: 7ebb6c63262b3c13ec677b1e72010146aa5b55e8
2019-07-11 05:54:01 -07:00
John Knox
173ce43192 Add sample app layout snapshot test
Summary:
This is fairly experimental. The test passes, but I don't know how stable it will be when litho changes for example.

However, it's easy to exclude specific attributes from the hierarchy, so maybe we can iterate if it breaks at first.

It just takes a snapshot of the layout hierarchy from headless flipper, and compares it to it's known one.

To run it:
`cd headless-tests && DEVICE=emulator-5554 yarn test` while you have the sample app running on an emulator.

To update the snapshots, just add `-u` to the end of that command.

Reviewed By: danielbuechele

Differential Revision: D15715674

fbshipit-source-id: 4fe6f83b60f8003d48aceb6468d93c075e6c38b8
2019-06-12 03:29:58 -07:00
David Aurelio
1d38078982 Remove unnecessary $FlowFixMe
Summary: No longer necessary, after flow types for `lodash.memoize` were added.

Reviewed By: jknoxville

Differential Revision: D15738356

fbshipit-source-id: 3c911e5eefee347ca69a37051fd5279c5de47873
2019-06-10 08:39:05 -07:00
John Knox
627ccc2fbc Longer connection wait time
Summary:
I'm seeing some failures where no client is connected when we do the export.
This increases the wait time before sending the SIGINT.

Reviewed By: passy

Differential Revision: D15716214

fbshipit-source-id: 4646ef9d1c37e491273bd9deff504675b0e4e780
2019-06-10 03:50:26 -07:00
John Knox
4d6b39ae42 Add test suite for headless
Summary:
Adds a JS test suite for running jest tests against flipper headless binaries. Replaces the jq-based bash script.

Simple sanity test included for all expected top level keys in output JSON.

Reviewed By: passy

Differential Revision: D15625723

fbshipit-source-id: 5ec8e764bcdbb99d9070de704e76a5cd9d8e5dc6
2019-06-07 08:29:45 -07:00