1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-17 00:50:05 +00:00

chore(sasjsTests): debugging

This commit is contained in:
Yury Shkoda
2023-05-29 18:11:25 +03:00
parent 1ead483921
commit 76bbb8acf2
3 changed files with 34 additions and 34 deletions

View File

@@ -6,6 +6,6 @@
"username": "", "username": "",
"password": "", "password": "",
"screenshotOnRunFailure": false, "screenshotOnRunFailure": false,
"testingFinishTimeout": 240000 "testingFinishTimeout": 600000
} }
} }

View File

@@ -2,11 +2,11 @@ import React, { ReactElement, useState, useContext, useEffect } from 'react'
import { TestSuiteRunner, TestSuite, AppContext } from '@sasjs/test-framework' import { TestSuiteRunner, TestSuite, AppContext } from '@sasjs/test-framework'
import { basicTests } from './testSuites/Basic' import { basicTests } from './testSuites/Basic'
import { sendArrTests, sendObjTests } from './testSuites/RequestData' import { sendArrTests, sendObjTests } from './testSuites/RequestData'
// import { specialCaseTests } from './testSuites/SpecialCases' import { specialCaseTests } from './testSuites/SpecialCases'
// import { sasjsRequestTests } from './testSuites/SasjsRequests' import { sasjsRequestTests } from './testSuites/SasjsRequests'
// import '@sasjs/test-framework/dist/index.css' import '@sasjs/test-framework/dist/index.css'
// import { computeTests } from './testSuites/Compute' import { computeTests } from './testSuites/Compute'
// import { fileUploadTests } from './testSuites/FileUpload' import { fileUploadTests } from './testSuites/FileUpload'
const App = (): ReactElement<{}> => { const App = (): ReactElement<{}> => {
const { adapter, config } = useContext(AppContext) const { adapter, config } = useContext(AppContext)
@@ -16,17 +16,17 @@ const App = (): ReactElement<{}> => {
useEffect(() => { useEffect(() => {
if (adapter) { if (adapter) {
const testSuites = [ const testSuites = [
// basicTests(adapter, config.userName, config.password) basicTests(adapter, config.userName, config.password),
sendArrTests(adapter, appLoc) sendArrTests(adapter, appLoc),
// sendObjTests(adapter), sendObjTests(adapter),
// specialCaseTests(adapter), specialCaseTests(adapter),
// sasjsRequestTests(adapter), sasjsRequestTests(adapter),
// fileUploadTests(adapter) fileUploadTests(adapter)
] ]
// if (adapter.getSasjsConfig().serverType === 'SASVIYA') { if (adapter.getSasjsConfig().serverType === 'SASVIYA') {
// testSuites.push(computeTests(adapter, appLoc)) testSuites.push(computeTests(adapter, appLoc))
// } }
setTestSuites(testSuites) setTestSuites(testSuites)
} }

View File

@@ -67,26 +67,26 @@ export const basicTests = (
assertion: (response: any) => assertion: (response: any) =>
response && response.isLoggedIn && response.userName === userName response && response.isLoggedIn && response.userName === userName
}, },
// { {
// title: 'Trigger login callback', title: 'Trigger login callback',
// description: description:
// 'Should trigger required login callback and after successful login, it should finish the request', 'Should trigger required login callback and after successful login, it should finish the request',
// test: async () => { test: async () => {
// await adapter.logOut() await adapter.logOut()
// return await adapter.request( return await adapter.request(
// 'common/sendArr', 'common/sendArr',
// stringData, stringData,
// undefined, undefined,
// async () => { async () => {
// await adapter.logIn(userName, password) await adapter.logIn(userName, password)
// } }
// ) )
// }, },
// assertion: (response: any) => { assertion: (response: any) => {
// return response.table1[0][0] === stringData.table1[0].col1 return response.table1[0][0] === stringData.table1[0].col1
// } }
// }, },
{ {
title: 'Request with debug on', title: 'Request with debug on',
description: description: