From a9a62623010d97c477f9082669b9732304028a42 Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Fri, 19 Jul 2024 14:20:28 +0530 Subject: [PATCH 1/5] fix: PHP warnings --- includes/gutenberg/feedzy-rss-feeds-gutenberg-block.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/gutenberg/feedzy-rss-feeds-gutenberg-block.php b/includes/gutenberg/feedzy-rss-feeds-gutenberg-block.php index e1769cf4..4a41a4e7 100644 --- a/includes/gutenberg/feedzy-rss-feeds-gutenberg-block.php +++ b/includes/gutenberg/feedzy-rss-feeds-gutenberg-block.php @@ -76,8 +76,8 @@ public function feedzy_gutenberg_scripts() { ); // Enqueue editor block styles - wp_enqueue_style( 'feedzy-block-css', FEEDZY_ABSURL . 'css/feedzy-rss-feeds.css', '', $version ); - wp_enqueue_style( 'feedzy-gutenberg-block-css', FEEDZY_ABSURL . 'js/build/style-block.css', '', $version ); + wp_enqueue_style( 'feedzy-block-css', FEEDZY_ABSURL . 'css/feedzy-rss-feeds.css', array(), $this->version ); + wp_enqueue_style( 'feedzy-gutenberg-block-css', FEEDZY_ABSURL . 'js/build/style-block.css', array(), $this->version ); } /** From 92c625e157d805c91469437762195de5dacf44dd Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Fri, 19 Jul 2024 14:20:53 +0530 Subject: [PATCH 2/5] fix: PHPUnit testcase error --- .github/workflows/test-php.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-php.yml b/.github/workflows/test-php.yml index b9ad6c67..b8d9a5f1 100755 --- a/.github/workflows/test-php.yml +++ b/.github/workflows/test-php.yml @@ -15,7 +15,7 @@ jobs: - name: Setup PHP version uses: shivammathur/setup-php@v2 with: - php-version: '7.1' + php-version: '7.4' extensions: simplexml - name: Checkout source code uses: actions/checkout@v2 @@ -51,7 +51,7 @@ jobs: - name: Setup PHP version uses: shivammathur/setup-php@v2 with: - php-version: '7.1' + php-version: '7.4' extensions: simplexml, mysql tools: phpunit-polyfills - name: Checkout source code From 24b7d18795219a3cd2c736076e9c14ed51ec0a57 Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Fri, 19 Jul 2024 16:04:21 +0530 Subject: [PATCH 3/5] Fix phpunit testcase issue with WP 6.6 --- includes/admin/feedzy-rss-feeds-import.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/admin/feedzy-rss-feeds-import.php b/includes/admin/feedzy-rss-feeds-import.php index 7d36b806..3784e2e4 100644 --- a/includes/admin/feedzy-rss-feeds-import.php +++ b/includes/admin/feedzy-rss-feeds-import.php @@ -1243,7 +1243,7 @@ private function run_job( $job, $max ) { $import_translation_lang = get_post_meta( $job->ID, 'import_auto_translation_lang', true ); $max = $import_feed_limit; - if ( metadata_exists( $import_post_type, $job->ID, 'import_post_status' ) ) { + if ( metadata_exists( 'post', $job->ID, 'import_post_status' ) ) { $import_post_status = get_post_meta( $job->ID, 'import_post_status', true ); } else { add_post_meta( $job->ID, 'import_post_status', 'publish' ); From f79ce9f88c8fa6d4e15d705a1342c71e042f4795 Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Fri, 19 Jul 2024 16:21:32 +0530 Subject: [PATCH 4/5] fix: e2e error --- tests/e2e/specs/import.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/specs/import.spec.js b/tests/e2e/specs/import.spec.js index 682eaf90..591e0491 100644 --- a/tests/e2e/specs/import.spec.js +++ b/tests/e2e/specs/import.spec.js @@ -144,7 +144,7 @@ test.describe( 'Feed Import', () => { // Select the first post created by feeds import. Check the featured image. await page.getByRole('link', { name: 'Posts', exact: true }).click({ force: true }); await page.locator('#the-list tr').first().locator('a.row-title').click({ force: true }); - await page.getByRole('button', { name: 'Featured image' }).click({ force: true }); + await page.getByRole('button', { name: 'Set featured image' }).click({ force: true }); await expect( page.getByLabel('Edit or replace the image') ).toBeVisible(); // Featured image is added. }); From 24fe6193f8340580d797136cde280937c4af09a3 Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Fri, 19 Jul 2024 16:27:43 +0530 Subject: [PATCH 5/5] e2e: remove set featured image --- tests/e2e/specs/import.spec.js | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/e2e/specs/import.spec.js b/tests/e2e/specs/import.spec.js index 591e0491..1168bdd1 100644 --- a/tests/e2e/specs/import.spec.js +++ b/tests/e2e/specs/import.spec.js @@ -144,7 +144,6 @@ test.describe( 'Feed Import', () => { // Select the first post created by feeds import. Check the featured image. await page.getByRole('link', { name: 'Posts', exact: true }).click({ force: true }); await page.locator('#the-list tr').first().locator('a.row-title').click({ force: true }); - await page.getByRole('button', { name: 'Set featured image' }).click({ force: true }); await expect( page.getByLabel('Edit or replace the image') ).toBeVisible(); // Featured image is added. });