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

[RNMobile] Moving native tests to gutenberg repo #15589

Merged
merged 15 commits into from
Jun 4, 2019

Conversation

etoledom
Copy link
Contributor

@etoledom etoledom commented May 13, 2019

gutenberg-mobile side PR: wordpress-mobile/gutenberg-mobile#977

This PR moves some of the mobile-gutenberg test suits to the gutenberg repo.
Added an exception to test/unit/jest.config.js so these tests are not run by npm run test-unit.

As a intermediate step, these tests will continue to be run only from gutenberg-mobile checkout via yarn test.

On a next step we plan to integrate these mobile tests to the gutenberg tool-chain.

To test:

  • On a stand-alone checkout of gutenberg run rpm run test-unit
  • Check that none of these new tests are run.
  • Check that all tests pass.

@etoledom etoledom added the Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) label May 13, 2019
@etoledom etoledom self-assigned this May 13, 2019
expect( component.exists() ).toBe( true );
} );

it( 'splits empty block on Enter', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor nitpick, specially since I think this is just a file move, but since there's no actually Enter keypress involved in this test, I wouldn't mention it on the test name

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch! Removed the reference to "on Enter".

@etoledom etoledom requested review from koke and hypest May 20, 2019 18:54
@etoledom etoledom changed the title [Mobile] (WIP) Moving native tests to gutenberg repo (WIP) Moving native tests to gutenberg repo May 20, 2019
* Add unit test for willTrimSpaces.

* Fix willTripSpaces to report false for no outer spaces on styled text.

* Ignore gutenberg-mobile unit tests in gutenberg test pipeline

* Revert "Fix willTripSpaces to report false for no outer spaces on styled text."

This reverts commit 0731689.

Upstream changes make this implementation no longer necessary.

* Fix lint issues

* Import RichText without native extension

* Remove stubs from rich-text __mocks__
@etoledom etoledom changed the title (WIP) Moving native tests to gutenberg repo [RNMobile] Moving native tests to gutenberg repo May 23, 2019
Copy link
Contributor

@koke koke left a comment

Choose a reason for hiding this comment

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

Looks good to me 👏

@etoledom etoledom merged commit 1a293b3 into master Jun 4, 2019
@etoledom etoledom deleted the rnmobile/move-mobile-tests-to-gutenberg-repo branch June 4, 2019 12:39
@youknowriad youknowriad added this to the Gutenberg 5.9 milestone Jun 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants