Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 12 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ jobs:
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php${{ matrix.php-versions }}-fpm.sock;

# Prevent 502 Bad Gateway error "upstream sent too big header while reading response header from upstream"
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_busy_buffers_size 64k;
}

location ~ /\.ht {
Expand Down Expand Up @@ -322,6 +327,13 @@ jobs:
# Artifacts are data generated by this workflow that we want to access, such as log files, screenshots, HTML output.
# The if: failure() directive means that this will run when the workflow fails e.g. if a test fails, which is needed
# because we want to see why a test failed.
- name: Upload nginx Error Log to Artifact
if: failure()
uses: actions/upload-artifact@v4
with:
name: nginx-error-log-${{ steps.test-group.outputs.value }}-${{ matrix.php-versions }}.log
path: /var/log/nginx/error.log

- name: Upload Test Results to Artifact
if: failure()
uses: actions/upload-artifact@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ public function _before(EndToEndTester $I)
// Activate Kit Plugin and third party Plugins.
$I->activateKitPlugin($I);
$I->activateThirdPartyPlugin($I, 'disable-_load_textdomain_just_in_time-doing_it_wrong-notice');
$I->useTheme('uncode');
$I->activateThirdPartyPlugin($I, 'uncode-core');

// Setup Kit Plugin, disabling JS.
$I->setupKitPluginDisableJS($I);
Expand All @@ -44,7 +42,9 @@ public function _before(EndToEndTester $I)
*/
public function testRestrictContentByProductWithUncodeThemeAndVisualComposer(EndToEndTester $I)
{
// Activate Visual Composer Page Builder.
// Activate theme and third party Plugins.
$I->useTheme('uncode');
$I->activateThirdPartyPlugin($I, 'uncode-core');
$I->activateThirdPartyPlugin($I, 'uncode-wpbakery-page-builder');

// Programmatically create a Page using the Visual Composer Page Builder.
Expand Down Expand Up @@ -81,8 +81,10 @@ public function testRestrictContentByProductWithUncodeThemeAndVisualComposer(End
checkNoWarningsAndNotices: false
);

// Deactivate Visual Composer Page Builder.
// Deactivate theme and third party Plugins.
$I->deactivateThirdPartyPlugin($I, 'uncode-wpbakery-page-builder');
$I->deactivateThirdPartyPlugin($I, 'uncode-core');
$I->useTheme('twentytwentyfive');
}

/**
Expand All @@ -96,6 +98,10 @@ public function testRestrictContentByProductWithUncodeThemeAndVisualComposer(End
*/
public function testRestrictContentByProductWithUncodeTheme(EndToEndTester $I)
{
// Activate theme and third party Plugins.
$I->useTheme('uncode');
$I->activateThirdPartyPlugin($I, 'uncode-core');

// Programmatically create a Page using the Visual Composer Page Builder.
$pageID = $I->havePostInDatabase(
[
Expand Down Expand Up @@ -128,6 +134,10 @@ public function testRestrictContentByProductWithUncodeTheme(EndToEndTester $I)
// Don't check for warnings and notices, as Uncode uses deprecated functions which WordPress 6.9 warn about.
checkNoWarningsAndNotices: false
);

// Deactivate theme and third party Plugins.
$I->deactivateThirdPartyPlugin($I, 'uncode-core');
$I->useTheme('twentytwentyfive');
}

/**
Expand All @@ -141,9 +151,7 @@ public function testRestrictContentByProductWithUncodeTheme(EndToEndTester $I)
*/
public function _passed(EndToEndTester $I)
{
// Deactivate Plugins and revert to default theme.
$I->deactivateThirdPartyPlugin($I, 'uncode-core');
$I->useTheme('twentytwentyfive');
// Deactivate Plugins.
$I->deactivateThirdPartyPlugin($I, 'disable-_load_textdomain_just_in_time-doing_it_wrong-notice');

// Deactivate and reset Kit Plugin.
Expand Down