Skip to content

Commit

Permalink
test: adapt cypress tests for new URL patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
dhhyi committed Feb 13, 2020
1 parent dafd9a3 commit 3269033
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion e2e/cypress/integration/pages/shopping/family.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ export class FamilyPage {
readonly productList = new ProductListModule('ish-product-listing');

static navigateTo(categoryUniqueId: string, page?: number) {
cy.visit(`/category/${categoryUniqueId}${page ? `?page=${page}` : ''}`);
cy.visit(`/cat${categoryUniqueId}${page ? `?page=${page}` : ''}`);
}
}
4 changes: 2 additions & 2 deletions e2e/cypress/integration/pages/shopping/product-detail.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ export class ProductDetailPage {

static navigateTo(sku: string, categoryUniqueId?: string) {
if (categoryUniqueId) {
cy.visit(`/category/${categoryUniqueId}/product/${sku}`);
cy.visit(`/sku${sku}-cat${categoryUniqueId}`);
} else {
cy.visit(`/product/${sku}`);
cy.visit(`/sku${sku}`);
}
}

Expand Down
2 changes: 1 addition & 1 deletion e2e/cypress/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"outDir": "../out-tsc",
"module": "commonjs",
"moduleResolution": "node",
"target": "es5",
"target": "es6",
"types": ["node", "cypress"]
}
}
8 changes: 4 additions & 4 deletions e2e/test-universal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ universalTest() {
}

universalTest 1 "${PWA_BASE_URL}/" "router-outlet><ish-home-page"
universalTest 2 "${PWA_BASE_URL}/category/Computers.1835.151" "router-outlet><ish-category-page"
universalTest 2 "${PWA_BASE_URL}/catComputers.1835.151" "router-outlet><ish-category-page"
universalTest 3 "${PWA_BASE_URL}/login" "Forgot your password?"
universalTest 4 "${PWA_BASE_URL}/register" "Create Account"
universalTest 5 "${PWA_BASE_URL}/category/Computers.1835" "<h1>Notebooks and PCs</h1>"
universalTest 6 "${PWA_BASE_URL}/category/Computers.1835" "<h3>PCs</h3>"
universalTest 7 "${PWA_BASE_URL}/category/Computers.1835.151" "add-to-compare"
universalTest 5 "${PWA_BASE_URL}/catComputers.1835" "<h1>Notebooks and PCs</h1>"
universalTest 6 "${PWA_BASE_URL}/catComputers.1835" "<h3>PCs</h3>"
universalTest 7 "${PWA_BASE_URL}/catComputers.1835.151" "add-to-compare"
universalTest 8 "${PWA_BASE_URL}/home" "intershop-pwa-state"
universalTest 9 "${PWA_BASE_URL}/home" "&q;baseURL&q;:"
universalTest 10 "${PWA_BASE_URL}/home" "<ish-content-include includeid=.pwa.include.homepage.pagelet2-Include"
Expand Down

0 comments on commit 3269033

Please sign in to comment.