forked from elementor/elementor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Internal: Internal: Add 'Free to Pro' Motion Effects promotion [ED-13…
…458] (elementor#25021) Co-authored-by: ElementorBot <48412871+elementorbot@users.noreply.github.com>
- Loading branch information
1 parent
366d2c4
commit b85b24b
Showing
27 changed files
with
259 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { expect } from '@playwright/test'; | ||
import Content from '../elementor-panel-tabs/content'; | ||
|
||
export default class promotionsHelper extends Content { | ||
async widgetControlPromotionModalScreenshotTest( element: string ) { | ||
await this.page.locator( `.e-control-${ element }-promotion` ).click( { force: true } ); | ||
const modalContainer = this.page.locator( '#elementor-element--promotion__dialog' ); | ||
await expect.soft( modalContainer ).toHaveScreenshot( `${ element }-modal.png` ); | ||
await this.page.locator( '.dialog-header .eicon-close' ).click(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 0 additions & 26 deletions
26
tests/playwright/sanity/modules/promotions/admin-menu-items/menu-item-promotions.test.ts
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-121 KB
.../menu-item-promotions.test.ts-snapshots/custom-code-menu-item-desktop-linux.png
Binary file not shown.
Binary file removed
BIN
-95.6 KB
...menu-item-promotions.test.ts-snapshots/custom-fonts-menu-item-desktop-linux.png
Binary file not shown.
Binary file removed
BIN
-114 KB
...menu-item-promotions.test.ts-snapshots/custom-icons-menu-item-desktop-linux.png
Binary file not shown.
Binary file removed
BIN
-145 KB
.../menu-item-promotions.test.ts-snapshots/submissions-menu-item-desktop-linux.png
Binary file not shown.
57 changes: 57 additions & 0 deletions
57
tests/playwright/sanity/modules/promotions/promotions.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { test, expect } from '@playwright/test'; | ||
import WpAdminPage from '../../../pages/wp-admin-page'; | ||
import PromotionsHelper from '../../../pages/promotions/helper'; | ||
|
||
test.describe( 'Promotion tests @promotions', () => { | ||
|
||
test( 'Menu Items Promotions - screenshots', async ( { page }, testInfo ) => { | ||
const wpAdminPage = new WpAdminPage( page, testInfo ), | ||
promotionContainer = '.e-feature-promotion'; | ||
|
||
await wpAdminPage.login(); | ||
|
||
await test.step( 'Free to Pro - Submissions', async () => { | ||
await wpAdminPage.promotionPageScreenshotTest( promotionContainer, 'e-form-submissions', 'submissions-menu-item-desktop' ); | ||
} ); | ||
|
||
await test.step( 'Free to Pro - Custom Icons', async () => { | ||
await wpAdminPage.promotionPageScreenshotTest( promotionContainer, 'elementor_custom_icons', 'custom-icons-menu-item-desktop' ); | ||
} ); | ||
|
||
await test.step( 'Free to Pro - Custom Fonts', async () => { | ||
await wpAdminPage.promotionPageScreenshotTest( promotionContainer, 'elementor_custom_fonts', 'custom-fonts-menu-item-desktop' ); | ||
} ); | ||
|
||
await test.step( 'Free to Pro - Custom Code', async () => { | ||
await wpAdminPage.promotionPageScreenshotTest( promotionContainer, 'elementor_custom_code', 'custom-code-menu-item-desktop' ); | ||
} ); | ||
} ); | ||
|
||
test( 'Modal Promotions screenshots', async ( { page }, testInfo ) => { | ||
const wpAdmin = new WpAdminPage( page, testInfo ), | ||
editor = await wpAdmin.openNewPage(), | ||
promotionsHelper = new PromotionsHelper( page, testInfo ), | ||
container = await editor.addElement( { elType: 'container' }, 'document' ); | ||
|
||
await editor.addWidget( 'heading', container ); | ||
|
||
await editor.activatePanelTab( 'advanced' ); | ||
await page.locator( '.elementor-control-section_effects' ).click(); | ||
|
||
await test.step( 'Motion Effects - promotion controls screenshots', async () => { | ||
const promotionControls = [ 'elementor-control-scrolling_effects_pro', 'elementor-control-mouse_effects_pro', 'elementor-control-sticky_pro' ]; | ||
|
||
for ( const control of promotionControls ) { | ||
const controlContainer = page.locator( `.${ control }` ); | ||
await expect.soft( controlContainer ).toHaveScreenshot( `${ control }.png` ); | ||
} | ||
} ); | ||
|
||
await test.step( 'Free to Pro - Control modals screenshot tests', async () => { | ||
const promotionControls = [ 'scrolling-effects', 'mouse-effects', 'sticky-effects' ]; | ||
for ( const effect of promotionControls ) { | ||
await promotionsHelper.widgetControlPromotionModalScreenshotTest( effect ); | ||
} | ||
} ); | ||
} ); | ||
} ); |
Binary file added
BIN
+121 KB
...promotions/promotions.test.ts-snapshots/custom-code-menu-item-desktop-linux.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
BIN
+95.4 KB
...romotions/promotions.test.ts-snapshots/custom-fonts-menu-item-desktop-linux.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
BIN
+114 KB
...romotions/promotions.test.ts-snapshots/custom-icons-menu-item-desktop-linux.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
BIN
+2.84 KB
...ions/promotions.test.ts-snapshots/elementor-control-mouse-effects-pro-linux.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
BIN
+3.13 KB
.../promotions.test.ts-snapshots/elementor-control-scrolling-effects-pro-linux.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
BIN
+2.32 KB
.../promotions/promotions.test.ts-snapshots/elementor-control-sticky-pro-linux.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
BIN
+8 KB
...y/modules/promotions/promotions.test.ts-snapshots/mouse-effects-modal-linux.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
BIN
+10.1 KB
...dules/promotions/promotions.test.ts-snapshots/scrolling-effects-modal-linux.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
BIN
+8.79 KB
.../modules/promotions/promotions.test.ts-snapshots/sticky-effects-modal-linux.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
BIN
+144 KB
...promotions/promotions.test.ts-snapshots/submissions-menu-item-desktop-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.