From 4a852c48e54474d6b7088a82e16363bd0089a809 Mon Sep 17 00:00:00 2001 From: Adriano Raiano Date: Mon, 15 Apr 2024 17:45:12 +0200 Subject: [PATCH] test simple only --- CHANGELOG.md | 4 ++++ cypress/e2e/spec.cy.ts | 54 +++++++++++++++++++++--------------------- package.json | 2 +- 3 files changed, 32 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf2505ba..f544d7a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 15.3.0 + +- Only overwrite ns config if it provided [#2270](https://github.com/i18next/next-i18next/pull/2270) + ## 15.2.0 - add possibility to pass resources directly via config and set localePath to null diff --git a/cypress/e2e/spec.cy.ts b/cypress/e2e/spec.cy.ts index 0b7bb9fa..bac5e490 100644 --- a/cypress/e2e/spec.cy.ts +++ b/cypress/e2e/spec.cy.ts @@ -13,15 +13,15 @@ describe('basic e2e test run', () => { cy.contains('Back to home').click() cy.location('pathname', { timeout: 10000 }).should('equal', '/') cy.contains('A simple example') - cy.contains('To auto static page (en)').click() - cy.location('pathname', { timeout: 10000 }).should( - 'equal', - '/auto-static' - ) - cy.contains('hello_en') - cy.contains('Back to home').click() - cy.location('pathname', { timeout: 10000 }).should('equal', '/') - cy.contains('A simple example') + // cy.contains('To auto static page (en)').click() + // cy.location('pathname', { timeout: 10000 }).should( + // 'equal', + // '/auto-static' + // ) + // cy.contains('hello_en') + // cy.contains('Back to home').click() + // cy.location('pathname', { timeout: 10000 }).should('equal', '/') + // cy.contains('A simple example') // Test German content cy.contains('Change locale').click() @@ -42,28 +42,28 @@ describe('basic e2e test run', () => { '/de' ) cy.contains('Ein einfaches Beispiel') - cy.contains('To auto static page (de)').click() - cy.location('pathname', { timeout: 10000 }).should( - 'equal', - '/de/auto-static' - ) - cy.contains('hello_de') - cy.contains('Zurück zur Hauptseite').click() - cy.location('pathname', { timeout: 10000 }).should( - 'equal', - '/de' - ) - cy.contains('Ein einfaches Beispiel') + // cy.contains('To auto static page (de)').click() + // cy.location('pathname', { timeout: 10000 }).should( + // 'equal', + // '/de/auto-static' + // ) + // cy.contains('hello_de') + // cy.contains('Zurück zur Hauptseite').click() + // cy.location('pathname', { timeout: 10000 }).should( + // 'equal', + // '/de' + // ) + // cy.contains('Ein einfaches Beispiel') cy.contains('Sprache wechseln zu').click() cy.location('pathname', { timeout: 10000 }).should('equal', '/') cy.contains('A simple example') // Test generated version of auto static - cy.request('/auto-static') - .its('body') - .should('include', '

hello_en

') - cy.request('/de/auto-static') - .its('body') - .should('include', '

hello_de

') + // cy.request('/auto-static') + // .its('body') + // .should('include', '

hello_en

') + // cy.request('/de/auto-static') + // .its('body') + // .should('include', '

hello_de

') }) }) diff --git a/package.json b/package.json index 58925b89..c6e94609 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "install:example:auto-static-optimize": "cd examples/auto-static-optimize && npm install", "move-build-to-examples?": "Hack: see # @link https://github.com/i18next/next-i18next/pull/2012", "move-build-to-examples": "rimraf ./examples/*/node_modules/next-i18next && cpy './package.json' './*.js' './*.ts' './dist' ./examples/simple/node_modules/next-i18next && cpy './package.json' './*.js' './*.ts' './dist' ./examples/ssg/node_modules/next-i18next && cpy './package.json' './*.js' './*.ts' './dist' ./examples/auto-static-optimize/node_modules/next-i18next ", - "test:e2e": "start-server-and-test 'cd examples/auto-static-optimize && npm run start' http://127.0.0.1:3000 cy:run", + "test:e2e": "start-server-and-test 'cd examples/simple && npm run start' http://127.0.0.1:3000 cy:run", "cy:run": "cypress run", "example": "npm run example:simple", "example:prod": "npm run example:simple:prod",