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

Commit92522b1

Browse files
committed
fix up client tutorialConfig
1 parent0a47e7e commit92522b1

File tree

7 files changed

+23
-76
lines changed

7 files changed

+23
-76
lines changed

‎web-app/src/containers/Continue/queryTutorial.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import{gql}from'apollo-boost'
1+
import{gql}from'apollo-boost'
22

33
exportdefaultgql`
44
query getTutorial($tutorialId: ID!, $version: String) {
@@ -12,6 +12,7 @@ export default gql`
1212
}
1313
createdAt
1414
codingLanguage
15+
testRunner
1516
repo {
1617
uri
1718
branch

‎web-app/src/containers/Tutorial/StagePage/queryStage.ts

Lines changed: 0 additions & 41 deletions
This file was deleted.

‎web-app/src/containers/Tutorial/SummaryPage/querySummary.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ export default gql`
66
id
77
title
88
text
9+
codingLanguage
10+
testRunner
11+
repo {
12+
uri
13+
}
914
version(version: $version) {
1015
version
1116
coderoadVersion

‎web-app/src/services/apollo/queries/tutorialConfig.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

‎web-app/src/services/apollo/queries/tutorialRepo.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

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

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import channel from '../../channel'
33

44
exportdefault{
55
tutorialStart(){
6+
console.log('EDITOR: TUTORIAL_START')
67
channel.editorSend({
78
type:'TUTORIAL_START',
89
payload:{
@@ -12,11 +13,22 @@ export default {
1213
}
1314
})
1415
},
15-
testRunnerSetup(context:CR.MachineContext){
16-
console.log('test runner setup',context)
16+
tutorialConfig(context:CR.MachineContext){
17+
// setup test runner and git
18+
const{tutorial}=context
19+
constpayload={
20+
codingLanguage:tutorial.codingLanguage,
21+
testRunner:tutorial.testRunner,
22+
repo:tutorial.repo,
23+
}
24+
console.log('EDITOR: TUTORIAL_CONFIG')
25+
channel.editorSend({
26+
type:'TUTORIAL_CONFIG',
27+
payload,
28+
})
1729
},
1830
testStart(context:CR.MachineContext,event:CR.MachineEvent){
19-
console.log('test start')
31+
console.log('EDITOR: TEST_RUN')
2032
const{stepId}=event.payload
2133
channel.editorSend({
2234
type:'TEST_RUN',

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ export const machine = Machine<CR.MachineContext, CR.MachineStateSchema, CR.Mach
6060
Tutorial:{
6161
id:'tutorial',
6262
initial:'Initialize',
63-
onEntry:['testRunnerSetup'],
6463
states:{
6564
Initialize:{
6665
onEntry:['initializeNewTutorial'],
@@ -96,7 +95,7 @@ export const machine = Machine<CR.MachineContext, CR.MachineStateSchema, CR.Mach
9695
on:{
9796
LOAD_TUTORIAL:{
9897
target:'Level',
99-
actions:['initPosition','setTutorial']
98+
actions:['tutorialConfig','initPosition','setTutorial']
10099
}
101100
},
102101
},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp