diff --git a/.dockerignore b/.dockerignore index d571957..2f03a01 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,3 @@ -*/node_modules +**/node_modules .git */dist \ No newline at end of file diff --git a/docker-compose.testing.yml b/docker-compose.testing.yml index 4bada7e..5c67018 100644 --- a/docker-compose.testing.yml +++ b/docker-compose.testing.yml @@ -12,6 +12,7 @@ services: - BASE_URL=http://app-test - TESTING_USERNAME=alex - TESTING_PASSWORD=Alex1234 + # - DEBUG=cypress:* depends_on: - app-test @@ -23,8 +24,9 @@ services: target: prod networks: internal: - ports: - - 5173:80 + # Only open the port for debugging + # ports: + # - 5173:80 depends_on: - backend @@ -71,8 +73,8 @@ services: - MONGO_USER=user - MONGO_PASS=user-password - MONGO_DB=odyssey-test -# ports: -# - 27017:27017 + # ports: + # - 27017:27017 base: image: linuxodyssey/quest-base diff --git a/tests/cypress/support/e2e.js b/tests/cypress/support/e2e.ts similarity index 100% rename from tests/cypress/support/e2e.js rename to tests/cypress/support/e2e.ts diff --git a/tests/package.json b/tests/package.json index 68157d1..885c84b 100644 --- a/tests/package.json +++ b/tests/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "private": true, "main": "index.js", - "type": "module", + "type": "commonjs", "license": "MIT", "scripts": { "test": "yarn cypress run", @@ -12,9 +12,11 @@ "dependencies": { "@testing-library/cypress": "^10.0.1", "cypress": "^13.5.1", - "dotenv": "^16.3.1" + "dotenv": "^16.3.1", + "ts-node": "^10.9.2" }, "devDependencies": { + "@types/dotenv": "^8.2.0", "typescript": "^5.3.3" } } diff --git a/tests/tsconfig.json b/tests/tsconfig.json index ada7ed3..6f9a664 100644 --- a/tests/tsconfig.json +++ b/tests/tsconfig.json @@ -1,10 +1,11 @@ { - "extends": "../tsconfig.json", "compilerOptions": { - "types": ["cypress", "@testing-library/cypress"], - "sourceMap": false, - "inlineSourceMap": true + "outDir": "dist", + "target": "es5", + "lib": ["es5", "dom"], + "types": ["cypress", "node", "@testing-library/cypress"], + "esModuleInterop": true }, - "include": ["node_modules/cypress", "cypress/**/*.ts"], - "exclude": ["node_modules/cypress", "cypress.config.ts", "../packages"] + "include": ["**/*.ts"], + "exclude": ["dist"] } diff --git a/yarn.lock b/yarn.lock index 01fe85a..26908b8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1043,6 +1043,13 @@ "@types/docker-modem" "*" "@types/node" "*" +"@types/dotenv@^8.2.0": + version "8.2.0" + resolved "https://registry.yarnpkg.com/@types/dotenv/-/dotenv-8.2.0.tgz#5cd64710c3c98e82d9d15844375a33bf1b45d053" + integrity sha512-ylSC9GhfRH7m1EUXBXofhgx4lUWmFeQDINW5oLuS+gxWdfUeW4zJdeVTYVkexEW+e2VUvlZR2kGnGGipAWR7kw== + dependencies: + dotenv "*" + "@types/express-serve-static-core@^4.17.33": version "4.17.43" resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.43.tgz#10d8444be560cb789c4735aea5eac6e5af45df54" @@ -2777,7 +2784,7 @@ dompurify@^3.0.6: resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.0.9.tgz#b3f362f24b99f53498c75d43ecbd784b0b3ad65e" integrity sha512-uyb4NDIvQ3hRn6NiC+SIFaP4mJ/MdXlvtunaqK9Bn6dD3RuB/1S/gasEjDHD8eiaqdSael2vBv+hOs7Y+jhYOQ== -dotenv@^16.3.1, dotenv@^16.4.1: +dotenv@*, dotenv@^16.3.1, dotenv@^16.4.1: version "16.4.5" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f" integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==