diff --git a/.github/workflows/server-tests.yml b/.github/workflows/server-tests.yml index 3654adc7..89f4dc40 100644 --- a/.github/workflows/server-tests.yml +++ b/.github/workflows/server-tests.yml @@ -97,6 +97,7 @@ jobs: npm i jq '.sasJsConfig.serverUrl |= "${{ secrets.SASJS_SERVER_URL }}"' ./public/config.json > ./public/config.temp && mv ./public/config.temp ./public/config.json jq '.sasJsConfig.serverType |= "SASJS"' ./public/config.json > ./public/config.temp && mv ./public/config.temp ./public/config.json + jq '.sasJsConfig.loginMechanism |= "Default"' ./public/config.json > ./public/config.temp && mv ./public/config.temp ./public/config.json jq '.userName |= "${{ secrets.SASJS_USERNAME }}"' ./public/config.json > ./public/config.temp && mv ./public/config.temp ./public/config.json jq '.password |= "${{ secrets.SASJS_PASSWORD }}"' ./public/config.json > ./public/config.temp && mv ./public/config.temp ./public/config.json @@ -110,8 +111,10 @@ jobs: shell: bash - name: Run cypress on sasjs + env: + TERM: dumb run: | - sed -i "s|sasjsTestsUrl: '.*'|sasjsTestsUrl: 'http://localhost:5173'|g" ./cypress.config.js + sed -i "s|sasjsTestsUrl: '.*'|sasjsTestsUrl: 'http://localhost:3000'|g" ./cypress.config.js sed -i "s|username: '.*'|username: '${{ secrets.SASJS_USERNAME }}'|g" ./cypress.config.js sed -i "s|password: '.*'|password: '${{ secrets.SASJS_PASSWORD }}'|g" ./cypress.config.js cat ./cypress.config.js diff --git a/cypress.config.js b/cypress.config.js index 2e2a7e37..62ca1ffe 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -9,7 +9,7 @@ module.exports = defineConfig({ supportFile: 'cypress/support/index.js' }, env: { - sasjsTestsUrl: 'http://localhost:5173', + sasjsTestsUrl: 'http://localhost:3000', username: '', password: '', screenshotOnRunFailure: false, diff --git a/cypress/integration/sasjs.tests.ts b/cypress/integration/sasjs.tests.ts index e999de7b..07d82a31 100644 --- a/cypress/integration/sasjs.tests.ts +++ b/cypress/integration/sasjs.tests.ts @@ -9,10 +9,12 @@ context('sasjs-tests', function () { }) beforeEach(() => { - cy.reload() + cy.visit(sasjsTestsUrl) }) function loginIfNeeded() { + cy.get('login-form, tests-view', { timeout: 30000 }).should('exist') + cy.get('body').then(($body) => { if ($body.find('login-form').length > 0) { cy.get('login-form') diff --git a/package-lock.json b/package-lock.json index 14e0a69b..bed5992f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "license": "ISC", "dependencies": { "@sasjs/utils": "3.5.6", - "axios": "^1.13.5", + "axios": "1.13.5", "axios-cookiejar-support": "5.0.5", "form-data": "4.0.4", "https": "1.0.0", diff --git a/package.json b/package.json index 0d8c56aa..235c6ad4 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "main": "index.js", "dependencies": { "@sasjs/utils": "3.5.6", - "axios": "^1.13.5", + "axios": "1.13.5", "axios-cookiejar-support": "5.0.5", "form-data": "4.0.4", "https": "1.0.0", diff --git a/sasjs-tests/sasjs/sasjsconfig.json b/sasjs-tests/sasjs/sasjsconfig.json index bb61281f..530c5f76 100644 --- a/sasjs-tests/sasjs/sasjsconfig.json +++ b/sasjs-tests/sasjs/sasjsconfig.json @@ -7,7 +7,7 @@ "targets": [ { "name": "4gl", - "serverUrl": "https://sas9.4gl.io", + "serverUrl": "https://sas.4gl.io", "serverType": "SASJS", "httpsAgentOptions": { "allowInsecureRequests": false diff --git a/sasjs-tests/vite.config.js b/sasjs-tests/vite.config.js index 44484a70..d9492f79 100644 --- a/sasjs-tests/vite.config.js +++ b/sasjs-tests/vite.config.js @@ -1,5 +1,8 @@ import { defineConfig } from 'vite' export default defineConfig({ + server: { + port: 3000 + }, build: { assetsInlineLimit: 0, assetsDir: ''