mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-17 17:10:05 +00:00
chore(cypress): debugging
This commit is contained in:
@@ -25,6 +25,8 @@ context('sasjs-tests', function () {
|
|||||||
'.ui.massive.icon.primary.left.labeled.button'
|
'.ui.massive.icon.primary.left.labeled.button'
|
||||||
)[0]
|
)[0]
|
||||||
|
|
||||||
|
// ui massive icon primary left labeled button
|
||||||
|
|
||||||
cy.task('log', `startButton: ${startButton}`)
|
cy.task('log', `startButton: ${startButton}`)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
@@ -35,8 +37,17 @@ context('sasjs-tests', function () {
|
|||||||
cy.task('log', `username: ${username}`)
|
cy.task('log', `username: ${username}`)
|
||||||
cy.task('log', `password: ${password}`)
|
cy.task('log', `password: ${password}`)
|
||||||
|
|
||||||
|
const userNameInput = cy.get('input[placeholder="User Name"]')
|
||||||
|
const passwordInput = cy.get('input[placeholder="Password"]')
|
||||||
|
|
||||||
|
cy.task('log', `userNameInput: ${userNameInput}`)
|
||||||
|
cy.task('log', `passwordInput: ${passwordInput}`)
|
||||||
|
|
||||||
cy.get('input[placeholder="User Name"]').type(username)
|
cy.get('input[placeholder="User Name"]').type(username)
|
||||||
cy.get('input[placeholder="Password"]').type(password)
|
cy.get('input[placeholder="Password"]').type(password)
|
||||||
|
const submitBtn = cy.get('.submit-button')
|
||||||
|
|
||||||
|
cy.task('log', `submitBtn: ${submitBtn}`)
|
||||||
cy.get('.submit-button').click()
|
cy.get('.submit-button').click()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,6 +59,13 @@ context('sasjs-tests', function () {
|
|||||||
.click()
|
.click()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
cy.task('log', `50`)
|
cy.task('log', `50`)
|
||||||
|
|
||||||
|
const loadingButton = $body.find(
|
||||||
|
'.ui.massive.loading.primary.button'
|
||||||
|
)[0]
|
||||||
|
|
||||||
|
cy.task('log', `loadingButton: ${loadingButton}`)
|
||||||
|
|
||||||
cy.get('.ui.massive.loading.primary.button', {
|
cy.get('.ui.massive.loading.primary.button', {
|
||||||
timeout: testingFinishTimeout
|
timeout: testingFinishTimeout
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import React, { ReactElement, useState, useContext, useEffect } from 'react'
|
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)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user