Commit Graph

16 Commits

Author SHA1 Message Date
Chaiwat Ekkaewnumchai
3fab1f8fd6 Upgrade Babel
Summary: Update babel related dependency to 7.8.3

Reviewed By: passy

Differential Revision: D19408069

fbshipit-source-id: cc9beca6bb9c8d2102332dac3812f52ca7275ec0
2020-01-16 03:58:32 -08:00
dependabot[bot]
1a1c5ca988 Bump handlebars from 4.1.2 to 4.5.3 in /headless-tests (#726)
Summary:
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.1.2 to 4.5.3.
<details>
<summary>Changelog</summary>

*Sourced from [handlebars's changelog](https://github.com/wycats/handlebars.js/blob/master/release-notes.md).*

> ## v4.5.3 - November 18th, 2019
> Bugfixes:
>
> - fix: add "no-prototype-builtins" eslint-rule and fix all occurences - f7f05d7
> - fix: add more properties required to be enumerable - 1988878
>
> Chores / Build:
> - fix: use !== 0 instead of != 0 - c02b05f
> - add chai and dirty-chai and sinon, for cleaner test-assertions and spies,
>   deprecate old assertion-methods  - 93e284e, 886ba86, 0817dad, 93516a0
>
> Security:
>
> - The properties `__proto__`, `__defineGetter__`, `__defineSetter__` and `__lookupGetter__`
>   have been added to the list of "properties that must be enumerable".
>   If a property by that name is found and not enumerable on its parent,
>   it will silently evaluate to `undefined`. This is done in both the compiled template and the "lookup"-helper.
>   This will prevent new Remote-Code-Execution exploits that have been
>   published recently.
>
> Compatibility notes:
>
> - Due to the security-fixes. The semantics of the templates using
>   `__proto__`, `__defineGetter__`, `__defineSetter__` and `__lookupGetter__` in the respect that those expression now return
>   `undefined` rather than their actual value from the proto.
> - The semantics have not changed in cases where the properties are  enumerable, as in:
>
> ```js
> {
>   __proto__: 'some string'
> }
> ```
>
> - The change may be breaking in that respect, but we still only
>   increase the patch-version, because the incompatible use-cases
>   are not intended, undocumented and far less important than fixing
>   Remote-Code-Execution exploits on existing systems.
>
>
>
> [Commits](https://github.com/wycats/handlebars.js/compare/v4.5.2...v4.5.3)
>
> ## v4.5.2 - November 13th, 2019
> # Bugfixes
>
> - fix: use String(field) in lookup when checking for "constructor" - d541378
> - test: add fluent API for testing Handlebars - c2ac79c
>
> Compatibility notes:
> - no incompatibility are to be expected
></tr></table> ... (truncated)
</details>
<details>
<summary>Commits</summary>

- [`c819c8b`](c819c8b533) v4.5.3
- [`827c9d0`](827c9d0747) Update release notes
- [`f7f05d7`](f7f05d7558) fix: add "no-prototype-builtins" eslint-rule and fix all occurences
- [`1988878`](1988878087) fix: add more properties required to be enumerable
- [`886ba86`](886ba86c2f) test/chore: add chai/expect and sinon to "runtime"-environment
- [`0817dad`](0817dad7e7) test: add sinon as global variable to eslint in the specs
- [`93516a0`](93516a0b07) test: add sinon.js for spies, deprecate current assertions
- [`93e284e`](93e284ed9b) chore: add chai and dirty-chai for better test assertions
- [`c02b05f`](c02b05fa81) fix: use !== 0 instead of != 0
- [`8de121d`](8de121d21c) v4.5.2
- Additional commits viewable in [compare view](https://github.com/wycats/handlebars.js/compare/v4.1.2...v4.5.3)
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=handlebars&package-manager=npm_and_yarn&previous-version=4.1.2&new-version=4.5.3)](https://help.github.com/articles/configuring-automated-security-fixes)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebook/flipper/network/alerts).

</details>
Pull Request resolved: https://github.com/facebook/flipper/pull/726

Reviewed By: mweststrate

Differential Revision: D19407963

Pulled By: passy

fbshipit-source-id: 215ca75306f0ff7c2f839627b39581fc432443b3
2020-01-15 06:00:53 -08:00
Pascal Hartig
874e590b96 Upgrade eslint and prettier
Summary: Not a fan of the long lines, but if that's where prettier is going, let's roll with it.

Reviewed By: jknoxville

Differential Revision: D17905599

fbshipit-source-id: c4232d46d2ec0b7c743f6afd8349106c85f013b9
2019-10-14 05:27:27 -07:00
Andres Suarez
0675dd924d Tidy up Flipper license headers [1/2]
Reviewed By: passy

Differential Revision: D17863711

fbshipit-source-id: 259dc77826fb803ff1b88c88529d7f679d3b74d8
2019-10-11 13:46:45 -07:00
Chaiwat Ekkaewnumchai
7e4696cf95 Update Snapshot for Headless Test
Summary:
D14932994 changes the layout, but we did not update the snapshot.

Another option is to disable a test for now.

Reviewed By: jknoxville

Differential Revision: D17548543

fbshipit-source-id: 455e5047eab0044cabd503cae7cbc386443f376e
2019-10-01 06:16:03 -07:00
Chaiwat Ekkaewnumchai
a4a3739d98 Skip Snapshop Test for Headless
Summary:
The test is failing right now because D14932994 changed the layout manipulation.

Disable the snapshot test for now and will be re-enabled in D17548543

Reviewed By: jknoxville

Differential Revision: D17549122

fbshipit-source-id: 8bf7a89594206e32cece150c8057ee03d190d2e5
2019-09-24 08:26:24 -07:00
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