Skip to content
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
Replace if condition to use onlyOnAndroid wrapper instead
  • Loading branch information
Gerardo committed Jun 3, 2022
commit 1a8101cee49984cc06c4f703173a6b64a8632d21
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import {
} from './helpers/utils';
import testData from './helpers/test-data';

// Used to skip some tests on iOS
const onlyOnAndroid = isAndroid() ? it : it.skip;

describe( 'Gutenberg Editor Drag & Drop blocks tests', () => {
beforeEach( async () => {
await clearClipboard( editorPage.driver );
Expand Down Expand Up @@ -53,9 +56,9 @@ describe( 'Gutenberg Editor Drag & Drop blocks tests', () => {
await editorPage.removeBlockAtPosition( blockNames.paragraph, 1 );
} );

// skip iOS for now
if ( isAndroid() ) {
it( 'should be able to long-press on a text-based block to paste a text in a focused textinput', async () => {
onlyOnAndroid(
'should be able to long-press on a text-based block to paste a text in a focused textinput',
async () => {
// Add a Paragraph block
await editorPage.addNewBlock( blockNames.paragraph );
const paragraphBlockElement = await editorPage.getTextBlockAtPosition(
Expand Down Expand Up @@ -85,12 +88,12 @@ describe( 'Gutenberg Editor Drag & Drop blocks tests', () => {

// Remove the block
await editorPage.removeBlockAtPosition( blockNames.paragraph );
} );
}
}
);

// skip iOS for now
if ( isAndroid() ) {
it( 'should be able to long-press on a text-based block using the PlainText component to paste a text in a focused textinput', async () => {
onlyOnAndroid(
'should be able to long-press on a text-based block using the PlainText component to paste a text in a focused textinput',
async () => {
// Add a Shortcode block
await editorPage.addNewBlock( blockNames.shortcode );
const shortcodeBlockElement = await editorPage.getShortBlockTextInputAtPosition(
Expand Down Expand Up @@ -118,8 +121,8 @@ describe( 'Gutenberg Editor Drag & Drop blocks tests', () => {

// Remove the block
await editorPage.removeBlockAtPosition( blockNames.shortcode );
} );
}
}
);

it( 'should be able to drag & drop a text-based block when the textinput is not focused', async () => {
// Initialize the editor with two Paragraph blocks
Expand Down