-
Notifications
You must be signed in to change notification settings - Fork 685
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3705 from magento/mikhaelbois/PWA-2471-cypress-mu…
…lti-store-update [PWA-2471] automate Venia Multi store test (Task 2 of 2)
- Loading branch information
Showing
55 changed files
with
13,573 additions
and
5,007 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 |
---|---|---|
|
@@ -27,4 +27,4 @@ | |
"retries": { | ||
"runMode": 2 | ||
} | ||
} | ||
} |
This file contains 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,11 @@ | ||
export const assertUrlSuffix = () => { | ||
cy.location() | ||
.its('pathname') | ||
.should('match', /\.html$/); | ||
}; | ||
|
||
export const assertNoUrlSuffix = () => { | ||
cy.location() | ||
.its('pathname') | ||
.should('not.match', /\.html$/); | ||
}; |
This file contains 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 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
15 changes: 15 additions & 0 deletions
15
venia-integration-tests/src/assertions/pageBuilder/index.js
This file contains 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,15 @@ | ||
import { pageBuilderImage } from '../../fields/pageBuilder'; | ||
|
||
/** | ||
* Utility function to assert image url contains base url | ||
*/ | ||
export const assertImageUrlContainsBaseUrl = () => { | ||
cy.get(pageBuilderImage) | ||
.first() | ||
.should('be.visible') | ||
.find('img') | ||
.should('exist') | ||
.then($img => { | ||
expect($img[0].src).contains(Cypress.config().baseUrl); | ||
}); | ||
}; |
This file contains 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 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 +1,3 @@ | ||
export const pageBuilderBanner = '[data-cy="PageBuilder-Banner-root"]'; | ||
|
||
export const pageBuilderImage = '[data-cy="PageBuilder-Image-root"]'; |
This file contains 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
27 changes: 27 additions & 0 deletions
27
venia-integration-tests/src/fixtures/multiStore/data/availableSortMethods.json
This file contains 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,27 @@ | ||
{ | ||
"data": { | ||
"products": { | ||
"sort_fields": { | ||
"options": [ | ||
{ | ||
"label": "Position", | ||
"value": "position", | ||
"__typename": "SortField" | ||
}, | ||
{ | ||
"label": "Product Name", | ||
"value": "name", | ||
"__typename": "SortField" | ||
}, | ||
{ | ||
"label": "Price", | ||
"value": "price", | ||
"__typename": "SortField" | ||
} | ||
], | ||
"__typename": "SortFields" | ||
}, | ||
"__typename": "Products" | ||
} | ||
} | ||
} |
This file contains 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 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 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
Oops, something went wrong.