-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat--google-breadcrumbs
- Loading branch information
Showing
68 changed files
with
812 additions
and
590 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
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: unit-tests | ||
|
||
on: | ||
workflow_dispatch: | ||
# push: | ||
# branches: | ||
# - develop | ||
# pull_request: | ||
# types: [opened, synchronize, reopened, ready_for_review] | ||
|
||
jobs: | ||
unit-tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20.5' | ||
cache: 'yarn' | ||
registry-url: "https://npm.pkg.github.com" | ||
|
||
- name: Set yarn version | ||
run: | | ||
yarn set version stable | ||
yarn set version 3.6.3 | ||
- name: Setup .yarnrc.yml | ||
run: | | ||
yarn config set nodeLinker node-modules | ||
yarn config set npmScopes.plentymarkets.npmRegistryServer "https://npm.pkg.github.com" | ||
yarn config set npmScopes.plentymarkets.npmAlwaysAuth true | ||
yarn config set npmScopes.plentymarkets.npmAuthToken $NODE_AUTH_TOKEN | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install Dependencies | ||
run: yarn --frozen-lockfile | ||
|
||
- name: Build packages | ||
run: yarn build | ||
|
||
- name: Run tests | ||
run: yarn test |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
export class CategoryPageObject { | ||
get filterClickShouldReloadCategory() { | ||
cy.intercept('http://localhost:8181/plentysystems/getFacet').as('getFacet'); | ||
cy.getByTestId('category-filter-0').first().click(); | ||
cy.wait('@getFacet').its('response.statusCode').should('eq', 200) | ||
return this; | ||
} | ||
} |
72 changes: 72 additions & 0 deletions
72
apps/web/__tests__/support/pageObjects/MyAccountPageObject.ts
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,72 @@ | ||
import { paths } from "../../../utils/paths"; | ||
|
||
export class MyAccountPageObject { | ||
get accountDropdownListItem () { | ||
return cy.get(`a[href="${paths.account}"]`) | ||
} | ||
|
||
clickTopBarMyAccountLink() { | ||
cy.getByTestId('account-dropdown-button').should('exist').click(); | ||
|
||
this.accountDropdownListItem | ||
.should('exist') | ||
.contains('My Account').click(); | ||
|
||
cy.url().should('contain', paths.account); | ||
} | ||
|
||
checkAllSections() { | ||
cy.contains('Account Settings').should('exist'); | ||
cy.contains('Personal Data').should('exist'); | ||
cy.contains('Billing Details').should('exist'); | ||
cy.contains('Shipping Details').should('exist'); | ||
cy.contains('Orders & Returns').should('exist'); | ||
cy.contains('My Orders').should('exist'); | ||
cy.contains('Returns').should('exist'); | ||
cy.contains('Logout').should('exist'); | ||
|
||
return this; | ||
} | ||
|
||
personalDataSection() { | ||
cy.get('a').contains('Personal Data').click(); | ||
cy.url().should('contain', paths.accountPersonalData); | ||
cy.contains('Your name').should('exist'); | ||
cy.contains('Contact information').should('exist'); | ||
cy.contains('Your password').should('exist'); | ||
|
||
return this; | ||
} | ||
|
||
billingDetailsSection() { | ||
cy.get('a').contains('Billing Details').click(); | ||
cy.url().should('contain', paths.accountBillingDetails); | ||
cy.contains('Billing address').should('exist'); | ||
|
||
return this; | ||
} | ||
|
||
shippingDetailsSection() { | ||
cy.get('a').contains('Shipping Details').click(); | ||
cy.url().should('contain', paths.accountShippingDetails); | ||
cy.contains('Shipping address').should('exist'); | ||
|
||
return this; | ||
} | ||
|
||
myOrdersSection() { | ||
cy.get('a').contains('My Orders').click(); | ||
cy.url().should('contain', paths.accountMyOrders); | ||
cy.contains("Details").should('exist'); | ||
|
||
return this; | ||
} | ||
|
||
returnsSection() { | ||
cy.get('a').contains('Returns').click(); | ||
cy.url().should('contain', paths.accountReturns); | ||
cy.contains("You haven’t shopped with us yet").should('exist'); | ||
|
||
return this; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { CategoryPageObject } from '../../support/pageObjects/CategoryObject'; | ||
|
||
const category = new CategoryPageObject(); | ||
|
||
describe('Smoke: Category Page', () => { | ||
it('[smoke] Category filters should trigger a product data reload', () => { | ||
// We should configure the system so that the first category is set up with filters. | ||
// This way we are independet from the language and the url. | ||
cy.visitAndHydrate('/c/living-room'); | ||
|
||
category.filterClickShouldReloadCategory; | ||
}) | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { paths } from '../../../utils/paths'; | ||
import { MyAccountPageObject } from '../../support/pageObjects/MyAccountPageObject'; | ||
|
||
const myAccount = new MyAccountPageObject(); | ||
|
||
describe('my account', () => { | ||
// it('going to my account from header', () => { | ||
// cy.visitAndHydrate(paths.home); | ||
// | ||
// myAccount.clickTopBarMyAccountLink(); | ||
// }); | ||
// | ||
// it('checking my account section', () => { | ||
// cy.visitAndHydrate(paths.account); | ||
// | ||
// myAccount | ||
// .checkAllSections() | ||
// .personalDataSection() | ||
// .billingDetailsSection() | ||
// .shippingDetailsSection() | ||
// .myOrdersSection() | ||
// .returnsSection(); | ||
// }); | ||
}); |
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.