mirror of
https://github.com/sasjs/adapter.git
synced 2025-12-11 01:14:36 +00:00
chore(sasjsTests): debugging
This commit is contained in:
@@ -6,6 +6,6 @@
|
||||
"username": "",
|
||||
"password": "",
|
||||
"screenshotOnRunFailure": false,
|
||||
"testingFinishTimeout": 240000
|
||||
"testingFinishTimeout": 600000
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,11 +2,11 @@ import React, { ReactElement, useState, useContext, useEffect } from 'react'
|
||||
import { TestSuiteRunner, TestSuite, AppContext } from '@sasjs/test-framework'
|
||||
import { basicTests } from './testSuites/Basic'
|
||||
import { sendArrTests, sendObjTests } from './testSuites/RequestData'
|
||||
// import { specialCaseTests } from './testSuites/SpecialCases'
|
||||
// import { sasjsRequestTests } from './testSuites/SasjsRequests'
|
||||
// import '@sasjs/test-framework/dist/index.css'
|
||||
// import { computeTests } from './testSuites/Compute'
|
||||
// import { fileUploadTests } from './testSuites/FileUpload'
|
||||
import { specialCaseTests } from './testSuites/SpecialCases'
|
||||
import { sasjsRequestTests } from './testSuites/SasjsRequests'
|
||||
import '@sasjs/test-framework/dist/index.css'
|
||||
import { computeTests } from './testSuites/Compute'
|
||||
import { fileUploadTests } from './testSuites/FileUpload'
|
||||
|
||||
const App = (): ReactElement<{}> => {
|
||||
const { adapter, config } = useContext(AppContext)
|
||||
@@ -16,17 +16,17 @@ const App = (): ReactElement<{}> => {
|
||||
useEffect(() => {
|
||||
if (adapter) {
|
||||
const testSuites = [
|
||||
// basicTests(adapter, config.userName, config.password)
|
||||
sendArrTests(adapter, appLoc)
|
||||
// sendObjTests(adapter),
|
||||
// specialCaseTests(adapter),
|
||||
// sasjsRequestTests(adapter),
|
||||
// fileUploadTests(adapter)
|
||||
basicTests(adapter, config.userName, config.password),
|
||||
sendArrTests(adapter, appLoc),
|
||||
sendObjTests(adapter),
|
||||
specialCaseTests(adapter),
|
||||
sasjsRequestTests(adapter),
|
||||
fileUploadTests(adapter)
|
||||
]
|
||||
|
||||
// if (adapter.getSasjsConfig().serverType === 'SASVIYA') {
|
||||
// testSuites.push(computeTests(adapter, appLoc))
|
||||
// }
|
||||
if (adapter.getSasjsConfig().serverType === 'SASVIYA') {
|
||||
testSuites.push(computeTests(adapter, appLoc))
|
||||
}
|
||||
|
||||
setTestSuites(testSuites)
|
||||
}
|
||||
|
||||
@@ -67,26 +67,26 @@ export const basicTests = (
|
||||
assertion: (response: any) =>
|
||||
response && response.isLoggedIn && response.userName === userName
|
||||
},
|
||||
// {
|
||||
// title: 'Trigger login callback',
|
||||
// description:
|
||||
// 'Should trigger required login callback and after successful login, it should finish the request',
|
||||
// test: async () => {
|
||||
// await adapter.logOut()
|
||||
{
|
||||
title: 'Trigger login callback',
|
||||
description:
|
||||
'Should trigger required login callback and after successful login, it should finish the request',
|
||||
test: async () => {
|
||||
await adapter.logOut()
|
||||
|
||||
// return await adapter.request(
|
||||
// 'common/sendArr',
|
||||
// stringData,
|
||||
// undefined,
|
||||
// async () => {
|
||||
// await adapter.logIn(userName, password)
|
||||
// }
|
||||
// )
|
||||
// },
|
||||
// assertion: (response: any) => {
|
||||
// return response.table1[0][0] === stringData.table1[0].col1
|
||||
// }
|
||||
// },
|
||||
return await adapter.request(
|
||||
'common/sendArr',
|
||||
stringData,
|
||||
undefined,
|
||||
async () => {
|
||||
await adapter.logIn(userName, password)
|
||||
}
|
||||
)
|
||||
},
|
||||
assertion: (response: any) => {
|
||||
return response.table1[0][0] === stringData.table1[0].col1
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'Request with debug on',
|
||||
description:
|
||||
|
||||
Reference in New Issue
Block a user