From 3c5b7683d388de365527467971462755aecbe63c Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Sun, 5 Oct 2025 03:24:05 +0200 Subject: [PATCH 01/30] Improved error message for CMS page delete --- app/code/core/Mage/Cms/Helper/Page.php | 63 +++++++++++++++++++ .../core/Mage/Cms/Model/Resource/Page.php | 4 +- tests/unit/Mage/Cms/Helper/PageTest.php | 9 +++ .../Traits/DataProvider/Mage/Cms/CmsTrait.php | 22 +++++++ 4 files changed, 96 insertions(+), 2 deletions(-) diff --git a/app/code/core/Mage/Cms/Helper/Page.php b/app/code/core/Mage/Cms/Helper/Page.php index 710b0a86658..3c782e8f771 100644 --- a/app/code/core/Mage/Cms/Helper/Page.php +++ b/app/code/core/Mage/Cms/Helper/Page.php @@ -174,4 +174,67 @@ public static function getUsedInStoreConfigPaths(?array $paths = []): array return $searchPaths; } + + public static function getConfigNameFromPath(string $paths): string + { + return match ($paths) { + self::XML_PATH_NO_ROUTE_PAGE => Mage::helper('cms')->__('No Route Page'), + self::XML_PATH_NO_COOKIES_PAGE => Mage::helper('cms')->__('No Cookies Page'), + self::XML_PATH_HOME_PAGE => Mage::helper('cms')->__('Home Page'), + default => $paths, + }; + } + + /** + * @param Mage_Adminhtml_Block_System_Config_Form::SCOPE_* $scope + * @throws Mage_Core_Exception + */ + public static function getConfigStoreFromScope(string $scope, string $scopeId): string + { + return match ($scope) { + Mage_Adminhtml_Block_System_Config_Form::SCOPE_DEFAULT => Mage::helper('cms')->__('Default Config'), + Mage_Adminhtml_Block_System_Config_Form::SCOPE_WEBSITES => sprintf( + '%s "%s"', + Mage::helper('cms')->__('Website'), + Mage::app()->getWebsite($scopeId)->getName(), + ), + Mage_Adminhtml_Block_System_Config_Form::SCOPE_STORES => sprintf( + '%s "%s"', + Mage::helper('cms')->__('Store View'), + Mage::app()->getStore($scopeId)->getName(), + ), + }; + } + + /** + * @throws Mage_Core_Exception + */ + public static function getDeleteErrorMessage(Mage_Core_Model_Resource_Db_Collection_Abstract $isUsedInConfig): string + { + $messages = []; + + $data = $isUsedInConfig->getData(); + foreach ($data as $key => $item) { + $path = $item['path']; + unset($item['config_id'], $item['path'], $item['updated_at'], $item['value']); + $data[$path][] = $item; + unset($data[$key], $key, $path); + } + + foreach ($data as $path => $items) { + $scopes = []; + foreach ($items as $item) { + $scopes[] = self::getConfigStoreFromScope($item['scope'], $item['scope_id']); + } + + $messages[] = sprintf( + '"%s" (%s)', + self::getConfigNameFromPath($path), + implode(', ', $scopes), + ); + } + unset($data, $path, $items, $item, $scopes); + + return implode(', ', $messages); + } } diff --git a/app/code/core/Mage/Cms/Model/Resource/Page.php b/app/code/core/Mage/Cms/Model/Resource/Page.php index fe70583a913..5d9ec9e3b10 100644 --- a/app/code/core/Mage/Cms/Model/Resource/Page.php +++ b/app/code/core/Mage/Cms/Model/Resource/Page.php @@ -39,8 +39,8 @@ protected function _beforeDelete(Mage_Core_Model_Abstract $object) $object->setId(null); Mage::throwException( Mage::helper('cms')->__( - 'Cannot delete page, it is used in "%s".', - implode(', ', $isUsedInConfig->getColumnValues('path')), + 'Cannot delete page, it is used in %s.', + Mage_Cms_Helper_Page::getDeleteErrorMessage($isUsedInConfig), ), ); } diff --git a/tests/unit/Mage/Cms/Helper/PageTest.php b/tests/unit/Mage/Cms/Helper/PageTest.php index 284e0dea6ed..c5b26805707 100644 --- a/tests/unit/Mage/Cms/Helper/PageTest.php +++ b/tests/unit/Mage/Cms/Helper/PageTest.php @@ -27,4 +27,13 @@ public function testGetUsedInStoreConfigPaths(array $expectedResult, ?array $pat { self::assertSame($expectedResult, Subject::getUsedInStoreConfigPaths($path)); } + + /** + * @dataProvider provideGetConfigStoreFromScope + * @group Helper + */ + public function testGetConfigStoreFromScope(string $expectedResult, string $scope, string $scopeId): void + { + self::assertStringStartsWith($expectedResult, Subject::getConfigStoreFromScope($scope, $scopeId)); + } } diff --git a/tests/unit/Traits/DataProvider/Mage/Cms/CmsTrait.php b/tests/unit/Traits/DataProvider/Mage/Cms/CmsTrait.php index 9b02b997d0e..9c43f4cc808 100644 --- a/tests/unit/Traits/DataProvider/Mage/Cms/CmsTrait.php +++ b/tests/unit/Traits/DataProvider/Mage/Cms/CmsTrait.php @@ -11,6 +11,7 @@ namespace OpenMage\Tests\Unit\Traits\DataProvider\Mage\Cms; use Generator; +use Mage_Adminhtml_Block_System_Config_Form; use Mage_Cms_Helper_Page; trait CmsTrait @@ -45,6 +46,27 @@ public function provideGetUsedInStoreConfigPaths(): Generator ]; } + public function provideGetConfigStoreFromScope(): Generator + { + yield 'default' => [ + 'Default Config', + Mage_Adminhtml_Block_System_Config_Form::SCOPE_DEFAULT, + '1', + ]; + + yield 'websites' => [ + 'Website', + Mage_Adminhtml_Block_System_Config_Form::SCOPE_WEBSITES, + '1', + ]; + + yield 'stores' => [ + 'Store View', + Mage_Adminhtml_Block_System_Config_Form::SCOPE_STORES, + '1', + ]; + } + public function provideGetShortFilename(): Generator { yield 'full length' => [ From 3595f78c3b2ea04e7d17fdcd921d3d28e33026be Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Sun, 5 Oct 2025 03:57:00 +0200 Subject: [PATCH 02/30] Added basic cypress test --- cypress/e2e/openmage/backend/cms/page.cy.js | 28 +++++++++++++++++++++ cypress/support/openmage.js | 2 +- cypress/support/openmage/config/paths.js | 5 ++++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/cypress/e2e/openmage/backend/cms/page.cy.js b/cypress/e2e/openmage/backend/cms/page.cy.js index c0f43f81f0f..eeb82c654e5 100644 --- a/cypress/e2e/openmage/backend/cms/page.cy.js +++ b/cypress/e2e/openmage/backend/cms/page.cy.js @@ -1,4 +1,5 @@ const route = cy.testRoutes.backend.cms.page; +const validation = cy.openmage.validation; describe(`Checks admin system "${route.h3}"`, () => { beforeEach('Log in the user', () => { @@ -9,4 +10,31 @@ describe(`Checks admin system "${route.h3}"`, () => { it(`tests classes and title`, () => { cy.adminTestRoute(route); }); + + it('tests to disable a CMS page that is used in config', () => { + cy.log('Select a CMS page'); + cy.get(route._gridTable) + .contains('td', 'no-route') + .click(); + + cy.log('Disable the CMS page'); + cy.get('#page_is_active') + .select('Disabled'); + + validation.saveAction(route._buttonSaveAndContinue); + cy.get(validation._warningMessage).should('include.text', 'Cannot disable page, it is used in configuration'); + cy.get(validation._successMessage).should('include.text', 'The page has been saved.'); + //cy.get('#messages').screenshot('error-disable-active-page', { overwrite: true}); + }); + + it('tests to delete a CMS page that is used in config', () => { + cy.log('Select a CMS page'); + cy.get(route._gridTable) + .contains('td', 'no-route') + .click(); + + validation.saveAction(route._buttonDelete); + cy.get(validation._errorMessage).should('include.text', 'Cannot delete page'); + //cy.get('#messages').screenshot('error-delete-active-page', { overwrite: true}); + }); }); \ No newline at end of file diff --git a/cypress/support/openmage.js b/cypress/support/openmage.js index e4c67926cc9..c7e5a0c56e0 100644 --- a/cypress/support/openmage.js +++ b/cypress/support/openmage.js @@ -82,7 +82,7 @@ cy.openmage = { }, saveAction: (selector) => { cy.log('Clicking on Save button'); - cy.get(selector).click({force: true, multiple: true}); + cy.get(selector).first().click({force: true, multiple: false}); }, validateFields: (fields, validation) =>{ cy.log('Checking for error messages'); diff --git a/cypress/support/openmage/config/paths.js b/cypress/support/openmage/config/paths.js index 2470f01ecf2..3c2ed3d6354 100644 --- a/cypress/support/openmage/config/paths.js +++ b/cypress/support/openmage/config/paths.js @@ -73,6 +73,11 @@ cy.testRoutes = { url: 'cms_page/index', h3: 'Manage Pages', _h3: adminPage._h3, + _gridTable: '#cmsPageGrid_table', + _buttonDelete: '.form-buttons button[title="Delete Page"]', + _buttonReset: '.form-buttons button[title="Rest"]', + _buttonSave: '.form-buttons button[title="Save Page"]', + _buttonSaveAndContinue: '.form-buttons button[title="Save and Continue Edit"]', }, widget: { _id_parent: adminNav.cms, From 9c37f134fefd9fcfc44c246540906adc7b22083d Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Sun, 5 Oct 2025 03:58:35 +0200 Subject: [PATCH 03/30] Improved config sort order - group by Mage_Core and Mage_Cms --- app/code/core/Mage/Cms/etc/system.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/core/Mage/Cms/etc/system.xml b/app/code/core/Mage/Cms/etc/system.xml index 78438587b9e..bf6806e043a 100644 --- a/app/code/core/Mage/Cms/etc/system.xml +++ b/app/code/core/Mage/Cms/etc/system.xml @@ -17,7 +17,7 @@ select adminhtml/system_config_source_cms_page - 1 + 21 1 1 1 @@ -26,7 +26,7 @@ select adminhtml/system_config_source_cms_page - 2 + 22 1 1 1 @@ -35,7 +35,7 @@ select adminhtml/system_config_source_cms_page - 3 + 23 1 1 1 @@ -44,7 +44,7 @@ select adminhtml/system_config_source_yesno - 5 + 25 1 1 1 From 291970dbecc85ce3b0f235e14045169b2ac52d9a Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Sun, 5 Oct 2025 04:15:22 +0200 Subject: [PATCH 04/30] rename --- app/code/core/Mage/Cms/Helper/Page.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/core/Mage/Cms/Helper/Page.php b/app/code/core/Mage/Cms/Helper/Page.php index 3c782e8f771..fda739f470f 100644 --- a/app/code/core/Mage/Cms/Helper/Page.php +++ b/app/code/core/Mage/Cms/Helper/Page.php @@ -175,7 +175,7 @@ public static function getUsedInStoreConfigPaths(?array $paths = []): array return $searchPaths; } - public static function getConfigNameFromPath(string $paths): string + public static function getConfigLabelFromConfigPath(string $paths): string { return match ($paths) { self::XML_PATH_NO_ROUTE_PAGE => Mage::helper('cms')->__('No Route Page'), @@ -189,7 +189,7 @@ public static function getConfigNameFromPath(string $paths): string * @param Mage_Adminhtml_Block_System_Config_Form::SCOPE_* $scope * @throws Mage_Core_Exception */ - public static function getConfigStoreFromScope(string $scope, string $scopeId): string + public static function getScopeInfoFromConfigScope(string $scope, string $scopeId): string { return match ($scope) { Mage_Adminhtml_Block_System_Config_Form::SCOPE_DEFAULT => Mage::helper('cms')->__('Default Config'), @@ -224,12 +224,12 @@ public static function getDeleteErrorMessage(Mage_Core_Model_Resource_Db_Collect foreach ($data as $path => $items) { $scopes = []; foreach ($items as $item) { - $scopes[] = self::getConfigStoreFromScope($item['scope'], $item['scope_id']); + $scopes[] = self::getScopeInfoFromConfigScope($item['scope'], $item['scope_id']); } $messages[] = sprintf( '"%s" (%s)', - self::getConfigNameFromPath($path), + self::getConfigLabelFromConfigPath($path), implode(', ', $scopes), ); } From 0d4401e0d823f92591ff79b3cb82ea9ca201e363 Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Sun, 5 Oct 2025 04:33:15 +0200 Subject: [PATCH 05/30] update tests --- tests/unit/Mage/Cms/Helper/PageTest.php | 18 ++++++++++++++--- .../Traits/DataProvider/Mage/Cms/CmsTrait.php | 20 ++++++++++++++++++- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/tests/unit/Mage/Cms/Helper/PageTest.php b/tests/unit/Mage/Cms/Helper/PageTest.php index c5b26805707..f54b712a50a 100644 --- a/tests/unit/Mage/Cms/Helper/PageTest.php +++ b/tests/unit/Mage/Cms/Helper/PageTest.php @@ -20,6 +20,7 @@ final class PageTest extends OpenMageTest use CmsTrait; /** + * @covers Mage_Cms_Helper_Page::getUsedInStoreConfigPaths() * @dataProvider provideGetUsedInStoreConfigPaths * @group Helper */ @@ -29,11 +30,22 @@ public function testGetUsedInStoreConfigPaths(array $expectedResult, ?array $pat } /** - * @dataProvider provideGetConfigStoreFromScope + * @covers Mage_Cms_Helper_Page::getConfigLabelFromConfigPath() + * @dataProvider provideGetConfigLabelFromConfigPath * @group Helper */ - public function testGetConfigStoreFromScope(string $expectedResult, string $scope, string $scopeId): void + public function testGetConfigLabelFromConfigPath(string $expectedResult, string $paths): void { - self::assertStringStartsWith($expectedResult, Subject::getConfigStoreFromScope($scope, $scopeId)); + self::assertSame($expectedResult, Subject::getConfigLabelFromConfigPath($paths)); + } + + /** + * @covers Mage_Cms_Helper_Page::getScopeInfoFromConfigScope() + * @dataProvider provideGetScopeInfoFromConfigScope + * @group Helper + */ + public function testGetScopeInfoFromConfigScope(string $expectedResult, string $scope, string $scopeId): void + { + self::assertStringStartsWith($expectedResult, Subject::getScopeInfoFromConfigScope($scope, $scopeId)); } } diff --git a/tests/unit/Traits/DataProvider/Mage/Cms/CmsTrait.php b/tests/unit/Traits/DataProvider/Mage/Cms/CmsTrait.php index 9c43f4cc808..0a2b89cfab8 100644 --- a/tests/unit/Traits/DataProvider/Mage/Cms/CmsTrait.php +++ b/tests/unit/Traits/DataProvider/Mage/Cms/CmsTrait.php @@ -46,7 +46,25 @@ public function provideGetUsedInStoreConfigPaths(): Generator ]; } - public function provideGetConfigStoreFromScope(): Generator + public function provideGetConfigLabelFromConfigPath(): Generator + { + yield 'home page' => [ + 'Home Page', + Mage_Cms_Helper_Page::XML_PATH_HOME_PAGE, + ]; + + yield 'no cookie page' => [ + 'No Cookies Page', + Mage_Cms_Helper_Page::XML_PATH_NO_COOKIES_PAGE, + ]; + + yield 'no route page' => [ + 'No Route Page', + Mage_Cms_Helper_Page::XML_PATH_NO_ROUTE_PAGE, + ]; + } + + public function provideGetScopeInfoFromConfigScope(): Generator { yield 'default' => [ 'Default Config', From adf183ec5012a8809e9c06561b50522518a4a34f Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Sun, 5 Oct 2025 04:38:48 +0200 Subject: [PATCH 06/30] doc --- app/code/core/Mage/Cms/Helper/Page.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/core/Mage/Cms/Helper/Page.php b/app/code/core/Mage/Cms/Helper/Page.php index fda739f470f..21da1376dbc 100644 --- a/app/code/core/Mage/Cms/Helper/Page.php +++ b/app/code/core/Mage/Cms/Helper/Page.php @@ -175,6 +175,9 @@ public static function getUsedInStoreConfigPaths(?array $paths = []): array return $searchPaths; } + /** + * @param self::XML_PATH_* $paths + */ public static function getConfigLabelFromConfigPath(string $paths): string { return match ($paths) { From 4a82b2dfea8756d6257f5b2f7ac22039789a1182 Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Sun, 5 Oct 2025 04:41:12 +0200 Subject: [PATCH 07/30] [skip-ci] typo --- app/code/core/Mage/Cms/Helper/Page.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/core/Mage/Cms/Helper/Page.php b/app/code/core/Mage/Cms/Helper/Page.php index 21da1376dbc..73b14cc8f58 100644 --- a/app/code/core/Mage/Cms/Helper/Page.php +++ b/app/code/core/Mage/Cms/Helper/Page.php @@ -176,15 +176,15 @@ public static function getUsedInStoreConfigPaths(?array $paths = []): array } /** - * @param self::XML_PATH_* $paths + * @param self::XML_PATH_* $path */ - public static function getConfigLabelFromConfigPath(string $paths): string + public static function getConfigLabelFromConfigPath(string $path): string { - return match ($paths) { + return match ($path) { self::XML_PATH_NO_ROUTE_PAGE => Mage::helper('cms')->__('No Route Page'), self::XML_PATH_NO_COOKIES_PAGE => Mage::helper('cms')->__('No Cookies Page'), self::XML_PATH_HOME_PAGE => Mage::helper('cms')->__('Home Page'), - default => $paths, + default => $path, }; } From ce58c3aae527e234d33e5f0520f123c87470ccec Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Sun, 5 Oct 2025 05:00:28 +0200 Subject: [PATCH 08/30] locale fix --- app/code/core/Mage/Cms/Model/Resource/Page.php | 2 +- app/locale/en_US/Mage_Cms.csv | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/core/Mage/Cms/Model/Resource/Page.php b/app/code/core/Mage/Cms/Model/Resource/Page.php index 5d9ec9e3b10..69b07aa147c 100644 --- a/app/code/core/Mage/Cms/Model/Resource/Page.php +++ b/app/code/core/Mage/Cms/Model/Resource/Page.php @@ -39,7 +39,7 @@ protected function _beforeDelete(Mage_Core_Model_Abstract $object) $object->setId(null); Mage::throwException( Mage::helper('cms')->__( - 'Cannot delete page, it is used in %s.', + 'Cannot delete page, it is used in configuration %s.', Mage_Cms_Helper_Page::getDeleteErrorMessage($isUsedInConfig), ), ); diff --git a/app/locale/en_US/Mage_Cms.csv b/app/locale/en_US/Mage_Cms.csv index 52f813fe13d..d106bdd764f 100644 --- a/app/locale/en_US/Mage_Cms.csv +++ b/app/locale/en_US/Mage_Cms.csv @@ -27,10 +27,10 @@ "CMS Static Block","CMS Static Block" "CMS Static Block Default Template","CMS Static Block Default Template" "Cannot create new directory.","Cannot create new directory." -"Cannot delete page, it is used in ""%s"".","Cannot delete page, it is used in ""%s""." +"Cannot delete page, it is used in configuration %s.","Cannot delete page, it is used in configuration %s." "Cannot delete directory %s.","Cannot delete directory %s." "Cannot delete root directory %s.","Cannot delete root directory %s." -"Cannot disable page, it is used in configuration ""%s"".","Cannot disable page, it is used in configuration ""%s""." +"Cannot disable page, it is used in configuration %s.","Cannot disable page, it is used in configuration %s." "Cannot upload file.","Cannot upload file." "Collapse All","Collapse All" "Content","Content" From ec3a7ada92c805b4d0bff4832934ae72abbb0f3c Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Sun, 5 Oct 2025 05:05:31 +0200 Subject: [PATCH 09/30] fix disable page --- app/code/core/Mage/Cms/Helper/Page.php | 2 +- app/code/core/Mage/Cms/Model/Resource/Page.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/core/Mage/Cms/Helper/Page.php b/app/code/core/Mage/Cms/Helper/Page.php index 73b14cc8f58..91ba54d5036 100644 --- a/app/code/core/Mage/Cms/Helper/Page.php +++ b/app/code/core/Mage/Cms/Helper/Page.php @@ -212,7 +212,7 @@ public static function getScopeInfoFromConfigScope(string $scope, string $scopeI /** * @throws Mage_Core_Exception */ - public static function getDeleteErrorMessage(Mage_Core_Model_Resource_Db_Collection_Abstract $isUsedInConfig): string + public static function getValidateConfigErrorMessage(Mage_Core_Model_Resource_Db_Collection_Abstract $isUsedInConfig): string { $messages = []; diff --git a/app/code/core/Mage/Cms/Model/Resource/Page.php b/app/code/core/Mage/Cms/Model/Resource/Page.php index 69b07aa147c..128c53594d7 100644 --- a/app/code/core/Mage/Cms/Model/Resource/Page.php +++ b/app/code/core/Mage/Cms/Model/Resource/Page.php @@ -40,7 +40,7 @@ protected function _beforeDelete(Mage_Core_Model_Abstract $object) Mage::throwException( Mage::helper('cms')->__( 'Cannot delete page, it is used in configuration %s.', - Mage_Cms_Helper_Page::getDeleteErrorMessage($isUsedInConfig), + Mage_Cms_Helper_Page::getValidateConfigErrorMessage($isUsedInConfig), ), ); } @@ -79,8 +79,8 @@ protected function _beforeSave(Mage_Core_Model_Abstract $object) $object->setIsActive(true); Mage::getSingleton('adminhtml/session')->addWarning( Mage::helper('cms')->__( - 'Cannot disable page, it is used in configuration "%s".', - implode(', ', $isUsedInConfig->getColumnValues('path')), + 'Cannot disable page, it is used in configuration %s.', + Mage_Cms_Helper_Page::getValidateConfigErrorMessage($isUsedInConfig), ), ); } From 2f9f632ec498e6424008698618f8ad57b33dd229 Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Sun, 5 Oct 2025 05:06:52 +0200 Subject: [PATCH 10/30] cypress screenshots --- cypress/e2e/openmage/backend/cms/page.cy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/openmage/backend/cms/page.cy.js b/cypress/e2e/openmage/backend/cms/page.cy.js index eeb82c654e5..ebd15a65641 100644 --- a/cypress/e2e/openmage/backend/cms/page.cy.js +++ b/cypress/e2e/openmage/backend/cms/page.cy.js @@ -24,7 +24,7 @@ describe(`Checks admin system "${route.h3}"`, () => { validation.saveAction(route._buttonSaveAndContinue); cy.get(validation._warningMessage).should('include.text', 'Cannot disable page, it is used in configuration'); cy.get(validation._successMessage).should('include.text', 'The page has been saved.'); - //cy.get('#messages').screenshot('error-disable-active-page', { overwrite: true}); + cy.get('#messages').screenshot('error-disable-active-page', { overwrite: true}); }); it('tests to delete a CMS page that is used in config', () => { @@ -35,6 +35,6 @@ describe(`Checks admin system "${route.h3}"`, () => { validation.saveAction(route._buttonDelete); cy.get(validation._errorMessage).should('include.text', 'Cannot delete page'); - //cy.get('#messages').screenshot('error-delete-active-page', { overwrite: true}); + cy.get('#messages').screenshot('error-delete-active-page', { overwrite: true}); }); }); \ No newline at end of file From d825873615b60aaa090b524b7ab47eea2c897130 Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Sun, 5 Oct 2025 05:52:08 +0200 Subject: [PATCH 11/30] bug fix --- app/code/core/Mage/Cms/Model/Resource/Page.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/core/Mage/Cms/Model/Resource/Page.php b/app/code/core/Mage/Cms/Model/Resource/Page.php index 128c53594d7..5a1e5eeb39d 100644 --- a/app/code/core/Mage/Cms/Model/Resource/Page.php +++ b/app/code/core/Mage/Cms/Model/Resource/Page.php @@ -281,7 +281,9 @@ protected function isValidPageIdentifier(Mage_Core_Model_Abstract $object) public function getUsedInStoreConfigCollection(Mage_Cms_Model_Page $page, ?array $paths = []): Mage_Core_Model_Resource_Db_Collection_Abstract { - $storeIds = (array) $page->getStoreId(); + $storeId = (array) $page->getStoreId(); # null on save + $stores = (array) $page->getStores(); # null on delete + $storeIds = $storeId + $stores; $storeIds[] = Mage_Core_Model_App::ADMIN_STORE_ID; $config = Mage::getResourceModel('core/config_data_collection') ->addFieldToFilter('value', $page->getIdentifier()) From e630a0cbfe0f90179a389b380bca0dd51bd74dda Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Sun, 5 Oct 2025 05:54:12 +0200 Subject: [PATCH 12/30] Update app/code/core/Mage/Cms/Model/Resource/Page.php Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- app/code/core/Mage/Cms/Model/Resource/Page.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/core/Mage/Cms/Model/Resource/Page.php b/app/code/core/Mage/Cms/Model/Resource/Page.php index 5a1e5eeb39d..aaf8f3dd055 100644 --- a/app/code/core/Mage/Cms/Model/Resource/Page.php +++ b/app/code/core/Mage/Cms/Model/Resource/Page.php @@ -283,7 +283,7 @@ public function getUsedInStoreConfigCollection(Mage_Cms_Model_Page $page, ?array { $storeId = (array) $page->getStoreId(); # null on save $stores = (array) $page->getStores(); # null on delete - $storeIds = $storeId + $stores; + $storeIds = array_merge($storeId, $stores); $storeIds[] = Mage_Core_Model_App::ADMIN_STORE_ID; $config = Mage::getResourceModel('core/config_data_collection') ->addFieldToFilter('value', $page->getIdentifier()) From c3ea0aa2f21b3ec77f7e35ba68ebe1567d1fa1f9 Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Sun, 5 Oct 2025 05:54:30 +0200 Subject: [PATCH 13/30] Update cypress/support/openmage/config/paths.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- cypress/support/openmage/config/paths.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/support/openmage/config/paths.js b/cypress/support/openmage/config/paths.js index 3c2ed3d6354..337c497f3d2 100644 --- a/cypress/support/openmage/config/paths.js +++ b/cypress/support/openmage/config/paths.js @@ -75,7 +75,7 @@ cy.testRoutes = { _h3: adminPage._h3, _gridTable: '#cmsPageGrid_table', _buttonDelete: '.form-buttons button[title="Delete Page"]', - _buttonReset: '.form-buttons button[title="Rest"]', + _buttonReset: '.form-buttons button[title="Reset"]', _buttonSave: '.form-buttons button[title="Save Page"]', _buttonSaveAndContinue: '.form-buttons button[title="Save and Continue Edit"]', }, From 1165a815ddb544b92b1b96838b0c7e7e8503ff5d Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Sun, 5 Oct 2025 11:18:50 +0200 Subject: [PATCH 14/30] Update tests --- .../openmage/backend/catalog/categories.cy.js | 13 +- .../openmage/backend/catalog/products.cy.js | 24 +- .../e2e/openmage/backend/catalog/search.cy.js | 24 +- .../openmage/backend/catalog/sitemap.cy.js | 24 +- .../backend/catalog/urlrewrites.cy.js | 24 +- cypress/e2e/openmage/backend/cms/block.cy.js | 24 +- cypress/e2e/openmage/backend/cms/page.cy.js | 76 ++-- cypress/e2e/openmage/backend/cms/widget.cy.js | 24 +- .../openmage/backend/customer/customer.cy.js | 24 ++ .../e2e/openmage/backend/customer/group.cy.js | 12 - .../openmage/backend/customer/groups.cy.js | 24 ++ .../openmage/backend/customer/manage.cy.js | 12 - .../openmage/backend/customer/online.cy.js | 14 +- cypress/e2e/openmage/backend/dashboard.cy.js | 13 + .../openmage/backend/newsletter/queue.cy.js | 14 +- .../openmage/backend/newsletter/report.cy.js | 14 +- .../backend/newsletter/subscriber.cy.js | 14 +- .../backend/newsletter/templates.cy.js | 24 +- cypress/e2e/openmage/backend/promo/cart.cy.js | 12 - .../e2e/openmage/backend/promo/catalog.cy.js | 24 +- .../e2e/openmage/backend/promo/quote.cy.js | 24 ++ .../openmage/backend/sales/creditmemo.cy.js | 19 +- .../e2e/openmage/backend/sales/invoice.cy.js | 19 +- .../e2e/openmage/backend/sales/order.cy.js | 19 +- .../e2e/openmage/backend/sales/shipment.cy.js | 19 +- .../openmage/backend/sales/transactions.cy.js | 14 +- .../e2e/openmage/backend/system/cache.cy.js | 19 +- .../config/catalog/configswatches.cy.js | 6 +- .../system/config/catalog/sitemap.cy.js | 21 +- .../system/config/customers/promo.cy.js | 13 +- .../e2e/openmage/backend/system/design.cy.js | 24 +- .../e2e/openmage/backend/system/emails.cy.js | 24 +- .../e2e/openmage/backend/system/indexes.cy.js | 13 +- .../backend/system/manage-currency.cy.js | 34 +- .../openmage/backend/system/myacount.cy.js | 22 +- .../backend/system/notifications.cy.js | 13 +- .../e2e/openmage/backend/system/stores.cy.js | 13 +- .../openmage/backend/system/variable.cy.js | 24 +- .../frontend/customer/account/create.cy.js | 19 +- .../frontend/newsletter-subscribe.cy.js | 26 +- cypress/support/commands.js | 18 +- cypress/support/e2e.js | 11 +- cypress/support/openmage.js | 56 ++- cypress/support/openmage/backend/catalog.js | 100 +++++ cypress/support/openmage/backend/cms.js | 101 +++++ cypress/support/openmage/backend/customer.js | 58 +++ cypress/support/openmage/backend/dashboard.js | 16 + .../support/openmage/backend/newsletter.js | 58 +++ cypress/support/openmage/backend/promo.js | 49 +++ cypress/support/openmage/backend/sales.js | 76 ++++ cypress/support/openmage/backend/system.js | 202 ++++++++++ cypress/support/openmage/config/paths.js | 351 ------------------ cypress/support/openmage/frontend/paths.js | 28 ++ 53 files changed, 1306 insertions(+), 637 deletions(-) create mode 100644 cypress/e2e/openmage/backend/customer/customer.cy.js delete mode 100644 cypress/e2e/openmage/backend/customer/group.cy.js create mode 100644 cypress/e2e/openmage/backend/customer/groups.cy.js delete mode 100644 cypress/e2e/openmage/backend/customer/manage.cy.js create mode 100644 cypress/e2e/openmage/backend/dashboard.cy.js delete mode 100644 cypress/e2e/openmage/backend/promo/cart.cy.js create mode 100644 cypress/e2e/openmage/backend/promo/quote.cy.js create mode 100644 cypress/support/openmage/backend/catalog.js create mode 100644 cypress/support/openmage/backend/cms.js create mode 100644 cypress/support/openmage/backend/customer.js create mode 100644 cypress/support/openmage/backend/dashboard.js create mode 100644 cypress/support/openmage/backend/newsletter.js create mode 100644 cypress/support/openmage/backend/promo.js create mode 100644 cypress/support/openmage/backend/sales.js create mode 100644 cypress/support/openmage/backend/system.js delete mode 100644 cypress/support/openmage/config/paths.js create mode 100644 cypress/support/openmage/frontend/paths.js diff --git a/cypress/e2e/openmage/backend/catalog/categories.cy.js b/cypress/e2e/openmage/backend/catalog/categories.cy.js index ea55f3629f2..8350075e205 100644 --- a/cypress/e2e/openmage/backend/catalog/categories.cy.js +++ b/cypress/e2e/openmage/backend/catalog/categories.cy.js @@ -1,12 +1,13 @@ -const route = cy.testRoutes.backend.catalog.categories; +const test = cy.testBackendCatalog.categories; +const check = cy.openmage.check; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.index.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.index); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.index); }); -}); \ No newline at end of file +}); diff --git a/cypress/e2e/openmage/backend/catalog/products.cy.js b/cypress/e2e/openmage/backend/catalog/products.cy.js index da6b3152778..4866d3e8508 100644 --- a/cypress/e2e/openmage/backend/catalog/products.cy.js +++ b/cypress/e2e/openmage/backend/catalog/products.cy.js @@ -1,13 +1,25 @@ -const route = cy.testRoutes.backend.catalog.products; +const test = cy.testBackendCatalog.products; +const check = cy.openmage.check; +const tools = cy.openmage.tools; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.index.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.index); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.index); + }); + + it(`tests edit route`, () => { + tools.clickGridRow(test.index._grid, 'td', '905'); + check.pageElements(test, test.edit); + }); + + it(`tests new route`, () => { + tools.clickAction(test.index.__buttons.add); + check.pageElements(test, test.new); }); it(`tests filter options`, () => { @@ -17,4 +29,4 @@ describe(`Checks admin system "${route.h3}"`, () => { cy.log('Checking for the number of filter visibility options'); cy.get('#productGrid_product_filter_visibility option').should('have.length', 5); }); -}); \ No newline at end of file +}); diff --git a/cypress/e2e/openmage/backend/catalog/search.cy.js b/cypress/e2e/openmage/backend/catalog/search.cy.js index b0714d2dd5d..a915f62581f 100644 --- a/cypress/e2e/openmage/backend/catalog/search.cy.js +++ b/cypress/e2e/openmage/backend/catalog/search.cy.js @@ -1,12 +1,24 @@ -const route = cy.testRoutes.backend.catalog.search; +const test = cy.testBackendCatalog.search; +const check = cy.openmage.check; +const tools = cy.openmage.tools; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.index.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.index); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.index); }); -}); \ No newline at end of file + + it(`tests edit route`, () => { + tools.clickGridRow(test.index._grid, 'td', 'classic'); + check.pageElements(test, test.edit); + }); + + it(`tests new route`, () => { + tools.clickAction(test.index.__buttons.add); + check.pageElements(test, test.new); + }); +}); diff --git a/cypress/e2e/openmage/backend/catalog/sitemap.cy.js b/cypress/e2e/openmage/backend/catalog/sitemap.cy.js index f1117f4ff01..69c39c37e65 100644 --- a/cypress/e2e/openmage/backend/catalog/sitemap.cy.js +++ b/cypress/e2e/openmage/backend/catalog/sitemap.cy.js @@ -1,12 +1,24 @@ -const route = cy.testRoutes.backend.catalog.sitemap; +const test = cy.testBackendCatalog.sitemap; +const check = cy.openmage.check; +const tools = cy.openmage.tools; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.index.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.index); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.index); }); -}); \ No newline at end of file + + it(`tests edit route`, () => { + //tools.clickGridRow(test.index._grid, 'td', 'test'); + check.pageElements(test, test.index); + }); + + it(`tests new route`, () => { + tools.clickAction(test.index.__buttons.add); + check.pageElements(test, test.new); + }); +}); diff --git a/cypress/e2e/openmage/backend/catalog/urlrewrites.cy.js b/cypress/e2e/openmage/backend/catalog/urlrewrites.cy.js index aa75e93b615..b007fc423b5 100644 --- a/cypress/e2e/openmage/backend/catalog/urlrewrites.cy.js +++ b/cypress/e2e/openmage/backend/catalog/urlrewrites.cy.js @@ -1,12 +1,24 @@ -const route = cy.testRoutes.backend.catalog.urlrewrite; +const test = cy.testBackendCatalog.urlrewrite; +const check = cy.openmage.check; +const tools = cy.openmage.tools; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.index.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.index); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.index); }); -}); \ No newline at end of file + + it(`tests edit route`, () => { + tools.clickGridRow(test.index._grid, 'td', '116238'); + check.pageElements(test, test.edit); + }); + + it(`tests new route`, () => { + tools.clickAction(test.index.__buttons.add); + check.pageElements(test, test.new); + }); +}); diff --git a/cypress/e2e/openmage/backend/cms/block.cy.js b/cypress/e2e/openmage/backend/cms/block.cy.js index 4d957ad176a..3a315c96aea 100644 --- a/cypress/e2e/openmage/backend/cms/block.cy.js +++ b/cypress/e2e/openmage/backend/cms/block.cy.js @@ -1,12 +1,24 @@ -const route = cy.testRoutes.backend.cms.block; +const test = cy.testBackendCms.block; +const check = cy.openmage.check; +const tools = cy.openmage.tools; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.index.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.index); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.index); }); -}); \ No newline at end of file + + it(`tests edit route`, () => { + tools.clickGridRow(test.index._grid, 'td', 'category-landingpage-home'); + check.pageElements(test, test.edit); + }); + + it(`tests new route`, () => { + tools.clickAction(test.index.__buttons.add); + check.pageElements(test, test.new); + }); +}); diff --git a/cypress/e2e/openmage/backend/cms/page.cy.js b/cypress/e2e/openmage/backend/cms/page.cy.js index ebd15a65641..cd51f605d33 100644 --- a/cypress/e2e/openmage/backend/cms/page.cy.js +++ b/cypress/e2e/openmage/backend/cms/page.cy.js @@ -1,40 +1,70 @@ -const route = cy.testRoutes.backend.cms.page; +const test = cy.testBackendCms.page; +const check = cy.openmage.check; +const tools = cy.openmage.tools; const validation = cy.openmage.validation; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.index.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.index); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.index); + }); + + it(`tests edit route`, () => { + tools.clickGridRow(test.index._grid, 'td', 'no-route', 'Select a CMS page'); + check.pageElements(test, test.edit); + }); + + it(`tests new route`, () => { + tools.clickAction(test.index.__buttons.add); + check.pageElements(test, test.new); }); it('tests to disable a CMS page that is used in config', () => { - cy.log('Select a CMS page'); - cy.get(route._gridTable) - .contains('td', 'no-route') - .click(); - - cy.log('Disable the CMS page'); - cy.get('#page_is_active') - .select('Disabled'); - - validation.saveAction(route._buttonSaveAndContinue); - cy.get(validation._warningMessage).should('include.text', 'Cannot disable page, it is used in configuration'); - cy.get(validation._successMessage).should('include.text', 'The page has been saved.'); + tools.clickGridRow(test.index._grid, 'td', 'no-route', 'Select a CMS page'); + + test.edit.disablePage(); + + tools.clickAction(test.edit.__buttons.saveAndContinue); + validation.hasWarningMessage('Cannot disable page, it is used in configuration'); + validation.hasSuccessMessage('The page has been saved.'); cy.get('#messages').screenshot('error-disable-active-page', { overwrite: true}); }); it('tests to delete a CMS page that is used in config', () => { - cy.log('Select a CMS page'); - cy.get(route._gridTable) - .contains('td', 'no-route') - .click(); + tools.clickGridRow(test.index._grid, 'td', 'no-route', 'Select a CMS page'); - validation.saveAction(route._buttonDelete); - cy.get(validation._errorMessage).should('include.text', 'Cannot delete page'); + tools.clickAction(test.edit.__buttons.delete); + validation.hasErrorMessage('Cannot delete page'); cy.get('#messages').screenshot('error-delete-active-page', { overwrite: true}); }); + + it('tests to add a CMS page', () => { + tools.clickAction(test.index.__buttons.add); + tools.clickAction(test.edit.__buttons.saveAndContinue); + + // @todo add validation for required fields + }); + + it('tests to un-asign a CMS page that is used in config', () => { + tools.clickGridRow(test.index._grid, 'td', 'no-route', 'Select a CMS page'); + + cy.log('Asign another store to the CMS page'); + cy.get('#page_store_id') + .select(4); + + tools.clickAction(test.edit.__buttons.saveAndContinue); + + // @todo: fix needed - this test passes because of a Magento bug + validation.hasSuccessMessage('The page has been saved.'); + + test.edit.resetStores(); + + tools.clickAction(test.edit.__buttons.saveAndContinue); + validation.hasSuccessMessage('The page has been saved.'); + }); + }); \ No newline at end of file diff --git a/cypress/e2e/openmage/backend/cms/widget.cy.js b/cypress/e2e/openmage/backend/cms/widget.cy.js index 57328d77c5f..2b3a7f27ddf 100644 --- a/cypress/e2e/openmage/backend/cms/widget.cy.js +++ b/cypress/e2e/openmage/backend/cms/widget.cy.js @@ -1,12 +1,24 @@ -const route = cy.testRoutes.backend.cms.widget; +const test = cy.testBackendCms.widget; +const check = cy.openmage.check; +const tools = cy.openmage.tools; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.index.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.index); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.index); }); -}); \ No newline at end of file + + it(`tests edit route`, () => { + tools.clickGridRow(test.index._grid, 'td', 'Couponing Block'); + check.pageElements(test, test.edit); + }); + + it(`tests new route`, () => { + tools.clickAction(test.index.__buttons.add); + check.pageElements(test, test.new); + }); +}); diff --git a/cypress/e2e/openmage/backend/customer/customer.cy.js b/cypress/e2e/openmage/backend/customer/customer.cy.js new file mode 100644 index 00000000000..afc2a4bedd8 --- /dev/null +++ b/cypress/e2e/openmage/backend/customer/customer.cy.js @@ -0,0 +1,24 @@ +const test = cy.testBackendCustomer.customer; +const check = cy.openmage.check; +const tools = cy.openmage.tools; + +describe(`Checks admin system "${test.index.title}"`, () => { + beforeEach('Log in the user', () => { + cy.adminLogIn(); + cy.adminGoToTestRoute(test, test.index); + }); + + it(`tests index route`, () => { + check.pageElements(test, test.index); + }); + + it(`tests edit route`, () => { + tools.clickGridRow(test.index._grid, 'td', '424-555-0000'); + check.pageElements(test, test.edit); + }); + + it(`tests new route`, () => { + tools.clickAction(test.index.__buttons.add); + check.pageElements(test, test.new); + }); +}); diff --git a/cypress/e2e/openmage/backend/customer/group.cy.js b/cypress/e2e/openmage/backend/customer/group.cy.js deleted file mode 100644 index 4e86668e508..00000000000 --- a/cypress/e2e/openmage/backend/customer/group.cy.js +++ /dev/null @@ -1,12 +0,0 @@ -const route = cy.testRoutes.backend.customers.groups; - -describe(`Checks admin system "${route.h3}"`, () => { - beforeEach('Log in the user', () => { - cy.adminLogIn(); - cy.adminGoToTestRoute(route); - }); - - it(`tests classes and title`, () => { - cy.adminTestRoute(route); - }); -}); \ No newline at end of file diff --git a/cypress/e2e/openmage/backend/customer/groups.cy.js b/cypress/e2e/openmage/backend/customer/groups.cy.js new file mode 100644 index 00000000000..f7be987ed07 --- /dev/null +++ b/cypress/e2e/openmage/backend/customer/groups.cy.js @@ -0,0 +1,24 @@ +const test = cy.testBackendCustomer.groups; +const check = cy.openmage.check; +const tools = cy.openmage.tools; + +describe(`Checks admin system "${test.index.title}"`, () => { + beforeEach('Log in the user', () => { + cy.adminLogIn(); + cy.adminGoToTestRoute(test, test.index); + }); + + it(`tests index route`, () => { + check.pageElements(test, test.index); + }); + + it(`tests edit route`, () => { + tools.clickGridRow(test.index._grid, 'td', 'General'); + check.pageElements(test, test.edit); + }); + + it(`tests new route`, () => { + tools.clickAction(test.index.__buttons.add); + check.pageElements(test, test.new); + }); +}); diff --git a/cypress/e2e/openmage/backend/customer/manage.cy.js b/cypress/e2e/openmage/backend/customer/manage.cy.js deleted file mode 100644 index c3a235895a8..00000000000 --- a/cypress/e2e/openmage/backend/customer/manage.cy.js +++ /dev/null @@ -1,12 +0,0 @@ -const route = cy.testRoutes.backend.customers.manage; - -describe(`Checks admin system "${route.h3}"`, () => { - beforeEach('Log in the user', () => { - cy.adminLogIn(); - cy.adminGoToTestRoute(route); - }); - - it(`tests classes and title`, () => { - cy.adminTestRoute(route); - }); -}); \ No newline at end of file diff --git a/cypress/e2e/openmage/backend/customer/online.cy.js b/cypress/e2e/openmage/backend/customer/online.cy.js index f7de43c12b0..15615f98e65 100644 --- a/cypress/e2e/openmage/backend/customer/online.cy.js +++ b/cypress/e2e/openmage/backend/customer/online.cy.js @@ -1,12 +1,14 @@ -const route = cy.testRoutes.backend.customers.online; +const test = cy.testBackendCustomer.online; +const check = cy.openmage.check; +const tools = cy.openmage.tools; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.index.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.index); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.index); }); -}); \ No newline at end of file +}); diff --git a/cypress/e2e/openmage/backend/dashboard.cy.js b/cypress/e2e/openmage/backend/dashboard.cy.js new file mode 100644 index 00000000000..d8628ada56b --- /dev/null +++ b/cypress/e2e/openmage/backend/dashboard.cy.js @@ -0,0 +1,13 @@ +const test = cy.testBackendDashboard.dashboard; +const check = cy.openmage.check; + +describe(`Checks admin system "${test.index.title}"`, () => { + beforeEach('Log in the user', () => { + cy.adminLogIn(); + cy.adminGoToTestRoute(test, test.index); + }); + + it(`tests index route`, () => { + check.pageElements(test, test.index); + }); +}); diff --git a/cypress/e2e/openmage/backend/newsletter/queue.cy.js b/cypress/e2e/openmage/backend/newsletter/queue.cy.js index 51b1158261c..bc911bc5aa8 100644 --- a/cypress/e2e/openmage/backend/newsletter/queue.cy.js +++ b/cypress/e2e/openmage/backend/newsletter/queue.cy.js @@ -1,12 +1,14 @@ -const route = cy.testRoutes.backend.newsletter.queue; +const test = cy.testBackendNewsletter.queue; +const check = cy.openmage.check; +const tools = cy.openmage.tools; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.index.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.index); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.index); }); -}); \ No newline at end of file +}); diff --git a/cypress/e2e/openmage/backend/newsletter/report.cy.js b/cypress/e2e/openmage/backend/newsletter/report.cy.js index 6b5f6db4fe3..e4e70ee9be8 100644 --- a/cypress/e2e/openmage/backend/newsletter/report.cy.js +++ b/cypress/e2e/openmage/backend/newsletter/report.cy.js @@ -1,12 +1,14 @@ -const route = cy.testRoutes.backend.newsletter.report; +const test = cy.testBackendNewsletter.report; +const check = cy.openmage.check; +const tools = cy.openmage.tools; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.index.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.index); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.index); }); -}); \ No newline at end of file +}); diff --git a/cypress/e2e/openmage/backend/newsletter/subscriber.cy.js b/cypress/e2e/openmage/backend/newsletter/subscriber.cy.js index cf915f44e02..0b3b1a440fb 100644 --- a/cypress/e2e/openmage/backend/newsletter/subscriber.cy.js +++ b/cypress/e2e/openmage/backend/newsletter/subscriber.cy.js @@ -1,12 +1,14 @@ -const route = cy.testRoutes.backend.newsletter.subscriber; +const test = cy.testBackendNewsletter.subscriber; +const check = cy.openmage.check; +const tools = cy.openmage.tools; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.index.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.index); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.index); }); -}); \ No newline at end of file +}); diff --git a/cypress/e2e/openmage/backend/newsletter/templates.cy.js b/cypress/e2e/openmage/backend/newsletter/templates.cy.js index 90c81014432..653069524d3 100644 --- a/cypress/e2e/openmage/backend/newsletter/templates.cy.js +++ b/cypress/e2e/openmage/backend/newsletter/templates.cy.js @@ -1,12 +1,24 @@ -const route = cy.testRoutes.backend.newsletter.templates; +const test = cy.testBackendNewsletter.templates; +const check = cy.openmage.check; +const tools = cy.openmage.tools; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.index.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.index); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.index); }); -}); \ No newline at end of file + + it(`tests edit route`, () => { + tools.clickGridRow(test.index._grid, 'td', 'Example'); + check.pageElements(test, test.edit); + }); + + it(`tests new route`, () => { + tools.clickAction(test.index.__buttons.add); + check.pageElements(test, test.new); + }); +}); diff --git a/cypress/e2e/openmage/backend/promo/cart.cy.js b/cypress/e2e/openmage/backend/promo/cart.cy.js deleted file mode 100644 index 770a92dd59b..00000000000 --- a/cypress/e2e/openmage/backend/promo/cart.cy.js +++ /dev/null @@ -1,12 +0,0 @@ -const route = cy.testRoutes.backend.promo.cart; - -describe(`Checks admin system "${route.h3}"`, () => { - beforeEach('Log in the user', () => { - cy.adminLogIn(); - cy.adminGoToTestRoute(route); - }); - - it(`tests classes and title`, () => { - cy.adminTestRoute(route); - }); -}); \ No newline at end of file diff --git a/cypress/e2e/openmage/backend/promo/catalog.cy.js b/cypress/e2e/openmage/backend/promo/catalog.cy.js index c5c9e498fb3..69598bfb00e 100644 --- a/cypress/e2e/openmage/backend/promo/catalog.cy.js +++ b/cypress/e2e/openmage/backend/promo/catalog.cy.js @@ -1,12 +1,24 @@ -const route = cy.testRoutes.backend.promo.catalog; +const test = cy.testBackendPromo.catalog; +const check = cy.openmage.check; +const tools = cy.openmage.tools; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.index.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.index); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.index); }); -}); \ No newline at end of file + + it(`tests edit route`, () => { + tools.clickGridRow(test.index._grid, 'td', 'Candle'); + check.pageElements(test, test.edit); + }); + + it(`tests new route`, () => { + tools.clickAction(test.index.__buttons.add); + check.pageElements(test, test.new); + }); +}); diff --git a/cypress/e2e/openmage/backend/promo/quote.cy.js b/cypress/e2e/openmage/backend/promo/quote.cy.js new file mode 100644 index 00000000000..1add1d77263 --- /dev/null +++ b/cypress/e2e/openmage/backend/promo/quote.cy.js @@ -0,0 +1,24 @@ +const test = cy.testBackendPromo.quote; +const check = cy.openmage.check; +const tools = cy.openmage.tools; + +describe(`Checks admin system "${test.index.title}"`, () => { + beforeEach('Log in the user', () => { + cy.adminLogIn(); + cy.adminGoToTestRoute(test, test.index); + }); + + it(`tests index route`, () => { + check.pageElements(test, test.index); + }); + + it(`tests edit route`, () => { + tools.clickGridRow(test.index._grid, 'td', '$500'); + check.pageElements(test, test.edit); + }); + + it(`tests new route`, () => { + tools.clickAction(test.index.__buttons.add); + check.pageElements(test, test.new); + }); +}); diff --git a/cypress/e2e/openmage/backend/sales/creditmemo.cy.js b/cypress/e2e/openmage/backend/sales/creditmemo.cy.js index ac5f9608cc1..3f73be4237e 100644 --- a/cypress/e2e/openmage/backend/sales/creditmemo.cy.js +++ b/cypress/e2e/openmage/backend/sales/creditmemo.cy.js @@ -1,12 +1,19 @@ -const route = cy.testRoutes.backend.sales.creditmemo; +const test = cy.testBackendSales.creditmemo; +const check = cy.openmage.check; +const tools = cy.openmage.tools; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.index.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.index); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.index); }); -}); \ No newline at end of file + + it(`tests view route`, () => { + tools.clickGridRow(test.index._grid, 'td', '100000007'); + check.pageElements(test, test.view); + }); +}); diff --git a/cypress/e2e/openmage/backend/sales/invoice.cy.js b/cypress/e2e/openmage/backend/sales/invoice.cy.js index bb12260d139..08e484c64cf 100644 --- a/cypress/e2e/openmage/backend/sales/invoice.cy.js +++ b/cypress/e2e/openmage/backend/sales/invoice.cy.js @@ -1,12 +1,19 @@ -const route = cy.testRoutes.backend.sales.invoice; +const test = cy.testBackendSales.invoice; +const check = cy.openmage.check; +const tools = cy.openmage.tools; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.index.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.index); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.index); }); -}); \ No newline at end of file + + it(`tests view route`, () => { + tools.clickGridRow(test.index._grid, 'td', '100000040'); + check.pageElements(test, test.view); + }); +}); diff --git a/cypress/e2e/openmage/backend/sales/order.cy.js b/cypress/e2e/openmage/backend/sales/order.cy.js index e0d9b46050b..8d91cb5f958 100644 --- a/cypress/e2e/openmage/backend/sales/order.cy.js +++ b/cypress/e2e/openmage/backend/sales/order.cy.js @@ -1,12 +1,19 @@ -const route = cy.testRoutes.backend.sales.order; +const test = cy.testBackendSales.order; +const check = cy.openmage.check; +const tools = cy.openmage.tools; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.index.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.index); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.index); }); -}); \ No newline at end of file + + it(`tests view route`, () => { + tools.clickGridRow(test.index._grid, 'td', '145000004'); + check.pageElements(test, test.view); + }); +}); diff --git a/cypress/e2e/openmage/backend/sales/shipment.cy.js b/cypress/e2e/openmage/backend/sales/shipment.cy.js index 09ab46db2fb..ef99e1953a5 100644 --- a/cypress/e2e/openmage/backend/sales/shipment.cy.js +++ b/cypress/e2e/openmage/backend/sales/shipment.cy.js @@ -1,12 +1,19 @@ -const route = cy.testRoutes.backend.sales.shipment; +const test = cy.testBackendSales.shipment; +const check = cy.openmage.check; +const tools = cy.openmage.tools; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.index.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.index); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.index); }); -}); \ No newline at end of file + + it(`tests view route`, () => { + tools.clickGridRow(test.index._grid, 'td', '100000032'); + check.pageElements(test, test.view); + }); +}); diff --git a/cypress/e2e/openmage/backend/sales/transactions.cy.js b/cypress/e2e/openmage/backend/sales/transactions.cy.js index 88cc54d3bc2..b76f9675f9d 100644 --- a/cypress/e2e/openmage/backend/sales/transactions.cy.js +++ b/cypress/e2e/openmage/backend/sales/transactions.cy.js @@ -1,12 +1,14 @@ -const route = cy.testRoutes.backend.sales.transactions; +const test = cy.testBackendSales.transactions; +const check = cy.openmage.check; +const tools = cy.openmage.tools; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.index.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.index); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.index); }); -}); \ No newline at end of file +}); diff --git a/cypress/e2e/openmage/backend/system/cache.cy.js b/cypress/e2e/openmage/backend/system/cache.cy.js index ec5b35e06c9..5dfa753e6f6 100644 --- a/cypress/e2e/openmage/backend/system/cache.cy.js +++ b/cypress/e2e/openmage/backend/system/cache.cy.js @@ -1,12 +1,19 @@ -const route = cy.testRoutes.backend.system.cache; +const test = cy.testBackendSystem.cache; +const check = cy.openmage.check; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.index.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.index); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.index); }); -}); \ No newline at end of file + + //it(`tests edit route`, () => { + //}); + + //it(`tests new route`, () => { + //}); +}); diff --git a/cypress/e2e/openmage/backend/system/config/catalog/configswatches.cy.js b/cypress/e2e/openmage/backend/system/config/catalog/configswatches.cy.js index cbe6ad2644e..e8ee65db089 100644 --- a/cypress/e2e/openmage/backend/system/config/catalog/configswatches.cy.js +++ b/cypress/e2e/openmage/backend/system/config/catalog/configswatches.cy.js @@ -1,4 +1,4 @@ -const route = cy.testRoutes.backend.system.config.catalog.configswatches; +const test = cy.testBackendSystem.config.catalog.configswatches; const validate = { dimension: { _input: { @@ -18,10 +18,10 @@ const validate = { } } -describe(`Checks admin system "${route.h3}" settings`, () => { +describe(`Checks admin system "${test.h3}" settings`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGetConfiguration(route); + cy.adminGetConfiguration(test); }); it(`tests non-digit dimensions`, () => { diff --git a/cypress/e2e/openmage/backend/system/config/catalog/sitemap.cy.js b/cypress/e2e/openmage/backend/system/config/catalog/sitemap.cy.js index c43ceefe257..70baca2772f 100644 --- a/cypress/e2e/openmage/backend/system/config/catalog/sitemap.cy.js +++ b/cypress/e2e/openmage/backend/system/config/catalog/sitemap.cy.js @@ -1,30 +1,31 @@ -const route = cy.testRoutes.backend.system.config.catalog.sitemap; -const saveButton = cy.testRoutes.backend.system.config._buttonSave; +const test = cy.testBackendSystem.config.catalog.sitemap; +const saveButton = cy.testBackendSystem.config._buttonSave; +const tools = cy.openmage.tools; const validation = cy.openmage.validation; -describe(`Checks admin system "${route.h3}" settings`, () => { +describe(`Checks admin system "${test.h3}" settings`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGetConfiguration(route); + cy.adminGetConfiguration(test); }); - const priority = route.__validation.priority._input; + const priority = test.__validation.priority._input; it(`tests invalid string priority`, () => { validation.fillFields(priority, validation.number, validation.test.string); - validation.saveAction(saveButton); + tools.clickAction(saveButton); validation.validateFields(priority, validation.number); }); it(`tests invalid number priority`, () => { validation.fillFields(priority, validation.numberRange, validation.test.numberGreater1); - validation.saveAction(saveButton); + tools.clickAction(saveButton); validation.validateFields(priority, validation.numberRange); }); it(`tests empty priority`, () => { validation.fillFields(priority, validation.requiredEntry); - validation.saveAction(saveButton); + tools.clickAction(saveButton); validation.validateFields(priority, validation.requiredEntry); }); @@ -32,7 +33,7 @@ describe(`Checks admin system "${route.h3}" settings`, () => { const error = 'An error occurred while saving this configuration: The priority must be between 0 and 1.'; validation.fillFields(priority, validation.requiredEntry); validation.removeClasses(priority); - validation.saveAction(saveButton); - cy.get(cy.openmage.validation._errorMessage).should('include.text', error); + tools.clickAction(saveButton); + validation.hasErrorMessage(error); }); }); \ No newline at end of file diff --git a/cypress/e2e/openmage/backend/system/config/customers/promo.cy.js b/cypress/e2e/openmage/backend/system/config/customers/promo.cy.js index eaa11dfb4a4..5cd2d2204c3 100644 --- a/cypress/e2e/openmage/backend/system/config/customers/promo.cy.js +++ b/cypress/e2e/openmage/backend/system/config/customers/promo.cy.js @@ -1,15 +1,16 @@ -const route = cy.testRoutes.backend.system.config.customers.promo; -const saveButton = cy.testRoutes.backend.system.config._buttonSave; +const test = cy.testBackendSystem.config.customers.promo; +const saveButton = cy.testBackendSystem.config._buttonSave; +const tools = cy.openmage.tools; const validation = cy.openmage.validation; -describe(`Checks admin system "${route.h3}" settings`, () => { +describe(`Checks admin system "${test.h3}" settings`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGetConfiguration(route); + cy.adminGetConfiguration(test); }); it(`tests invalid string input`, () => { - const fieldset = route.__validation.__groups.couponCodes; + const fieldset = test.__validation.__groups.couponCodes; cy.get('body').then($body => { if (!$body.find(fieldset._id).hasClass('open')) { cy.get(fieldset._id).click({force: true}); @@ -19,7 +20,7 @@ describe(`Checks admin system "${route.h3}" settings`, () => { const fields = fieldset._input; const validate = validation.digits; validation.fillFields(fields, validate, validation.test.string); - validation.saveAction(saveButton); + tools.clickAction(saveButton); validation.validateFields(fields, validate); }); }); diff --git a/cypress/e2e/openmage/backend/system/design.cy.js b/cypress/e2e/openmage/backend/system/design.cy.js index ac61162fba7..34923ee4ee9 100644 --- a/cypress/e2e/openmage/backend/system/design.cy.js +++ b/cypress/e2e/openmage/backend/system/design.cy.js @@ -1,12 +1,24 @@ -const route = cy.testRoutes.backend.system.design; +const test = cy.testBackendSystem.design; +const check = cy.openmage.check; +const tools = cy.openmage.tools; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.index.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.index); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.index); }); -}); \ No newline at end of file + + it(`tests edit route`, () => { + //tools.clickGridRow(test.index._grid, 'td', 'teset'); + check.pageElements(test, test.index); + }); + + it(`tests new route`, () => { + tools.clickAction(test.index.__buttons.add); + check.pageElements(test, test.new); + }); +}); diff --git a/cypress/e2e/openmage/backend/system/emails.cy.js b/cypress/e2e/openmage/backend/system/emails.cy.js index 3706aabab33..1a8e4d88345 100644 --- a/cypress/e2e/openmage/backend/system/emails.cy.js +++ b/cypress/e2e/openmage/backend/system/emails.cy.js @@ -1,12 +1,24 @@ -const route = cy.testRoutes.backend.system.email; +const test = cy.testBackendSystem.email; +const check = cy.openmage.check; +const tools = cy.openmage.tools; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.index.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.index); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.index); }); -}); \ No newline at end of file + + it(`tests edit route`, () => { + //tools.clickGridRow(test.index._grid, 'td', 'test'); + check.pageElements(test, test.index); + }); + + it(`tests new route`, () => { + tools.clickAction(test.index.__buttons.add); + check.pageElements(test, test.new); + }); +}); diff --git a/cypress/e2e/openmage/backend/system/indexes.cy.js b/cypress/e2e/openmage/backend/system/indexes.cy.js index b79338afa83..243ef5d96cb 100644 --- a/cypress/e2e/openmage/backend/system/indexes.cy.js +++ b/cypress/e2e/openmage/backend/system/indexes.cy.js @@ -1,12 +1,13 @@ -const route = cy.testRoutes.backend.system.indexes; +const test = cy.testBackendSystem.indexes; +const check = cy.openmage.check; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.list.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.list); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.list); }); -}); \ No newline at end of file +}); diff --git a/cypress/e2e/openmage/backend/system/manage-currency.cy.js b/cypress/e2e/openmage/backend/system/manage-currency.cy.js index 8f57d0c6c27..7e735e778f2 100644 --- a/cypress/e2e/openmage/backend/system/manage-currency.cy.js +++ b/cypress/e2e/openmage/backend/system/manage-currency.cy.js @@ -1,14 +1,16 @@ -const route = cy.testRoutes.backend.system.manage_curreny; +const test = cy.testBackendSystem.manage_curreny; +const check = cy.openmage.check; +const tools = cy.openmage.tools; const validation = cy.openmage.validation; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.index.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.index); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.index); }); const warning = 'Invalid input data for USD => EUR rate'; @@ -16,23 +18,23 @@ describe(`Checks admin system "${route.h3}"`, () => { it(`tests empty currency`, () => { cy.get('body').then($body => { - if ($body.find(route.__validation._input.from).length > 0) { - cy.get(route.__validation._input.from).clear(); - validation.saveAction(route._buttonSave); - cy.get(validation._warningMessage).should('include.text', warning); - cy.get(validation._successMessage).should('include.text', success); + if ($body.find(test.index.__validation._input.from).length > 0) { + cy.get(test.index.__validation._input.from).clear(); + tools.clickAction(test.index.__buttons.save); + validation.hasWarningMessage(warning); + validation.hasSuccessMessage(success); } }); }); it(`tests string currency`, () => { cy.get('body').then($body => { - if ($body.find(route.__validation._input.from).length > 0) { - cy.get(route.__validation._input.from).clear().type('abc'); - validation.saveAction(route._buttonSave); - cy.get(validation._warningMessage).should('include.text', warning); - cy.get(validation._successMessage).should('include.text', success); + if ($body.find(test.index.__validation._input.from).length > 0) { + cy.get(test.index.__validation._input.from).clear().type('abc'); + tools.clickAction(test.index.__buttons.save); + validation.hasWarningMessage(warning); + validation.hasSuccessMessage(success); } }); }); -}); \ No newline at end of file +}); diff --git a/cypress/e2e/openmage/backend/system/myacount.cy.js b/cypress/e2e/openmage/backend/system/myacount.cy.js index 00488494fdf..a119986b400 100644 --- a/cypress/e2e/openmage/backend/system/myacount.cy.js +++ b/cypress/e2e/openmage/backend/system/myacount.cy.js @@ -1,20 +1,22 @@ -const route = cy.testRoutes.backend.system.myaccount; +const test = cy.testBackendSystem.myaccount; +const check = cy.openmage.check; +tools const validation = cy.openmage.validation; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.index.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.index); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.index); }); it(`tests empty input`, () => { - const validate = cy.openmage.validation.requiredEntry; - validation.fillFields(route.__validation._input, validate); - validation.saveAction(route._buttonSave); - validation.validateFields(route.__validation._input, validate); + const validate = validation.requiredEntry; + validation.fillFields(test.index.__validation._input, validate); + tools.clickAction(test.index.__buttons.save); + validation.validateFields(test.index.__validation._input, validate); }); -}); \ No newline at end of file +}); diff --git a/cypress/e2e/openmage/backend/system/notifications.cy.js b/cypress/e2e/openmage/backend/system/notifications.cy.js index 75c15ec7e7f..5cd227bfc5a 100644 --- a/cypress/e2e/openmage/backend/system/notifications.cy.js +++ b/cypress/e2e/openmage/backend/system/notifications.cy.js @@ -1,12 +1,13 @@ -const route = cy.testRoutes.backend.system.notification; +const test = cy.testBackendSystem.notification; +const check = cy.openmage.check; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.index.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.index); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.index); }); -}); \ No newline at end of file +}); diff --git a/cypress/e2e/openmage/backend/system/stores.cy.js b/cypress/e2e/openmage/backend/system/stores.cy.js index 8d50c26d242..86a56ffb100 100644 --- a/cypress/e2e/openmage/backend/system/stores.cy.js +++ b/cypress/e2e/openmage/backend/system/stores.cy.js @@ -1,12 +1,13 @@ -const route = cy.testRoutes.backend.system.stores; +const test = cy.testBackendSystem.stores; +const check = cy.openmage.check; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.index.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.index); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.index); }); -}); \ No newline at end of file +}); diff --git a/cypress/e2e/openmage/backend/system/variable.cy.js b/cypress/e2e/openmage/backend/system/variable.cy.js index 4f7dbd710ee..43d0708a681 100644 --- a/cypress/e2e/openmage/backend/system/variable.cy.js +++ b/cypress/e2e/openmage/backend/system/variable.cy.js @@ -1,12 +1,24 @@ -const route = cy.testRoutes.backend.system.variables; +const test = cy.testBackendSystem.variables; +const check = cy.openmage.check; +const tools = cy.openmage.tools; -describe(`Checks admin system "${route.h3}"`, () => { +describe(`Checks admin system "${test.index.title}"`, () => { beforeEach('Log in the user', () => { cy.adminLogIn(); - cy.adminGoToTestRoute(route); + cy.adminGoToTestRoute(test, test.index); }); - it(`tests classes and title`, () => { - cy.adminTestRoute(route); + it(`tests index route`, () => { + check.pageElements(test, test.index); }); -}); \ No newline at end of file + + it(`tests edit route`, () => { + //tools.clickGridRow(test.index._grid, 'td', ''); + check.pageElements(test, test.index); + }); + + it(`tests new route`, () => { + tools.clickAction(test.index.__buttons.add); + check.pageElements(test, test.new); + }); +}); diff --git a/cypress/e2e/openmage/frontend/customer/account/create.cy.js b/cypress/e2e/openmage/frontend/customer/account/create.cy.js index e438f7ddb07..c40ecdd9334 100644 --- a/cypress/e2e/openmage/frontend/customer/account/create.cy.js +++ b/cypress/e2e/openmage/frontend/customer/account/create.cy.js @@ -1,26 +1,27 @@ -const route = cy.testRoutes.frontend.customer.account.create; -const fields = route.__validation._input; +const test = cy.testFrontend.customer.account.create; +const fields = test.__validation._input; +const tools = cy.openmage.tools; const validation = cy.openmage.validation; describe('Checks customer account create', () => { beforeEach('Go to page', () => { - cy.visit(route.url); + cy.visit(test.url); }); it('Checks the Create Account page title', () => { - cy.get(route._h1).should('include.text', route.h1); + cy.get(test._h1).should('include.text', test.h1); }); it('Submits empty form', () => { validation.fillFields(fields, validation.requiredEntry); - validation.saveAction(route._buttonSubmit); + tools.clickAction(test._buttonSubmit); validation.validateFields(fields, validation.requiredEntry); }); it('Submits empty form, no js', () => { validation.fillFields(fields, validation.requiredEntry); validation.removeClasses(fields); - validation.saveAction(route._buttonSubmit); + tools.clickAction(test._buttonSubmit); cy.get(validation._errorMessage) .should('include.text', '"First Name" is a required value.') .should('include.text', '"First Name" length must be equal or greater than 1 characters.') @@ -32,7 +33,7 @@ describe('Checks customer account create', () => { it('Submits form with short password and wrong confirmation', () => { cy.get(fields.password).type('123').should('have.value', '123'); cy.get(fields.confirmation).type('abc').should('have.value', 'abc'); - cy.get(route._buttonSubmit).click(); + tools.clickAction(test._buttonSubmit); cy.get('#advice-validate-password-password').should('include.text', 'Please enter more characters or clean leading or trailing spaces.'); cy.get('#advice-validate-cpassword-confirmation').should('include.text', 'Please make sure your passwords match.'); }); @@ -48,7 +49,7 @@ describe('Checks customer account create', () => { cy.get(fields.email_address).type(email).should('have.value', email); cy.get(fields.password).type(password).should('have.value', password); cy.get(fields.confirmation).type(password).should('have.value', password); - cy.get(route._buttonSubmit).click(); - cy.get(validation._successMessage).should('include.text', successMsg); + tools.clickAction(test._buttonSubmit); + validation.hasSuccessMessage(successMsg); }); }); diff --git a/cypress/e2e/openmage/frontend/newsletter-subscribe.cy.js b/cypress/e2e/openmage/frontend/newsletter-subscribe.cy.js index 2aefb3b99c1..a37d253c461 100644 --- a/cypress/e2e/openmage/frontend/newsletter-subscribe.cy.js +++ b/cypress/e2e/openmage/frontend/newsletter-subscribe.cy.js @@ -1,27 +1,29 @@ -const route = cy.testRoutes.frontend.homepage; +const test = cy.testFrontend.homepage; +const tools = cy.openmage.tools; +const validation = cy.openmage.validation; describe('Check newsletter subribe', () => { beforeEach('Go to page', () => { - cy.visit(route.url); + cy.visit(test.url); }); it('tests empty input', () => { - const error = cy.openmage.validation.requiredEntry.error; - cy.get(route.newsletter._id).should('have.value', ''); - cy.get(route.newsletter._buttonSubmit).click(); + const error = validation.requiredEntry.error; + cy.get(test.newsletter._id).should('have.value', ''); + tools.clickAction(test.newsletter._buttonSubmit); cy.get('#advice-required-entry-newsletter').should('include.text', error); }) it('Test valid input twice', () => { - const email = cy.openmage.tools.generateRandomEmail(); + const email = tools.generateRandomEmail(); cy.log('Test first valid input'); - cy.get(route.newsletter._id).type(email).should('have.value', email); - cy.get(route.newsletter._buttonSubmit).click(); - cy.get(cy.openmage.validation._successMessage).should('include.text', 'Thank you for your subscription.'); + cy.get(test.newsletter._id).type(email).should('have.value', email); + tools.clickAction(test.newsletter._buttonSubmit); + validation.hasSuccessMessage('Thank you for your subscription.'); cy.log('Test second valid input'); - cy.get(route.newsletter._id).type(email).should('have.value', email); - cy.get(route.newsletter._buttonSubmit).click(); - cy.get(cy.openmage.validation._errorMessage).should('include.text', 'There was a problem with the subscription: This email address is already registered.'); + cy.get(test.newsletter._id).type(email).should('have.value', email); + tools.clickAction(test.newsletter._buttonSubmit); + validation.hasErrorMessage('There was a problem with the subscription: This email address is already registered.'); }) }) diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 5e14a6c4020..5e3d34c40b5 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -13,7 +13,7 @@ Cypress.Commands.add('adminLogIn', () => { cy.url().should('include', '/dashboard/index'); }) -Cypress.Commands.add('adminGoToTestRoute', (route) => { +Cypress.Commands.add('adminGoToTestRoute', (route, path) => { cy.get('body').then($body => { const popup = '#message-popup-window .message-popup-head a'; if ($body.find(popup).length > 0) { @@ -22,20 +22,28 @@ Cypress.Commands.add('adminGoToTestRoute', (route) => { } }); - cy.log(`Clicking on "${route.h3}" menu`); + cy.log(`Clicking on "${path.title}" menu`); cy.get(route._id).click({force: true}); - cy.url().should('include', route.url); + cy.url().should('include', path.url); }) -Cypress.Commands.add('adminTestRoute', (route) => { +/** + * @deprecated Use cy.openmage.check.pageElements(test, path) instead + */ +Cypress.Commands.add('adminTestRoute', (route, path) => { cy.log('Checking for title'); - cy.get(route._h3).should('include.text', route.h3); + cy.get(route._h3).should('include.text', path.title); cy.log('Checking for active parent class'); cy.get(route._id_parent).should('have.class', 'active'); cy.log('Checking for active class'); cy.get(route._id).should('have.class', 'active'); + + cy.log('Checking for existing buttons'); + Object.keys(path.__buttons).forEach(button => { + cy.get(path.__buttons[button]).should('exist'); + }); }) Cypress.Commands.add('adminGetConfiguration', (route) => { diff --git a/cypress/support/e2e.js b/cypress/support/e2e.js index d19ff07ec62..b2c7690fc99 100644 --- a/cypress/support/e2e.js +++ b/cypress/support/e2e.js @@ -16,4 +16,13 @@ // Import commands.js using ES2015 syntax: import './commands' import './openmage' -import './openmage/config/paths' +import './openmage/backend/catalog' +import './openmage/backend/cms' +import './openmage/backend/customer' +import './openmage/backend/dashboard' +import './openmage/backend/newsletter' +import './openmage/backend/promo' +import './openmage/backend/sales' +import './openmage/backend/system' + +import './openmage/frontend/paths' diff --git a/cypress/support/openmage.js b/cypress/support/openmage.js index c7e5a0c56e0..5bbdd9ac49e 100644 --- a/cypress/support/openmage.js +++ b/cypress/support/openmage.js @@ -14,7 +14,45 @@ cy.openmage = { } } }, + check: { + buttons: (path) => { + cy.log('Checking for existing buttons'); + Object.keys(path.__buttons).forEach(button => { + cy.get(path.__buttons[button]).should('exist'); + }); + }, + pageElements: (test, path) => { + cy.log('Checking for title'); + cy.get(test._h3).should('include.text', path.title); + + cy.log('Checking for active parent class'); + cy.get(test._id_parent).should('have.class', 'active'); + + cy.log('Checking for active class'); + cy.get(test._id).should('have.class', 'active'); + + cy.log('Checking for existing grid'); + if (path._grid !== undefined) { + cy.get(path._grid).should('exist'); + } + + cy.log('Checking for existing buttons'); + if (path.__buttons !== undefined) { + Object.keys(path.__buttons).forEach(button => { + cy.get(path.__buttons[button]).should('exist'); + }); + } + }, + }, tools: { + clickAction: (selector, log = 'Clicking on button') => { + cy.log(log); + cy.get(selector).first().click({force: true, multiple: false}); + }, + clickGridRow: (grid, selector, content, log = 'Clicking on grid') => { + cy.log(log); + cy.get(grid).contains(selector, content).first().click({force: true, multiple: false}); + }, generateRandomEmail: () => { const chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let email = ''; @@ -22,7 +60,7 @@ cy.openmage = { email += chars.charAt(Math.floor(Math.random() * chars.length)); } return email + '-cypress-test@example.com'; - } + }, }, validation: { test: { @@ -80,10 +118,6 @@ cy.openmage = { .invoke('removeClass'); }); }, - saveAction: (selector) => { - cy.log('Clicking on Save button'); - cy.get(selector).first().click({force: true, multiple: false}); - }, validateFields: (fields, validation) =>{ cy.log('Checking for error messages'); Object.keys(fields).forEach(field => { @@ -91,5 +125,17 @@ cy.openmage = { cy.get(selector).should('include.text', validation.error); }); }, + hasErrorMessage: (message) =>{ + cy.log('Checking for error messages'); + cy.get('.error-msg').should('include.text', message); + }, + hasSuccessMessage: (message) =>{ + cy.log('Checking for success messages'); + cy.get('.success-msg').should('include.text', message); + }, + hasWarningMessage: (message) =>{ + cy.log('Checking for warning messages'); + cy.get('.warning-msg').should('include.text', message); + }, } } \ No newline at end of file diff --git a/cypress/support/openmage/backend/catalog.js b/cypress/support/openmage/backend/catalog.js new file mode 100644 index 00000000000..809a017349d --- /dev/null +++ b/cypress/support/openmage/backend/catalog.js @@ -0,0 +1,100 @@ +const defaultConfig = { + _id_parent: '#nav-admin-catalog', + _h3: 'h3.icon-head', +} + +cy.testBackendCatalog = { + products: { + _id: '#nav-admin-catalog-products', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'Manage Products', + url: 'catalog_product/index', + _grid: '#productGrid_table', + __buttons: { + add: 'button[title="Add Product"]', + }, + }, + edit: { + title: 'Plaid Cotton', + url: 'catalog_product/edit', + }, + new: { + title: 'New Product', + url: 'catalog_product/new', + }, + }, + categories: { + _id: '#nav-admin-catalog-categories', + _id_parent: defaultConfig._id_parent, + _h3: '#category-edit-container ' + defaultConfig._h3, + index: { + title: 'New Root Category', + url: 'catalog_category/index', + }, + }, + search: { + _id: '#nav-admin-catalog-search', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'Search', + url: 'catalog_search/index', + _grid: '#catalog_search_grid_table', + __buttons: { + add: '.form-buttons button[title="Add New Search Term"]', + }, + }, + edit: { + title: 'Edit Search', + url: 'catalog_search/edit', + }, + new: { + title: 'New Search', + url: 'catalog_search/new', + }, + }, + sitemap: { + _id: '#nav-admin-catalog-sitemap', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'Google Sitemap', + url: 'sitemap/index', + _grid: '#sitemapGrid_table', + __buttons: { + add: '.form-buttons button[title="Add Sitemap"]', + }, + }, + edit: { + title: 'Edit Sitemap', + url: 'sitemap/edit', + }, + new: { + title: 'New Sitemap', + url: 'sitemap/edit', + }, + }, + urlrewrite: { + _id: '#nav-admin-catalog-urlrewrite', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'URL Rewrite Management', + url: 'urlrewrite/index', + _grid: '#urlrewriteGrid_table', + __buttons: { + add: '.form-buttons button[title="Add URL Rewrite"]', + }, + }, + edit: { + title: 'Edit URL Rewrite', + url: 'urlrewrite/edit', + }, + new: { + title: 'Add New URL Rewrite', + url: 'urlrewrite/edit', + }, + }, +} diff --git a/cypress/support/openmage/backend/cms.js b/cypress/support/openmage/backend/cms.js new file mode 100644 index 00000000000..cc8f606739f --- /dev/null +++ b/cypress/support/openmage/backend/cms.js @@ -0,0 +1,101 @@ +const defaultConfig = { + _id_parent: '#nav-admin-cms', + _h3: 'h3.icon-head', + block: { + __fields: { + block_title : { + selector: '#block_title', + }, + block_identifier : { + selector: '#block_identifier', + }, + }, + }, +} + +cy.testBackendCms = { + block: { + _id: '#nav-admin-cms-block', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'Static Blocks', + url: 'cms_block/index', + _grid: '#cmsBlockGrid_table', + __buttons: { + add: '.form-buttons button[title="Add New Block"]', + }, + }, + edit: { + title: 'Edit Block', + url: 'cms_block/new', + }, + new: { + title: 'New Block', + url: 'cms_block/new', + }, + }, + page: { + _id: '#nav-admin-cms-page', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'Manage Pages', + url: 'cms_page/index', + _grid: '#cmsPageGrid', + __buttons: { + add: '.form-buttons button[title="Add New Page"]', + }, + }, + edit: { + title: 'Edit Page', + url: 'cms_page/edit', + __buttons: { + delete: '.form-buttons button[title="Delete Page"]', + save: '.form-buttons button[title="Save Page"]', + saveAndContinue: '.form-buttons button[title="Save and Continue Edit"]', + reset: '.form-buttons button[title="Reset"]', + }, + disablePage: () => { + cy.log('Disable the CMS page'); + cy.get('#page_is_active') + .select('Disabled'); + }, + resetStores: () => { + cy.log('Restore the default store to the CMS page'); + cy.get('#page_store_id') + .select([1, 2, 3]); + }, + }, + new: { + title: 'New Page', + url: 'cms_page/new', + __buttons: { + save: '.form-buttons button[title="Save Page"]', + saveAndContinue: '.form-buttons button[title="Save and Continue Edit"]', + reset: '.form-buttons button[title="Reset"]', + }, + }, + }, + widget: { + _id: '#nav-admin-cms-widget_instance', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'Manage Widget Instances', + url: 'widget_instance/index', + _grid: '#widgetInstanceGrid_table', + __buttons: { + add: '.form-buttons button[title="Add New Widget Instance"]', + }, + }, + edit: { + title: 'Widget', + url: 'widget_instance/new', + }, + new: { + title: 'New Widget Instance', + url: 'widget_instance/new', + }, + } +} diff --git a/cypress/support/openmage/backend/customer.js b/cypress/support/openmage/backend/customer.js new file mode 100644 index 00000000000..443bef131b8 --- /dev/null +++ b/cypress/support/openmage/backend/customer.js @@ -0,0 +1,58 @@ +const defaultConfig = { + _id_parent: '#nav-admin-customer', + _h3: 'h3.icon-head', +} + +cy.testBackendCustomer = { + customer: { + _id: '#nav-admin-customer-manage', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'Manage Customers', + url: 'customer/index', + _grid: '#customerGrid_table', + __buttons: { + add: '.form-buttons button[title="Add New Customer"]', + }, + }, + edit: { + title: 'John Smith', + url: 'customer/edit', + }, + new: { + title: 'New Customer', + url: 'customer/new', + }, + }, + groups: { + _id: '#nav-admin-customer-group', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'Customer Groups', + url: 'customer_group/index', + _grid: '#customerGroupGrid_table', + __buttons: { + add: '.form-buttons button[title="Add New Customer Group"]', + }, + }, + edit: { + title: 'Edit Customer Group', + url: 'customer_group/edit', + }, + new: { + title: 'New Customer Group', + url: 'customer_group/new', + }, + }, + online: { + _id: '#nav-admin-customer-online', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'Online Customers', + url: 'customer_online/index', + }, + }, +} diff --git a/cypress/support/openmage/backend/dashboard.js b/cypress/support/openmage/backend/dashboard.js new file mode 100644 index 00000000000..362feb6b870 --- /dev/null +++ b/cypress/support/openmage/backend/dashboard.js @@ -0,0 +1,16 @@ +const defaulfConfig = { + _id_parent: '#nav-admin-dashboard', + _h3: 'h3.head-dashboard', +} + +cy.testBackendDashboard = { + dashboard: { + _id: '#nav-admin-dashboard', + _id_parent: defaulfConfig._id_parent, + _h3: defaulfConfig._h3, + index: { + title: 'Dashboard', + url: 'dashboard/index', + }, + }, +} diff --git a/cypress/support/openmage/backend/newsletter.js b/cypress/support/openmage/backend/newsletter.js new file mode 100644 index 00000000000..9b4aeaebdad --- /dev/null +++ b/cypress/support/openmage/backend/newsletter.js @@ -0,0 +1,58 @@ +const defaultConfig = { + _id_parent: '#nav-admin-newsletter', + _h3: 'h3.icon-head', +} + +cy.testBackendNewsletter = { + templates: { + _id: '#nav-admin-newsletter-template', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'Newsletter Templates', + url: 'newsletter_template/index', + _grid: '#newsletterTemplateGrid_table', + __buttons: { + add: '.form-buttons button[title="Add New Template"]', + }, + }, + edit: { + title: 'Edit Newsletter Template', + url: 'newsletter_template/edit', + }, + new: { + title: 'New Newsletter Template', + url: 'newsletter_template/new', + }, + }, + queue: { + _id: '#nav-admin-newsletter-queue', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'Newsletter Queue', + url: 'newsletter_queue/index', + _grid: '#queueGrid_table', + }, + }, + subscriber: { + _id: '#nav-admin-newsletter-subscriber', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'Newsletter Subscribers', + url: 'newsletter_subscriber/index', + _grid: '#subscriberGrid_table', + }, + }, + report: { + _id: '#nav-admin-newsletter-problem', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'Newsletter Problem Reports', + url: 'newsletter_problem/index', + _grid: '#problemGrid_table', + }, + }, +} diff --git a/cypress/support/openmage/backend/promo.js b/cypress/support/openmage/backend/promo.js new file mode 100644 index 00000000000..9126a20bb37 --- /dev/null +++ b/cypress/support/openmage/backend/promo.js @@ -0,0 +1,49 @@ +const defaultConfig = { + _id_parent: '#nav-admin-promo', + _h3: 'h3.icon-head', +} + +cy.testBackendPromo = { + catalog: { + _id: '#nav-admin-promo-catalog', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'Catalog Price Rules', + url: 'promo_catalog/index', + _grid: '#promo_catalog_grid', + __buttons: { + add: '.form-buttons button[title="Add New Rule"]', + }, + }, + edit: { + title: 'Edit Rule', + url: 'promo_catalog/edit', + }, + new: { + title: 'New Rule', + url: 'promo_catalog/new', + }, + }, + quote: { + _id: '#nav-admin-promo-quote', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'Shopping Cart Price Rules', + url: 'promo_quote/index', + _grid: '#promo_quote_grid_table', + __buttons: { + add: '.form-buttons button[title="Add New Rule"]', + }, + }, + edit: { + title: 'Edit Rule', + url: 'promo_quote/edit', + }, + new: { + title: 'New Rule', + url: 'promo_quote/new', + }, + }, +} diff --git a/cypress/support/openmage/backend/sales.js b/cypress/support/openmage/backend/sales.js new file mode 100644 index 00000000000..97f9cc3f336 --- /dev/null +++ b/cypress/support/openmage/backend/sales.js @@ -0,0 +1,76 @@ +const defaultConfig = { + _id_parent: '#nav-admin-sales', + _h3: 'h3.icon-head', +} + +cy.testBackendSales = { + creditmemo: { + _id: '#nav-admin-sales-creditmemo', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'Credit Memos', + url: 'sales_creditmemo/index', + _grid: '#sales_creditmemo_grid_table', + }, + view: { + title: 'Credit Memo #', + url: 'sales_creditmemo/edit', + }, + }, + invoice: { + _id: '#nav-admin-sales-invoice', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'Invoice', + url: 'sales_invoice/index', + _grid: '#sales_invoice_grid_table', + }, + view: { + title: 'Invoice #', + url: 'sales_invoice/view', + }, + }, + order: { + _id: '#nav-admin-sales-order', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'Orders', + url: 'sales_order/index', + _grid: '#sales_order_grid_table', + __buttons: { + new: '.form-buttons button[title="Create New Order"]', + }, + }, + view: { + title: 'Order #', + url: 'sales_order/view', + }, + }, + shipment: { + _id: '#nav-admin-sales-shipment', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'Shipments', + url: 'sales_shipment/index', + _grid: '#sales_shipment_grid_table', + }, + view: { + title: 'Shipment #', + url: 'sales_shipment/view', + }, + }, + transactions: { + _id: '#nav-admin-sales-transactions', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'Transactions', + url: 'sales_transactions/index', + _grid: '#order_transactions_table', + }, + }, +} diff --git a/cypress/support/openmage/backend/system.js b/cypress/support/openmage/backend/system.js new file mode 100644 index 00000000000..0646b203528 --- /dev/null +++ b/cypress/support/openmage/backend/system.js @@ -0,0 +1,202 @@ +const defaultConfig = { + _id_parent: '#nav-admin-system', + _h3: 'h3.icon-head', +} + +cy.testBackendSystem = { + cache: { + _id: '#nav-admin-system-cache', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'Cache Storage Management', + url: 'cache/index', + _grid: '#cache_grid_table', + __buttons: { + flushApply: '.form-buttons button[title="Flush & Apply Updates"]', + flushCache: '.form-buttons button[title="Flush Cache Storage"]', + }, + }, + }, + design: { + _id: '#nav-admin-system-design', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'Design', + url: 'system_design/index', + _grid: '#designGrid_table', + __buttons: { + add: '.form-buttons button[title="Add Design Change"]', + }, + }, + edit: { + title: 'Edit Design Change', + url: 'system_design/edit', + }, + new: { + title: 'New Design Change', + url: 'system_design/new', + }, + }, + email: { + _id: '#nav-admin-system-email_template', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'Transactional Emails', + url: 'system_email_template/index', + _grid: '#systemEmailTemplateGrid_table', + __buttons: { + add: '.form-buttons button[title="Add New Template"]', + }, + }, + edit: { + title: 'Edit Email Template', + url: 'system_email_template/edit', + }, + new: { + title: 'New Email Template', + url: 'system_email_template/new', + }, + }, + myaccount: { + _id: '#nav-admin-system-myaccount', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'My Account', + url: 'system_account/index', + __buttons: { + save: '.form-buttons button[title="Save Account"]', + }, + __validation: { + _input: { + username: '#username', + firstname: '#firstname', + lastname: '#lastname', + email: '#email', + current_password: '#current_password', + } + } + + }, + }, + manage_curreny: { + _id: '#nav-admin-system-currency-rates', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'Manage Currency Rates', + url: 'system_currency/index', + __buttons: { + save: '.form-buttons button[title="Save Currency Rates"]', + }, + __validation: { + _input: { + from: 'input[name="rate[USD][EUR]"]', + } + } + }, + }, + notification: { + _id: '#nav-admin-system-adminnotification', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'Messages Inbox', + url: 'notification/index', + _grid: '#notificationGrid_table', + }, + }, + indexes: { + _id: '#nav-admin-system-index', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + list: { + title: 'Index Management', + url: 'process/list', + _grid: '#indexer_processes_grid_table', + }, + }, + stores: { + _id: '#nav-admin-system-store', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'Manage Stores', + url: 'system_store/index', + __buttons: { + addWebsite: '.form-buttons button[title="Create Website"]', + addStore: '.form-buttons button[title="Create Store"]', + addStoreView: '.form-buttons button[title="Create Store View"]', + }, + }, + }, + variables: { + _id: '#nav-admin-system-variable', + _id_parent: defaultConfig._id_parent, + _h3: defaultConfig._h3, + index: { + title: 'Custom Variables', + url: 'system_variable/index', + _grid: '#customVariablesGrid', + __buttons: { + add: '.form-buttons button[title="Add New Variable"]', + }, + }, + edit: { + title: 'Custom Variable', + url: 'system_variable/edit', + }, + new: { + title: 'New Custom Variable', + url: 'system_variable/new', + }, + }, + config: { + _buttonSave: '.form-buttons button[title="Save Config"]', + catalog: { + configswatches: { + _id: '#section-configswatches', + url: 'system_config/edit/section/configswatches', + h3: 'Configurable Swatches', + _h3: defaultConfig._h3, + }, + sitemap: { + _id: '#section-sitemap', + url: 'system_config/edit/section/sitemap', + h3: 'Google Sitemap', + _h3: defaultConfig._h3, + __validation: { + priority: { + _input: { + category: '#sitemap_category_priority', + product: '#sitemap_product_priority', + page: '#sitemap_page_priority', + } + } + } + } + }, + customers: { + promo: { + _id: '#section-promo', + url: 'system_config/edit/section/promo', + h3: 'Promotions', + _h3: defaultConfig._h3, + __validation: { + __groups: { + couponCodes: { + _id: '#promo_auto_generated_coupon_codes-head', + _input: { + length: '#promo_auto_generated_coupon_codes_length', + dashes: '#promo_auto_generated_coupon_codes_dash', + } + } + } + } + }, + }, + } +} diff --git a/cypress/support/openmage/config/paths.js b/cypress/support/openmage/config/paths.js deleted file mode 100644 index 3c2ed3d6354..00000000000 --- a/cypress/support/openmage/config/paths.js +++ /dev/null @@ -1,351 +0,0 @@ -const adminNav = { - catalog: '#nav-admin-catalog', - cms: '#nav-admin-cms', - customer: '#nav-admin-customer', - newsletter: '#nav-admin-newsletter', - promo: '#nav-admin-promo', - sales: '#nav-admin-sales', - system: '#nav-admin-system', -} - -const adminPage = { - _h3: 'h3.icon-head', -} - -cy.testRoutes = { - api: {}, - backendLogin: {}, - backend: { - dashboard: { - _id: '#nav-admin-dashboard', - url: 'dashboard/index', - h3: 'Dashboard', - _h3: adminPage._h3, - }, - catalog: { - products: { - _id_parent: adminNav.catalog, - _id: '#nav-admin-catalog-products', - url: 'catalog_product/index', - h3: 'Manage Products', - _h3: adminPage._h3, - }, - categories: { - _id_parent: adminNav.catalog, - _id: '#nav-admin-catalog-categories', - url: 'catalog_category/index', - h3: 'New Root Category', - _h3: '#category-edit-container ' + adminPage._h3, - }, - search: { - _id_parent: adminNav.catalog, - _id: '#nav-admin-catalog-search', - url: 'catalog_search/index', - h3: 'Search', - _h3: adminPage._h3, - }, - sitemap: { - _id_parent: adminNav.catalog, - _id: '#nav-admin-catalog-sitemap', - url: 'sitemap/index', - h3: 'Google Sitemap', - _h3: adminPage._h3, - }, - urlrewrite: { - _id_parent: adminNav.catalog, - _id: '#nav-admin-catalog-urlrewrite', - url: 'urlrewrite/index', - h3: 'URL Rewrite Management', - _h3: adminPage._h3, - } - }, - cms: { - block: { - _id_parent: adminNav.cms, - _id: '#nav-admin-cms-block', - url: 'cms_block/index', - h3: 'Static Blocks', - _h3: adminPage._h3, - }, - page: { - _id_parent: adminNav.cms, - _id: '#nav-admin-cms-page', - url: 'cms_page/index', - h3: 'Manage Pages', - _h3: adminPage._h3, - _gridTable: '#cmsPageGrid_table', - _buttonDelete: '.form-buttons button[title="Delete Page"]', - _buttonReset: '.form-buttons button[title="Rest"]', - _buttonSave: '.form-buttons button[title="Save Page"]', - _buttonSaveAndContinue: '.form-buttons button[title="Save and Continue Edit"]', - }, - widget: { - _id_parent: adminNav.cms, - _id: '#nav-admin-cms-widget_instance', - url: 'widget_instance/index', - h3: 'Manage Widget Instances', - _h3: adminPage._h3, - } - }, - customers: { - manage: { - _id_parent: adminNav.customer, - _id: '#nav-admin-customer-manage', - url: 'customer/index', - h3: 'Manage Customers', - _h3: adminPage._h3, - }, - groups: { - _id_parent: adminNav.customer, - _id: '#nav-admin-customer-group', - url: 'customer_group/index', - h3: 'Customer Groups', - _h3: adminPage._h3, - }, - online: { - _id_parent: adminNav.customer, - _id: '#nav-admin-customer-online', - url: 'customer_online/index', - h3: 'Online Customers', - _h3: adminPage._h3, - } - }, - newsletter: { - templates: { - _id_parent: adminNav.newsletter, - _id: '#nav-admin-newsletter-template', - url: 'newsletter_template/index', - h3: 'Newsletter Templates', - _h3: adminPage._h3, - }, - queue: { - _id_parent: adminNav.newsletter, - _id: '#nav-admin-newsletter-queue', - url: 'newsletter_queue/index', - h3: 'Newsletter Queue', - _h3: adminPage._h3, - }, - subscriber: { - _id_parent: adminNav.newsletter, - _id: '#nav-admin-newsletter-subscriber', - url: 'newsletter_subscriber/index', - h3: 'Newsletter Subscribers', - _h3: adminPage._h3, - }, - report: { - _id_parent: adminNav.newsletter, - _id: '#nav-admin-newsletter-problem', - url: 'newsletter_problem/index', - h3: 'Newsletter Problem Reports', - _h3: adminPage._h3, - } - }, - promo: { - catalog: { - _id_parent: adminNav.promo, - _id: '#nav-admin-promo-catalog', - url: 'promo_catalog/index', - h3: 'Catalog Price Rules', - _h3: adminPage._h3, - }, - cart: { - _id_parent: adminNav.promo, - _id: '#nav-admin-promo-quote', - url: 'promo_quote/index', - h3: 'Shopping Cart Price Rules', - _h3: adminPage._h3, - } - }, - sales: { - creditmemo: { - _id_parent: adminNav.sales, - _id: '#nav-admin-sales-creditmemo', - url: 'sales_creditmemo/index', - h3: 'Credit Memos', - _h3: adminPage._h3, - }, - invoice: { - _id_parent: adminNav.sales, - _id: '#nav-admin-sales-invoice', - url: 'sales_invoice/index', - h3: 'Invoice', - _h3: adminPage._h3, - }, - order: { - _id_parent: adminNav.sales, - _id: '#nav-admin-sales-order', - url: 'sales_order/index', - h3: 'Orders', - _h3: adminPage._h3, - }, - shipment: { - _id_parent: adminNav.sales, - _id: '#nav-admin-sales-shipment', - url: 'sales_shipment/index', - h3: 'Shipments', - _h3: adminPage._h3, - }, - transactions: { - _id_parent: adminNav.sales, - _id: '#nav-admin-sales-transactions', - url: 'sales_transactions/index', - h3: 'Transactions', - _h3: adminPage._h3, - } - }, - system: { - cache: { - _id_parent: adminNav.system, - _id: '#nav-admin-system-cache', - url: 'cache/index', - h3: 'Cache Storage Management', - _h3: adminPage._h3, - }, - design: { - _id_parent: adminNav.system, - _id: '#nav-admin-system-design', - url: 'system_design/index', - h3: 'Design', - _h3: adminPage._h3, - }, - email: { - _id_parent: adminNav.system, - _id: '#nav-admin-system-email_template', - url: 'system_email_template/index', - h3: 'Transactional Emails', - _h3: adminPage._h3, - }, - myaccount: { - _id_parent: adminNav.system, - _id: '#nav-admin-system-myaccount', - url: 'system_account/index', - h3: 'My Account', - _h3: adminPage._h3, - _buttonSave: '.form-buttons button[title="Save Account"]', - __validation: { - _input: { - username: '#username', - firstname: '#firstname', - lastname: '#lastname', - email: '#email', - current_password: '#current_password', - } - } - }, - manage_curreny: { - _id_parent: adminNav.system, - _id: '#nav-admin-system-currency-rates', - url: 'system_currency/index', - h3: 'Manage Currency Rates', - _h3: adminPage._h3, - _buttonSave: '.form-buttons button[title="Save Currency Rates"]', - __validation: { - _input: { - from: 'input[name="rate[USD][EUR]"]', - } - } - }, - notification: { - _id_parent: adminNav.system, - _id: '#nav-admin-system-adminnotification', - url: 'notification/index', - h3: 'Messages Inbox', - _h3: adminPage._h3, - }, - indexes: { - _id_parent: adminNav.system, - _id: '#nav-admin-system-index', - url: 'process/list', - h3: 'Index Management', - _h3: adminPage._h3, - }, - stores: { - _id_parent: adminNav.system, - _id: '#nav-admin-system-store', - url: 'system_store/index', - h3: 'Manage Stores', - _h3: adminPage._h3, - }, - variables: { - _id_parent: adminNav.system, - _id: '#nav-admin-system-variable', - url: 'system_variable/index', - h3: 'Custom Variables', - _h3: adminPage._h3, - }, - config: { - _buttonSave: '.form-buttons button[title="Save Config"]', - catalog: { - configswatches: { - _id: '#section-configswatches', - url: 'system_config/edit/section/configswatches', - h3: 'Configurable Swatches', - _h3: adminPage._h3, - }, - sitemap: { - _id: '#section-sitemap', - url: 'system_config/edit/section/sitemap', - h3: 'Google Sitemap', - _h3: adminPage._h3, - __validation: { - priority: { - _input: { - category: '#sitemap_category_priority', - product: '#sitemap_product_priority', - page: '#sitemap_page_priority', - } - } - } - } - }, - customers: { - promo: { - _id: '#section-promo', - url: 'system_config/edit/section/promo', - h3: 'Promotions', - _h3: adminPage._h3, - __validation: { - __groups: { - couponCodes: { - _id: '#promo_auto_generated_coupon_codes-head', - _input: { - length: '#promo_auto_generated_coupon_codes_length', - dashes: '#promo_auto_generated_coupon_codes_dash', - } - } - } - } - }, - }, - } - } - }, - frontend: { - homepage: { - url: '/', - newsletter: { - _buttonSubmit: '#newsletter-validate-detail button[type="submit"]', - _id: '#newsletter' - } - }, - customer: { - account: { - create: { - url: '/customer/account/create', - _buttonSubmit: '#form-validate button[type="submit"]', - _h1: 'h1', - h1: 'Create an Account', - __validation: { - _input: { - firstname: '#firstname', - lastname: '#lastname', - email_address: '#email_address', - password: '#password', - confirmation: '#confirmation', - } - } - } - } - } - } -} diff --git a/cypress/support/openmage/frontend/paths.js b/cypress/support/openmage/frontend/paths.js new file mode 100644 index 00000000000..3f3969f108c --- /dev/null +++ b/cypress/support/openmage/frontend/paths.js @@ -0,0 +1,28 @@ +cy.testFrontend = { + homepage: { + url: '/', + newsletter: { + _buttonSubmit: '#newsletter-validate-detail button[type="submit"]', + _id: '#newsletter' + } + }, + customer: { + account: { + create: { + url: '/customer/account/create', + _buttonSubmit: '#form-validate button[type="submit"]', + _h1: 'h1', + h1: 'Create an Account', + __validation: { + _input: { + firstname: '#firstname', + lastname: '#lastname', + email_address: '#email_address', + password: '#password', + confirmation: '#confirmation', + } + } + } + } + } +} From 3ed8490f094b628c9659b108c1c1fa418f2788ac Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Sun, 5 Oct 2025 19:43:01 +0200 Subject: [PATCH 15/30] template fix --- .../default/default/template/newsletter/template/list.phtml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/design/adminhtml/default/default/template/newsletter/template/list.phtml b/app/design/adminhtml/default/default/template/newsletter/template/list.phtml index 3c191552fca..2188a5d31bb 100644 --- a/app/design/adminhtml/default/default/template/newsletter/template/list.phtml +++ b/app/design/adminhtml/default/default/template/newsletter/template/list.phtml @@ -13,7 +13,8 @@

getHeaderText() ?>

- + __('Add New Template'); ?> + From 5ac59d363f85fc770640cf7b7784fd19250ba1f6 Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Sun, 5 Oct 2025 22:05:15 +0200 Subject: [PATCH 16/30] Update app/code/core/Mage/Cms/Model/Resource/Page.php --- app/code/core/Mage/Cms/Model/Resource/Page.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/core/Mage/Cms/Model/Resource/Page.php b/app/code/core/Mage/Cms/Model/Resource/Page.php index aaf8f3dd055..438a5238a3a 100644 --- a/app/code/core/Mage/Cms/Model/Resource/Page.php +++ b/app/code/core/Mage/Cms/Model/Resource/Page.php @@ -79,7 +79,8 @@ protected function _beforeSave(Mage_Core_Model_Abstract $object) $object->setIsActive(true); Mage::getSingleton('adminhtml/session')->addWarning( Mage::helper('cms')->__( - 'Cannot disable page, it is used in configuration %s.', + 'Cannot disable page, it is used in configuration for %s.', + Mage::helper('adminhtml')->getUrl('adminhtml/system_config/edit', ['section' => 'web']), Mage_Cms_Helper_Page::getValidateConfigErrorMessage($isUsedInConfig), ), ); From ed627be27f378855253df00dadcb29938b063e2f Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Sun, 5 Oct 2025 22:05:31 +0200 Subject: [PATCH 17/30] Update app/code/core/Mage/Cms/Model/Resource/Page.php --- app/code/core/Mage/Cms/Model/Resource/Page.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/core/Mage/Cms/Model/Resource/Page.php b/app/code/core/Mage/Cms/Model/Resource/Page.php index 438a5238a3a..09ef2627598 100644 --- a/app/code/core/Mage/Cms/Model/Resource/Page.php +++ b/app/code/core/Mage/Cms/Model/Resource/Page.php @@ -39,7 +39,8 @@ protected function _beforeDelete(Mage_Core_Model_Abstract $object) $object->setId(null); Mage::throwException( Mage::helper('cms')->__( - 'Cannot delete page, it is used in configuration %s.', + 'Cannot delete page, it is used in configuration for %s.', + Mage::helper('adminhtml')->getUrl('adminhtml/system_config/edit', ['section' => 'web']), Mage_Cms_Helper_Page::getValidateConfigErrorMessage($isUsedInConfig), ), ); From 831e14247c357891390163d156c440c4b644bca3 Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Sun, 5 Oct 2025 22:06:04 +0200 Subject: [PATCH 18/30] Update app/code/core/Mage/Cms/Helper/Page.php --- app/code/core/Mage/Cms/Helper/Page.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/code/core/Mage/Cms/Helper/Page.php b/app/code/core/Mage/Cms/Helper/Page.php index 91ba54d5036..da6127fa95e 100644 --- a/app/code/core/Mage/Cms/Helper/Page.php +++ b/app/code/core/Mage/Cms/Helper/Page.php @@ -197,13 +197,12 @@ public static function getScopeInfoFromConfigScope(string $scope, string $scopeI return match ($scope) { Mage_Adminhtml_Block_System_Config_Form::SCOPE_DEFAULT => Mage::helper('cms')->__('Default Config'), Mage_Adminhtml_Block_System_Config_Form::SCOPE_WEBSITES => sprintf( - '%s "%s"', - Mage::helper('cms')->__('Website'), + '%s', Mage::app()->getWebsite($scopeId)->getName(), ), Mage_Adminhtml_Block_System_Config_Form::SCOPE_STORES => sprintf( '%s "%s"', - Mage::helper('cms')->__('Store View'), + Mage::app()->getStore($scopeId)->getGroup()->getName(), Mage::app()->getStore($scopeId)->getName(), ), }; From da5681f8c0f3f0ce79010e8063a8f631b5da7e6e Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Sun, 5 Oct 2025 22:41:28 +0200 Subject: [PATCH 19/30] Update store and website names in data provider --- tests/unit/Traits/DataProvider/Mage/Cms/CmsTrait.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/Traits/DataProvider/Mage/Cms/CmsTrait.php b/tests/unit/Traits/DataProvider/Mage/Cms/CmsTrait.php index 0a2b89cfab8..d6df9624f30 100644 --- a/tests/unit/Traits/DataProvider/Mage/Cms/CmsTrait.php +++ b/tests/unit/Traits/DataProvider/Mage/Cms/CmsTrait.php @@ -73,13 +73,13 @@ public function provideGetScopeInfoFromConfigScope(): Generator ]; yield 'websites' => [ - 'Website', + 'Main Website', Mage_Adminhtml_Block_System_Config_Form::SCOPE_WEBSITES, '1', ]; yield 'stores' => [ - 'Store View', + 'Main Website', Mage_Adminhtml_Block_System_Config_Form::SCOPE_STORES, '1', ]; From 3f0e2115f0497753d289efc5aac5b53cfdc10d6f Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Sun, 5 Oct 2025 22:56:48 +0200 Subject: [PATCH 20/30] Refactor getScopeInfoFromConfigScope method --- app/code/core/Mage/Cms/Helper/Page.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/code/core/Mage/Cms/Helper/Page.php b/app/code/core/Mage/Cms/Helper/Page.php index da6127fa95e..1cd1f559e5e 100644 --- a/app/code/core/Mage/Cms/Helper/Page.php +++ b/app/code/core/Mage/Cms/Helper/Page.php @@ -196,10 +196,7 @@ public static function getScopeInfoFromConfigScope(string $scope, string $scopeI { return match ($scope) { Mage_Adminhtml_Block_System_Config_Form::SCOPE_DEFAULT => Mage::helper('cms')->__('Default Config'), - Mage_Adminhtml_Block_System_Config_Form::SCOPE_WEBSITES => sprintf( - '%s', - Mage::app()->getWebsite($scopeId)->getName(), - ), + Mage_Adminhtml_Block_System_Config_Form::SCOPE_WEBSITES => Mage::app()->getWebsite($scopeId)->getName(), Mage_Adminhtml_Block_System_Config_Form::SCOPE_STORES => sprintf( '%s "%s"', Mage::app()->getStore($scopeId)->getGroup()->getName(), From 8bcd591f58b837f7089741701d3560009457fe60 Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Mon, 13 Oct 2025 16:09:32 +0200 Subject: [PATCH 21/30] removed od files --- .../openmage/backend/customer/groups.cy.js | 24 --- cypress/support/openmage/backend/catalog.js | 100 --------- cypress/support/openmage/backend/cms.js | 101 --------- cypress/support/openmage/backend/customer.js | 58 ----- .../support/openmage/backend/newsletter.js | 58 ----- cypress/support/openmage/backend/promo.js | 49 ----- cypress/support/openmage/backend/sales.js | 76 ------- cypress/support/openmage/backend/system.js | 202 ------------------ cypress/support/openmage/frontend/paths.js | 28 --- 9 files changed, 696 deletions(-) delete mode 100644 cypress/e2e/openmage/backend/customer/groups.cy.js delete mode 100644 cypress/support/openmage/backend/catalog.js delete mode 100644 cypress/support/openmage/backend/cms.js delete mode 100644 cypress/support/openmage/backend/customer.js delete mode 100644 cypress/support/openmage/backend/newsletter.js delete mode 100644 cypress/support/openmage/backend/promo.js delete mode 100644 cypress/support/openmage/backend/sales.js delete mode 100644 cypress/support/openmage/backend/system.js delete mode 100644 cypress/support/openmage/frontend/paths.js diff --git a/cypress/e2e/openmage/backend/customer/groups.cy.js b/cypress/e2e/openmage/backend/customer/groups.cy.js deleted file mode 100644 index f7be987ed07..00000000000 --- a/cypress/e2e/openmage/backend/customer/groups.cy.js +++ /dev/null @@ -1,24 +0,0 @@ -const test = cy.testBackendCustomer.groups; -const check = cy.openmage.check; -const tools = cy.openmage.tools; - -describe(`Checks admin system "${test.index.title}"`, () => { - beforeEach('Log in the user', () => { - cy.adminLogIn(); - cy.adminGoToTestRoute(test, test.index); - }); - - it(`tests index route`, () => { - check.pageElements(test, test.index); - }); - - it(`tests edit route`, () => { - tools.clickGridRow(test.index._grid, 'td', 'General'); - check.pageElements(test, test.edit); - }); - - it(`tests new route`, () => { - tools.clickAction(test.index.__buttons.add); - check.pageElements(test, test.new); - }); -}); diff --git a/cypress/support/openmage/backend/catalog.js b/cypress/support/openmage/backend/catalog.js deleted file mode 100644 index 809a017349d..00000000000 --- a/cypress/support/openmage/backend/catalog.js +++ /dev/null @@ -1,100 +0,0 @@ -const defaultConfig = { - _id_parent: '#nav-admin-catalog', - _h3: 'h3.icon-head', -} - -cy.testBackendCatalog = { - products: { - _id: '#nav-admin-catalog-products', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'Manage Products', - url: 'catalog_product/index', - _grid: '#productGrid_table', - __buttons: { - add: 'button[title="Add Product"]', - }, - }, - edit: { - title: 'Plaid Cotton', - url: 'catalog_product/edit', - }, - new: { - title: 'New Product', - url: 'catalog_product/new', - }, - }, - categories: { - _id: '#nav-admin-catalog-categories', - _id_parent: defaultConfig._id_parent, - _h3: '#category-edit-container ' + defaultConfig._h3, - index: { - title: 'New Root Category', - url: 'catalog_category/index', - }, - }, - search: { - _id: '#nav-admin-catalog-search', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'Search', - url: 'catalog_search/index', - _grid: '#catalog_search_grid_table', - __buttons: { - add: '.form-buttons button[title="Add New Search Term"]', - }, - }, - edit: { - title: 'Edit Search', - url: 'catalog_search/edit', - }, - new: { - title: 'New Search', - url: 'catalog_search/new', - }, - }, - sitemap: { - _id: '#nav-admin-catalog-sitemap', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'Google Sitemap', - url: 'sitemap/index', - _grid: '#sitemapGrid_table', - __buttons: { - add: '.form-buttons button[title="Add Sitemap"]', - }, - }, - edit: { - title: 'Edit Sitemap', - url: 'sitemap/edit', - }, - new: { - title: 'New Sitemap', - url: 'sitemap/edit', - }, - }, - urlrewrite: { - _id: '#nav-admin-catalog-urlrewrite', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'URL Rewrite Management', - url: 'urlrewrite/index', - _grid: '#urlrewriteGrid_table', - __buttons: { - add: '.form-buttons button[title="Add URL Rewrite"]', - }, - }, - edit: { - title: 'Edit URL Rewrite', - url: 'urlrewrite/edit', - }, - new: { - title: 'Add New URL Rewrite', - url: 'urlrewrite/edit', - }, - }, -} diff --git a/cypress/support/openmage/backend/cms.js b/cypress/support/openmage/backend/cms.js deleted file mode 100644 index cc8f606739f..00000000000 --- a/cypress/support/openmage/backend/cms.js +++ /dev/null @@ -1,101 +0,0 @@ -const defaultConfig = { - _id_parent: '#nav-admin-cms', - _h3: 'h3.icon-head', - block: { - __fields: { - block_title : { - selector: '#block_title', - }, - block_identifier : { - selector: '#block_identifier', - }, - }, - }, -} - -cy.testBackendCms = { - block: { - _id: '#nav-admin-cms-block', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'Static Blocks', - url: 'cms_block/index', - _grid: '#cmsBlockGrid_table', - __buttons: { - add: '.form-buttons button[title="Add New Block"]', - }, - }, - edit: { - title: 'Edit Block', - url: 'cms_block/new', - }, - new: { - title: 'New Block', - url: 'cms_block/new', - }, - }, - page: { - _id: '#nav-admin-cms-page', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'Manage Pages', - url: 'cms_page/index', - _grid: '#cmsPageGrid', - __buttons: { - add: '.form-buttons button[title="Add New Page"]', - }, - }, - edit: { - title: 'Edit Page', - url: 'cms_page/edit', - __buttons: { - delete: '.form-buttons button[title="Delete Page"]', - save: '.form-buttons button[title="Save Page"]', - saveAndContinue: '.form-buttons button[title="Save and Continue Edit"]', - reset: '.form-buttons button[title="Reset"]', - }, - disablePage: () => { - cy.log('Disable the CMS page'); - cy.get('#page_is_active') - .select('Disabled'); - }, - resetStores: () => { - cy.log('Restore the default store to the CMS page'); - cy.get('#page_store_id') - .select([1, 2, 3]); - }, - }, - new: { - title: 'New Page', - url: 'cms_page/new', - __buttons: { - save: '.form-buttons button[title="Save Page"]', - saveAndContinue: '.form-buttons button[title="Save and Continue Edit"]', - reset: '.form-buttons button[title="Reset"]', - }, - }, - }, - widget: { - _id: '#nav-admin-cms-widget_instance', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'Manage Widget Instances', - url: 'widget_instance/index', - _grid: '#widgetInstanceGrid_table', - __buttons: { - add: '.form-buttons button[title="Add New Widget Instance"]', - }, - }, - edit: { - title: 'Widget', - url: 'widget_instance/new', - }, - new: { - title: 'New Widget Instance', - url: 'widget_instance/new', - }, - } -} diff --git a/cypress/support/openmage/backend/customer.js b/cypress/support/openmage/backend/customer.js deleted file mode 100644 index 443bef131b8..00000000000 --- a/cypress/support/openmage/backend/customer.js +++ /dev/null @@ -1,58 +0,0 @@ -const defaultConfig = { - _id_parent: '#nav-admin-customer', - _h3: 'h3.icon-head', -} - -cy.testBackendCustomer = { - customer: { - _id: '#nav-admin-customer-manage', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'Manage Customers', - url: 'customer/index', - _grid: '#customerGrid_table', - __buttons: { - add: '.form-buttons button[title="Add New Customer"]', - }, - }, - edit: { - title: 'John Smith', - url: 'customer/edit', - }, - new: { - title: 'New Customer', - url: 'customer/new', - }, - }, - groups: { - _id: '#nav-admin-customer-group', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'Customer Groups', - url: 'customer_group/index', - _grid: '#customerGroupGrid_table', - __buttons: { - add: '.form-buttons button[title="Add New Customer Group"]', - }, - }, - edit: { - title: 'Edit Customer Group', - url: 'customer_group/edit', - }, - new: { - title: 'New Customer Group', - url: 'customer_group/new', - }, - }, - online: { - _id: '#nav-admin-customer-online', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'Online Customers', - url: 'customer_online/index', - }, - }, -} diff --git a/cypress/support/openmage/backend/newsletter.js b/cypress/support/openmage/backend/newsletter.js deleted file mode 100644 index 9b4aeaebdad..00000000000 --- a/cypress/support/openmage/backend/newsletter.js +++ /dev/null @@ -1,58 +0,0 @@ -const defaultConfig = { - _id_parent: '#nav-admin-newsletter', - _h3: 'h3.icon-head', -} - -cy.testBackendNewsletter = { - templates: { - _id: '#nav-admin-newsletter-template', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'Newsletter Templates', - url: 'newsletter_template/index', - _grid: '#newsletterTemplateGrid_table', - __buttons: { - add: '.form-buttons button[title="Add New Template"]', - }, - }, - edit: { - title: 'Edit Newsletter Template', - url: 'newsletter_template/edit', - }, - new: { - title: 'New Newsletter Template', - url: 'newsletter_template/new', - }, - }, - queue: { - _id: '#nav-admin-newsletter-queue', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'Newsletter Queue', - url: 'newsletter_queue/index', - _grid: '#queueGrid_table', - }, - }, - subscriber: { - _id: '#nav-admin-newsletter-subscriber', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'Newsletter Subscribers', - url: 'newsletter_subscriber/index', - _grid: '#subscriberGrid_table', - }, - }, - report: { - _id: '#nav-admin-newsletter-problem', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'Newsletter Problem Reports', - url: 'newsletter_problem/index', - _grid: '#problemGrid_table', - }, - }, -} diff --git a/cypress/support/openmage/backend/promo.js b/cypress/support/openmage/backend/promo.js deleted file mode 100644 index 9126a20bb37..00000000000 --- a/cypress/support/openmage/backend/promo.js +++ /dev/null @@ -1,49 +0,0 @@ -const defaultConfig = { - _id_parent: '#nav-admin-promo', - _h3: 'h3.icon-head', -} - -cy.testBackendPromo = { - catalog: { - _id: '#nav-admin-promo-catalog', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'Catalog Price Rules', - url: 'promo_catalog/index', - _grid: '#promo_catalog_grid', - __buttons: { - add: '.form-buttons button[title="Add New Rule"]', - }, - }, - edit: { - title: 'Edit Rule', - url: 'promo_catalog/edit', - }, - new: { - title: 'New Rule', - url: 'promo_catalog/new', - }, - }, - quote: { - _id: '#nav-admin-promo-quote', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'Shopping Cart Price Rules', - url: 'promo_quote/index', - _grid: '#promo_quote_grid_table', - __buttons: { - add: '.form-buttons button[title="Add New Rule"]', - }, - }, - edit: { - title: 'Edit Rule', - url: 'promo_quote/edit', - }, - new: { - title: 'New Rule', - url: 'promo_quote/new', - }, - }, -} diff --git a/cypress/support/openmage/backend/sales.js b/cypress/support/openmage/backend/sales.js deleted file mode 100644 index 97f9cc3f336..00000000000 --- a/cypress/support/openmage/backend/sales.js +++ /dev/null @@ -1,76 +0,0 @@ -const defaultConfig = { - _id_parent: '#nav-admin-sales', - _h3: 'h3.icon-head', -} - -cy.testBackendSales = { - creditmemo: { - _id: '#nav-admin-sales-creditmemo', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'Credit Memos', - url: 'sales_creditmemo/index', - _grid: '#sales_creditmemo_grid_table', - }, - view: { - title: 'Credit Memo #', - url: 'sales_creditmemo/edit', - }, - }, - invoice: { - _id: '#nav-admin-sales-invoice', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'Invoice', - url: 'sales_invoice/index', - _grid: '#sales_invoice_grid_table', - }, - view: { - title: 'Invoice #', - url: 'sales_invoice/view', - }, - }, - order: { - _id: '#nav-admin-sales-order', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'Orders', - url: 'sales_order/index', - _grid: '#sales_order_grid_table', - __buttons: { - new: '.form-buttons button[title="Create New Order"]', - }, - }, - view: { - title: 'Order #', - url: 'sales_order/view', - }, - }, - shipment: { - _id: '#nav-admin-sales-shipment', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'Shipments', - url: 'sales_shipment/index', - _grid: '#sales_shipment_grid_table', - }, - view: { - title: 'Shipment #', - url: 'sales_shipment/view', - }, - }, - transactions: { - _id: '#nav-admin-sales-transactions', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'Transactions', - url: 'sales_transactions/index', - _grid: '#order_transactions_table', - }, - }, -} diff --git a/cypress/support/openmage/backend/system.js b/cypress/support/openmage/backend/system.js deleted file mode 100644 index 0646b203528..00000000000 --- a/cypress/support/openmage/backend/system.js +++ /dev/null @@ -1,202 +0,0 @@ -const defaultConfig = { - _id_parent: '#nav-admin-system', - _h3: 'h3.icon-head', -} - -cy.testBackendSystem = { - cache: { - _id: '#nav-admin-system-cache', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'Cache Storage Management', - url: 'cache/index', - _grid: '#cache_grid_table', - __buttons: { - flushApply: '.form-buttons button[title="Flush & Apply Updates"]', - flushCache: '.form-buttons button[title="Flush Cache Storage"]', - }, - }, - }, - design: { - _id: '#nav-admin-system-design', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'Design', - url: 'system_design/index', - _grid: '#designGrid_table', - __buttons: { - add: '.form-buttons button[title="Add Design Change"]', - }, - }, - edit: { - title: 'Edit Design Change', - url: 'system_design/edit', - }, - new: { - title: 'New Design Change', - url: 'system_design/new', - }, - }, - email: { - _id: '#nav-admin-system-email_template', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'Transactional Emails', - url: 'system_email_template/index', - _grid: '#systemEmailTemplateGrid_table', - __buttons: { - add: '.form-buttons button[title="Add New Template"]', - }, - }, - edit: { - title: 'Edit Email Template', - url: 'system_email_template/edit', - }, - new: { - title: 'New Email Template', - url: 'system_email_template/new', - }, - }, - myaccount: { - _id: '#nav-admin-system-myaccount', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'My Account', - url: 'system_account/index', - __buttons: { - save: '.form-buttons button[title="Save Account"]', - }, - __validation: { - _input: { - username: '#username', - firstname: '#firstname', - lastname: '#lastname', - email: '#email', - current_password: '#current_password', - } - } - - }, - }, - manage_curreny: { - _id: '#nav-admin-system-currency-rates', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'Manage Currency Rates', - url: 'system_currency/index', - __buttons: { - save: '.form-buttons button[title="Save Currency Rates"]', - }, - __validation: { - _input: { - from: 'input[name="rate[USD][EUR]"]', - } - } - }, - }, - notification: { - _id: '#nav-admin-system-adminnotification', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'Messages Inbox', - url: 'notification/index', - _grid: '#notificationGrid_table', - }, - }, - indexes: { - _id: '#nav-admin-system-index', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - list: { - title: 'Index Management', - url: 'process/list', - _grid: '#indexer_processes_grid_table', - }, - }, - stores: { - _id: '#nav-admin-system-store', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'Manage Stores', - url: 'system_store/index', - __buttons: { - addWebsite: '.form-buttons button[title="Create Website"]', - addStore: '.form-buttons button[title="Create Store"]', - addStoreView: '.form-buttons button[title="Create Store View"]', - }, - }, - }, - variables: { - _id: '#nav-admin-system-variable', - _id_parent: defaultConfig._id_parent, - _h3: defaultConfig._h3, - index: { - title: 'Custom Variables', - url: 'system_variable/index', - _grid: '#customVariablesGrid', - __buttons: { - add: '.form-buttons button[title="Add New Variable"]', - }, - }, - edit: { - title: 'Custom Variable', - url: 'system_variable/edit', - }, - new: { - title: 'New Custom Variable', - url: 'system_variable/new', - }, - }, - config: { - _buttonSave: '.form-buttons button[title="Save Config"]', - catalog: { - configswatches: { - _id: '#section-configswatches', - url: 'system_config/edit/section/configswatches', - h3: 'Configurable Swatches', - _h3: defaultConfig._h3, - }, - sitemap: { - _id: '#section-sitemap', - url: 'system_config/edit/section/sitemap', - h3: 'Google Sitemap', - _h3: defaultConfig._h3, - __validation: { - priority: { - _input: { - category: '#sitemap_category_priority', - product: '#sitemap_product_priority', - page: '#sitemap_page_priority', - } - } - } - } - }, - customers: { - promo: { - _id: '#section-promo', - url: 'system_config/edit/section/promo', - h3: 'Promotions', - _h3: defaultConfig._h3, - __validation: { - __groups: { - couponCodes: { - _id: '#promo_auto_generated_coupon_codes-head', - _input: { - length: '#promo_auto_generated_coupon_codes_length', - dashes: '#promo_auto_generated_coupon_codes_dash', - } - } - } - } - }, - }, - } -} diff --git a/cypress/support/openmage/frontend/paths.js b/cypress/support/openmage/frontend/paths.js deleted file mode 100644 index 3f3969f108c..00000000000 --- a/cypress/support/openmage/frontend/paths.js +++ /dev/null @@ -1,28 +0,0 @@ -cy.testFrontend = { - homepage: { - url: '/', - newsletter: { - _buttonSubmit: '#newsletter-validate-detail button[type="submit"]', - _id: '#newsletter' - } - }, - customer: { - account: { - create: { - url: '/customer/account/create', - _buttonSubmit: '#form-validate button[type="submit"]', - _h1: 'h1', - h1: 'Create an Account', - __validation: { - _input: { - firstname: '#firstname', - lastname: '#lastname', - email_address: '#email_address', - password: '#password', - confirmation: '#confirmation', - } - } - } - } - } -} From 517a05d116ac3a3cb425f1f6f5c21deae76b2f44 Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Mon, 13 Oct 2025 16:12:09 +0200 Subject: [PATCH 22/30] updated css --- skin/adminhtml/default/openmage/override.css | 16 ++++++++++++++++ skin/adminhtml/default/openmage/override.css.map | 2 +- .../default/openmage/scss/override.scss | 16 ++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/skin/adminhtml/default/openmage/override.css b/skin/adminhtml/default/openmage/override.css index 4189487f428..f13170f0cbd 100644 --- a/skin/adminhtml/default/openmage/override.css +++ b/skin/adminhtml/default/openmage/override.css @@ -747,6 +747,10 @@ div.autocomplete ul li.selected { border: 1px solid #dfc97a !important; color: #2f2f2f !important; } +.notice-msg a { + color: #2f2f2f !important; + text-decoration: underline; +} .error-msg { background-image: url(images/icon-error.png) !important; @@ -757,6 +761,10 @@ div.autocomplete ul li.selected { border: 1px solid #963535 !important; color: #963535 !important; } +.error-msg a { + color: #963535 !important; + text-decoration: underline; +} .success-msg { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' style='width:24px;height:24px' viewBox='0 0 24 24'%3E%3Cpath fill='%23185b00' d='M9,20.42L2.79,14.21L5.62,11.38L9,14.77L18.88,4.88L21.71,7.71L9,20.42Z' /%3E%3C/svg%3E") !important; @@ -767,6 +775,10 @@ div.autocomplete ul li.selected { border: 1px solid #ceceb6 !important; color: #185b00 !important; } +.success-msg a { + color: #185b00 !important; + text-decoration: underline; +} .warning-msg { background-image: url(images/information-variant.svg) !important; @@ -777,6 +789,10 @@ div.autocomplete ul li.selected { border: 1px solid #d87e34 !important; color: #2f2f2f !important; } +.warning-msg a { + color: #2f2f2f !important; + text-decoration: underline; +} .links-feed { margin-top: 10px; diff --git a/skin/adminhtml/default/openmage/override.css.map b/skin/adminhtml/default/openmage/override.css.map index 4ed9303b689..be500dc20ec 100644 --- a/skin/adminhtml/default/openmage/override.css.map +++ b/skin/adminhtml/default/openmage/override.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["scss/override.scss","scss/_variables.scss","scss/_base.scss","scss/_fonts.scss"],"names":[],"mappings":"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","file":"override.css"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["../../../../../../skin/adminhtml/default/openmage/scss/override.scss","../../../../../../skin/adminhtml/default/openmage/scss/_variables.scss","../../../../../../skin/adminhtml/default/openmage/scss/_base.scss","../../../../../../skin/adminhtml/default/openmage/scss/_fonts.scss"],"names":[],"mappings":"AAAA;AAAA;AAAA;AAAA;AC+FA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACzFA;EACE,ODiDgB;EChDhB;EACA,YDLuB;;;ACUzB;EACE;EACA;EAEA;EACA;;;AAKF;EACE;EACA,OD8BgB;EC7BhB;EACA;;;AAKF;EACE,YD3BmB;EC4BnB,ODqBgB;ECpBhB;EACA;;;AAKF;EACE;EACA,YDnCqB;ECoCrB;;;AAKF;EACE;EACA;EACA;EACA;EACA;;;AAKF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAgBF;EACE,YDrEU;ECsEV,OD9BgB;ECgChB;;;AAKF;EACE,ODtCgB;ECuChB;EACA;EACA;;;AAKF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAKF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAKF;EAEE;EACA;EACA;EACA;EAEA;;;AAKF;EACE;EACA;EACA;;;AAKF;EACE;EACA;;;AAKF;EACE;EACA,YD/HwB;ECgIxB,ODlFM;;;AC0NR;EACE,kBD3NM;EC4NN;EAEA;;;AC9SF;EACE;EACA,wLAE4D;EAC5D;EACA;;AAGF;EACE;EACA,8LAE8D;EAC9D;EACA;;AAGF;EACE;EACA,qLAE2D;EAC3D;EACA;;AAEF;EACE;EACA,iMAE+D;EAC/D;EACA;;AHpBF;EACE,OC2CgB;ED1ChB;;;AAGF;EACE,OCsCgB;EDrChB;;;AAGF;EACE,OCiCgB;EDhChB;;;AAGF;EACE,OC4BgB;ED3BhB;;;AAGF;EACE,OCuBgB;EDtBhB;;;AAGF;EACE,OCkBgB;EDjBhB;;;AAGF;EACE,OCagB;EDZhB;;;AAGF;EACE;EACA,OC5C0B;ED6C1B;;AAEA;EACE,OChDwB;;ADmD1B;EACE,OCnDkB;EDoDlB;;AAGF;EACE,OCxDkB;EDyDlB;;AAGF;EACE,OC7DkB;ED8DlB;;AAGF;EACE;;;AAIJ;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA,OC9BgB;;;ADiClB;EACE;EACA;EACA;;;AAGF;EAEE;;;AAOF;EAEE,YCtGuB;EDuGvB;;;AAOF;EACE;EACA;;AAMA;EACE;;AAGF;EACE;;AAGF;EACE;;;AAIJ;EAEE;EACA;;AACA;EAEE;EACA;;;AAIJ;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;;AAKE;EACE,OC/GY;EDgHZ;EACA;EACA;;AAGF;EACE;;AAEA;EACE;;AAYJ;EACE;EACA;EACA;EACA;;AAkBJ;EACE;EACA;;AAEA;EACE;;AAEA;EACE;;AAIJ;EACE;EACA,YCjJE;EDkJF;;AAEA;EACE;;AAGF;EACE;;AAIJ;EACE;EACA,YC/JE;;ADmKF;EACE,YCzOkB;;AD4OpB;EACE,YC7OkB;;ADgPpB;EACE,YCjPkB;;ADuPtB;EACE;;AAEA;EACE;EACA;;AAEA;EACE;;AAKF;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAIJ;EEaJ,cFZyD;EEazD;EACA,OFdyD;EEezD;EACA,QFhB8D;EACxD;;AAIJ;EACE,YCzSiB;ED0SjB;;AAEA;EACE;EACA;EACA;EACA,OC5OA;ED6OA;;AAEA;EACE,OChPF;EDiPE;;AAEA;EACE,OC5TS;;ADkUT;EACE;;AAEA;EAEE;EACA;;AAQJ;EACE;;AAEA;EAEE;EACA;;AAMR;EACE,OCrRF;EDsRE;;AAMJ;EACE,YCpWe;;ADuWjB;EACE,YCxWe;;AD8WnB;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAIJ;EACE;;;AAIJ;EACE,YCjZmB;EDkZnB;;;AAGF;EACE;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;;;AAKN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;;AACA;EACE;EACA;EACA;EACA,kBCxWE;EDyWF;EACA;EAEA;EAEA;;AACA;EACE;;AAWR;EACE,YCncqB;EDocrB;EACA;EACA;EACA;;;AAIA;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAEA;EACE,YCrde;EDsdf;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA,YC3da;ED4db;;AAMR;EACE;EACA,OCxbc;EDybd;;AAEA;EACE,YCpaE;EDqaF;;AAGF;EACE,YCzaE;ED0aF,OClcY;EDmcZ;EACA;;AAEA;EAEE;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAOF;EACE;;AAEA;EACE;EACA;;AAMR;EACE;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA,YC1hBmB;ED2hBnB,OCvdI;;;AD2dR;EACE,YC5dM;ED6dN;;;AAGF;EACE,YChjBmB;EDijBnB;;;AAIA;EACE;;AAEA;EAEE;EACA;;AAMA;EAEE;;AAaN;EACE;EAEA;;AAEA;EACE,OC/hBY;;ADiiBZ;EACE,YCjlBe;;;AD0lBjB;EACE;;AAGF;EACE;;AAEA;EACE;EACA,OCpjBQ;EDqjBR;EACA;EACA;;AAOF;EACE,YCniBe;;ADsiBjB;EACE,YCpnBW;;ADwnBf;EACE,YC5iBiB;;ADkjBrB;EACE;EACA;EAEA;;AAGE;EACE;;AAGF;EACE;;AAIJ;EACE;;AAIJ;EACE;;;AAKN;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;;AAGF;EACE;;;AAIJ;EACE;;;AAGF;EACE;;;AAIA;EACE;;AAEA;EACE,OCzoBY;;AD6oBhB;EACE,YC9rBiB;ED+rBjB,OC/oBc;;;ADopBhB;EACE;;AAGF;EACE;;;AAIJ;EACE;;AACA;EACE;EACA;EACA;EACA;EACA;EACA,YCzsBO;ED0sBP,OCtqBc;;ADwqBhB;EACE;EACA;EACA;EACA;EACA,OC7qBc;ED8qBd,YCtpBI;EDupBJ;EACA;;;AAIJ;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE,YClvBqB;EDmvBrB;;;AAGF;EACE,YChrBM;;;ADmrBR;EACE,YCprBM;;;ADwrBN;EACE;EACA;EACA;EACA;;AAGF;EACE;;;AAIJ;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;;;AAIJ;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;;;AAIJ;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;;;AAIJ;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;;;AAIJ;EACE;;;AAGF;EACE;EACA;EACA;;;AAIA;EACE;EACA;;AAGF;EACE;;AAGF;EACE,YCrxBI;EDsxBJ;;;AAIJ;EACE,YCv2BuB;;;AD02BzB;EACE;EACA;;AACA;EACE;;AACA;EACE,YCnzBS;;ADszBb;EACE;;;AAGJ;EACE;;;AAGF;EACE,kBChzBM;EDizBN;EACA;;AAEA;EACE;EACA;EACA;EAEA;;;AAIJ;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAMA;EAEE;EACA,YC93BiB;ED+3BjB,OCh1BI;;;ADu1BN;EAEE;EACA,YCr5BqB;EDs5BrB,OC31BI;;;ADk3BN;EACE;;AAGF;EACE;EACA,YCx3BI;;AD03BJ;EACE;;AAIJ;EACE,YCh4BI;EDi4BJ,qBCj4BI;;;ADq4BR;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA,YCv9BqB;EDw9BrB;;;AAGF;EACE;;;AAOF;EACE;;;AAGF;EACE;;;AAGF;EAEE;;AAEA;EAEE;EACA;;AAWF;EAEE;;AAQJ;EACE;EACA,YCl8BM;EDm8BN;;AAEA;EACE;;;AAIJ;EACE;;AAEA;EACE,OCt+Bc;;;AD0+BlB;EACE;;;AAGF;EACE,YCv9BM;EDw9BN;;AAEA;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;;;AAIJ;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;;AAEA;EACE;;AAGF;EACE;;;AAIJ;EACE;;;AAIA;EExxBA,cFyxBmD;EExxBnD;EACA,OFuxBmD;EEtxBnD;EACA,QFqxBwD;;;AAG1D;EE5xBE,cF6xBoD;EE5xBpD;EACA,OF2xBoD;EE1xBpD;EACA,QFyxByD;;;AAE3D;EACE,YC3gCM;;;AD8gCR;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;;AAEE;EACE,OC/hCE;;ADiiCJ;EACE;EACA;EACA;;AACA;EACE;EACA;;AAIN;EACE,YC5iCI;;AD8iCF;EACE;EACA;;;AAON;EE50BA,cF60ByD;EE50BzD;EACA,OF20ByD;EE10BzD;EACA,QFy0B8D;;AAE9D;EE/0BA,cFg1B0D;EE/0B1D;EACA,OF80B0D;EE70B1D;EACA,QF40B+D;;AAE/D;EEl1BA,cFm1BuD;EEl1BvD;EACA,OFi1BuD;EEh1BvD;EACA,QF+0B4D;EAC1D;;AAEF;EEt1BA,cFu1BwD;EEt1BxD;EACA,OFq1BwD;EEp1BxD;EACA,QFm1B6D;EAC3D;;;AAMF;EE91BA,cF+1ByD;EE91BzD;EACA,OF61ByD;EE51BzD;EACA,QF21B8D;;;AAIhE;EEn2BE,cFo2BmD;EEn2BnD;EACA,OFk2BmD;EEj2BnD;EACA,QFg2BwD;;;AAG1D;EACE;;;AAGF;EACE;;;AAGF;EACE;AAAA;IACyB","file":"override.css"} \ No newline at end of file diff --git a/skin/adminhtml/default/openmage/scss/override.scss b/skin/adminhtml/default/openmage/scss/override.scss index 076ca1acda3..641d2827533 100644 --- a/skin/adminhtml/default/openmage/scss/override.scss +++ b/skin/adminhtml/default/openmage/scss/override.scss @@ -795,6 +795,10 @@ div { background-position: 8px center !important; border: 1px solid $color_chenin_approx !important; color: $color_dark_grey !important; + a { + color: $color_dark_grey !important; + text-decoration: underline; + } } .error-msg { @@ -806,6 +810,10 @@ div { background-position: 8px center !important; border: 1px solid $color_sanguine_brown_approx !important; color: $color_sanguine_brown_approx !important; + a { + color: $color_sanguine_brown_approx !important; + text-decoration: underline; + } } .success-msg { @@ -817,6 +825,10 @@ div { background-position: 8px center !important; border: 1px solid $color_foggy_gray_approx !important; color: $color_san_felix_approx !important; + a { + color: $color_san_felix_approx !important; + text-decoration: underline; + } } .warning-msg { @@ -828,6 +840,10 @@ div { background-position: 8px center !important; border: 1px solid $color_brandy_punch_approx !important; color: $color_dark_grey !important; + a { + color: $color_dark_grey !important; + text-decoration: underline; + } } .links-feed { From ad025c1a0e37340e55a16d7416d2c3fdb26f57a5 Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Tue, 14 Oct 2025 07:44:05 +0200 Subject: [PATCH 23/30] translation --- app/locale/en_US/Mage_Cms.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/locale/en_US/Mage_Cms.csv b/app/locale/en_US/Mage_Cms.csv index d106bdd764f..161f2aabd6d 100644 --- a/app/locale/en_US/Mage_Cms.csv +++ b/app/locale/en_US/Mage_Cms.csv @@ -27,10 +27,10 @@ "CMS Static Block","CMS Static Block" "CMS Static Block Default Template","CMS Static Block Default Template" "Cannot create new directory.","Cannot create new directory." -"Cannot delete page, it is used in configuration %s.","Cannot delete page, it is used in configuration %s." +"Cannot delete page, it is used in configuration for %s.","Cannot delete page, it is used in configuration for %s." "Cannot delete directory %s.","Cannot delete directory %s." "Cannot delete root directory %s.","Cannot delete root directory %s." -"Cannot disable page, it is used in configuration %s.","Cannot disable page, it is used in configuration %s." +"Cannot disable page, it is used in configuration for %s.","Cannot disable page, it is used in configuration for %s." "Cannot upload file.","Cannot upload file." "Collapse All","Collapse All" "Content","Content" From f924b0fe0bf9d0a6a127b7d8d4b645d8fc248862 Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Tue, 14 Oct 2025 07:52:23 +0200 Subject: [PATCH 24/30] rector --- app/code/core/Mage/Cms/Helper/Page.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/core/Mage/Cms/Helper/Page.php b/app/code/core/Mage/Cms/Helper/Page.php index 5301eeaf145..452ae3a45e5 100644 --- a/app/code/core/Mage/Cms/Helper/Page.php +++ b/app/code/core/Mage/Cms/Helper/Page.php @@ -234,6 +234,7 @@ public static function getValidateConfigErrorMessage(Mage_Core_Model_Resource_Db implode(', ', $scopes), ); } + unset($data, $path, $items, $item, $scopes); return implode(', ', $messages); From 0bd62a0fded41e2f7114b681ca2119b4fde1cd5b Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Wed, 22 Oct 2025 17:47:17 +0200 Subject: [PATCH 25/30] Apply suggestions from code review --- app/code/core/Mage/Cms/Helper/Page.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/core/Mage/Cms/Helper/Page.php b/app/code/core/Mage/Cms/Helper/Page.php index 452ae3a45e5..30f606b18a3 100644 --- a/app/code/core/Mage/Cms/Helper/Page.php +++ b/app/code/core/Mage/Cms/Helper/Page.php @@ -200,7 +200,7 @@ public static function getScopeInfoFromConfigScope(string $scope, string $scopeI Mage_Adminhtml_Block_System_Config_Form::SCOPE_DEFAULT => Mage::helper('cms')->__('Default Config'), Mage_Adminhtml_Block_System_Config_Form::SCOPE_WEBSITES => Mage::app()->getWebsite($scopeId)->getName(), Mage_Adminhtml_Block_System_Config_Form::SCOPE_STORES => sprintf( - '%s "%s"', + '%s - %s', Mage::app()->getStore($scopeId)->getGroup()->getName(), Mage::app()->getStore($scopeId)->getName(), ), @@ -229,7 +229,7 @@ public static function getValidateConfigErrorMessage(Mage_Core_Model_Resource_Db } $messages[] = sprintf( - '"%s" (%s)', + '%s (%s)', self::getConfigLabelFromConfigPath($path), implode(', ', $scopes), ); From a416adeb3ddc6caff582bf52b3f55e2356556ec6 Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Wed, 22 Oct 2025 18:05:07 +0200 Subject: [PATCH 26/30] wording --- app/code/core/Mage/Cms/Model/Resource/Page.php | 13 +++++++++---- app/locale/en_US/Mage_Cms.csv | 4 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/app/code/core/Mage/Cms/Model/Resource/Page.php b/app/code/core/Mage/Cms/Model/Resource/Page.php index 08fa5654228..e514aa069d6 100644 --- a/app/code/core/Mage/Cms/Model/Resource/Page.php +++ b/app/code/core/Mage/Cms/Model/Resource/Page.php @@ -39,8 +39,8 @@ protected function _beforeDelete(Mage_Core_Model_Abstract $object) $object->setId(null); Mage::throwException( Mage::helper('cms')->__( - 'Cannot delete page, it is used in configuration for %s.', - Mage::helper('adminhtml')->getUrl('adminhtml/system_config/edit', ['section' => 'web']), + 'You cannot delete this the page as it is used for configuration for %s.', + Mage::helper('adminhtml')::getUrl('adminhtml/system_config/edit', ['section' => 'web']), Mage_Cms_Helper_Page::getValidateConfigErrorMessage($isUsedInConfig), ), ); @@ -80,8 +80,8 @@ protected function _beforeSave(Mage_Core_Model_Abstract $object) $object->setIsActive(true); Mage::getSingleton('adminhtml/session')->addWarning( Mage::helper('cms')->__( - 'Cannot disable page, it is used in configuration for %s.', - Mage::helper('adminhtml')->getUrl('adminhtml/system_config/edit', ['section' => 'web']), + 'You cannot disable this page as it is used for configuration for %s.', + Mage::helper('adminhtml')::getUrl('adminhtml/system_config/edit', ['section' => 'web']), Mage_Cms_Helper_Page::getValidateConfigErrorMessage($isUsedInConfig), ), ); @@ -113,6 +113,7 @@ protected function _beforeSave(Mage_Core_Model_Abstract $object) /** * @param Mage_Cms_Model_Page $object * @inheritDoc + * @throws Zend_Db_Exception */ protected function _afterSave(Mage_Core_Model_Abstract $object) { @@ -187,6 +188,7 @@ protected function _afterLoad(Mage_Core_Model_Abstract $object) * @param mixed $value * @param Mage_Cms_Model_Page $object * @return Zend_Db_Select + * @throws Exception */ protected function _getLoadSelect($field, $value, $object) { @@ -238,6 +240,7 @@ protected function _getLoadByIdentifierSelect($identifier, $store, $isActive = n /** * Check for unique of identifier of page to selected store(s). * + * @param Mage_Cms_Model_Page $object * @return bool */ public function getIsUniquePageToStores(Mage_Core_Model_Abstract $object) @@ -330,6 +333,7 @@ public function checkIdentifier($identifier, $storeId) * * @param string|int $identifier * @return string + * @throws Mage_Core_Model_Store_Exception */ public function getCmsPageTitleByIdentifier($identifier) { @@ -422,6 +426,7 @@ public function setStore($store) * Retrieve store model * * @return Mage_Core_Model_Store + * @throws Mage_Core_Model_Store_Exception */ public function getStore() { diff --git a/app/locale/en_US/Mage_Cms.csv b/app/locale/en_US/Mage_Cms.csv index 161f2aabd6d..c8479e280ff 100644 --- a/app/locale/en_US/Mage_Cms.csv +++ b/app/locale/en_US/Mage_Cms.csv @@ -27,10 +27,8 @@ "CMS Static Block","CMS Static Block" "CMS Static Block Default Template","CMS Static Block Default Template" "Cannot create new directory.","Cannot create new directory." -"Cannot delete page, it is used in configuration for %s.","Cannot delete page, it is used in configuration for %s." "Cannot delete directory %s.","Cannot delete directory %s." "Cannot delete root directory %s.","Cannot delete root directory %s." -"Cannot disable page, it is used in configuration for %s.","Cannot disable page, it is used in configuration for %s." "Cannot upload file.","Cannot upload file." "Collapse All","Collapse All" "Content","Content" @@ -124,4 +122,6 @@ "Unable to find a block to delete.","Unable to find a block to delete." "Unable to find a page to delete.","Unable to find a page to delete." "WYSIWYG Options","WYSIWYG Options" +"You cannot delete this the page as it is used for configuration for %s.","You cannot delete this the page as it is used for configuration for %s." +"You cannot disable this the page as it is used for configuration for %s.","You cannot disable this the page as it is used for configuration for %s." "px.","px." From 4a8de02eb2db7e5c78cd57914b8d08f2dac2d40c Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Wed, 22 Oct 2025 18:33:42 +0200 Subject: [PATCH 27/30] tests --- cypress/e2e/openmage/backend/cms/page.cy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/openmage/backend/cms/page.cy.js b/cypress/e2e/openmage/backend/cms/page.cy.js index 125cfbf166e..444b22339fa 100644 --- a/cypress/e2e/openmage/backend/cms/page.cy.js +++ b/cypress/e2e/openmage/backend/cms/page.cy.js @@ -61,7 +61,7 @@ describe(`Checks admin system "${test.index.title}"`, () => { test.edit.__buttons.saveAndContinue.click(); const success = 'The page has been saved.'; - const warning = 'Cannot disable page, it is used in configuration'; + const warning = 'You cannot disable this page as it is used for configuration for'; validation.hasWarningMessage(warning); validation.hasSuccessMessage(success); utils.screenshot(cy.openmage.validation._messagesContainer, 'message.cms.page.disableActivePage'); @@ -71,7 +71,7 @@ describe(`Checks admin system "${test.index.title}"`, () => { test.index.clickGridRow('no-route'); test.edit.__buttons.delete.click(); - const message = 'Cannot delete page'; + const message = 'You cannot delete this the page as it is used for configuration for'; const screenshot = 'message.cms.page.deleteActivePage'; validation.hasErrorMessage(message, { screenshot: true, filename: screenshot }); }); From e8f9828a3717fd002e9f544e96ec3ca89acdc3e1 Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Sun, 26 Oct 2025 21:20:29 +0100 Subject: [PATCH 28/30] wording --- app/code/core/Mage/Cms/Model/Resource/Page.php | 4 ++-- app/locale/en_US/Mage_Cms.csv | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/core/Mage/Cms/Model/Resource/Page.php b/app/code/core/Mage/Cms/Model/Resource/Page.php index e514aa069d6..3012dad35b0 100644 --- a/app/code/core/Mage/Cms/Model/Resource/Page.php +++ b/app/code/core/Mage/Cms/Model/Resource/Page.php @@ -39,7 +39,7 @@ protected function _beforeDelete(Mage_Core_Model_Abstract $object) $object->setId(null); Mage::throwException( Mage::helper('cms')->__( - 'You cannot delete this the page as it is used for configuration for %s.', + 'You cannot delete this page as it is used to configure %s.', Mage::helper('adminhtml')::getUrl('adminhtml/system_config/edit', ['section' => 'web']), Mage_Cms_Helper_Page::getValidateConfigErrorMessage($isUsedInConfig), ), @@ -80,7 +80,7 @@ protected function _beforeSave(Mage_Core_Model_Abstract $object) $object->setIsActive(true); Mage::getSingleton('adminhtml/session')->addWarning( Mage::helper('cms')->__( - 'You cannot disable this page as it is used for configuration for %s.', + 'You cannot disable this page as it is used to configure %s.', Mage::helper('adminhtml')::getUrl('adminhtml/system_config/edit', ['section' => 'web']), Mage_Cms_Helper_Page::getValidateConfigErrorMessage($isUsedInConfig), ), diff --git a/app/locale/en_US/Mage_Cms.csv b/app/locale/en_US/Mage_Cms.csv index c8479e280ff..4b3256ccb16 100644 --- a/app/locale/en_US/Mage_Cms.csv +++ b/app/locale/en_US/Mage_Cms.csv @@ -122,6 +122,6 @@ "Unable to find a block to delete.","Unable to find a block to delete." "Unable to find a page to delete.","Unable to find a page to delete." "WYSIWYG Options","WYSIWYG Options" -"You cannot delete this the page as it is used for configuration for %s.","You cannot delete this the page as it is used for configuration for %s." -"You cannot disable this the page as it is used for configuration for %s.","You cannot disable this the page as it is used for configuration for %s." +"You cannot delete this the page as it is used to configure %s.","You cannot delete this the page as it is used to configure %s." +"You cannot disable this the page as it is used to configure %s.","You cannot disable this the page as it is used to configure %s." "px.","px." From 9f724288ec3f6c6cd67d1e3872b0ccb1d9911e46 Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Sun, 26 Oct 2025 21:26:51 +0100 Subject: [PATCH 29/30] typo --- app/locale/en_US/Mage_Cms.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/locale/en_US/Mage_Cms.csv b/app/locale/en_US/Mage_Cms.csv index 4b3256ccb16..b21ead836f2 100644 --- a/app/locale/en_US/Mage_Cms.csv +++ b/app/locale/en_US/Mage_Cms.csv @@ -122,6 +122,6 @@ "Unable to find a block to delete.","Unable to find a block to delete." "Unable to find a page to delete.","Unable to find a page to delete." "WYSIWYG Options","WYSIWYG Options" -"You cannot delete this the page as it is used to configure %s.","You cannot delete this the page as it is used to configure %s." -"You cannot disable this the page as it is used to configure %s.","You cannot disable this the page as it is used to configure %s." +"You cannot delete this page as it is used to configure %s.","You cannot delete this page as it is used to configure %s." +"You cannot disable this page as it is used to configure %s.","You cannot disable this page as it is used to configure %s." "px.","px." From c9c9c94bc6391e76e94862dac7414eba61106166 Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Sun, 26 Oct 2025 21:28:54 +0100 Subject: [PATCH 30/30] test --- cypress/e2e/openmage/backend/cms/page.cy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/openmage/backend/cms/page.cy.js b/cypress/e2e/openmage/backend/cms/page.cy.js index 444b22339fa..ae3f88ba544 100644 --- a/cypress/e2e/openmage/backend/cms/page.cy.js +++ b/cypress/e2e/openmage/backend/cms/page.cy.js @@ -61,7 +61,7 @@ describe(`Checks admin system "${test.index.title}"`, () => { test.edit.__buttons.saveAndContinue.click(); const success = 'The page has been saved.'; - const warning = 'You cannot disable this page as it is used for configuration for'; + const warning = 'You cannot disable this page as it is used to configure'; validation.hasWarningMessage(warning); validation.hasSuccessMessage(success); utils.screenshot(cy.openmage.validation._messagesContainer, 'message.cms.page.disableActivePage'); @@ -71,7 +71,7 @@ describe(`Checks admin system "${test.index.title}"`, () => { test.index.clickGridRow('no-route'); test.edit.__buttons.delete.click(); - const message = 'You cannot delete this the page as it is used for configuration for'; + const message = 'You cannot delete this page as it is used to configure'; const screenshot = 'message.cms.page.deleteActivePage'; validation.hasErrorMessage(message, { screenshot: true, filename: screenshot }); });