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

Release v1.10.0 #1246

Merged
merged 193 commits into from
Jul 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
193 commits
Select commit Hold shift + click to select a range
5fe7da5
add image block and select image from wordpress media library(mostly …
JavonDavis Jun 4, 2019
af95746
reenable remaining list test
JavonDavis Jun 4, 2019
50a721e
test for multiple heading blocks and paragraph blocks
JavonDavis Jun 5, 2019
27ae229
fix heading block function call
JavonDavis Jun 5, 2019
d8eaae6
use longer test data
JavonDavis Jun 5, 2019
ff37242
update submodule
JavonDavis Jun 5, 2019
37bc1d9
remove xdescribe
JavonDavis Jun 5, 2019
7aae7d4
Merge branch 'develop' of https://github.com/wordpress-mobile/gutenbe…
JavonDavis Jun 5, 2019
bad274c
use empty image block for android tests
JavonDavis Jun 5, 2019
24b91f1
merge develop
JavonDavis Jun 7, 2019
a5b276d
fix lint error
JavonDavis Jun 7, 2019
b11783e
Merge branch 'develop' of https://github.com/wordpress-mobile/gutenbe…
JavonDavis Jun 11, 2019
baf8ac0
resolve conflicts with develop
JavonDavis Jun 11, 2019
8246b68
merge develop
JavonDavis Jun 11, 2019
eb88920
merge develop and workaround for #952
JavonDavis Jun 13, 2019
5ee597b
fix lint and test data
JavonDavis Jun 13, 2019
0f82cf2
add title element for android too
JavonDavis Jun 13, 2019
9df6cdf
Add block insertion tests with html verification
JavonDavis Jun 14, 2019
9135f49
fix submodule
JavonDavis Jun 15, 2019
9929d7e
Merge branch 'develop' of https://github.com/wordpress-mobile/gutenbe…
JavonDavis Jun 17, 2019
ceb5a72
fix issue caused by not properly deleting blocks
JavonDavis Jun 18, 2019
ff1650c
clicking on middle of element to avoid ios new block creation
JavonDavis Jun 18, 2019
3b980c9
Merge branch 'develop' of https://github.com/wordpress-mobile/gutenbe…
JavonDavis Jun 18, 2019
99de16e
Update GB reference.
SergioEstevao Jun 19, 2019
e4e311e
Update mocks for tests.
SergioEstevao Jun 19, 2019
4b03ca2
Update GB reference.
SergioEstevao Jun 19, 2019
9fbe8aa
Use non default device on Sauce
JavonDavis Jun 21, 2019
610da4e
use branch specific app files
JavonDavis Jun 21, 2019
3be41ca
Move AppContainer and MainScreen to @wordpress/edit-post as Editor an…
Tug Jun 24, 2019
258c692
Update gutenberg ref
Tug Jun 24, 2019
05ee1b6
add a prestep for creating sage filename
JavonDavis Jun 24, 2019
7a9f12f
use correct name in utils
JavonDavis Jun 24, 2019
b7b7ac5
Merge branch 'develop' of https://github.com/wordpress-mobile/gutenbe…
JavonDavis Jun 24, 2019
b232607
update cache keys
JavonDavis Jun 24, 2019
ad97bd9
upgrade circleci image to api 29
JavonDavis Jun 24, 2019
041127f
upgrade circleci image to api 29
JavonDavis Jun 24, 2019
1ac420a
delete differently
JavonDavis Jun 24, 2019
41a18be
delete differently
JavonDavis Jun 24, 2019
e5da2df
delete differently on ios vs android
JavonDavis Jun 24, 2019
c354d52
Update GB reference.
SergioEstevao Jun 25, 2019
4d20727
remove runInBand
JavonDavis Jun 25, 2019
78debf3
serparate local run to not run in parallel
JavonDavis Jun 26, 2019
3aadc6b
try increasing number of workers to max vms in sauce
JavonDavis Jun 26, 2019
fdd4b23
revert max workers
JavonDavis Jun 26, 2019
b62d556
Update GB reference.
SergioEstevao Jun 26, 2019
eb2beb8
Merge branch 'develop' into try/move_richtext
SergioEstevao Jun 26, 2019
9981785
Update gutenberg ref
Tug Jun 26, 2019
ba480c7
Update GB reference.
SergioEstevao Jun 26, 2019
9977eb8
Merge pull request #1154 from wordpress-mobile/try/move_richtext
SergioEstevao Jun 26, 2019
99c4c3c
Update gutenberg after merge
Tug Jun 26, 2019
89dc55c
Merge remote-tracking branch 'origin/develop' into update/move-appcon…
Tug Jun 26, 2019
e83c7d8
Merge pull request #1171 from wordpress-mobile/update/move-appcontain…
Tug Jun 26, 2019
ab569ca
Upgrade node-sass
Tug Jun 26, 2019
9dc16d6
Merge pull request #1180 from wordpress-mobile/try/parallel-device-tests
JavonDavis Jun 26, 2019
bb97dac
Run yarn upgrade to metro-core/fsevents build error
Tug Jun 26, 2019
468d46b
iOS brdige: Avoid logging if threshold is higher than log level
etoledom Jun 27, 2019
78768c4
iOS Bridge: Add fatal log level and helper inits
etoledom Jun 27, 2019
15b08cd
iOS Bridge: Set log threshold to error if packager is not running
etoledom Jun 27, 2019
55da325
Update gutenberg ref
pinarol Jun 27, 2019
c2ecda4
Update gutenberg ref
pinarol Jun 27, 2019
0ab143e
Update gutenberg ref
pinarol Jun 27, 2019
5a70628
Update gutenberg ref
pinarol Jun 27, 2019
6526be3
Merge branch 'master' into master-v1.8.0-to-develop
hypest Jun 28, 2019
dd2a5ae
Merge pull request #1185 from wordpress-mobile/master-v1.8.0-to-develop
hypest Jun 28, 2019
29b1e14
Merge pull request #1183 from wordpress-mobile/issue/reduce-ios-bridg…
etoledom Jul 1, 2019
117b82f
CircleCI: Speed up iOS device tests by caching gutenberg.app
jtreanor Jul 3, 2019
b173bb4
CircleCI: Cache i18n-cache/data to speed up 'yarn install'
jtreanor Jul 3, 2019
b322a82
CircleCI: Cache node_modules instead of the yarn cache and use yarn i…
jtreanor Jul 3, 2019
5d9b330
CircleCI: Use separate yarn cache for each job
jtreanor Jul 3, 2019
3f04ad0
Update gutenberg ref
pinarol Jul 3, 2019
13d0dd8
Merge branch 'develop' into issue/1173-video-block-upload-fail
pinarol Jul 3, 2019
8f1cda9
Update gutenberg ref
pinarol Jul 3, 2019
4352a51
Merge pull request #1189 from wordpress-mobile/ci/cache-locales
hypest Jul 4, 2019
6bf532c
Update gutenberg ref
pinarol Jul 4, 2019
1842c6c
Merge branch 'develop' into issue/1173-video-block-upload-fail
pinarol Jul 4, 2019
0a0bc04
Merge pull request #1188 from wordpress-mobile/speedup-ui-tests
jtreanor Jul 4, 2019
170220a
Merge branch 'develop' into issue/1173-video-block-upload-fail
pinarol Jul 4, 2019
f6c98f5
Adding `navigator.userAgent` to our globals to solve a crash updating…
etoledom Jul 4, 2019
ef09049
Merge pull request #1195 from wordpress-mobile/issue/fix-window-navig…
etoledom Jul 4, 2019
516b1f9
Bump handlebars from 4.0.11 to 4.1.2 in /react-native-aztec/example
dependabot[bot] Jul 5, 2019
61a5215
Update gutenberg ref
etoledom Jul 5, 2019
907adae
Merge branch 'develop' into issue/1173-video-block-upload-fail
etoledom Jul 5, 2019
c66d53c
Merge pull request #1196 from wordpress-mobile/dependabot/npm_and_yar…
hypest Jul 5, 2019
0028130
GB will now send the list of unsupported blocks found in the current …
daniloercoli Jul 5, 2019
b1f58b8
Update GB hash
daniloercoli Jul 5, 2019
5797732
Merge branch 'develop' into add/tests-add-block-insertion
JavonDavis Jul 5, 2019
7a9a3ea
Mobile app crashes when the user merges two blocks (#1203)
marecar3 Jul 6, 2019
c3cf2b1
Update gutenberg ref
etoledom Jul 8, 2019
d768f57
Merge branch 'develop' into issue/1173-video-block-upload-fail
etoledom Jul 8, 2019
050cdc7
Implementing unsupportedBlockNames bridge callback on iOS
etoledom Jul 8, 2019
39e7112
Update GB ref
daniloercoli Jul 8, 2019
02fe01c
Update GB ref after merge master into our gb branch
daniloercoli Jul 8, 2019
69d43d2
Merge branch 'develop' of https://github.com/wordpress-mobile/gutenbe…
daniloercoli Jul 8, 2019
4b84ada
Update gb ref
daniloercoli Jul 8, 2019
544ca0c
Tapping on an empty editor area creates a new paragraph block (#1200)
marecar3 Jul 8, 2019
34eb866
fixed issues with tests moving a little too fast sometimes when runni…
JavonDavis Jul 9, 2019
ce6408f
Update gutenberg ref
etoledom Jul 9, 2019
7ee2d3b
Merge branch 'develop' into issue/1174-track-unsupported-blocks
etoledom Jul 9, 2019
d9fa4a4
Update gutenberg ref
etoledom Jul 9, 2019
90d52df
Merge branch 'develop' into issue/1173-video-block-upload-fail
etoledom Jul 9, 2019
d5992dd
Merge pull request #1182 from wordpress-mobile/issue/1173-video-block…
etoledom Jul 9, 2019
6d03ee9
Update gutenberg ref to master
etoledom Jul 9, 2019
d64cf0b
Merge branch 'develop' into issue/1174-track-unsupported-blocks
etoledom Jul 9, 2019
f066d3b
Merge pull request #1199 from wordpress-mobile/issue/1174-track-unsup…
etoledom Jul 9, 2019
29f741b
Update JS bundles
etoledom Jul 9, 2019
e76549a
Merge branch 'develop' into issue/update-js-bundles
etoledom Jul 9, 2019
b6daeaa
Update bundles to latests develop
etoledom Jul 9, 2019
05021a6
Point gutenberg reference to update/parser-reserialize-unknown-blocks
Tug Jul 9, 2019
98603eb
Update RELEASE-NOTES.txt
Tug Jul 9, 2019
e030b81
Update RELEASE-NOTES.txt
Tug Jul 9, 2019
e84a7e1
Update README.md to use the latest npm version
Tug Jul 9, 2019
893108e
Rename jsdom-jscore dependency to jsdom-jscore-rn
Tug Jul 9, 2019
c0c5ea5
Merge remote-tracking branch 'origin/develop' into fix/support-node-1…
Tug Jul 9, 2019
225ec1a
Update gutenberg ref to master
Tug Jul 9, 2019
c8d9c22
merge develop
JavonDavis Jul 9, 2019
9d5b155
Update gutenberg ref after merge
Tug Jul 9, 2019
44e263c
Merge pull request #1209 from wordpress-mobile/try/fix-parser-reseria…
Tug Jul 9, 2019
ff16006
update comment and resolve gutenberg conflict
JavonDavis Jul 9, 2019
117eae0
Update gutenberg ref
mchowning Jul 5, 2019
5d335f7
Merge pull request #1207 from wordpress-mobile/fix/android-device-tests
JavonDavis Jul 9, 2019
523031e
Merge branch 'develop' of https://github.com/wordpress-mobile/gutenbe…
JavonDavis Jul 9, 2019
6a097d0
Merge pull request #1201 from wordpress-mobile/issue/632-insert-post-…
mchowning Jul 9, 2019
9589f65
Merge branch 'develop' of https://github.com/wordpress-mobile/gutenbe…
JavonDavis Jul 9, 2019
dc9ccee
fix issue with keyboard not being hidden on iOS device tests
JavonDavis Jul 9, 2019
fb61146
swipe up to show caption field instead of trying to dismiss keyboard
JavonDavis Jul 9, 2019
57b9613
Merge pull request #1060 from wordpress-mobile/add/tests-image-block
JavonDavis Jul 9, 2019
523e5f8
updated comment to be more consistent
JavonDavis Jul 9, 2019
933f210
remove false comments
JavonDavis Jul 10, 2019
b015592
Merge pull request #1208 from wordpress-mobile/issue/update-js-bundles
daniloercoli Jul 10, 2019
ad46d41
Track develop gutenberg ref
Tug Jul 10, 2019
0a8bdd7
Merge remote-tracking branch 'origin/develop' into fix/support-node-1…
Tug Jul 10, 2019
5ec7042
Merge pull request #1181 from wordpress-mobile/fix/support-node-12.2plus
Tug Jul 10, 2019
a539743
Merge pull request #1069 from wordpress-mobile/add/tests-heading-block
JavonDavis Jul 10, 2019
07264e8
Update gutenberg ref
etoledom Jul 10, 2019
bc8a535
Update jest config file
etoledom Jul 10, 2019
ee39a64
Update react-dom to solve invariant error.
etoledom Jul 10, 2019
07e4042
Update gutenberg ref
etoledom Jul 10, 2019
ac1ec3b
Add back local tests
etoledom Jul 10, 2019
014b641
Fix test warnings
etoledom Jul 10, 2019
de453de
Remove duplicated test config files
etoledom Jul 10, 2019
938d989
Fix lint issues
etoledom Jul 10, 2019
ec73e52
AndroidX migration (#1112)
marecar3 Jul 10, 2019
5ab6353
resolved test issues with merge
JavonDavis Jul 11, 2019
d28a01f
resolve ci changes
JavonDavis Jul 11, 2019
e44f34e
remove "its" from test data
JavonDavis Jul 11, 2019
c6a979b
try no cache option with jest to fix issue with tests not running in …
JavonDavis Jul 11, 2019
07a675d
try no cache option with jest to fix issue with tests not running in …
JavonDavis Jul 11, 2019
0a371c2
add max workers to jest command
JavonDavis Jul 11, 2019
987bb4a
remove detect open handles
JavonDavis Jul 11, 2019
f297209
Update gutenberg hash
etoledom Jul 11, 2019
c229dfa
Merge branch 'develop' into issue/run-tests-on-gutenberg-repo
etoledom Jul 11, 2019
f4ee8b6
Update gutenberg ref
etoledom Jul 11, 2019
eaed8c5
Merge pull request #1215 from wordpress-mobile/issue/run-tests-on-gut…
etoledom Jul 11, 2019
173c49e
add docs to readme and contributing
JavonDavis Jul 11, 2019
050752f
Update README.md
JavonDavis Jul 11, 2019
b70ce37
Merge branch 'develop' of https://github.com/wordpress-mobile/gutenbe…
JavonDavis Jul 11, 2019
2cf5fe7
rename test to match new scenario
JavonDavis Jul 12, 2019
560efc2
update submodule
JavonDavis Jul 12, 2019
849a315
reduce max workers and increase timeout length to reduce driver colli…
JavonDavis Jul 12, 2019
251d571
Merge pull request #1139 from wordpress-mobile/add/tests-add-block-in…
JavonDavis Jul 12, 2019
5664e34
Merge branch 'develop' of https://github.com/wordpress-mobile/gutenbe…
JavonDavis Jul 12, 2019
7c38ccc
merge develop and update submodule
JavonDavis Jul 12, 2019
2a064da
Merge branch 'add/test-documentation-readme' of https://github.com/wo…
JavonDavis Jul 12, 2019
9861118
update README
JavonDavis Jul 12, 2019
66b5e98
update README
JavonDavis Jul 12, 2019
1359404
point to UI test README in project README
JavonDavis Jul 15, 2019
bb430c9
Update gutenberg ref
mchowning Jul 13, 2019
a4dacee
Merge pull request #1228 from wordpress-mobile/remove_image_component…
mchowning Jul 15, 2019
3ff59f1
fix contribution url
JavonDavis Jul 15, 2019
3d4d946
add link to contributing guide in README
JavonDavis Jul 16, 2019
507ee91
clarify how the config file is used
JavonDavis Jul 16, 2019
fd111e0
Merge pull request #1223 from wordpress-mobile/add/test-documentation…
JavonDavis Jul 16, 2019
98341ad
Release v1.9 (#1216)
marecar3 Jul 17, 2019
a460c08
Update gutenberg ref and release notes
mchowning Jul 11, 2019
5d0be02
Update release notes
mchowning Jul 17, 2019
66dd13d
Update gutenberg ref
mchowning Jul 17, 2019
5e100b0
Merge pull request #1231 from wordpress-mobile/issue/932_blur-post-title
mchowning Jul 19, 2019
14af3b0
Update gutenberg ref
mchowning Jul 12, 2019
ba27f29
Update release notes
mchowning Jul 15, 2019
c96a3c5
Merge pull request #1227 from wordpress-mobile/issue/632-replace-init…
mchowning Jul 20, 2019
cf82f89
Update vscode extension config to prevent VSCode to show a warning on…
maxme Jul 23, 2019
b5f01e9
Merge pull request #1241 from wordpress-mobile/update/vs-code-extensi…
hypest Jul 23, 2019
4778a43
Remove references to node 9 errors in readme
mchowning Jul 15, 2019
86d5d34
Update release notes
mchowning Jul 23, 2019
098cd68
Update gutenberg ref
mchowning Jul 23, 2019
53811c1
Merge pull request #1243 from wordpress-mobile/issue/image-block-igno…
mchowning Jul 24, 2019
8a3cb05
Bump version to 1.10.0
Tug Jul 26, 2019
f01084c
Update bundles
Tug Jul 26, 2019
85859f7
Merge remote-tracking branch 'origin/master' into release/1.10.0
Tug Jul 26, 2019
bfb2c43
Update RELEASE-NOTES.txt
Tug Jul 26, 2019
421c89f
Update gutenberg ref
Tug Jul 26, 2019
d6a551a
Remove obsolete release note item
Tug Jul 26, 2019
b4dd27f
Update bundles
Tug Jul 26, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ commands:
- restore_cache:
name: Restore Yarn Cache
keys:
- yarn-i18n-v1-{{ .Environment.CIRCLE_JOB }}-{{ checksum "yarn.lock" }}
- yarn-i18n-v3-{{ .Environment.CIRCLE_JOB }}-{{ checksum "yarn.lock" }}
- run:
name: Yarn Install
command: yarn install --frozen-lockfile --prefer-offline
- save_cache:
name: Save Yarn Cache
key: yarn-i18n-v1-{{ .Environment.CIRCLE_JOB }}-{{ checksum "yarn.lock" }}
key: yarn-i18n-v3-{{ .Environment.CIRCLE_JOB }}-{{ checksum "yarn.lock" }}
paths:
- node_modules
- i18n-cache/data
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
path: ./reports/test-results
android-device-checks:
docker:
- image: circleci/android:api-28-node8-alpha
- image: circleci/android:api-29-node
steps:
- checkout
- run:
Expand All @@ -80,7 +80,8 @@ jobs:
- run:
name: Upload apk to sauce labs
command: |
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" -X POST -H "Content-Type: application/octet-stream" https://saucelabs.com/rest/v1/storage/automattic/Gutenberg.apk?overwrite=true --data-binary @./android/app/build/outputs/apk/debug/app-debug.apk
source bin/sauce-pre-upload.sh
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" -X POST -H "Content-Type: application/octet-stream" https://saucelabs.com/rest/v1/storage/automattic/Gutenberg-$SAUCE_FILENAME.apk?overwrite=true --data-binary @./android/app/build/outputs/apk/debug/app-debug.apk
- run:
name: Run Device Tests
command: yarn device-tests
Expand Down Expand Up @@ -111,21 +112,21 @@ jobs:
- restore_cache:
name: Restore Dependencies Cache
keys:
- dependencies-{{ checksum "react-native-aztec/ios/Cartfile.resolved" }}-{{
- dependencies-v2-{{ checksum "react-native-aztec/ios/Cartfile.resolved" }}-{{
checksum "yarn.lock" }}
- dependencies-{{ checksum "react-native-aztec/ios/Cartfile.resolved" }}
- dependencies-
- dependencies-v2-{{ checksum "react-native-aztec/ios/Cartfile.resolved" }}
- dependencies-v2-
- run:
name: Yarn preios (if needed)
command: test -e ios/build/gutenberg/Build/Products/Release-iphonesimulator/gutenberg.app || yarn preios
- save_cache:
name: Save Dependencies Cache
key: dependencies-{{ checksum "react-native-aztec/ios/Cartfile.resolved" }}-{{
key: dependencies-v2-{{ checksum "react-native-aztec/ios/Cartfile.resolved" }}-{{
checksum "yarn.lock" }}
paths:
- react-native-aztec/ios/Carthage
- ~/.rncache
- run:
- run:
name: Build (if needed)
command: test -e ios/build/gutenberg/Build/Products/Release-iphonesimulator/gutenberg.app || yarn react-native run-ios --configuration Release --no-packager
- run:
Expand All @@ -137,7 +138,8 @@ jobs:
- run:
name: Upload .app to sauce labs
command: |
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" -X POST -H "Content-Type: application/octet-stream" https://saucelabs.com/rest/v1/storage/automattic/Gutenberg.app.zip?overwrite=true --data-binary @./ios/Gutenberg.app.zip
source bin/sauce-pre-upload.sh
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" -X POST -H "Content-Type: application/octet-stream" https://saucelabs.com/rest/v1/storage/automattic/Gutenberg-$SAUCE_FILENAME.app.zip?overwrite=true --data-binary @./ios/Gutenberg.app.zip
- run:
name: Run Device Tests
command: |
Expand Down
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"recommendations": [
"gcazaciuc.vscode-flow-ide",
"vsmobile.vscode-react-native"
"msjsdiag.vscode-react-native"
]
}
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@ nvm install --latest-npm
yarn install
```

Note: using node v9.x currently produces the following error:
```
error sane@3.1.0: The engine "node" is incompatible with this module. Expected version "6.* || 8.* || >= 10.*".
```
To be revisited, as we don't need to impose a limit in version per se.

## Run

```
Expand Down Expand Up @@ -141,7 +135,7 @@ and for android run,

Note, you might experience problems that seem to be related to the tests starting the Appium server, for example errors that say `Connection Refused`, `Connection Reset` or `The requested environment is not available`. Sorry about that this is still a WIP, you can manually start the Appium server via [appium desktop](https://github.com/appium/appium-desktop) or the cli, then change the port number in the tests while optionally commenting out related code in the `beforeAll` and `afterAll` block.

For a more detailed outline of the UI tests and how to get started writing one please visit the [Project Wiki](https://github.com/wordpress-mobile/gutenberg-mobile/wiki/Getting-started-with-UI-tests)
For a more detailed outline of the UI tests and how to get started writing one please visit the [UI Test documentation](https://github.com/wordpress-mobile/gutenberg-mobile/blob/develop/__device-tests__/README.md) and our [contributing guide](https://github.com/wordpress-mobile/gutenberg-mobile/blob/develop/__device-tests__/CONTRIBUTING.md).

## Static analysis and code style

Expand Down
6 changes: 6 additions & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
1.10.0
------
* Adding a block from the post title now shows the add block here indicator.
Copy link
Contributor

Choose a reason for hiding this comment

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

There is one final edge case for this (adding from the post title on a new post when there is just the placeholder text and no paragraph block yet) is still not fixed. Should we pull this from the release notes until that is fixed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is fine as it's included in this release

Copy link
Contributor

Choose a reason for hiding this comment

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

Aww, but that screws up my plan of changing all the release notes. 😉

* Deselect post title any time a block is added
* Fix loss of center alignment in image captions on Android

1.9.0
------
* Enable video block on Android platform
Expand Down
44 changes: 44 additions & 0 deletions __device-tests__/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Writing a UI test? Great! 😬 This guide is here to help fill in some of the blanks of how the tests are written now and how you can add a new one.

You can find our on-device UI tests in the `__device-tests__` folder and that's where all of the code for that really lives.
The test suite follows a sort of [Page Object Pattern](https://webdriver.io/docs/pageobjects.html), the `__device-tests__/pages/editor-page.js` manages all interactions with the pages and the `__device-tests__/gutenberg-editor.test.js` actually uses the functions made available via the Page Object `EditorPage` to drive the test cases. At the time of writing this, all the tests live there but as the suite gets large it might be better to manage different classes of tests in different files.

So what does the process for writing a test look like? Here are some steps that I hope can help make this easier,

### First, define the scenario

- What are the actions that need to take place here? Walk through the scenario and manually to have an idea of what the test steps will need to do, the elements you'll need to interact with and how you're going to need to interact with them. I found it helps to properly define the steps taken in the scenario and the different user interactions that are needed to accomplish it.

You'd just add a new scenario to the test file as well that would look something like,

```javscript
it( 'should be able to do something', async () => {
// Code to do something...
} );
```

That first parameter in the block above is where you'd put a short description of the scenario while the next parameter is the code you'd like to execute.

### Second, figure out how to find the elements

- The UI tests rely on locator strategies to identify elements... There's a number of locator strategies available to use and [this blog post](https://saucelabs.com/blog/advanced-locator-strategies) describes in a little more detail what a few of these are and how to use them. You'll need to start thinking about what locator strategy you'll need to use to find the elements you need if it isn't already available.
- The preferred strategy is the accessibility identifier and in a lot of cases this might not be possible and you'll have to resort to other less robust alternatives such as XPath.

There's a few tools you have available to figure out what you need.

For Android, you can fire up the app and then within Android Studio select `Tools -> Layout Inspector` which will then open up a `.li` file which you can then use to inspect various areas of the app, here's a [screenshot](https://d.pr/free/i/anU50R) of what that looks like.

For iOS, you can also fire up and use the accessibility inspector, which is an app that should come available on your OSX machine. From there you can choose the process running your simulator and inspect various areas of the app.

Alternative for both of these platforms and for an interface to simulate the commands I'd recommend [Appium Desktop](https://github.com/appium/appium-desktop/releases/tag/v1.12.1). A great tool for inspecting the view hierarchy and interacting with elements on screen as your test would. Here's a [screenshot](https://d.pr/free/i/GziQ5Q) of what that would look like.

Using one or a combination of these tools will make it much easier to identify what locator strategy you're going to use or which elements need accessibility identifiers to ease the search process without affecting VoiceOver features.

### Finally, once you've figured out how you're going to find the elements

- You'll write any functions needed to interact with the page in the `EditorPage` page object and then call those interactions within the test. The code you'll need to write to actually do the finding will use a combination of

- Appium's spec http://appium.io/docs/en/about-appium/intro/ which you can find examples of a variety of functions under the commands tab
- WebDriver I/O Appium protocols https://webdriver.io/docs/api/appium.html which provides examples and descriptions of what those look like.

It takes some getting use to but looking at the existing code should be helpful in identifying common commands that it'd help to be familiar with.
56 changes: 56 additions & 0 deletions __device-tests__/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Overview

We use [appium](http://appium.io/) combined with [SauceLabs](https://saucelabs.com/) as an on-device testing solution for covering writing flows using Gutenberg blocks.

Appium is built on the idea that testing native apps shouldn't require including an SDK or recompiling your app. And that you should be able to use your preferred test practices, frameworks, and tools. Appium is an open source project and has made design and tool decisions to encourage a vibrant contributing community.

SauceLabs is a cloud hosting platform that provides access to a variety of simulators, emulators and real devices.

## Getting set up to run the tests

### Emulators && Simulators

iOS: Once you've already set up XCode and the simulators you should be good to go to run the tests on an iOS simulator.

Android: You'll need to have created the emulator images and fired up the desired emulator before running the tests against an Android emulator.

### Real Devices

TBA

## Running the tests locally

TLDR; to run the tests locally ensure metro isn't running and then run `yarn test:e2e:ios:local` and `yarn test:e2e:android:local` for the desired platform.

Those commands include the process to build a testable version of the app, if it's the case you don't want to run the
full suite and want to run a specific file or files you can use the e2e build commands that can be found in the package.json for the respective platform and then
run `TEST_RN_PLATFORM=android yarn device-tests <pattern>` where the pattern can just be the file path.

### Starting the Appium Server

One of the Caveats to using Appium is the need for the Appium server to be running to interact with the Simulator or Device through Webdriver, as a result the appium server will need to be started before running the tests. To make the entire process easier in the `beforeAll` block of the tests an Appium instance is fired up on a default port of 4723. If you already have something running on that port and would rather not stop that you can change the port within the code that starts that up. At the moment that port number is referenced from the config located at `__device-tests__/helpers/serverConfigs.js`. The process is killed in the `afterAll` block but at the time of writing this there's a small chance some errors might cause it not to get there so it might be best to kill the process yourself if you think something is up. The server output when running the tests are written to `appium-out.log`, this can provide useful information when debugging the issues with the tests.

### WebDriver capabilities

Appium uses a config object that contains `capabilities` to define how it will connect to a simulator or device, this object is currently located in `__device-tests__/helpers/caps.js` and then referenced when firing up the driver. There are two values that I think are important to know and that's

- `platformVersion` which is the platform version of a connected adb device. e.g `9.0` for Android or `12.2` for iOS. The version used here is upper bounded by the max allowed on CI but feel free to change this value locally as needed.
- `app` which is the absolute path to the `.app` or `.apk` file or the path relative to the **Appium root**. It's important to note that that when using the relative paths it's not to the project folder but to the appium server, since by default we start up appium in the project root when running the paths appear relative to the root but if you were using another instance of the Appium server the relative path would need to come from there.

A full spec on the capabilities can be found [here](http://appium.io/docs/en/writing-running-appium/caps/). If you'd like to change configurations like
what port appium runs on or what device or emulator the tests should be executed on that file would be where you'd like to make that update.

## The run process

At the moment when running locally, the app attempts to fire up an appium server and then connects to it via webdriver. Then

* on Android, a debug version of the app is bundled, built, and used.
* on iOS a release version is bundled built and used.

**It's important to ensure that **metro is not running.** This would cause the value of the `__DEV__` variable to be true and load up the sample blocks.**

After the build is complete, an appium server is fired up on port 4723 and the device tests are ran on the connected device/simulator.

-----

To read more about writing your own tests please read the [contributing guide](https://github.com/wordpress-mobile/gutenberg-mobile/blob/develop/__device-tests__/CONTRIBUTING.md)
114 changes: 114 additions & 0 deletions __device-tests__/gutenberg-editor-block-insertion.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
/**
* @format
* */

/**
* Internal dependencies
*/
import EditorPage from './pages/editor-page';
import {
setupDriver,
isLocalEnvironment,
stopDriver,
isAndroid,
clickMiddleOfElement,
} from './helpers/utils';
import testData from './helpers/test-data';

jasmine.DEFAULT_TIMEOUT_INTERVAL = 300000;

describe( 'Gutenberg Editor tests for Block insertion', () => {
let driver;
let editorPage;
let allPassed = true;

// Use reporter for setting status for saucelabs Job
if ( ! isLocalEnvironment() ) {
const reporter = {
specDone: async ( result ) => {
allPassed = allPassed && result.status !== 'failed';
},
};

jasmine.getEnv().addReporter( reporter );
}

beforeAll( async () => {
driver = await setupDriver();
editorPage = new EditorPage( driver );
} );

it( 'should be able to see visual editor', async () => {
await expect( editorPage.getBlockList() ).resolves.toBe( true );
} );

it( 'should be able to insert block into post', async () => {
await editorPage.addNewParagraphBlock();
let paragraphBlockElement = await editorPage.getParagraphBlockAtPosition( 1 );
if ( isAndroid() ) {
await paragraphBlockElement.click();
}
await editorPage.sendTextToParagraphBlockAtPosition( 1, testData.longText );
// Should have 3 paragraph blocks at this point

paragraphBlockElement = await editorPage.getParagraphBlockAtPosition( 2 );
await paragraphBlockElement.click();

await editorPage.addNewParagraphBlock();
paragraphBlockElement = await editorPage.getParagraphBlockAtPosition( 3 );
await paragraphBlockElement.click();
await editorPage.sendTextToParagraphBlockAtPosition( 3, testData.mediumText );

await editorPage.verifyHtmlContent( testData.blockInsertionHtml );

// Workaround for now since deleting the first element causes a crash on CI for Android
if ( isAndroid() ) {
paragraphBlockElement = await editorPage.getParagraphBlockAtPosition( 3 );
await paragraphBlockElement.click();
await editorPage.removeParagraphBlockAtPosition( 3 );
for ( let i = 3; i > 0; i-- ) {
paragraphBlockElement = await editorPage.getParagraphBlockAtPosition( i );
await paragraphBlockElement.click();
await editorPage.removeParagraphBlockAtPosition( i );
}
} else {
for ( let i = 4; i > 0; i-- ) {
paragraphBlockElement = await editorPage.getParagraphBlockAtPosition( 1 );
await clickMiddleOfElement( driver, paragraphBlockElement );
await editorPage.removeParagraphBlockAtPosition( 1 );
}
}
} );

it( 'should be able to insert block at the beginning of post from the title', async () => {
await editorPage.addNewParagraphBlock();
let paragraphBlockElement = await editorPage.getParagraphBlockAtPosition( 1 );
if ( isAndroid() ) {
await paragraphBlockElement.click();
}
await editorPage.sendTextToParagraphBlockAtPosition( 1, testData.longText );
// Should have 3 paragraph blocks at this point

if ( isAndroid() ) {
await driver.hideDeviceKeyboard();
}

const titleElement = await editorPage.getTitleElement();
await titleElement.click();
await titleElement.click();

await editorPage.addNewParagraphBlock();
paragraphBlockElement = await editorPage.getParagraphBlockAtPosition( 1 );
await clickMiddleOfElement( driver, paragraphBlockElement );
await editorPage.sendTextToParagraphBlockAtPosition( 1, testData.mediumText );
await paragraphBlockElement.click();
await editorPage.verifyHtmlContent( testData.blockInsertionHtmlFromTitle );
} );

afterAll( async () => {
if ( ! isLocalEnvironment() ) {
driver.sauceJobStatus( allPassed );
}
await stopDriver( driver );
} );
} );
2 changes: 1 addition & 1 deletion __device-tests__/gutenberg-editor-heading.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from './helpers/utils';
import testData from './helpers/test-data';

jasmine.DEFAULT_TIMEOUT_INTERVAL = 240000;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 300000;

describe( 'Gutenberg Editor tests', () => {
let driver;
Expand Down
3 changes: 2 additions & 1 deletion __device-tests__/gutenberg-editor-image.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from './helpers/utils';
import testData from './helpers/test-data';

jasmine.DEFAULT_TIMEOUT_INTERVAL = 240000;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 300000;

describe( 'Gutenberg Editor Image Block tests', () => {
let driver;
Expand Down Expand Up @@ -63,6 +63,7 @@ describe( 'Gutenberg Editor Image Block tests', () => {
await swipeUp( driver, imageBlock );
await editorPage.enterCaptionToSelectedImageBlock( testData.imageCaption );
await editorPage.dismissKeyboard();
imageBlock = await editorPage.getImageBlockAtPosition( 1 );
await imageBlock.click();
}
await editorPage.removeImageBlockAtPosition( 1 );
Expand Down
2 changes: 1 addition & 1 deletion __device-tests__/gutenberg-editor-lists-end.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from './helpers/utils';
import testData from './helpers/test-data';

jasmine.DEFAULT_TIMEOUT_INTERVAL = 240000;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 300000;

describe( 'Gutenberg Editor tests for List block (end)', () => {
let driver;
Expand Down
2 changes: 1 addition & 1 deletion __device-tests__/gutenberg-editor-lists.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from './helpers/utils';
import testData from './helpers/test-data';

jasmine.DEFAULT_TIMEOUT_INTERVAL = 240000;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 300000;

describe( 'Gutenberg Editor tests for List block', () => {
let driver;
Expand Down
2 changes: 1 addition & 1 deletion __device-tests__/gutenberg-editor-paragraph.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from './helpers/utils';
import testData from './helpers/test-data';

jasmine.DEFAULT_TIMEOUT_INTERVAL = 250000;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 300000;

describe( 'Gutenberg Editor tests for Paragraph Block', () => {
let driver;
Expand Down
2 changes: 1 addition & 1 deletion __device-tests__/gutenberg-editor-paste.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
} from './helpers/utils';
import testData from './helpers/test-data';

jasmine.DEFAULT_TIMEOUT_INTERVAL = 240000;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 300000;

describe( 'Gutenberg Editor paste tests', () => {
// skip iOS for now
Expand Down
Loading