mirror of
https://github.com/sasjs/adapter.git
synced 2026-04-21 13:11:31 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 63a863f9e2 |
@@ -97,7 +97,6 @@ jobs:
|
|||||||
npm i
|
npm i
|
||||||
jq '.sasJsConfig.serverUrl |= "${{ secrets.SASJS_SERVER_URL }}"' ./public/config.json > ./public/config.temp && mv ./public/config.temp ./public/config.json
|
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.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 '.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
|
jq '.password |= "${{ secrets.SASJS_PASSWORD }}"' ./public/config.json > ./public/config.temp && mv ./public/config.temp ./public/config.json
|
||||||
|
|
||||||
@@ -111,10 +110,8 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Run cypress on sasjs
|
- name: Run cypress on sasjs
|
||||||
env:
|
|
||||||
TERM: dumb
|
|
||||||
run: |
|
run: |
|
||||||
sed -i "s|sasjsTestsUrl: '.*'|sasjsTestsUrl: 'http://localhost:3000'|g" ./cypress.config.js
|
sed -i "s|sasjsTestsUrl: '.*'|sasjsTestsUrl: 'http://localhost:5173'|g" ./cypress.config.js
|
||||||
sed -i "s|username: '.*'|username: '${{ secrets.SASJS_USERNAME }}'|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
|
sed -i "s|password: '.*'|password: '${{ secrets.SASJS_PASSWORD }}'|g" ./cypress.config.js
|
||||||
cat ./cypress.config.js
|
cat ./cypress.config.js
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
tasks:
|
||||||
|
- init: npm install && npm run build
|
||||||
+1
-1
@@ -9,7 +9,7 @@ module.exports = defineConfig({
|
|||||||
supportFile: 'cypress/support/index.js'
|
supportFile: 'cypress/support/index.js'
|
||||||
},
|
},
|
||||||
env: {
|
env: {
|
||||||
sasjsTestsUrl: 'http://localhost:3000',
|
sasjsTestsUrl: 'http://localhost:5173',
|
||||||
username: '',
|
username: '',
|
||||||
password: '',
|
password: '',
|
||||||
screenshotOnRunFailure: false,
|
screenshotOnRunFailure: false,
|
||||||
|
|||||||
@@ -9,12 +9,10 @@ context('sasjs-tests', function () {
|
|||||||
})
|
})
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit(sasjsTestsUrl)
|
cy.reload()
|
||||||
})
|
})
|
||||||
|
|
||||||
function loginIfNeeded() {
|
function loginIfNeeded() {
|
||||||
cy.get('login-form, tests-view', { timeout: 30000 }).should('exist')
|
|
||||||
|
|
||||||
cy.get('body').then(($body) => {
|
cy.get('body').then(($body) => {
|
||||||
if ($body.find('login-form').length > 0) {
|
if ($body.find('login-form').length > 0) {
|
||||||
cy.get('login-form')
|
cy.get('login-form')
|
||||||
|
|||||||
Generated
+308
-221
File diff suppressed because it is too large
Load Diff
+3
-3
@@ -53,7 +53,7 @@
|
|||||||
"cp": "0.2.0",
|
"cp": "0.2.0",
|
||||||
"cypress": "^15.7.1",
|
"cypress": "^15.7.1",
|
||||||
"dotenv": "16.0.0",
|
"dotenv": "16.0.0",
|
||||||
"express": "4.17.3",
|
"express": "4.22.1",
|
||||||
"jest": "29.7.0",
|
"jest": "29.7.0",
|
||||||
"jest-environment-jsdom": "^29.7.0",
|
"jest-environment-jsdom": "^29.7.0",
|
||||||
"jest-extended": "4.0.2",
|
"jest-extended": "4.0.2",
|
||||||
@@ -76,8 +76,8 @@
|
|||||||
},
|
},
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sasjs/utils": "^3.5.6",
|
"@sasjs/utils": "3.5.6",
|
||||||
"axios": "1.15.0",
|
"axios": "1.12.2",
|
||||||
"axios-cookiejar-support": "5.0.5",
|
"axios-cookiejar-support": "5.0.5",
|
||||||
"form-data": "4.0.4",
|
"form-data": "4.0.4",
|
||||||
"https": "1.0.0",
|
"https": "1.0.0",
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"name": "4gl",
|
"name": "4gl",
|
||||||
"serverUrl": "https://sas.4gl.io",
|
"serverUrl": "https://sas9.4gl.io",
|
||||||
"serverType": "SASJS",
|
"serverType": "SASJS",
|
||||||
"httpsAgentOptions": {
|
"httpsAgentOptions": {
|
||||||
"allowInsecureRequests": false
|
"allowInsecureRequests": false
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite'
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
server: {
|
|
||||||
port: 3000
|
|
||||||
},
|
|
||||||
build: {
|
build: {
|
||||||
assetsInlineLimit: 0,
|
assetsInlineLimit: 0,
|
||||||
assetsDir: ''
|
assetsDir: ''
|
||||||
|
|||||||
@@ -97,10 +97,12 @@ export class WebJobExecutor extends BaseJobExecutor {
|
|||||||
apiUrl = apiUrl.replace('_program=', '__program=')
|
apiUrl = apiUrl.replace('_program=', '__program=')
|
||||||
}
|
}
|
||||||
|
|
||||||
// Append context name to URL if provided and non-empty
|
// if context name exists and is not blank string
|
||||||
apiUrl += config.contextName?.trim()
|
// then add _contextname variable in apiUrl
|
||||||
? `&_contextname=${encodeURIComponent(config.contextName)}`
|
apiUrl +=
|
||||||
: ''
|
config.contextName && !/\s/.test(config.contextName)
|
||||||
|
? `&_contextname=${config.contextName}`
|
||||||
|
: ''
|
||||||
}
|
}
|
||||||
|
|
||||||
let requestParams = {
|
let requestParams = {
|
||||||
|
|||||||
Reference in New Issue
Block a user