Skip to content

Commit

Permalink
Update SettingsCest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhahnweilheim committed Dec 28, 2023
1 parent 369b79b commit 55d4e1c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/codeception/acceptance/SettingsCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

class SettingsCest
{
$bg_color_pg = '#cfe2f3';
$bg_color_pg_d_5 = '#c3d5e5';
const BG_COLOR_PG = '#cfe2f3';
const BG_COLOR_PG_D_5 = '#c3d5e5';

public function testSettings(AcceptanceTester $I)
{
Expand All @@ -25,7 +25,7 @@ public function testSettingsColor(AcceptanceTester $I)
$I->amAdmin();
$I->amOnRoute(['/flex-theme/config/colors']);
$I->waitForText('Flex Theme');
$I->fillField('Background Color Page', $this->bg-color-pg);
$I->fillField('Background Color Page', self::BG_COLOR_PG);

$I->click('Save');

Expand All @@ -40,11 +40,11 @@ public function testEffectOfPreviousSettings(AcceptanceTester $I)
$color = $I->executeJS("getComputedStyle(document.documentElement).getPropertyValue('--background_color_page');");
$colorDarkened = $I->executeJS("getComputedStyle(document.documentElement).getPropertyValue('--background_color_page__darken__5');");

if ($color !== $this->bg_color_pg) {
if ($color !== self::BG_COLOR_PG) {
return false;
}

if ($colorDarkened !== $this->bg_color_pg_d_5) {
if ($colorDarkened !== self::BG_COLOR_PG_D_5) {
return false;
}
}
Expand Down

0 comments on commit 55d4e1c

Please sign in to comment.