Skip to content
Open
Show file tree
Hide file tree
Changes from 6 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.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);
});
});
});
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.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`, () => {
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.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);
});
});

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);
});
});
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.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);
});
});

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);
});
});
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.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);
});
});

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);
});
});
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.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);
});
});

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);
});
});
68 changes: 63 additions & 5 deletions cypress/e2e/openmage/backend/cms/page.cy.js
Original file line number Diff line number Diff line change
@@ -1,12 +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', () => {
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', () => {
tools.clickGridRow(test.index._grid, 'td', 'no-route', 'Select a CMS 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.');
});

});
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.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);
});
});

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);
});
});
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.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);
});
});
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.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);
});
});
12 changes: 0 additions & 12 deletions cypress/e2e/openmage/backend/customer/manage.cy.js

This file was deleted.

Loading