Commit 634e409 1 parent b55eec0 commit 634e409 Copy full SHA for 634e409
File tree 6 files changed +37
-15
lines changed
packages/create-redwood-app/tests
6 files changed +37
-15
lines changed Original file line number Diff line number Diff line change @@ -756,9 +756,13 @@ jobs:
756
756
sudo apt-get install expect
757
757
758
758
./tests/e2e_prompts.sh
759
+ sleep 1
759
760
./tests/e2e_prompts_git.sh
761
+ sleep 1
760
762
./tests/e2e_prompts_m.sh
763
+ sleep 1
761
764
./tests/e2e_prompts_ts.sh
765
+ sleep 1
762
766
./tests/e2e_prompts_overwrite.sh
763
767
working-directory : ./packages/create-redwood-app
764
768
env :
Original file line number Diff line number Diff line change @@ -9,10 +9,12 @@ if {$projectPath eq ""} {
9
9
10
10
cd $projectPath
11
11
12
+ set projectDirectory " redwood-app-prompt-test"
13
+
12
14
spawn yarn create-redwood-app
13
15
14
16
expect " Where would you like to create your Redwood app?"
15
- send " redwood-app \n"
17
+ send " $projectDirectory \n"
16
18
17
19
expect " Select your preferred language"
18
20
# TypeScript
@@ -31,8 +33,10 @@ set exitStatus [lindex $result 3]
31
33
32
34
if {$exitStatus == 0} {
33
35
puts " Success"
36
+ exec rm -rf $projectDirectory
37
+ exit 0
34
38
} else {
35
39
puts " Error: The process failed with exit status $exitStatus "
40
+ exec rm -rf $projectDirectory
41
+ exit 1
36
42
}
37
-
38
- exec rm -rf ./redwood-app
Original file line number Diff line number Diff line change @@ -9,10 +9,12 @@ if {$projectPath eq ""} {
9
9
10
10
cd $projectPath
11
11
12
+ set projectDirectory " redwood-app-prompt-git-test"
13
+
12
14
spawn yarn create-redwood-app --git
13
15
14
16
expect " Where would you like to create your Redwood app?"
15
- send " redwood-app \n"
17
+ send " $projectDirectory \n"
16
18
17
19
expect " Select your preferred language"
18
20
# TypeScript
@@ -27,8 +29,10 @@ set exitStatus [lindex $result 3]
27
29
28
30
if {$exitStatus == 0} {
29
31
puts " Success"
32
+ exec rm -rf $projectDirectory
33
+ exit 0
30
34
} else {
31
35
puts " Error: The process failed with exit status $exitStatus "
36
+ exec rm -rf $projectDirectory
37
+ exit 1
32
38
}
33
-
34
- exec rm -rf ./redwood-app
Original file line number Diff line number Diff line change @@ -9,10 +9,12 @@ if {$projectPath eq ""} {
9
9
10
10
cd $projectPath
11
11
12
+ set projectDirectory " redwood-app-prompt-m-test"
13
+
12
14
spawn yarn create-redwood-app -m " first"
13
15
14
16
expect " Where would you like to create your Redwood app?"
15
- send " redwood-app \n"
17
+ send " $projectDirectory \n"
16
18
17
19
expect " Select your preferred language"
18
20
# TypeScript
@@ -28,8 +30,10 @@ set exitStatus [lindex $result 3]
28
30
29
31
if {$exitStatus == 0} {
30
32
puts " Success"
33
+ exec rm -rf $projectDirectory
34
+ exit 0
31
35
} else {
32
36
puts " Error: The process failed with exit status $exitStatus "
37
+ exec rm -rf $projectDirectory
38
+ exit 1
33
39
}
34
-
35
- exec rm -rf ./redwood-app
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ if {$projectPath eq ""} {
10
10
cd $projectPath
11
11
12
12
# Make directory that needs to be overwritten.
13
- set projectDirectory " redwood-app"
13
+ set projectDirectory " redwood-app-prompt-overwrite-test "
14
14
exec mkdir $projectDirectory
15
15
exec touch $projectDirectory /README.md
16
16
@@ -40,8 +40,10 @@ set exitStatus [lindex $result 3]
40
40
41
41
if {$exitStatus == 1} {
42
42
puts " Success"
43
+ exec rm -rf $projectDirectory
44
+ exit 0
43
45
} else {
44
46
puts " Error: The process failed with exit status $exitStatus "
47
+ exec rm -rf $projectDirectory
48
+ exit 1
45
49
}
46
-
47
- exec rm -rf ./redwood-app
Original file line number Diff line number Diff line change @@ -9,10 +9,12 @@ if {$projectPath eq ""} {
9
9
10
10
cd $projectPath
11
11
12
+ set projectDirectory " redwood-app-prompt-ts-test"
13
+
12
14
spawn yarn create-redwood-app --ts
13
15
14
16
expect " Where would you like to create your Redwood app?"
15
- send " redwood-app \n"
17
+ send " $projectDirectory \n"
16
18
17
19
expect " Do you want to initialize a git repo?"
18
20
# Yes
@@ -28,8 +30,10 @@ set exitStatus [lindex $result 3]
28
30
29
31
if {$exitStatus == 0} {
30
32
puts " Success"
33
+ exec rm -rf $projectDirectory
34
+ exit 0
31
35
} else {
32
36
puts " Error: The process failed with exit status $exitStatus "
37
+ exec rm -rf $projectDirectory
38
+ exit 1
33
39
}
34
-
35
- exec rm -rf ./redwood-app
You can’t perform that action at this time.
0 commit comments