Skip to content

Commit

Permalink
OXDEV-8214: Fix ThemeSwitchCest and adjust changelog entry
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelOxid committed Aug 9, 2024
1 parent b0b6bf1 commit fd841fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 4 additions & 5 deletions tests/Codeception/Acceptance/Theme/ThemeSwitchCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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();

Expand All @@ -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();
}
}

0 comments on commit fd841fe

Please sign in to comment.