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

Commitae4c5d0

Browse files
committed
remove save from ui
1 parent299769f commitae4c5d0

File tree

9 files changed

+21
-36
lines changed

9 files changed

+21
-36
lines changed

‎src/actions/runTest.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ interface Props {
2727
}
2828

2929
asyncfunctionrunTest({onSuccess, onFail, onRun, onError}:Props):Promise<void>{
30+
console.log('------------------- run test ------------------')
3031
// increment process id
3132
constprocessId=++currentId
3233

@@ -44,6 +45,7 @@ async function runTest({onSuccess, onFail, onRun, onError}: Props): Promise<void
4445
// jest CLI docs https://jestjs.io/docs/en/cli
4546
consttestArgs=[
4647
'--json',
48+
'--onlyChanged',
4749
'--env=node',
4850
'--maxConcurrency=4',
4951
'--maxWorkers=4'

‎src/actions/tutorialConfig.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ interface TutorialConfigParams {
99
}
1010

1111
consttutorialConfig=async({tutorial, alreadyConfigured, onComplete}:TutorialConfigParams)=>{
12+
console.log('---------- tutorialConfig -----------')
1213
if(!alreadyConfigured){
1314
// setup git, add remote
1415
awaitgit.initIfNotExists()

‎src/channel/index.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,6 @@ class Channel implements Channel {
9494
this.context.position.set(action.payload.position)
9595
this.context.progress.set(action.payload.progress)
9696
return
97-
// run unit tests on step
98-
case'TEST_RUN':
99-
vscode.commands.executeCommand('coderoad.run_test',action.payload)
100-
return
10197
// load step actions (git commits, commands, open files)
10298
case'SETUP_ACTIONS':
10399
vscode.commands.executeCommand('coderoad.set_current_step',action.payload)

‎src/editor/commands.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export const createCommands = ({extensionPath, workspaceState, workspaceRoot}: C
6464
currentStepId=stepId
6565
},
6666
[COMMANDS.RUN_TEST]:(current:{stepId:string}|undefined)=>{
67+
console.log('-------- command.run_test ------ ')
6768
// use stepId from client, or last set stepId
6869
constpayload={stepId:current ?current.stepId :currentStepId}
6970
runTest({
@@ -85,9 +86,9 @@ export const createCommands = ({extensionPath, workspaceState, workspaceRoot}: C
8586
webview.send({type:'TEST_ERROR', payload})
8687
},
8788
onRun:()=>{
88-
console.log('COMMANDTEST_RUN')
89+
console.log('COMMANDTEST_RUNNING')
8990
// send test run message back to client
90-
webview.send({type:'TEST_RUN', payload})
91+
webview.send({type:'TEST_RUNNING', payload})
9192
}
9293
})
9394
},

‎web-app/src/containers/Tutorial/StagePage/Stage/index.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,10 @@ const styles = {
2525
interfaceProps{
2626
stage:T.Stage
2727
onContinue():void
28-
onSave():void
2928
onLoadSolution():void
3029
}
3130

32-
constStage=({ stage, onContinue,onSave,onLoadSolution}:Props)=>{
31+
constStage=({ stage, onContinue, onLoadSolution}:Props)=>{
3332
if(!stage.steps){
3433
thrownewError('No Stage steps found')
3534
}
@@ -62,14 +61,10 @@ const Stage = ({ stage, onContinue, onSave, onLoadSolution }: Props) => {
6261
</Step>
6362
</div>
6463

65-
{stage.status==='COMPLETE'?(
64+
{stage.status==='COMPLETE'&&(
6665
<divstyle={styles.options}>
6766
<ButtononClick={onContinue}>Continue</Button>
6867
</div>
69-
) :(
70-
<divstyle={styles.options}>
71-
<ButtononClick={onSave}>Save</Button>
72-
</div>
7368
)}
7469
</div>
7570
)

‎web-app/src/containers/Tutorial/StagePage/index.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,6 @@ const StageSummaryPageContainer = (props: PageProps) => {
2424
})
2525
}
2626

27-
constonSave=():void=>{
28-
props.send({
29-
type:'TEST_RUN',
30-
payload:{
31-
stepId:position.stepId,
32-
},
33-
})
34-
}
35-
3627
constonLoadSolution=():void=>{
3728
props.send({type:'STEP_SOLUTION_LOAD'})
3829
}
@@ -48,7 +39,7 @@ const StageSummaryPageContainer = (props: PageProps) => {
4839
})
4940
stage.status=progress.stages[position.stageId] ?'COMPLETE' :'ACTIVE'
5041

51-
return<Stagestage={stage}onContinue={onContinue}onSave={onSave}onLoadSolution={onLoadSolution}/>
42+
return<Stagestage={stage}onContinue={onContinue}onLoadSolution={onLoadSolution}/>
5243
}
5344

5445
exportdefaultStageSummaryPageContainer

‎web-app/src/services/channel/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ class Channel {
5353
case'TEST_FAIL':
5454
this.machineSend(action)
5555
return
56-
case'TEST_RUN':
57-
console.log('TEST_RUN')
56+
case'TEST_RUNNING':
5857
this.machineSend(action)
5958
return
6059
case'TEST_ERROR':

‎web-app/src/services/state/actions/editor.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,16 @@ export default {
5454
type:'EDITOR_TUTORIAL_CONTINUE_CONFIG',
5555
})
5656
},
57-
testStart(context:CR.MachineContext,event:CR.MachineEvent){
58-
console.log('EDITOR: TEST_RUN')
59-
const{stepId}=event.payload
60-
channel.editorSend({
61-
type:'TEST_RUN',
62-
payload:{
63-
stepId,
64-
}
65-
})
66-
},
57+
//testStart(context: CR.MachineContext, event: CR.MachineEvent) {
58+
//console.log('EDITOR: TEST_RUN')
59+
//const {stepId} = event.payload
60+
// //channel.editorSend({
61+
// //type: 'TEST_RUN',
62+
// //payload: {
63+
// //stepId,
64+
// //}
65+
// //})
66+
//},
6767
loadLevel(context:CR.MachineContext):void{
6868
constlevel:G.Level=selectors.currentLevel(context)
6969
if(level.setup){

‎web-app/src/services/state/machine.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export const machine = Machine<CR.MachineContext, CR.MachineStateSchema, CR.Mach
111111
states:{
112112
Normal:{
113113
on:{
114-
TEST_RUN:'TestRunning',
114+
TEST_RUNNING:'TestRunning',
115115
STEP_SOLUTION_LOAD:{
116116
actions:['editorLoadSolution'],
117117
},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp