Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
51 changes: 49 additions & 2 deletions __device-tests__/gutenberg-editor-sanity-test-1-visual.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@
* Internal dependencies
*/
const { blockNames } = editorPage;
import { takeScreenshot } from './utils';
const { toggleOrientation, isAndroid, swipeFromTo, toggleDarkMode } = e2eUtils;
import { takeScreenshot, takeScreenshotByElement } from './utils';
const {
clickIfClickable,
toggleOrientation,
isAndroid,
swipeFromTo,
toggleDarkMode,
typeString,
waitForVisible,
} = e2eUtils;
import { NESTED_COLUMNS_3_LEVELS } from './test-editor-data';

const ANDROID_COLUMN_APPENDER_BUTTON_XPATH =
Expand Down Expand Up @@ -285,4 +293,43 @@ describe( 'Gutenberg Editor - Test Suite 1', () => {
expect( screenshot ).toMatchImageSnapshot();
} );
} );

describe( 'Social Icons block', () => {
it( 'should display active icon colors', async () => {
await editorPage.initializeEditor();

await editorPage.addNewBlock( blockNames.socialIcons );
const twitterIconXpath = isAndroid()
? '//android.widget.Button[@content-desc="Twitter social icon"]'
: '//XCUIElementTypeButton[@name="Twitter social icon"]';
await clickIfClickable( editorPage.driver, twitterIconXpath );
await editorPage.toggleFormatting( 'Add link to Twitter' );
const uRLFieldXpath = isAndroid()
? '//android.widget.Button[@content-desc="URL. Empty"]/android.view.ViewGroup[1]/android.widget.EditText'
: '//XCUIElementTypeOther[@name="Add URL"]/XCUIElementTypeTextField';
const uRLField = await waitForVisible(
editorPage.driver,
uRLFieldXpath
);
await typeString(
editorPage.driver,
uRLField,
'https://twitter.com/WordPress'
);
await editorPage.dismissBottomSheet();
// Wait for the modal to close
await editorPage.driver.sleep( 3000 );
const socialLinksBlockXpath = isAndroid()
? '//android.widget.Button[@content-desc="Social Icons Block. Row 1"]'
: '(//XCUIElementTypeOther[@name="Social Icons Block. Row 1"])[1]';
const socialLinksBlock = await editorPage.driver.elementByXPath(
socialLinksBlockXpath
);

const screenshot = await takeScreenshotByElement(
socialLinksBlock
);
expect( screenshot ).toMatchImageSnapshot();
} );
} );
} );
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion gutenberg
Submodule gutenberg updated 29 files
+1 −1 gutenberg.php
+16 −16 lib/compat/wordpress-6.4/script-loader.php
+93 −2 lib/experimental/auto-inserting-blocks.php
+4 −0 lib/experimental/editor-settings.php
+2 −2 package-lock.json
+1 −1 package.json
+2 −3 packages/block-editor/src/components/block-list/content.scss
+1 −5 packages/block-editor/src/components/link-control/index.js
+1 −0 packages/block-editor/src/components/link-control/test/index.js
+232 −0 packages/block-editor/src/hooks/auto-inserting-blocks.js
+1 −0 packages/block-editor/src/hooks/index.js
+0 −1 packages/block-library/src/embed/embed-link-settings.native.js
+9 −9 packages/block-library/src/embed/test/index.native.js
+0 −132 packages/block-library/src/social-link/test/index.native.js
+30 −0 packages/block-library/src/social-links/test/edit.native.js
+12 −0 packages/blocks/src/api/registration.js
+1 −1 packages/components/src/mobile/link-settings/link-settings-navigation.native.js
+40 −0 packages/e2e-tests/plugins/interactive-blocks/directive-bind/render.php
+11 −0 packages/e2e-tests/plugins/interactive-blocks/directive-bind/view.js
+14 −0 packages/e2e-tests/plugins/interactive-blocks/directive-slots/block.json
+67 −0 packages/e2e-tests/plugins/interactive-blocks/directive-slots/render.php
+18 −0 packages/e2e-tests/plugins/interactive-blocks/directive-slots/view.js
+5 −0 packages/interactivity/CHANGELOG.md
+104 −8 packages/interactivity/src/directives.js
+38 −0 packages/interactivity/src/slots.js
+11 −1 packages/react-native-editor/__device-tests__/helpers/appium-local-start.js
+1 −0 packages/react-native-editor/__device-tests__/pages/editor-page.js
+165 −2 test/e2e/specs/interactivity/directive-bind.spec.ts
+186 −0 test/e2e/specs/interactivity/directive-slots.spec.ts