Skip to content

Commit

Permalink
Merge branch 'b-7.3.x' into b-8.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
RahatHameed committed Nov 11, 2024
2 parents 0cb4bbb + 6d32d3f commit 8ebd064
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
43 changes: 43 additions & 0 deletions tests/Codeception/Acceptance/CategoryDetailCest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php

/**
* Copyright © OXID eSales AG. All rights reserved.
* See LICENSE file for license details.
*/

declare(strict_types=1);

namespace OxidEsales\EshopCommunity\Tests\Codeception\Acceptance;

use Codeception\Util\Fixtures;
use OxidEsales\Codeception\Step\CategoryNavigation;
use OxidEsales\EshopCommunity\Tests\Codeception\Support\AcceptanceTester;
use PHPUnit\Framework\Attributes\Group;


#[Group('category_description')]
final class CategoryDetailCest
{
public function categoryDetailPageInformation(AcceptanceTester $I): void
{
$I->wantToTest('category information in detail page');

$categoryData = Fixtures::get('testCategory0');

$categoryNavigation = new CategoryNavigation($I);
$categoryDetailPage = $categoryNavigation->openCategoryDetailsPage($categoryData['id']);
$categoryDetailPage->seeCategoryData($categoryData);
}

public function subcategoryDetailPageInformation(AcceptanceTester $I): void
{
$I->wantToTest('subcategory information in detail page');

$categoryData = Fixtures::get('testCategory0');
$subCategoryData = Fixtures::get('testCategory1');

$categoryNavigation = new CategoryNavigation($I);
$categoryDetailPage = $categoryNavigation->openCategoryDetailsPage($categoryData['id']);
$categoryDetailPage->seeSubCategoryData($subCategoryData);
}
}
1 change: 1 addition & 0 deletions tests/Codeception/Acceptance/_bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@
$helper->loadRuntimeFixtures(codecept_data_dir('order.php'));
$helper->loadRuntimeFixtures(codecept_data_dir('product.php'));
$helper->loadRuntimeFixtures(codecept_data_dir('shop.php'));
$helper->loadRuntimeFixtures(codecept_data_dir('category.php'));
23 changes: 23 additions & 0 deletions tests/Codeception/Support/Data/category.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

/**
* Copyright © OXID eSales AG. All rights reserved.
* See LICENSE file for license details.
*/

declare(strict_types=1);

return [
'testCategory0' => [
'id' => 'testcategory0',
'title' => 'Test category 0 [EN] šÄßüл',
'description' => 'Test category 0 desc [EN] šÄßüл',
'longDescription' => 'Category 0 long desc [EN] šÄßüл',
],
'testCategory1' => [
'id' => 'testcategory1',
'title' => 'Test category 1 [EN] šÄßüл',
'description' => 'Test category 1 desc [EN] šÄßüл',
'longDescription' => 'Category 1 long desc [EN] šÄßüл',
],
];

0 comments on commit 8ebd064

Please sign in to comment.