Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9556a84

Browse files
committed
show pass subtask when task passes
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parentd3ff8f9 commit9556a84

File tree

2 files changed

+16
-20
lines changed
  • src/services/testRunner
  • web-app/src/containers/Tutorial/components

2 files changed

+16
-20
lines changed

‎src/services/testRunner/index.ts

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,7 @@ const createTestRunner = (data: TT.Tutorial, callbacks: Callbacks) => {
5050
return
5151
}
5252

53-
console.log('STEP')
54-
console.log(JSON.stringify(step))
55-
56-
// flag as running
57-
// no need to flag subtasks as running
58-
if(!step.setup?.subtasks){
59-
callbacks.onRun(position)
60-
}
53+
callbacks.onRun(position)
6154

6255
letresult:{stdout:string|undefined;stderr:string|undefined}
6356
try{
@@ -98,16 +91,6 @@ const createTestRunner = (data: TT.Tutorial, callbacks: Callbacks) => {
9891

9992
consttap:ParserOutput=parser(stdout||'')
10093

101-
if(step.setup.subtasks){
102-
constsummary=parseSubtasks(tap.summary,position.stepId||'')
103-
104-
console.log('---subtask summary')
105-
console.log(summary)
106-
callbacks.onLoadSubtasks({ summary})
107-
// exit early
108-
return
109-
}
110-
11194
addOutput({channel:logChannelName,text:tap.logs.join('\n'),show:false})
11295

11396
if(stderr){
@@ -128,7 +111,18 @@ const createTestRunner = (data: TT.Tutorial, callbacks: Callbacks) => {
128111
description:firstFail.details||'Unknown error',
129112
summary:tap.summary,
130113
}
131-
callbacks.onFail(position,failSummary)
114+
115+
if(step.setup.subtasks){
116+
constsubtaskSummary=parseSubtasks(tap.summary,position.stepId||'')
117+
118+
callbacks.onFail(position,{
119+
...failSummary,
120+
summary:subtaskSummary,
121+
})
122+
}else{
123+
callbacks.onFail(position,failSummary)
124+
}
125+
132126
constoutput=formatFailOutput(tap)
133127
addOutput({channel:failChannelName,text:output,show:true})
134128
return
@@ -142,13 +136,15 @@ const createTestRunner = (data: TT.Tutorial, callbacks: Callbacks) => {
142136

143137
// PASS
144138
if(tap.ok){
139+
console.log('running pass')
145140
clearOutput(failChannelName)
146141

147142
callbacks.onSuccess(position)
148143

149144
if(onSuccess){
150145
onSuccess()
151146
}
147+
5
152148
}else{
153149
// should never get here
154150
onError(newError(`Error with running test${JSON.stringify(position)}`))

‎web-app/src/containers/Tutorial/components/Step.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const Step = (props: Props) => {
6767
<ulcss={styles.subtasks}>
6868
{props.subtasks.map((subtask)=>(
6969
<likey={subtask.name}css={styles.subtask}>
70-
<TestStatusIconsize="xs"checked={subtask.pass}/>
70+
<TestStatusIconsize="xs"checked={props.status==='COMPLETE'||subtask.pass}/>
7171

7272
<spanstyle={{marginLeft:'0.5rem'}}>{subtask.name}</span>
7373
</li>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp