From 077328c469e848138d3c6f64b4d36e6d595bc55a Mon Sep 17 00:00:00 2001 From: Veljko Date: Mon, 22 Jul 2024 17:44:38 +0200 Subject: [PATCH] Fix flaky performance test and disable it from PRs [MAILPOET-6157] --- .circleci/config.yml | 2 +- .../performance/tests/segments-select-template.js | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3d504b06f1..60adbbb2f1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1029,7 +1029,7 @@ workflows: - acceptance_tests_woo_hpos_sync_on - acceptance_tests_woo_hpos_off - acceptance_tests_blockbased_theme - - performance_tests + # performance_tests disabled nightly: triggers: diff --git a/mailpoet/tests/performance/tests/segments-select-template.js b/mailpoet/tests/performance/tests/segments-select-template.js index 307b0474bf..f249b776c3 100644 --- a/mailpoet/tests/performance/tests/segments-select-template.js +++ b/mailpoet/tests/performance/tests/segments-select-template.js @@ -55,6 +55,11 @@ export async function segmentsSelectTemplate() { page.waitForLoadState('networkidle'), ]); + await page.screenshot({ + path: screenshotPath + 'Segments_Select_Template_02.png', + fullPage: fullPageSet, + }); + // Save the segment await waitForSelectorToBeClickable( page, @@ -62,12 +67,6 @@ export async function segmentsSelectTemplate() { ); await focusAndClick(page, 'div.mailpoet-form-actions > button'); - await page.waitForLoadState('networkidle'); - await page.screenshot({ - path: screenshotPath + 'Segments_Select_Template_02.png', - fullPage: fullPageSet, - }); - await page.waitForSelector('[data-automation-id="select_all"]'); const segmentUpdatedMessage = "//div[@class='notice-success'].//p[starts-with(text(),'Segment successfully updated!')]";