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

Migrate dynamic HR to core/separator #2371

Merged
merged 27 commits into from
May 10, 2022
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1e991c8
Bump composer/composer from 2.2.11 to 2.2.12 (#2363)
dependabot[bot] Apr 23, 2022
96eed29
[skip ci] Update coblocks.pot/coblocks.json files
godaddy-wordpress-bot Apr 23, 2022
c18a798
Changelog for 2.22.11
olafleur-godaddy Apr 26, 2022
430a1bf
2.22.11
olafleur-godaddy Apr 26, 2022
79a87e8
[skip ci] Update coblocks.pot/coblocks.json files
godaddy-wordpress-bot Apr 26, 2022
12b148c
Bump grunt from 1.4.1 to 1.5.2 (#2366)
dependabot[bot] Apr 28, 2022
e1d0308
[skip ci] Update coblocks.pot/coblocks.json files
godaddy-wordpress-bot Apr 28, 2022
84f37c7
Migrate dynamic-hr to core/seperator
EvanHerman May 3, 2022
faee534
Remove tests
EvanHerman May 3, 2022
39510bc
Merge branch 'master' into migrate-dynamic-hr
EvanHerman May 3, 2022
366e556
Add a validation for the presence of the minor part in the version (#…
olafleur-godaddy May 3, 2022
b2bee49
[skip ci] Update coblocks.pot/coblocks.json files
godaddy-wordpress-bot May 4, 2022
028812a
Fix some Cypress tests in WP 6.0 RC1 (#2372)
olafleur-godaddy May 4, 2022
2393743
[skip ci] Update coblocks.pot/coblocks.json files
godaddy-wordpress-bot May 4, 2022
03a365a
Fix more Cypress tests for WP 6.0 RC1 (#2373)
olafleur-godaddy May 5, 2022
aebd27c
[skip ci] Update coblocks.pot/coblocks.json files
godaddy-wordpress-bot May 5, 2022
7dd3b26
Add e2e tests with PHP 8.0 (#2375)
olafleur-godaddy May 6, 2022
37b3a35
[skip ci] Update coblocks.pot/coblocks.json files
godaddy-wordpress-bot May 6, 2022
43a07a2
Introduce CoBlocks Labs (#2350)
AnthonyLedesma May 9, 2022
eb0eee5
[skip ci] Update coblocks.pot/coblocks.json files
godaddy-wordpress-bot May 9, 2022
ba90a6a
GoLF Automated checkin by importer (5/9/2022 10:09:48 AM)
May 9, 2022
7e9a0f7
Issue 2305 - add tab index to carousel thumbnails (#2312)
snovosel May 9, 2022
f6adcad
[skip ci] Update coblocks.pot/coblocks.json files
godaddy-wordpress-bot May 9, 2022
130731e
Resolve yarn.lock merge conflicts
EvanHerman May 9, 2022
3bc0b6f
Regen yarn.lock file
EvanHerman May 9, 2022
43afeb6
Restore dynamic-separator front-end styles
jrtashjian May 10, 2022
911e703
Merge branch 'the-great-migration' into migrate-dynamic-hr
jrtashjian May 10, 2022
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
34 changes: 28 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,20 @@ executors:
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_PASSWORD
php_80_browsers_mysql_mailhog:
docker:
- image: cimg/php:8.0-browsers
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_PASSWORD
- image: cimg/mysql:5.7
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_PASSWORD
- image: mailhog/mailhog:v1.0.1
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_PASSWORD
php_74_node:
docker:
- image: cimg/php:7.4-node
Expand Down Expand Up @@ -176,12 +190,12 @@ workflows:
requires:
- build

# - e2e_chrome_wp_previous_major:
# filters:
# tags:
# only: /^(?!canary).*$/
# requires:
# - build
- e2e_chrome_wp_php80:
filters:
tags:
only: /^(?!canary).*$/
requires:
- build

# PERF TESTING
- perf_tests_master:
Expand Down Expand Up @@ -774,6 +788,14 @@ jobs:
browser: chrome
theme: twentytwentytwo

e2e_chrome_wp_php80:
executor: php_80_browsers_mysql_mailhog
parallelism: 11
steps:
- run_e2e_tests:
browser: chrome
theme: twentytwentytwo

perf_tests_master:
executor: php_74_browsers_mysql
steps:
Expand Down
26 changes: 12 additions & 14 deletions .dev/tests/cypress/helpers.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* Internal dependencies.
*/
import coblocksLayoutSelector from '../../../src/extensions/layout-selector/test/cypress-layouts';

/**
* Close layout selector.
*/
Expand Down Expand Up @@ -64,15 +59,7 @@ export function loginToSite() {
export function goTo( path = '/wp-admin' ) {
cy.visit( Cypress.env( 'testURL' ) + path );

return getWindowObject().then( ( safeWin ) => {
// Only set global `safeWin.coblocksLayoutSelector` on new pages.
if ( safeWin.location.href.includes( 'post-new.php?post_type=page' ) ) {
safeWin.coblocksLayoutSelector = coblocksLayoutSelector;

safeWin.wp.data.dispatch( 'coblocks/template-selector' ).updateLayouts( coblocksLayoutSelector.layouts );
safeWin.wp.data.dispatch( 'coblocks/template-selector' ).updateCategories( coblocksLayoutSelector.categories );
}
} );
return getWindowObject();
}

/**
Expand Down Expand Up @@ -460,6 +447,17 @@ export function openEditorSettingsModal() {
cy.get( '.coblocks-settings-modal input[type="checkbox"]' ).should( 'have.length', 6 );
}

/**
* Open the CoBlocks Labs modal.
*/
export function openCoBlocksLabsModal() {
// Open "more" menu.
cy.get( '.edit-post-more-menu button' ).click();
cy.get( '.components-menu-group' ).contains( 'CoBlocks Labs' ).click();

cy.get( '.components-modal__frame' ).contains( 'CoBlocks Labs' ).should( 'exist' );
}

/**
* Helper method to convert a hex value to an RGB value
*
Expand Down
7 changes: 7 additions & 0 deletions .dev/tests/jest/assets-transformer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const path = require( 'path' );

module.exports = {
process( src, filename ) {
return 'module.exports = ' + JSON.stringify( path.basename( filename ) ) + ';';
},
};
4 changes: 4 additions & 0 deletions .dev/tests/jest/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ module.exports = {
'<rootDir>/.dev/tests/jest/setup-globals.js',
],
testMatch: [ '**/test/*.spec.js' ],
transform: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/.dev/tests/jest/assets-transformer.js',
},
};
244 changes: 244 additions & 0 deletions .dev/tests/jest/setup-globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,247 @@ global.coblocksLayoutSelector = {
categories: [],
layouts: [],
};

// Mock site design state for tests.
const siteDesignURLBase = 'http://localhost:8889';
// Disable reason: sorting keys for this object is superfluous.
/* eslint-disable sort-keys */
global.siteDesign = {
availableDesignStyles: {
traditional: {
slug: 'traditional',
label: 'Traditional',
url: `${ siteDesignURLBase }/wp-content/themes/go/dist/css/design-styles/style-traditional.css`,
editor_style: 'dist/css/design-styles/style-traditional-editor.css',
color_schemes: {
one: {
label: 'Apricot',
primary: '#c76919',
secondary: '#122538',
tertiary: '#f8f8f8',
background: '#ffffff',
},
two: {
label: 'Emerald',
primary: '#165153',
secondary: '#212121',
tertiary: '#f3f1f0',
background: '#ffffff',
},
three: {
label: 'Brick',
primary: '#87200e',
secondary: '#242611',
tertiary: '#f9f2ef',
background: '#ffffff',
},
four: {
label: 'Bronze',
primary: '#a88548',
secondary: '#05212d',
tertiary: '#f9f4ef',
background: '#ffffff',
},
},
fonts: {
'Crimson Text': [
'400',
'400i',
'700',
'700i',
],
'Nunito Sans': [
'400',
'400i',
'600',
'700',
],
},
font_size: '1.05rem',
type_ratio: '1.275',
viewport_basis: '900',
},
modern: {
slug: 'modern',
label: 'Modern',
url: `${ siteDesignURLBase }/wp-content/themes/go/dist/css/design-styles/style-modern.css`,
editor_style: 'dist/css/design-styles/style-modern-editor.css',
color_schemes: {
one: {
label: 'Shade',
primary: '#000000',
secondary: '#455a64',
tertiary: '#eceff1',
background: '#ffffff',
},
two: {
label: 'Blush',
primary: '#c2185b',
secondary: '#ec407a',
tertiary: '#fce4ec',
background: '#ffffff',
},
three: {
label: 'Indigo',
primary: '#303f9f',
secondary: '#5c6bc0',
tertiary: '#e8eaf6',
background: '#ffffff',
},
four: {
label: 'Pacific',
primary: '#00796b',
secondary: '#26a69a',
tertiary: '#e0f2f1',
background: '#ffffff',
},
},
fonts: {
Heebo: [
'800',
'400',
],
'Fira Code': [
'400',
'400i',
'700',
],
Montserrat: [
'400',
'700',
],
},
font_size: '0.85rem',
type_ratio: '1.3',
viewport_basis: '950',
},
},
currentColorScheme: 'one',
currentColors: {
background: '#ffffff',
primary: '#c76919',
secondary: '#122538',
tertiary: '#f8f8f8',
},
currentDesignStyle: 'traditional',
currentFonts: {
Poppins: [
'600',
],
Quicksand: [
'400',
'600',
],
},
editorClass: 'editor-styles-wrapper',
fontSize: '1rem',
fonts: [
{
'Crimson Text': [
'400',
'400i',
'700',
'700i',
],
'Nunito Sans': [
'400',
'400i',
'600',
'700',
],
},
{
'Fira Code': [
'400',
'400i',
'700',
],
Heebo: [
'800',
'400',
],
Montserrat: [
'400',
'700',
],
},
{
'Noto Sans': [
'400',
'400i',
'700',
],
'Source Code Pro': [
'400',
'700',
],
Trocchi: [
'400',
'600',
],
},
{
Karla: [
'400',
'400i',
'700',
],
'Work Sans': [
'300',
'700',
],
},
{
Poppins: [
'600',
],
Quicksand: [
'400',
'600',
],
},
{
Cardo: [
'700',
],
Roboto: [
'400',
],
},
{
Vollkorn: [
'400',
],
'Yeseva One': [
'400',
],
},
{
Anton: [
'400',
],
'IBM Plex Sans': [
'400',
],
},
{
'IBM Plex Mono_body': [
'400',
],
'IBM Plex Mono_heading': [
'600',
'400',
],
},
{
'Open Sans': [
'400',
],
Recursive: [
'900',
],
},
],
};

global.coblocksLabs = true;
2 changes: 1 addition & 1 deletion .dev/tests/phpunit/test-class-coblocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function test_constants() {
$reflection_method->invoke( coblocks() );

$expected = [
'version' => '2.22.10',
'version' => '2.22.11',
'plugin_dir' => str_replace( '.dev/tests/phpunit/', '', plugin_dir_path( __FILE__ ) ),
'plugin_url' => str_replace( '.dev/tests/phpunit/', '', plugin_dir_url( __FILE__ ) ),
'plugin_file' => str_replace( '.dev/tests/phpunit/test-class-coblocks.php', 'class-coblocks.php', __FILE__ ),
Expand Down
Binary file added assets/coblocks-labs/layout-selector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/coblocks-labs/site-content.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/coblocks-labs/site-design.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@

2.22.11 / 2022-04-26
====================
### Bug fixes
* Fix Events block to handle multi-day events [#2353](https://github.com/godaddy-wordpress/coblocks/pull/2353)
* Fix links in Gist block [#2349](https://github.com/godaddy-wordpress/coblocks/pull/2349)

### Misc
* Update dependencies [#2363](https://github.com/godaddy-wordpress/coblocks/pull/2363), [#2359](https://github.com/godaddy-wordpress/coblocks/pull/2359),
[#2358](https://github.com/godaddy-wordpress/coblocks/pull/2358) and [#2356](https://github.com/godaddy-wordpress/coblocks/pull/2356)
* Introduce GoDaddy global styles [#2357](https://github.com/godaddy-wordpress/coblocks/pull/2357)

2.22.10 / 2022-04-08
====================
### Bug fixes
Expand Down
Loading