From 76bbb8acf222a090d61855b5f89e83915812c609 Mon Sep 17 00:00:00 2001 From: Yury Shkoda Date: Mon, 29 May 2023 18:11:25 +0300 Subject: [PATCH] chore(sasjsTests): debugging --- cypress.json | 2 +- sasjs-tests/src/App.tsx | 28 ++++++++++----------- sasjs-tests/src/testSuites/Basic.ts | 38 ++++++++++++++--------------- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/cypress.json b/cypress.json index ddb5a1c..a69af2c 100644 --- a/cypress.json +++ b/cypress.json @@ -6,6 +6,6 @@ "username": "", "password": "", "screenshotOnRunFailure": false, - "testingFinishTimeout": 240000 + "testingFinishTimeout": 600000 } } diff --git a/sasjs-tests/src/App.tsx b/sasjs-tests/src/App.tsx index a1f2259..c5f90ed 100644 --- a/sasjs-tests/src/App.tsx +++ b/sasjs-tests/src/App.tsx @@ -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) } diff --git a/sasjs-tests/src/testSuites/Basic.ts b/sasjs-tests/src/testSuites/Basic.ts index fb9ba18..a318004 100644 --- a/sasjs-tests/src/testSuites/Basic.ts +++ b/sasjs-tests/src/testSuites/Basic.ts @@ -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: