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/1.6.0 #1036

Merged
merged 215 commits into from
May 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
215 commits
Select commit Hold shift + click to select a range
6d1b407
include code for handling paragraph block with multiple newlines
JavonDavis Apr 3, 2019
be25642
Merge branch 'revert-803-revert-676-try/e2e-tests-appium' of https://…
JavonDavis Apr 3, 2019
0f52256
start restructuring functions to editor page
JavonDavis Apr 3, 2019
c7eec61
moved most of block functionality to editor page
JavonDavis Apr 4, 2019
284ecde
Merge branch 'revert-803-revert-676-try/e2e-tests-appium' of https://…
JavonDavis Apr 4, 2019
9bce282
completely removed blockinteraction and moved actual interactions to …
JavonDavis Apr 4, 2019
188436c
add getText function for paragraph blocks
JavonDavis Apr 4, 2019
4654a26
included flow for splitting paragraph blocks
JavonDavis Apr 4, 2019
f1ccfd2
include all current paragraph flow tests
JavonDavis Apr 4, 2019
fbc6fe9
resolve linter errors
JavonDavis Apr 4, 2019
97588dc
fixed path to iOS app in circle config
JavonDavis Apr 5, 2019
9757529
append branch to path
JavonDavis Apr 5, 2019
212df48
remove branch from file path
JavonDavis Apr 5, 2019
9441c7b
revert platform version removal
JavonDavis Apr 5, 2019
f05d9c9
include test for merging paragraph blocks
JavonDavis Apr 5, 2019
eed3b95
device_test: include jest exectation for second block deletion
JavonDavis Apr 5, 2019
cc8e999
increase timeout to account for time to type long text
JavonDavis Apr 5, 2019
4272d85
remove unused branch variable
JavonDavis Apr 5, 2019
7a557de
include null check for linter
JavonDavis Apr 5, 2019
b669430
merge develop
JavonDavis Apr 8, 2019
7f9e48e
revert initial html
JavonDavis Apr 8, 2019
c227250
Testing: Merge appium improvements
JavonDavis Apr 8, 2019
72928aa
fix flow errors
JavonDavis Apr 9, 2019
0856bac
focus on block before removing
JavonDavis Apr 9, 2019
60d5970
include additional comments and update zip path
JavonDavis Apr 9, 2019
28ba568
merge develop
JavonDavis Apr 15, 2019
013fe27
using row number in toolbar accessibility
JavonDavis Apr 15, 2019
6b5441f
update gitignore
JavonDavis Apr 15, 2019
dff6090
change out label for blocks in block list
JavonDavis Apr 15, 2019
aea1257
update test identifiers and positions to match with row numbers
JavonDavis Apr 16, 2019
26769c1
switched out android text entry to use adb shell command due to https…
JavonDavis Apr 16, 2019
1d8e18f
switched out android text entry to use adb shell command due to https…
JavonDavis Apr 16, 2019
5c69b1a
switched out android text entry to use adb shell command due to https…
JavonDavis Apr 16, 2019
8e1849c
revert Depency graph delete
JavonDavis Apr 16, 2019
f0cd38d
add function to swipe up to show remove icon
JavonDavis Apr 17, 2019
5c896f4
swipe up before each removal for small screens
JavonDavis Apr 17, 2019
89d61fc
update swipe
JavonDavis Apr 17, 2019
a67a5c7
update swipe
JavonDavis Apr 17, 2019
be18d5f
update swipe
JavonDavis Apr 17, 2019
c866ee5
moved swiping into remove block function
JavonDavis Apr 17, 2019
478c8a7
connect InlineToolbar to store and include additional expect condition
JavonDavis Apr 18, 2019
2a06e92
fix linter error
JavonDavis Apr 18, 2019
8278d49
fix typo in utils
JavonDavis Apr 18, 2019
76d7e94
merge in changes from develop
JavonDavis Apr 19, 2019
3a9966f
include comment on adb shell
JavonDavis Apr 19, 2019
8ed04b6
Handle iOS z-gesture for block list and modals
Tug Apr 24, 2019
d6493be
Update gutenberg ref
etoledom Apr 26, 2019
67bf3e1
Update gutenberg ref
etoledom Apr 26, 2019
9e573b8
Update gutenberg ref
etoledom Apr 26, 2019
e3055eb
Merge remote-tracking branch 'origin/develop' into update/accessibili…
Tug Apr 26, 2019
7391a84
Update GB reference.
SergioEstevao Apr 30, 2019
73c406f
Add basic test for list blocks
hypest May 7, 2019
ffd57d1
Add local e2e script that supports attaching debugger
hypest May 7, 2019
94e5b05
Adjust code style
hypest May 7, 2019
243385d
Add dev menu item to toggle html mode
hypest May 7, 2019
d0e56b2
Verify list block's html
hypest May 8, 2019
f303bc0
Block's html verification only on Android for now
hypest May 10, 2019
d65b6fa
Minor code cleanup
hypest May 10, 2019
6d9b81f
Update gutenberg ref
etoledom May 10, 2019
a1b3437
Merge branch 'develop' into update/accessibility-ios-z-gesture
etoledom May 10, 2019
675f91d
Update gutenberg ref
etoledom May 10, 2019
3e04dcb
Update gutenberg ref
etoledom May 14, 2019
a200d20
Merge branch 'develop' into update/accessibility-ios-z-gesture
etoledom May 14, 2019
1bfe7ac
Update gutenberg ref
etoledom May 14, 2019
9d2e7fe
Update gutenberg ref
etoledom May 15, 2019
4ee108d
Merge branch 'develop' into issue/914-bottom-sheet-screen-reader
etoledom May 15, 2019
4bbb25a
Update gutenberg ref
etoledom May 15, 2019
12b7095
Update gutenberg ref
etoledom May 15, 2019
829babe
Update gutenberg ref
etoledom May 15, 2019
c0b46c7
Merge branch 'develop' into issue/implement_quote_block
SergioEstevao May 15, 2019
1e5865e
Update Gutenberg reference.
SergioEstevao May 15, 2019
52608cd
Update gutenberg ref
etoledom May 15, 2019
9f21dbc
Merge branch 'develop' into update/accessibility-ios-z-gesture
etoledom May 15, 2019
522bb3a
Update GB reference.
SergioEstevao May 15, 2019
c646a0b
Send the backspace event when deleting new lines.
SergioEstevao May 10, 2019
c82ab4c
Update Aztec version.
SergioEstevao May 15, 2019
d691aa0
Update gutenberg ref
etoledom May 16, 2019
62117a1
Merge branch 'develop' into update/accessibility-ios-z-gesture
etoledom May 16, 2019
bf77dda
Update Aztec.
SergioEstevao May 16, 2019
e1c3873
Use separator character.
SergioEstevao May 16, 2019
da38d2a
Update gutenberg ref
etoledom May 16, 2019
8d327cf
Merge branch 'develop' into issue/914-bottom-sheet-screen-reader
etoledom May 16, 2019
3f7031f
Merge branch 'develop' into issue/914-bottom-sheet-screen-reader
etoledom May 16, 2019
382f7e7
Make sure the HTML goes clean when selection is updated.
SergioEstevao May 16, 2019
e957b6b
Update GB reference.
SergioEstevao May 16, 2019
60b3d06
merged in develop and resolved issues sending text to the paragraph b…
JavonDavis May 16, 2019
af3bc23
resolve conflicts with develop
JavonDavis May 16, 2019
ca0a861
resolve issue with translator using sprintf
JavonDavis May 16, 2019
f0a5ccc
resolved issue with remove block identifier on Android
JavonDavis May 16, 2019
6c56471
Don’t remove anything from the HTML.
SergioEstevao May 16, 2019
c76f0c8
Update GB reference.
SergioEstevao May 16, 2019
2b9a315
Update Aztec-iOS to 1.6.3 (#993)
koke May 17, 2019
a51429b
Merge pull request #935 from wordpress-mobile/issue/914-bottom-sheet-…
etoledom May 17, 2019
8022ed3
Update GB reference.
SergioEstevao May 17, 2019
2bde312
merge in updates from add/paragraph-flow-tests
JavonDavis May 17, 2019
a105c7e
Update from master and GB master
hypest May 20, 2019
8e97769
Fix crash occurring when icon of the block is string (#997)
pinarol May 20, 2019
719fbef
Merge branch 'develop' into master-merge-2019-05-20
hypest May 20, 2019
52feb26
Add unit-tests for media related components (#919)
pinarol May 20, 2019
48b46a9
merge in develop
JavonDavis May 20, 2019
dfe8851
improve accessibility text for translators
JavonDavis May 20, 2019
85fc10e
fixed gutnberg submmodule version
JavonDavis May 20, 2019
95add06
Video block ui/ux enhancements (#979)
marecar3 May 21, 2019
85365cf
Move Picker and BottomSheet to the @wordpress/components package
Tug May 21, 2019
293d4fb
Merge branch 'develop' into master-merge-2019-05-20
hypest May 21, 2019
39db1c2
Update gutenberg ref
etoledom May 21, 2019
47abf1c
Merge branch 'develop' into update/accessibility-ios-z-gesture
etoledom May 21, 2019
906d87c
Update gutenberg ref
etoledom May 21, 2019
31d16f3
Roll back changes on .vscode/settings.json
etoledom May 21, 2019
14977c1
update interface methods in MainApplication.java
JavonDavis May 21, 2019
83c779d
sync gutenberg version
JavonDavis May 21, 2019
2ffca58
Update aztec version.
SergioEstevao May 21, 2019
036a28c
improve accessibility text
JavonDavis May 21, 2019
ba18700
improve accessibility text
JavonDavis May 21, 2019
41adacc
Update src/block-management/inline-toolbar/index.js
JavonDavis May 21, 2019
7acefbc
Merge branch 'develop' of https://github.com/wordpress-mobile/gutenbe…
JavonDavis May 21, 2019
548f324
resolve identifier changes in UI tests
JavonDavis May 21, 2019
fd7f023
Cleanup RN build and make sure we don't include react twice
Tug May 21, 2019
a74af6a
Merge branch 'add/paragraph-flow-tests' of https://github.com/wordpre…
JavonDavis May 21, 2019
90e14a3
Revert changes on .flowconfig
Tug May 21, 2019
fabc73c
Merge pull request #970 from wordpress-mobile/tests/add-list-test
JavonDavis May 21, 2019
8cd754f
Update GB reference.
SergioEstevao May 21, 2019
2e18402
Merge pull request #821 from wordpress-mobile/add/paragraph-flow-tests
JavonDavis May 21, 2019
24e1598
Remove test that is no longer valid.
SergioEstevao May 21, 2019
92e4362
Update GB reference.
SergioEstevao May 21, 2019
c62d4bf
Re-load the ReactVideoPackage that got removed by #821
hypest May 22, 2019
aad12e1
Merge branch 'develop' into master-merge-2019-05-20
hypest May 22, 2019
505becf
Update JS bundles
hypest May 22, 2019
25109f3
Merge pull request #1003 from wordpress-mobile/master-merge-2019-05-20
hypest May 22, 2019
1e73a6d
Exclude gutenberg node_modules folder using resolver.blacklistRE in r…
Tug May 22, 2019
2fe8c34
Update GB reference.
SergioEstevao May 22, 2019
d905543
Update GB reference.
SergioEstevao May 22, 2019
2829e6a
Update GB reference.
SergioEstevao May 22, 2019
e49a04b
Fix lint errors in tests and update gutenberg hash
Tug May 22, 2019
81da624
Update GB reference after merge to master.
SergioEstevao May 22, 2019
1a02fa1
Showing error when block has invalid content
etoledom May 22, 2019
94c7a38
Add new data-controls package to symlinked folder.
SergioEstevao May 22, 2019
cdf06d4
Using BlockInvalidWarning component to show invalid block warning
etoledom May 22, 2019
96a75be
Merge pull request #1016 from wordpress-mobile/issue/1015-video-packa…
hypest May 22, 2019
ec8f098
Merge remote-tracking branch 'origin/develop' into update/move-bottom…
Tug May 22, 2019
e3cfa07
Update gutenberg ref
Tug May 22, 2019
d4f9614
Merge pull request #1013 from wordpress-mobile/issue/update_on_split_…
SergioEstevao May 22, 2019
5ab5ff7
Merge branch 'develop' into issue/874_nested_lists
SergioEstevao May 22, 2019
36abf9b
Merge branch 'develop' into issue/implement_quote_block
SergioEstevao May 22, 2019
65935b9
Sending custom title and icon to BlockInvalidWarning
etoledom May 23, 2019
c21e854
Applying changes to BlockInvalidWarning
etoledom May 23, 2019
5fac377
Clean up
etoledom May 23, 2019
50300ca
Fix lint issues
etoledom May 23, 2019
79d29c8
Update RELEASE-NOTES.txt
etoledom May 23, 2019
b296dd1
Update gutenberg ref
Tug May 23, 2019
2bfbdff
Merge remote-tracking branch 'origin/develop' into update/move-bottom…
Tug May 23, 2019
bb6a867
Update GB reference.
SergioEstevao May 23, 2019
0299e81
Update tests after renaming innnr BottomSheet components
Tug May 23, 2019
876ebe7
Move the platform check deeper, in the EditorPage class
hypest May 23, 2019
a0bf165
Add a test for ending a list
hypest May 23, 2019
921e903
Merge pull request #1008 from wordpress-mobile/update/move-bottom-she…
Tug May 23, 2019
6b8270b
Merge branch 'develop' into issue/874_nested_lists
SergioEstevao May 23, 2019
cf74827
Revert dependency upgrades
Tug May 23, 2019
ed82022
Merge remote-tracking branch 'origin/develop' into fix/react-hooks-error
Tug May 23, 2019
366b7f5
Revert android-jsc gradle config
Tug May 23, 2019
de0eac6
Do not update gutenberg ref
Tug May 23, 2019
efd844c
Merge remote-tracking branch 'origin/develop' into update/accessibili…
Tug May 23, 2019
4f76ab9
Update gutenberg ref
Tug May 23, 2019
6e7dffd
Merge pull request #1012 from wordpress-mobile/fix/react-hooks-error
Tug May 23, 2019
8e5422d
Update to Aztec official release.
SergioEstevao May 23, 2019
047a44b
Merge pull request #1022 from wordpress-mobile/feature/list-end-test
hypest May 23, 2019
6cbe970
Follow web side's lead to add `indexToSelect` to onReplace
hypest May 23, 2019
d8c5082
Merge pull request #926 from wordpress-mobile/update/accessibility-io…
Tug May 23, 2019
1200524
Update README.md
JavonDavis May 23, 2019
b1feee4
Merge branch 'develop' into issue/874_nested_lists
SergioEstevao May 23, 2019
d770b77
Merge pull request #991 from wordpress-mobile/issue/874_nested_lists
SergioEstevao May 23, 2019
4db7338
Merge pull request #1025 from wordpress-mobile/README-wiki-update-1
JavonDavis May 23, 2019
afcfb66
Merge branch 'develop' into issue/implement_quote_block
SergioEstevao May 23, 2019
10a8187
change default platform version to 12.2
JavonDavis May 23, 2019
f2342a8
Update GB reference.
SergioEstevao May 23, 2019
1765536
update appium version
JavonDavis May 23, 2019
5a63ea6
Update gutenberg ref
etoledom May 24, 2019
f45a5d9
Merge branch 'develop' into issue/969-ui-for-invalid-block
etoledom May 24, 2019
b33e6bd
Merge pull request #1024 from wordpress-mobile/issue/1023-focus-parag…
hypest May 24, 2019
de667c3
Update GB reference.
SergioEstevao May 24, 2019
ce63843
Update Gutenberg ref
pinarol May 24, 2019
c5d877d
Create JS bundles
pinarol May 24, 2019
7fb3597
Update release notes
pinarol May 24, 2019
544dc6a
Update GB reference.
SergioEstevao May 24, 2019
c0c509f
Update gb reference.
SergioEstevao May 24, 2019
5afba1a
Update gutenberg ref
etoledom May 24, 2019
c3d4d1b
Adding RELEASE-NOTES entry
etoledom May 24, 2019
66a5b84
Merge pull request #1026 from wordpress-mobile/update/device-tests-de…
JavonDavis May 24, 2019
cdf1453
Merge pull request #963 from wordpress-mobile/issue/implement_quote_b…
SergioEstevao May 24, 2019
60e5027
Update gutenberg ref
etoledom May 24, 2019
8c81d00
Merge branch 'develop' into issue/1018-link-open-new-tab
etoledom May 24, 2019
ceb4b74
Update Gutenberg ref
hypest May 26, 2019
9acb4b9
Merge branch 'develop' into issue/969-ui-for-invalid-block
hypest May 26, 2019
21a48dd
Update to the merged Gutenberg hash
hypest May 26, 2019
0533baf
Merge pull request #1021 from wordpress-mobile/issue/969-ui-for-inval…
hypest May 26, 2019
ed260e6
Point to Gutenberg hash with the fix
hypest May 27, 2019
a42a3f9
Update Aztec version to 1.6.5
SergioEstevao May 27, 2019
3883a02
Update Gutenberg hash
hypest May 27, 2019
4f19270
Merge branch 'develop' into make-video-block-public
hypest May 27, 2019
089d81f
Update to merged Gutenberg hash
hypest May 27, 2019
c536f1c
Merge pull request #1028 from wordpress-mobile/make-video-block-public
hypest May 27, 2019
aa7166c
Update GB hash
hypest May 27, 2019
19da964
Merge branch 'develop' into issue/1031-caret-lost-on-para-split
hypest May 27, 2019
3adf307
Update to merged Gutenberg hash
hypest May 27, 2019
904686b
Merge pull request #1032 from wordpress-mobile/issue/1031-caret-lost-…
hypest May 27, 2019
9c95ae5
Update to merged Gutenberg hash
hypest May 27, 2019
2528b30
Merge branch 'develop' into issue/1018-link-open-new-tab
hypest May 27, 2019
62fbc76
Merge branch 'develop' into update/aztec_version_1.6.5
hypest May 27, 2019
d67ce89
Merge pull request #1030 from wordpress-mobile/issue/1018-link-open-n…
hypest May 27, 2019
cb57c49
Merge pull request #1035 from wordpress-mobile/update/aztec_version_1…
hypest May 27, 2019
6812b73
Bump version to v1.6.0 and update JS bundles
hypest May 27, 2019
e14ab28
Update GB hash, pointing to disabling of video, quote blocks
hypest May 28, 2019
b50ec81
Update JS bundles
hypest May 28, 2019
d42023c
Update GB hash to point to the release branch
hypest May 30, 2019
38034f9
Update JS bundles
hypest May 30, 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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ 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)

## Static analysis and code style

The project includes a linter (`eslint`) to perform codestyle and static analysis of the code. The configuration used is the same as [the one in the Gutenberg project](https://github.com/WordPress/gutenberg/blob/master/eslint/config.js). To perform the check, run:
Expand Down
3 changes: 3 additions & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
1.6.0
------
* Fixed issue with link settings where “Open in New Tab” was always OFF on open.
- A new block is available: video block.
* Added UI to display a warning when a block has invalid content.
72 changes: 0 additions & 72 deletions __device-tests__/blocks/block-interaction.js

This file was deleted.

53 changes: 0 additions & 53 deletions __device-tests__/blocks/paragraph-block-interaction.js

This file was deleted.

60 changes: 60 additions & 0 deletions __device-tests__/gutenberg-editor-lists-end.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/**
* @format
* */

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

jasmine.DEFAULT_TIMEOUT_INTERVAL = 240000;

describe( 'Gutenberg Editor tests', () => {
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 end a List block', async () => {
await editorPage.addNewListBlock();
const listBlockElement = await editorPage.getListBlockAtPosition( 1 );

// Send the first list item text
await editorPage.sendTextToListBlock( listBlockElement, testData.listItem1 );

// send an Enter
await editorPage.sendTextToParagraphBlock( listBlockElement, '\n' );

// send an Enter
await editorPage.sendTextToParagraphBlock( listBlockElement, '\n' );

await editorPage.verifyHtmlContent( testData.listEndedHtml );
} );

afterAll( async () => {
if ( ! isLocalEnvironment() ) {
driver.sauceJobStatus( allPassed );
}
await stopDriver( driver );
} );
} );
65 changes: 65 additions & 0 deletions __device-tests__/gutenberg-editor-lists.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/**
* @format
* */

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

jasmine.DEFAULT_TIMEOUT_INTERVAL = 240000;

describe( 'Gutenberg Editor tests', () => {
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 add a new List block', async () => {
await editorPage.addNewListBlock();
const listBlockElement = await editorPage.getListBlockAtPosition( 1 );

// Send the first list item text
await editorPage.sendTextToListBlock( listBlockElement, testData.listItem1 );

// send an Enter
await editorPage.sendTextToParagraphBlock( listBlockElement, '\n' );

// Send the second list item text
await editorPage.sendTextToListBlock( listBlockElement, testData.listItem2 );

// switch to html and verify html
await editorPage.verifyHtmlContent( testData.listHtml );
} );

afterAll( async () => {
if ( ! isLocalEnvironment() ) {
driver.sauceJobStatus( allPassed );
}
await stopDriver( driver );
} );
} );
73 changes: 65 additions & 8 deletions __device-tests__/gutenberg-editor.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@
* Internal dependencies
*/
import EditorPage from './pages/editor-page';
import ParagraphBlockInteraction from './blocks/paragraph-block-interaction';
import { setupDriver, isLocalEnvironment, timer, stopDriver } from './helpers/utils';
import {
setupDriver,
isLocalEnvironment,
clickMiddleOfElement,
clickBeginningOfElement,
stopDriver } from './helpers/utils';
import testData from './helpers/test-data';

jasmine.DEFAULT_TIMEOUT_INTERVAL = 120000;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 240000;

describe( 'Gutenberg Editor tests', () => {
let driver;
Expand Down Expand Up @@ -37,11 +42,63 @@ describe( 'Gutenberg Editor tests', () => {
} );

it( 'should be able to add a new Paragraph block', async () => {
const paragraphBlockInteraction = new ParagraphBlockInteraction( driver );
await editorPage.addNewBlock( paragraphBlockInteraction );
await paragraphBlockInteraction.sendText( 'Hello Gutenberg!' );
await timer( 3000 );
expect( await paragraphBlockInteraction.getText() ).toBe( 'Hello Gutenberg!' );
await editorPage.addNewParagraphBlock();
const paragraphBlockElement = await editorPage.getParagraphBlockAtPosition( 1 );
await editorPage.sendTextToParagraphBlock( paragraphBlockElement, testData.shortText );
await editorPage.removeParagraphBlockAtPosition( 1 );
} );

it( 'should be able to split one paragraph block into two', async () => {
await editorPage.addNewParagraphBlock();
const paragraphBlockElement = await editorPage.getParagraphBlockAtPosition( 1 );
await editorPage.sendTextToParagraphBlock( paragraphBlockElement, testData.shortText );
const textViewElement = await editorPage.getTextViewForParagraphBlock( paragraphBlockElement );
await clickMiddleOfElement( driver, textViewElement );
await editorPage.sendTextToParagraphBlock( paragraphBlockElement, '\n' );
expect( await editorPage.hasParagraphBlockAtPosition( 1 ) && await editorPage.hasParagraphBlockAtPosition( 2 ) )
.toBe( true );

const text0 = await editorPage.getTextForParagraphBlockAtPosition( 1 );
const text1 = await editorPage.getTextForParagraphBlockAtPosition( 2 );
expect( text0 ).not.toBe( '' );
expect( text1 ).not.toBe( '' );
expect( testData.shortText ).toMatch( new RegExp( `${ text0 + text1 }|${ text0 } ${ text1 }` ) );

await editorPage.removeParagraphBlockAtPosition( 2 );
await editorPage.removeParagraphBlockAtPosition( 1 );
} );

it( 'should be able to merge 2 paragraph blocks into 1', async () => {
await editorPage.addNewParagraphBlock();
let paragraphBlockElement = await editorPage.getParagraphBlockAtPosition( 1 );
await editorPage.sendTextToParagraphBlock( paragraphBlockElement, testData.shortText );
let textViewElement = await editorPage.getTextViewForParagraphBlock( paragraphBlockElement );
await clickMiddleOfElement( driver, textViewElement );
await editorPage.sendTextToParagraphBlock( paragraphBlockElement, '\n' );
expect( await editorPage.hasParagraphBlockAtPosition( 1 ) && await editorPage.hasParagraphBlockAtPosition( 2 ) )
.toBe( true );

const text0 = await editorPage.getTextForParagraphBlockAtPosition( 1 );
const text1 = await editorPage.getTextForParagraphBlockAtPosition( 2 );
paragraphBlockElement = await editorPage.getParagraphBlockAtPosition( 2 );
textViewElement = await editorPage.getTextViewForParagraphBlock( paragraphBlockElement );
await clickBeginningOfElement( driver, textViewElement );
await editorPage.sendTextToParagraphBlock( paragraphBlockElement, '\u0008' );

const text = await editorPage.getTextForParagraphBlockAtPosition( 1 );
expect( text0 + text1 ).toMatch( text );

expect( await editorPage.hasParagraphBlockAtPosition( 2 ) ).toBe( false );
await editorPage.removeParagraphBlockAtPosition( 1 );
} );

it( 'should be able to create a post with multiple paragraph blocks', async () => {
await editorPage.addNewParagraphBlock();
await editorPage.sendTextToParagraphBlockAtPosition( 1, testData.longText );

for ( let i = 4; i > 0; i-- ) {
await editorPage.removeParagraphBlockAtPosition( i );
}
} );

afterAll( async () => {
Expand Down
1 change: 1 addition & 0 deletions __device-tests__/helpers/appium-local.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const start = ( localAppiumPort: number ) => new Promise < childProcess.C
'--port', localAppiumPort.toString(),
'--log', './appium-out.log',
'--log-no-colors',
'--relaxed-security', // Needed for mobile:shell commend for text entry on Android
] );

let appiumOutputBuffer = '';
Expand Down
6 changes: 3 additions & 3 deletions __device-tests__/helpers/caps.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
exports.ios12 = {
browserName: '',
platformName: 'iOS',
platformVersion: '12.0',
platformVersion: '12.2',
deviceName: 'iPhone Simulator',
os: 'iOS',
deviceOrientation: 'portrait',
automationName: 'XCUITest',
appiumVersion: '1.9.1', // SauceLabs requires appiumVersion to be specified.
appiumVersion: '1.13.0', // SauceLabs requires appiumVersion to be specified.
app: undefined, // will be set later, locally this is relative to root of project
};

Expand All @@ -20,6 +20,6 @@ exports.android8 = {
appPackage: 'com.gutenberg',
appActivity: 'com.gutenberg.MainActivity',
deviceOrientation: 'portrait',
appiumVersion: '1.9.1',
appiumVersion: '1.13.0',
app: undefined,
};
Loading