Skip to content

Commit 443bafa

Browse files
committed
update
1 parent bdcba9d commit 443bafa

File tree

3 files changed

+34
-3
lines changed

3 files changed

+34
-3
lines changed

cypress/e2e/paths/backend/system/config/catalog/configswatches.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ describe(`Checks admin system "${route.h3}" settings`, () => {
7676

7777
cy.adminSaveConfiguration();
7878

79-
console.log('Checking for error messages');
79+
cy.log('Checking for error messages');
8080
const error = validation.errors.requiredEntry;
8181
cy.get('#advice-required-entry-configswatches_product_detail_dimensions_height').should('include.text', error);
8282
cy.get('#advice-required-entry-configswatches_product_detail_dimensions_width').should('include.text', error);

cypress/e2e/paths/backend/system/config/catalog/sitemap.cy.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ describe(`Checks admin system "${route.h3}" settings`, () => {
5454

5555
cy.adminSaveConfiguration();
5656

57-
console.log('Checking for error messages');
57+
cy.log('Checking for error messages');
5858
const error = validation.errors.numberRange;
5959
cy.get('#advice-validate-number-range-sitemap_category_priority').should('include.text', error);
6060
cy.get('#advice-validate-number-range-sitemap_product_priority').should('include.text', error);
@@ -73,7 +73,7 @@ describe(`Checks admin system "${route.h3}" settings`, () => {
7373

7474
cy.adminSaveConfiguration();
7575

76-
console.log('Checking for error messages');
76+
cy.log('Checking for error messages');
7777
const error = validation.errors.requiredEntry;
7878
cy.get('#advice-required-entry-sitemap_category_priority').should('include.text', error);
7979
cy.get('#advice-required-entry-sitemap_product_priority').should('include.text', error);

cypress/e2e/paths/backend/system/myacount.cy.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@ import {paths} from "../../../../support/paths";
22
import {validation} from "../../../../support/validation";
33

44
const route = paths.backend.system.myaccount
5+
const validate = {
6+
_input: {
7+
username: '#username',
8+
firstname: '#firstname',
9+
lastname: '#lastname',
10+
email: '#email',
11+
current_password: '#current_password',
12+
}
13+
}
514

615
describe(`Checks admin system "${route.h3}"`, () => {
716
beforeEach('Log in the user', () => {
@@ -12,4 +21,26 @@ describe(`Checks admin system "${route.h3}"`, () => {
1221
it(`tests classes and title`, () => {
1322
cy.adminTestRoute(route);
1423
});
24+
25+
it(`tests empty priority`, () => {
26+
Object.keys(validate._input).forEach(field => {
27+
const selector = validate._input[field];
28+
29+
cy
30+
.get(selector)
31+
.clear({ force: true })
32+
.should('have.value', '');
33+
});
34+
35+
cy.log('Clicking on Save button');
36+
cy.get('.form-buttons button[title="Save Account"]').click({force: true, multiple: true});
37+
38+
cy.log('Checking for error messages');
39+
const error = validation.errors.requiredEntry;
40+
cy.get('#advice-required-entry-username').should('include.text', error);
41+
cy.get('#advice-required-entry-firstname').should('include.text', error);
42+
cy.get('#advice-required-entry-lastname').should('include.text', error);
43+
cy.get('#advice-required-entry-email').should('include.text', error);
44+
cy.get('#advice-required-entry-current_password').should('include.text', error);
45+
});
1546
});

0 commit comments

Comments
 (0)