Skip to content

Commit

Permalink
Merge branch 'development' into feat/extend-theme-suport
Browse files Browse the repository at this point in the history
  • Loading branch information
Soare-Robert-Daniel committed Nov 27, 2023
2 parents 1ad1221 + cfb8a84 commit 3711dfc
Show file tree
Hide file tree
Showing 17 changed files with 30 additions and 9 deletions.
2 changes: 1 addition & 1 deletion assets/apps/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@neve-wp/components",
"version": "0.0.49",
"version": "0.0.51",
"description": "Neve React Components",
"author": "themeisle <[email protected]>",
"license": "GPL-2.0-or-later",
Expand Down
1 change: 1 addition & 0 deletions assets/apps/components/src/Common/DropdownFix.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ export default function Dropdown(props) {
popoverProps ? popoverProps.className : undefined,
contentClassName
)}
inline={true}
>
{renderContent(args)}
</Popover>
Expand Down
3 changes: 3 additions & 0 deletions assets/apps/components/src/Common/GlobalColorsPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ const GlobalColorsPicker = ({ onChange, activeColor, isGlobal }) => {
/>
</>
)}
popoverProps={{
inline: true,
}}
/>
);
};
Expand Down
3 changes: 3 additions & 0 deletions assets/apps/components/src/Controls/ColorControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ const ColorControl = ({
? ''
: 'neve-color-picker-dropdown'
}
popoverProps={{
inline: true,
}}
renderToggle={({ isOpen, onToggle }) => {
toggle = onToggle;
return (
Expand Down
3 changes: 3 additions & 0 deletions assets/apps/components/src/Controls/MultiSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ const MultiSelect = ({ choices, onChange, currentValue, label }) => {
<Dropdown
className="dd-toggle"
focusOnMount={false}
popoverProps={{
inline: true,
}}
renderToggle={({ isOpen, onToggle }) => (
<Button
isSmall
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ const ComponentsPopover: React.FC<Props> = ({
position="top center"
className="items-popover"
onFocusOutside={closePopup}
// @ts-ignore
inline={true}
>
<div className="popover-header">
<Icon icon={search} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ const FontFamilySelector = ({
setVisible(false);
setSearch('');
}}
inline={true}
>
{fonts ? getFontList() : __('In Progress', 'neve')}
</Popover>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const IconSelector = ({ label, value, onIconChoice, icons }) => {
onFocusOutside={() => {
setVisible(!visible);
}}
inline={true}
>
{
<Suspense fallback={<Spinner />}>
Expand Down
2 changes: 1 addition & 1 deletion bin/envs/cli-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ init_environment(){
wp --allow-root theme install --activate $NEVE_LOCATION
wp --allow-root option update fresh_site 0
echo "Installing Theme API Plugin"
wp --allow-root plugin install https://github.com/cristian-ungureanu/wp-thememods-api/archive/refs/heads/main.zip --force --activate
wp --allow-root plugin install https://github.com/codeinwp/wp-thememods-api/archive/refs/heads/main.zip --force --activate
}


Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default defineConfig({
forbidOnly: !!process.env.CI,
workers: process.env.CI ? 6 : undefined,
retries: 0,
timeout: parseInt(process.env.TIMEOUT || '', 10) || 100_000, // Defaults to 100 seconds.
timeout: parseInt(process.env.TIMEOUT || '', 10) || 150_000, // Defaults to 100 seconds.
fullyParallel: true,
projects: [
// Setup project
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/specs/customizer/general/color-control.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test.describe('Color Control', () => {
});

test('Test Color Control - Front End', async ({ page }) => {
page.goto('/?test_name=colorControl');
await page.goto('/?test_name=colorControl');
await expect(
page.locator('.hide-on-mobile .header-main-inner')
).toHaveCSS('color', 'rgb(253, 143, 106)');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ test.describe('Custom Global Color Control', () => {
await page.locator('.block-editor-rich-text__editable').first().click();
// use Background color control to open the color picker, available since WP 6.1
await page.getByRole('button', { name: 'Background' }).click();
await page.getByRole('button', { name: 'Color: Custom 1' }).click();
await page.getByRole('option', { name: 'Color: Custom 1' }).click();
await page
.locator('.block-editor-panel-color-gradient-settings__color-name')
.getByText('Text')
Expand Down Expand Up @@ -72,6 +72,6 @@ test.describe('Custom Global Color Control', () => {
await page.goto('/hello-world/?test_name=custom-global-colors');
await expect(
await page.locator('.nv-content-wrap p').first()
).toHaveClass(/has-custom-1-color/);
).toHaveClass(/has-custom-1-background-color/);
});
});
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.
13 changes: 10 additions & 3 deletions e2e-tests/specs/woo-visual-regression/checkout.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,21 @@ test.describe('Checkout page check', () => {
await page.goto('/product/album/');
await page.locator('.single_add_to_cart_button').click();
await page.goto('/checkout/');
await page.locator('#place_order').click();
await page.getByRole('button', { name: 'Place Order' }).click();
await page.waitForTimeout(1000);
await expect(page).toHaveScreenshot({ maxDiffPixelRatio: 0.2 });
await page
.getByRole('heading', { name: 'Checkout' })
.scrollIntoViewIfNeeded();
await expect(page).toHaveScreenshot({
maxDiffPixelRatio: 0.2,
});
});

test('Check MyAccount errors', async ({ page }) => {
await page.goto('/my-account/edit-account/');
await page.locator('.woocommerce-Button').first().click();
await expect(page).toHaveScreenshot({ maxDiffPixelRatio: 0.2 });
await expect(page).toHaveScreenshot({
maxDiffPixelRatio: 0.2,
});
});
});
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.

0 comments on commit 3711dfc

Please sign in to comment.