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

Release #1152

Merged
merged 21 commits into from
May 23, 2024
Merged

Release #1152

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
b856b84
Sync branch [skip ci]
pirate-bot May 14, 2024
468c3c8
Sync branch [skip ci]
pirate-bot May 14, 2024
c50062e
Update index.php
vytisbulkevicius May 16, 2024
2e20fdb
chore: replaced favicons with dashicons
GrigoreMihai May 17, 2024
1ea938f
chore: added renew notice dom cleanup on close
GrigoreMihai May 17, 2024
874cf97
chore: added proper links for license renew on lock notice
GrigoreMihai May 17, 2024
7c53f00
chore: optimized feature lock notice rendering
GrigoreMihai May 20, 2024
94c9181
removed leftover testing code
GrigoreMihai May 20, 2024
565348d
lint code
GrigoreMihai May 20, 2024
378fa1a
chore: mode the pro popup blocker to separate function
GrigoreMihai May 20, 2024
064c73b
lint code
GrigoreMihai May 20, 2024
7b5d823
fix: sql for subscriber
preda-bogdan May 20, 2024
cedcd06
chore: code style
preda-bogdan May 20, 2024
e6e85fb
chore(deps): bump codeinwp/themeisle-sdk from 3.3.21 to 3.3.22
dependabot[bot] May 20, 2024
106789c
Merge pull request #1155 from Codeinwp/dependabot/composer/developmen…
vytisbulkevicius May 21, 2024
7a58250
chore: addresed pr review changes
GrigoreMihai May 22, 2024
ebe416e
fix: widget not loading
preda-bogdan May 23, 2024
7ae84d2
Merge pull request #1154 from Codeinwp/fix/sql_data_save
vytisbulkevicius May 23, 2024
b94a05b
Merge pull request #1157 from Codeinwp/fix/widgets
vytisbulkevicius May 23, 2024
187c7f6
chore: added e2e test for pro chart lock
GrigoreMihai May 23, 2024
f131320
Merge pull request #1153 from Codeinwp/fix/470
vytisbulkevicius May 23, 2024
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
Next Next commit
fix: widget not loading
References: #1156
  • Loading branch information
preda-bogdan committed May 23, 2024
commit ebe416e4f31428e96e41c6c26b1460098af683f7
5 changes: 4 additions & 1 deletion classes/Visualizer/Module/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public function __construct( Visualizer_Plugin $plugin ) {
parent::__construct( $plugin );
$this->_addAction( 'load-post.php', 'enqueueMediaScripts' );
$this->_addAction( 'load-post-new.php', 'enqueueMediaScripts' );
$this->_addAction( 'enqueue_block_editor_assets', 'enqueueMediaScripts' );
$this->_addAction( 'admin_footer', 'renderTemplates' );
$this->_addAction( 'admin_enqueue_scripts', 'enqueueLibraryScripts', null, 0 );
$this->_addAction( 'admin_menu', 'registerAdminMenu' );
Expand Down Expand Up @@ -330,7 +331,9 @@ public function feedbackReviewTrigger( $dumb ) {
*/
public function enqueueMediaScripts() {
global $typenow;
if ( post_type_supports( $typenow, 'editor' ) ) {
global $current_screen;

if ( post_type_supports( $typenow, 'editor' ) || $current_screen->id === 'widgets' ) {
wp_enqueue_style( 'visualizer-media', VISUALIZER_ABSURL . 'css/media.css', array( 'media-views' ), Visualizer_Plugin::VERSION );

// Load all the assets for the different libraries we support.
Expand Down
23 changes: 20 additions & 3 deletions tests/e2e/specs/gutenberg-editor.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ test.describe( 'Charts with Gutenberg Editor', () => {
test('new chart creation', async ( { admin, editor, page } ) => {
await admin.createNewPost();
await editor.insertBlock( { name: 'visualizer/chart'} );

await expect( page.getByText('Make a new chart or display') ).toBeVisible();
await expect( page.getByLabel('Editor content').locator('a') ).toBeVisible();

Expand All @@ -40,7 +40,7 @@ test.describe( 'Charts with Gutenberg Editor', () => {
// Create chart via popup.
await page.frameLocator('iframe').getByRole('button', { name: 'Next' }).click();
await page.frameLocator('iframe').getByRole('button', { name: 'Create Chart' }).click();

await expect( page.getByRole('button', { name: 'Save', exact: true }) ).toBeVisible();
await page.getByRole('button', { name: 'Save', exact: true }).click();
await expect( page.getByRole('button', { name: 'Done' }) ).toBeVisible();
Expand Down Expand Up @@ -98,7 +98,7 @@ test.describe( 'Charts with Gutenberg Editor', () => {
await page.getByRole('button', { name: 'Import from other chart' }).click();

await page.getByRole('button', { name: 'Import data from database' }).click();

const upgradeLinks = await page.locator('a').filter({ hasText: 'Upgrade Now' }).count();
expect( upgradeLinks ).toBe( 6 );

Expand Down Expand Up @@ -131,4 +131,21 @@ test.describe( 'Charts with Gutenberg Editor', () => {
await expect(page.getByLabel('Visualizer', { exact: true }).locator('h1')).toContainText('Visualizer');
await page.getByRole('button', { name: ' Close dialog' }).click();
} );

test( 'check widgets', async ( { admin, editor, page } ) => {
await createChartWithAdmin( admin, page );

await admin.visitAdminPage( 'widgets.php' );

await page.getByLabel('Close', { exact: true }).click();
await page.getByLabel('Toggle block inserter').click();
await page.getByPlaceholder('Search').fill('visuali');
await page.getByRole('option', { name: ' Visualizer Chart' }).click();
await page.locator('div').filter({ hasText: /^Display an existing chart$/ }).click();
await page.getByTitle('Insert Chart').first().click();

await expect(page.getByLabel('Block: Visualizer Chart')).toContainText('Visualizer');
await expect(page.locator('rect').first()).toBeVisible();

} );
} );
Loading