From 8c83a75b78bd2d8ee57d9322c839a994f2f285ae Mon Sep 17 00:00:00 2001 From: RahatHameed Date: Fri, 21 Jun 2024 11:59:09 +0200 Subject: [PATCH] OXDEV-8213 Used themeId from evn variables --- .../Acceptance/Theme/ThemeListCest.php | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/tests/Codeception/Acceptance/Theme/ThemeListCest.php b/tests/Codeception/Acceptance/Theme/ThemeListCest.php index 8d86925..8f9cbea 100644 --- a/tests/Codeception/Acceptance/Theme/ThemeListCest.php +++ b/tests/Codeception/Acceptance/Theme/ThemeListCest.php @@ -28,26 +28,22 @@ public function testThemeListAuthorized(AcceptanceTester $I): void $I->assertArrayNotHasKey('errors', $result); $themeList = $result['data']['themesList']; - $I->assertCount(1, $themeList); - - $I->assertEquals("APEX Theme", $themeList[0]['title']); - $I->assertEquals("apex", $themeList[0]['identifier']); - $I->assertEquals("APEX - Bootstrap 5 TWIG Theme", $themeList[0]['description']); - $I->assertTrue($themeList[0]['active']); + $I->assertNotEmpty($themeList); } public function runThemeListQuery(AcceptanceTester $I): array { + $themeId = getenv('THEME_ID'); $I->login($this->getAdminUsername(), $this->getAdminPassword()); $I->sendGQLQuery( 'query themeList { themesList( filters: { - activeFilter: { - equals: true + active: { + equals: true } - titleFilter: { - contains: "APEX Theme" + title: { + contains: "' . $themeId . '" } } ) {