We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentd7f6949 commit0f8c72dCopy full SHA for 0f8c72d
src/editor/commands.ts
@@ -3,7 +3,7 @@ import * as TT from 'typings/tutorial'
3
import*asvscodefrom'vscode'
4
importcreateTestRunnerfrom'../services/testRunner'
5
import{setupActions}from'../actions/setupActions'
6
-importcreateWebViewfrom'../webview'
+importcreateWebViewfrom'../services/webview'
7
importloggerfrom'../services/logger'
8
9
exportconstCOMMANDS={
@@ -62,9 +62,9 @@ export const createCommands = ({ extensionPath, workspaceState }: CreateCommandP
62
// send test pass message back to client
63
webview.send({type:'TEST_PASS',payload:{ position}})
64
},
65
-onFail:(position:T.Position,message:string)=>{
+onFail:(position:T.Position,failSummary:T.TestFail):void=>{
66
// send test fail message back to client with failure message
67
-webview.send({type:'TEST_FAIL',payload:{ position,message}})
+webview.send({type:'TEST_FAIL',payload:{ position,fail:failSummary}})
68
69
onError:(position:T.Position)=>{
70
// TODO: send test error message back to client
src/services/testRunner/formatOutput.ts
@@ -4,7 +4,7 @@ import { ParserOutput, Fail } from './parser'
// export const formatSuccessOutput = (tap: ParserOutput): string => {}
exportconstformatFailOutput=(tap:ParserOutput):string=>{
-letoutput=`FAILEDTESTS\n`
+letoutput=`FAILEDTEST LOG\n`
tap.failed.forEach((fail:Fail)=>{
constdetails=fail.details ?`\n${fail.details}\n` :''
10
constlogs=fail.logs ?`\n${fail.logs.join('\n')}\n` :''
src/services/testRunner/index.ts
@@ -10,7 +10,7 @@ import { formatFailOutput } from './formatOutput'
11
interfaceCallbacks{
12
onSuccess(position:T.Position):void
13
-onFail(position:T.Position,message:string):void
+onFail(position:T.Position,failSummary:T.TestFail):void
14
onRun(position:T.Position):void
15
onError(position:T.Position):void
16
}
@@ -56,8 +56,12 @@ const createTestRunner = (config: TT.TutorialTestRunnerConfig, callbacks: Callba
56
if(stderr){
57
// FAIL also trigger stderr
58
if(stdout&&stdout.length&&!tap.ok){
59
-constfirstFailMessage=tap.failed[0].message
60
-callbacks.onFail(position,firstFailMessage)
+constfirstFail=tap.failed[0]
+constfailSummary={
61
+title:firstFail.message||'Test Failed',
+description:firstFail.details||'Unknown error',
+}
+callbacks.onFail(position,failSummary)
constoutput=formatFailOutput(tap)
displayOutput({channel:failChannelName,text:output,show:true})
return
src/services/testRunner/output.ts
@@ -18,13 +18,11 @@ interface DisplayOutput {
18
exportconstdisplayOutput=(params:DisplayOutput)=>{
19
constchannel=getOutputChannel(params.channel)
20
channel.clear()
21
-channel.show(params.show||false)
22
channel.append(params.text)
23
24
25
exportconstclearOutput=(channelName:string)=>{
26
constchannel=getOutputChannel(channelName)
27
-channel.show(false)
28
29
channel.hide()
30
src/webview/index.tsrenamed to src/services/webview/index.ts
@@ -1,7 +1,7 @@
1
import*aspathfrom'path'
2
import{Action}from'typings'
-importChannelfrom'../channel'
+importChannelfrom'../../channel'
importrenderfrom'./render'
interfaceReactWebViewProps{
src/webview/render.tsrenamed to src/services/webview/render.ts
import{JSDOM}from'jsdom'
-importonErrorfrom'../services/sentry/onError'
+importonErrorfrom'../sentry/onError'
constgetNonce=():string=>{
lettext=''
typings/index.d.ts
@@ -42,6 +42,7 @@ export interface TestStatus {
42
type:'success'|'warning'|'error'|'loading'
43
title:string
44
content?:string
45
+timeout?:number
46
47
48
exportinterfaceMachineContext{
@@ -116,3 +117,8 @@ export interface ProcessEvent {
116
117
description:string
118
status:'RUNNING'|'SUCCESS'|'FAIL'|'ERROR'
119
120
+
121
+exporttypeTestFail={
122
+title:string
123
+description:string
124
web-app/src/components/ProcessMessages/TestMessage.tsx
@@ -5,7 +5,7 @@ import { css, jsx } from '@emotion/core'
constdurations={
success:1000,
-warning:4500,
+warning:20000,
error:4500,
loading:300000,
web-app/src/services/state/actions/testNotify.ts
@@ -20,8 +20,8 @@ const testActions: ActionFunctionMap<CR.MachineContext, CR.MachineEvent> = {
testFail:assign({
testStatus:(context,event)=>({
type:'warning',
-title:'Fail!',
-content:event.payload.message,
+title:event.payload.fail.title,
+content:event.payload.fail.description,
}),
//@ts-ignore