From 5d029b9591a9fac8120f88ec65f79b83108b133a Mon Sep 17 00:00:00 2001 From: Danilo Hoffmann Date: Wed, 12 Feb 2020 15:56:26 +0100 Subject: [PATCH] test: adapt cypress tests for new URL patterns --- e2e/cypress/integration/pages/shopping/family.page.ts | 2 +- .../integration/pages/shopping/product-detail.page.ts | 4 ++-- e2e/cypress/tsconfig.json | 2 +- e2e/test-universal.sh | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/e2e/cypress/integration/pages/shopping/family.page.ts b/e2e/cypress/integration/pages/shopping/family.page.ts index 8a505686689..18a5ad84751 100644 --- a/e2e/cypress/integration/pages/shopping/family.page.ts +++ b/e2e/cypress/integration/pages/shopping/family.page.ts @@ -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}` : ''}`); } } diff --git a/e2e/cypress/integration/pages/shopping/product-detail.page.ts b/e2e/cypress/integration/pages/shopping/product-detail.page.ts index 5df9f279bcb..1fba36b31f9 100644 --- a/e2e/cypress/integration/pages/shopping/product-detail.page.ts +++ b/e2e/cypress/integration/pages/shopping/product-detail.page.ts @@ -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}`); } } diff --git a/e2e/cypress/tsconfig.json b/e2e/cypress/tsconfig.json index 29e09f63db7..d2ade9b14e2 100644 --- a/e2e/cypress/tsconfig.json +++ b/e2e/cypress/tsconfig.json @@ -11,7 +11,7 @@ "outDir": "../out-tsc", "module": "commonjs", "moduleResolution": "node", - "target": "es5", + "target": "es6", "types": ["node", "cypress"] } } diff --git a/e2e/test-universal.sh b/e2e/test-universal.sh index a254b843479..30c395eed42 100644 --- a/e2e/test-universal.sh +++ b/e2e/test-universal.sh @@ -15,12 +15,12 @@ universalTest() { } universalTest 1 "${PWA_BASE_URL}/" "router-outlet>Notebooks and PCs" -universalTest 6 "${PWA_BASE_URL}/category/Computers.1835" "

PCs

" -universalTest 7 "${PWA_BASE_URL}/category/Computers.1835.151" "add-to-compare" +universalTest 5 "${PWA_BASE_URL}/catComputers.1835" "

Notebooks and PCs

" +universalTest 6 "${PWA_BASE_URL}/catComputers.1835" "

PCs

" +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" "