From b414660d10ed3ecc120e59d683d0498f07ace32c Mon Sep 17 00:00:00 2001 From: Tasko Olevski Date: Fri, 16 Sep 2022 23:48:38 +0200 Subject: [PATCH] squashme: minor fix --- .github/workflows/acceptance-tests.yaml | 2 +- .gitignore | 2 + acceptance-tests/package-lock.json | 313 +++++++++++++++--------- acceptance-tests/package.json | 6 +- acceptance-tests/test.js | 35 ++- 5 files changed, 227 insertions(+), 131 deletions(-) diff --git a/.github/workflows/acceptance-tests.yaml b/.github/workflows/acceptance-tests.yaml index 7b916e05..91097721 100644 --- a/.github/workflows/acceptance-tests.yaml +++ b/.github/workflows/acceptance-tests.yaml @@ -20,7 +20,7 @@ jobs: - image: jupyter/minimal-notebook env: lab spec: jupyterlab.cy.js - - image: jupyter/r-notebook + - image: renku/renkulab-r:4.2.0-0.12.0 env: rstudio spec: rstudio.cy.js include: diff --git a/.gitignore b/.gitignore index 70f2f3c4..c50c4a4a 100644 --- a/.gitignore +++ b/.gitignore @@ -217,3 +217,5 @@ acceptance-tests/cypress/videos # Helm requirements lock files helm-chart/amalthea/requirements.lock helm-chart/amalthea/Chart.lock + +.DS_Store diff --git a/acceptance-tests/package-lock.json b/acceptance-tests/package-lock.json index 515e4d11..5ab8aa6a 100644 --- a/acceptance-tests/package-lock.json +++ b/acceptance-tests/package-lock.json @@ -8,10 +8,12 @@ "name": "acceptance-tests", "version": "0.0.1", "devDependencies": { - "@renku/notebooks-cypress-tests": "^0.0.5", + "@renku/notebooks-cypress-tests": "^0.0.6", "axios": "^0.27.2", + "axios-cookiejar-support": "^4.0.3", "cypress": "^10.8.0", - "mocha": "^10.0.0" + "mocha": "^10.0.0", + "tough-cookie": "^4.1.2" } }, "node_modules/@colors/colors": { @@ -53,6 +55,19 @@ "node": ">= 6" } }, + "node_modules/@cypress/request/node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/@cypress/xvfb": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/@cypress/xvfb/-/xvfb-1.2.4.tgz", @@ -73,9 +88,9 @@ } }, "node_modules/@renku/notebooks-cypress-tests": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/@renku/notebooks-cypress-tests/-/notebooks-cypress-tests-0.0.5.tgz", - "integrity": "sha512-F9ynyf7hks+OKRqDgDOu1BeWP6daUzwa96YMKJIrjxISpIlWIVlX6BD4VSt//RUvvsMmbT8ayPWZ27Y504VWaQ==", + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/@renku/notebooks-cypress-tests/-/notebooks-cypress-tests-0.0.6.tgz", + "integrity": "sha512-Axw+lEM4D0/3za8o6uIl8uxmqFnbWOerFaKQGFl4c+YA+eZEb2DZgKPNw+Bh39C90g9KLNZGSJuIknqNkYq7vA==", "dev": true, "dependencies": { "cypress": "^10.8.0", @@ -116,6 +131,18 @@ "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", "dev": true }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", @@ -289,6 +316,22 @@ "form-data": "^4.0.0" } }, + "node_modules/axios-cookiejar-support": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/axios-cookiejar-support/-/axios-cookiejar-support-4.0.3.tgz", + "integrity": "sha512-fMQc0mPR1CikWZEwVC6Av+sD4cJuV2eo06HFA+DfhY54uRcO43ILGxaq7YAMTiM0V0SdJCV4NhE1bOsQYlfSkg==", + "dev": true, + "dependencies": { + "http-cookie-agent": "^4.0.2" + }, + "engines": { + "node": ">=14.18.0 <15.0.0 || >=16.0.0" + }, + "peerDependencies": { + "axios": ">=0.20.0", + "tough-cookie": ">=4.0.0" + } + }, "node_modules/axios/node_modules/form-data": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", @@ -1189,6 +1232,31 @@ "he": "bin/he" } }, + "node_modules/http-cookie-agent": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/http-cookie-agent/-/http-cookie-agent-4.0.2.tgz", + "integrity": "sha512-noTmxdH5CuytTnLj/Qv3Z84e/YFq8yLXAw3pqIYZ25Edhb9pQErIAC+ednw40Cic6Le/h9ryph5/TqsvkOaUCw==", + "dev": true, + "dependencies": { + "agent-base": "^6.0.2" + }, + "engines": { + "node": ">=14.18.0 <15.0.0 || >=16.0.0" + }, + "peerDependencies": { + "deasync": "^0.1.26", + "tough-cookie": "^4.0.0", + "undici": "^5.1.1" + }, + "peerDependenciesMeta": { + "deasync": { + "optional": true + }, + "undici": { + "optional": true + } + } + }, "node_modules/http-signature": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", @@ -1697,29 +1765,6 @@ "url": "https://opencollective.com/mochajs" } }, - "node_modules/mocha/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/mocha/node_modules/debug/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "node_modules/mocha/node_modules/glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", @@ -1999,6 +2044,12 @@ "node": ">=0.6" } }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true + }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -2038,6 +2089,12 @@ "node": ">=0.10.0" } }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true + }, "node_modules/restore-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", @@ -2296,16 +2353,27 @@ } }, "node_modules/tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.2.tgz", + "integrity": "sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==", "dev": true, "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" }, "engines": { - "node": ">=0.8" + "node": ">=6" + } + }, + "node_modules/tough-cookie/node_modules/universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" } }, "node_modules/tslib": { @@ -2362,6 +2430,16 @@ "node": ">=8" } }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dev": true, + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, "node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -2423,41 +2501,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -2576,6 +2619,18 @@ "tough-cookie": "~2.5.0", "tunnel-agent": "^0.6.0", "uuid": "^8.3.2" + }, + "dependencies": { + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + } } }, "@cypress/xvfb": { @@ -2600,9 +2655,9 @@ } }, "@renku/notebooks-cypress-tests": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/@renku/notebooks-cypress-tests/-/notebooks-cypress-tests-0.0.5.tgz", - "integrity": "sha512-F9ynyf7hks+OKRqDgDOu1BeWP6daUzwa96YMKJIrjxISpIlWIVlX6BD4VSt//RUvvsMmbT8ayPWZ27Y504VWaQ==", + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/@renku/notebooks-cypress-tests/-/notebooks-cypress-tests-0.0.6.tgz", + "integrity": "sha512-Axw+lEM4D0/3za8o6uIl8uxmqFnbWOerFaKQGFl4c+YA+eZEb2DZgKPNw+Bh39C90g9KLNZGSJuIknqNkYq7vA==", "dev": true, "requires": { "cypress": "^10.8.0", @@ -2643,6 +2698,15 @@ "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", "dev": true }, + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "requires": { + "debug": "4" + } + }, "aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", @@ -2779,6 +2843,15 @@ } } }, + "axios-cookiejar-support": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/axios-cookiejar-support/-/axios-cookiejar-support-4.0.3.tgz", + "integrity": "sha512-fMQc0mPR1CikWZEwVC6Av+sD4cJuV2eo06HFA+DfhY54uRcO43ILGxaq7YAMTiM0V0SdJCV4NhE1bOsQYlfSkg==", + "dev": true, + "requires": { + "http-cookie-agent": "^4.0.2" + } + }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -3427,6 +3500,15 @@ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, + "http-cookie-agent": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/http-cookie-agent/-/http-cookie-agent-4.0.2.tgz", + "integrity": "sha512-noTmxdH5CuytTnLj/Qv3Z84e/YFq8yLXAw3pqIYZ25Edhb9pQErIAC+ednw40Cic6Le/h9ryph5/TqsvkOaUCw==", + "dev": true, + "requires": { + "agent-base": "^6.0.2" + } + }, "http-signature": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", @@ -3794,23 +3876,6 @@ "yargs-unparser": "2.0.0" }, "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - }, - "dependencies": { - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } - } - }, "glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", @@ -4018,6 +4083,12 @@ "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "dev": true }, + "querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true + }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -4051,6 +4122,12 @@ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true + }, "restore-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", @@ -4236,13 +4313,23 @@ } }, "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.2.tgz", + "integrity": "sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==", "dev": true, "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, + "dependencies": { + "universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "dev": true + } } }, "tslib": { @@ -4284,6 +4371,16 @@ "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", "dev": true }, + "url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dev": true, + "requires": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -4325,34 +4422,6 @@ "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - } } }, "wrappy": { diff --git a/acceptance-tests/package.json b/acceptance-tests/package.json index 168e85ab..daa950e3 100644 --- a/acceptance-tests/package.json +++ b/acceptance-tests/package.json @@ -8,9 +8,11 @@ }, "author": "", "devDependencies": { - "@renku/notebooks-cypress-tests": "^0.0.5", + "@renku/notebooks-cypress-tests": "^0.0.6", "axios": "^0.27.2", + "axios-cookiejar-support": "^4.0.3", "cypress": "^10.8.0", - "mocha": "^10.0.0" + "mocha": "^10.0.0", + "tough-cookie": "^4.1.2" } } diff --git a/acceptance-tests/test.js b/acceptance-tests/test.js index 76329706..f385b9b8 100644 --- a/acceptance-tests/test.js +++ b/acceptance-tests/test.js @@ -3,7 +3,11 @@ const cypress = require('cypress'); const util = require('util'); const exec = util.promisify(require('child_process').exec); const axios = require('axios').default; +const wrapper = require("axios-cookiejar-support").wrapper +const CookieJar = require("tough-cookie").CookieJar +const jar = new CookieJar(); +const client = wrapper(axios.create({ jar })); const host = "localhost"; const k8sNamespace = process.env.K8S_NAMESPACE || "default"; const image = process.env.TEST_IMAGE_NAME || "jupyter/base-notebook:latest"; @@ -25,7 +29,15 @@ spec: host: ${host} path: /${sessionName} ingressAnnotations: - kubernetes.io/ingress.class: "nginx" + kubernetes.io/ingress.class: "nginx" + patches: + - patch: + - op: add + path: /statefulset/spec/template/spec/containers/0/command + value: + - jupyter + - notebook + type: application/json-patch+json auth: token: "" ` @@ -41,7 +53,7 @@ const checkStatusCode = async function (url) { while (true) { console.log("Waiting for container to become ready...") try { - res = await axios.get(url) + res = await client.get(url) if (res.status < 300) { console.log(`Response from starting container succeeded with status code: ${res.status}`) return {"status": res.status}; @@ -80,16 +92,27 @@ EOF`); const {status} = await checkStatusCode(url); assert(status < 300) }); - it('Should pass all acceptance tests', async function () { - console.log("Starting cypress tests") + it('Should pass all Cypress tests on chrome', async function () { const results = await cypress.run({ env: { URL: url }, spec: `cypress/e2e/${testSpec}`, - configFile: "cypress.config.js" + configFile: "cypress.config.js", + browser: "chrome" }) - assert(!results.totalFailed, `Tests failed with errors`) + assert(!results.totalFailed, `Tests failed with errors on chrome.`) + }); + it('Should pass all Cypress tests on firefox', async function () { + const results = await cypress.run({ + env: { + URL: url + }, + spec: `cypress/e2e/${testSpec}`, + configFile: "cypress.config.js", + browser: "firefox" + }) + assert(!results.totalFailed, `Tests failed with errors on firefox.`) }); after(async function () { console.log(`Stopping session with image ${image}.`)