Skip to content
Open
Show file tree
Hide file tree
Changes from 30 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
<tr>
<td style="width:50%;"><h3 class="icon-head head-newsletter"><?php echo $this->getHeaderText() ?></h3></td>
<td class="form-buttons">
<button class="scalable add" onclick="window.location='<?php echo $this->getCreateUrl() ?>'"><span><span><span><?php echo Mage::helper('newsletter')->__('Add New Template'); ?></span></span></span></button>
<?php $title = Mage::helper('newsletter')->__('Add New Template'); ?>
<button class="scalable add" title="<?php echo $title; ?>" onclick="window.location='<?php echo $this->getCreateUrl() ?>'"><span><span><span><?php echo $title; ?></span></span></span></button>
</td>
</tr>
</table>
Expand Down
13 changes: 7 additions & 6 deletions cypress/e2e/openmage/backend/catalog/categories.cy.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
const route = cy.testRoutes.backend.catalog.categories;
const test = cy.testBackendCatalogProductsCategories.config;
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`, () => {
validation.pageElements(test, test.index);
});
});
});
24 changes: 18 additions & 6 deletions cypress/e2e/openmage/backend/catalog/products.cy.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
const route = cy.testRoutes.backend.catalog.products;
const test = cy.testBackendCatalogProducts.config;
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`, () => {
validation.pageElements(test, test.index);
});

it(`tests edit route`, () => {
tools.clickContains(test.index._grid, 'td', '905');
validation.pageElements(test, test.edit);
});

it(`tests new route`, () => {
tools.click(test.index.__buttons.add);
validation.pageElements(test, test.new);
});

it(`tests filter options`, () => {
Expand All @@ -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);
});
});
});
24 changes: 18 additions & 6 deletions cypress/e2e/openmage/backend/catalog/search.cy.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
const route = cy.testRoutes.backend.catalog.search;
const test = cy.testBackendCatalogSearch.config;
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`, () => {
validation.pageElements(test, test.index);
});
});

it(`tests edit route`, () => {
tools.clickContains(test.index._grid, 'td', 'classic');
validation.pageElements(test, test.edit);
});

it(`tests new route`, () => {
tools.click(test.index.__buttons.add);
validation.pageElements(test, test.new);
});
});
24 changes: 18 additions & 6 deletions cypress/e2e/openmage/backend/catalog/sitemap.cy.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
const route = cy.testRoutes.backend.catalog.sitemap;
const test = cy.testBackendCatalogSitemap.config;
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`, () => {
validation.pageElements(test, test.index);
});
});

it(`tests edit route`, () => {
// TODO: There is no edit route for sitemaps
validation.pageElements(test, test.index);
});

it(`tests new route`, () => {
tools.click(test.index.__buttons.add);
validation.pageElements(test, test.new);
});
});
24 changes: 18 additions & 6 deletions cypress/e2e/openmage/backend/catalog/urlrewrites.cy.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
const route = cy.testRoutes.backend.catalog.urlrewrite;
const test = cy.testBackendUrlrewrite.config;
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`, () => {
validation.pageElements(test, test.index);
});
});

it(`tests edit route`, () => {
tools.clickContains(test.index._grid, 'td', '116238');
validation.pageElements(test, test.edit);
});

it(`tests new route`, () => {
tools.click(test.index.__buttons.add);
validation.pageElements(test, test.new);
});
});
24 changes: 18 additions & 6 deletions cypress/e2e/openmage/backend/cms/block.cy.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
const route = cy.testRoutes.backend.cms.block;
const test = cy.testBackendCmsBlock.config;
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`, () => {
validation.pageElements(test, test.index);
});
});

it(`tests edit route`, () => {
tools.clickContains(test.index._grid, 'td', 'category-landingpage-home');
validation.pageElements(test, test.edit);
});

it(`tests new route`, () => {
tools.click(test.index.__buttons.add);
validation.pageElements(test, test.new);
});
});
67 changes: 62 additions & 5 deletions cypress/e2e/openmage/backend/cms/page.cy.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,69 @@
const route = cy.testRoutes.backend.cms.page;
const test = cy.testBackendCmsPage.config;
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`, () => {
validation.pageElements(test, test.index);
});

it(`tests edit route`, () => {
test.index.clickGridRow();
validation.pageElements(test, test.edit);
});

it(`tests new route`, () => {
test.index.clickAdd();
validation.pageElements(test, test.new);
});

it('tests to disable a CMS page that is used in config', () => {
test.index.clickGridRow();

test.edit.disablePage();
test.edit.clickSaveAndContinue();

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, padding: 10 });
});

it('tests to delete a CMS page that is used in config', () => {
test.index.clickGridRow();
test.edit.clickDelete();

validation.hasErrorMessage('Cannot delete page');

cy.get('#messages').screenshot('error-delete-active-page', { overwrite: true, padding: 10 });
});

it('tests to add a CMS page', () => {
test.index.clickAdd();
test.edit.clickSaveAndContinue();

// @todo add validation for required fields
});

it('tests to unassign a CMS page that is used in config', () => {
test.index.clickGridRow();

//cy.log('Assign another store to the CMS page');
//cy.get(test.edit.__fields.page_store_id.selector)
// .select(4);

//test.edit.clickSaveAndContinue();

// @todo: fix needed - this test passes because of a Magento bug
//validation.hasSuccessMessage('The page has been saved.');

test.edit.resetStores();
test.edit.clickSaveAndContinue();

validation.hasSuccessMessage('The page has been saved.');
});
});
24 changes: 18 additions & 6 deletions cypress/e2e/openmage/backend/cms/widget.cy.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
const route = cy.testRoutes.backend.cms.widget;
const test = cy.testBackendCmsWidget.config;
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`, () => {
validation.pageElements(test, test.index);
});
});

it(`tests edit route`, () => {
tools.clickContains(test.index._grid, 'td', 'Couponing Block');
validation.pageElements(test, test.edit);
});

it(`tests new route`, () => {
tools.click(test.index.__buttons.add);
validation.pageElements(test, test.new);
});
});
24 changes: 24 additions & 0 deletions cypress/e2e/openmage/backend/customer/customer.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const test = cy.testBackendCustomerCustomer.config;
const tools = cy.openmage.tools;
const validation = cy.openmage.validation;

describe(`Checks admin system "${test.index.title}"`, () => {
beforeEach('Log in the user', () => {
cy.adminLogIn();
cy.adminGoToTestRoute(test, test.index);
});

it(`tests index route`, () => {
validation.pageElements(test, test.index);
});

it(`tests edit route`, () => {
tools.clickContains(test.index._grid, 'td', '424-555-0000');
validation.pageElements(test, test.edit);
});

it(`tests new route`, () => {
tools.click(test.index.__buttons.add);
validation.pageElements(test, test.new);
});
});
12 changes: 0 additions & 12 deletions cypress/e2e/openmage/backend/customer/group.cy.js

This file was deleted.

24 changes: 24 additions & 0 deletions cypress/e2e/openmage/backend/customer/groups.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const test = cy.testBackendCustomerGroups.config;
const tools = cy.openmage.tools;
const validation = cy.openmage.validation;

describe(`Checks admin system "${test.index.title}"`, () => {
beforeEach('Log in the user', () => {
cy.adminLogIn();
cy.adminGoToTestRoute(test, test.index);
});

it(`tests index route`, () => {
validation.pageElements(test, test.index);
});

it(`tests edit route`, () => {
tools.clickContains(test.index._grid, 'td', 'General');
validation.pageElements(test, test.edit);
});

it(`tests new route`, () => {
tools.click(test.index.__buttons.add);
validation.pageElements(test, test.new);
});
});
12 changes: 0 additions & 12 deletions cypress/e2e/openmage/backend/customer/manage.cy.js

This file was deleted.

Loading
Loading