-
-
Notifications
You must be signed in to change notification settings - Fork 449
Updated cypress test #4975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sreichel
wants to merge
31
commits into
OpenMage:main
Choose a base branch
from
sreichel:cypress/refactor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Updated cypress test #4975
Changes from 25 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
534476e
Updated cypress test
sreichel e6a1de7
Merge branch 'main' into cypress/refactor
sreichel 7b8a044
typo
sreichel d29866a
template fix
sreichel b58631a
disabled test
sreichel 8846bed
Merge remote-tracking branch 'origin/cypress/refactor' into cypress/r…
sreichel 7d400ec
fixes
sreichel 73164cf
updated tests
sreichel b76b7dd
fixed imports
sreichel 14fe941
fixed imports
sreichel 49834ac
updated tests
sreichel 393fac6
typo
sreichel 168024d
typo
sreichel 1b07150
sonar
sreichel ade1959
typo
sreichel 8ada203
typo
sreichel c032a11
typo
sreichel 8d10aa8
refactor
sreichel 988c29b
refactor
sreichel cb819db
minor fixes
sreichel 1a4417d
minor fixes
sreichel ba5611f
minor
sreichel 82ecc36
refactor
sreichel d2b31b8
minor
sreichel c1bc4a8
minor
sreichel efaecb2
minor
sreichel 00352a4
minor
sreichel a0a2532
minor
sreichel 10a17f6
minor
sreichel 759722a
minor
sreichel a188b6b
minor
sreichel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); | ||
}); | ||
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); | ||
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 system variables | ||
validation.pageElements(test, test.index); | ||
}); | ||
|
||
it(`tests new route`, () => { | ||
tools.click(test.index.__buttons.add); | ||
validation.pageElements(test, test.new); | ||
}); | ||
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); | ||
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); | ||
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 un-asign a CMS page that is used in config', () => { | ||
sreichel marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
test.index.clickGridRow(); | ||
|
||
//cy.log('Asign another store to the CMS page'); | ||
sreichel marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
//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(); | ||
test.edit.clickSaveAndContinue(); | ||
|
||
validation.hasSuccessMessage('The page has been saved.'); | ||
}); | ||
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); | ||
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.