From fd841fe424167e50baacc2465ae7375d0f3ee7b8 Mon Sep 17 00:00:00 2001 From: marcelmanzel Date: Fri, 9 Aug 2024 11:17:38 +0200 Subject: [PATCH] OXDEV-8214: Fix ThemeSwitchCest and adjust changelog entry --- CHANGELOG.md | 2 +- tests/Codeception/Acceptance/Theme/ThemeSwitchCest.php | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91777d2..a0eccc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Theme list and filtering option on basis of theme name and status - Module list and filtering option on basis of module name and status -- Active a given theme by themeId +- Activation of given theme by themeId ## [1.1.0] - 2024-07-05 This is stable release for v1.1.0. No changes have been made since v1.1.0-rc.1. diff --git a/tests/Codeception/Acceptance/Theme/ThemeSwitchCest.php b/tests/Codeception/Acceptance/Theme/ThemeSwitchCest.php index 03e4b77..89b3c10 100644 --- a/tests/Codeception/Acceptance/Theme/ThemeSwitchCest.php +++ b/tests/Codeception/Acceptance/Theme/ThemeSwitchCest.php @@ -9,13 +9,12 @@ namespace OxidEsales\GraphQL\ConfigurationAccess\Tests\Codeception\Acceptance\Theme; -use OxidEsales\EshopCommunity\Internal\Transition\Adapter\ShopAdapterInterface; +use OxidEsales\Eshop\Core\Theme; use OxidEsales\GraphQL\ConfigurationAccess\Tests\Codeception\Acceptance\BaseCest; use OxidEsales\GraphQL\ConfigurationAccess\Tests\Codeception\AcceptanceTester; /** * @group theme_switch - * @group setting_access * @group oe_graphql_configuration_access */ final class ThemeSwitchCest extends BaseCest @@ -29,7 +28,7 @@ public function testThemeSwitchAuthorized(AcceptanceTester $I): void $I->assertArrayNotHasKey('errors', $result); } - public function runThemeSwitchMutation(AcceptanceTester $I): array + private function runThemeSwitchMutation(AcceptanceTester $I): array { $themeId = $this->getCurrentThemeId(); @@ -45,7 +44,7 @@ public function runThemeSwitchMutation(AcceptanceTester $I): array private function getCurrentThemeId(): string { - $shopAdapter = $this->get(ShopAdapterInterface::class); - return $shopAdapter->getActiveThemeId(); + $theme = new Theme(); + return $theme->getActiveThemeId(); } }