Skip to content

Commit b549105

Browse files
authored
Merge pull request #114 from Kit/tests-improve-reliability
Tests: Improve Reliability
2 parents 3010f75 + 2455b78 commit b549105

2 files changed

Lines changed: 19 additions & 4 deletions

File tree

tests/EndToEnd.suite.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ modules:
4040
capabilities:
4141
"goog:chromeOptions":
4242
args:
43+
- "--headless"
4344
- "--disable-gpu"
4445
- "--disable-dev-shm-usage"
46+
- "--disable-software-rasterizer"
4547
- "--proxy-server='direct://'"
4648
- "--proxy-bypass-list=*"
4749
- "--no-sandbox"

tests/Support/Helper/ThirdPartyPlugin.php

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,23 @@ public function deactivateThirdPartyPlugin($I, $name)
6565
// Wait for the Plugins page to load.
6666
$I->waitForElementVisible('body.plugins-php');
6767

68-
// Deactivate the Plugin.
69-
$I->checkOption('//*[@data-slug="' . $name . '"]/th/input');
70-
$I->selectOption('action', 'deactivate-selected');
71-
$I->click('#doaction');
68+
// Depending on the Plugin name, perform deactivation.
69+
switch ($name) {
70+
case 'wpforms-lite':
71+
// Using the check option results in a 502 Bad Gateway error.
72+
$I->click('a#deactivate-' . $name);
73+
break;
74+
75+
default:
76+
// Deactivate the Plugin.
77+
$I->checkOption('//*[@data-slug="' . $name . '"]/th/input');
78+
$I->selectOption('action', 'deactivate-selected');
79+
$I->click('#doaction');
80+
81+
// Wait for the Plugins page to load with the Plugin deactivated, to confirm it deactivated.
82+
$I->waitForElementVisible('table.plugins tr[data-slug=' . $name . '].inactive');
83+
break;
84+
}
7285
}
7386

7487
/**

0 commit comments

Comments
 (0)