File tree Expand file tree Collapse file tree 9 files changed +76
-6
lines changed Expand file tree Collapse file tree 9 files changed +76
-6
lines changed Original file line number Diff line number Diff line change 43
43
- run :
44
44
name : Set env variables
45
45
command : echo 'export VERSION=$(echo $CIRCLE_SHA1 | cut -c -7)' >> $BASH_ENV
46
+ - run :
47
+ name : build qa
48
+ command : REACT_APP_NODE_ENV=QA yarn build:qa
46
49
- run :
47
50
name : build staging
48
51
command : REACT_APP_NODE_ENV=STAGING yarn build:staging
@@ -52,15 +55,37 @@ jobs:
52
55
- persist_to_workspace :
53
56
root : .
54
57
paths :
58
+ - qa
55
59
- staging
56
60
- production
57
61
62
+ deploy_qa :
63
+ docker :
64
+ - image : circleci/python:3.6-jessie
65
+ working_directory : ~/deploy
66
+ environment :
67
+ PUBLIC_URL : https://forms.qa.codeyourfuture.io
68
+ steps :
69
+ - attach_workspace :
70
+ at : .
71
+ - run :
72
+ name : Set env variables
73
+ command : echo 'export VERSION=$(echo $CIRCLE_SHA1 | cut -c -7)' >> $BASH_ENV
74
+ - run :
75
+ name : Install awscli
76
+ command : sudo pip install awscli
77
+ - s3deploy :
78
+ dir : qa
79
+ to : ' forms.qa.codeyourfuture.io'
80
+ cf_distribution_id : E2VFUDC8YCDBKS
81
+
82
+
58
83
deploy_staging :
59
84
docker :
60
85
- image : circleci/python:3.6-jessie
61
86
working_directory : ~/deploy
62
87
environment :
63
- PUBLIC_URL : https://staging. forms.codeyourfuture.io
88
+ PUBLIC_URL : https://forms.staging .codeyourfuture.io
64
89
steps :
65
90
- attach_workspace :
66
91
at : .
72
97
command : sudo pip install awscli
73
98
- s3deploy :
74
99
dir : staging
75
- to : ' staging. forms.codeyourfuture.io'
76
- cf_distribution_id : E3MJAA9E60TZUB
100
+ to : ' forms.staging .codeyourfuture.io'
101
+ cf_distribution_id : E1SJFMKKCNFUGI
77
102
78
103
deploy_production :
79
104
docker :
@@ -101,6 +126,14 @@ workflows:
101
126
jobs :
102
127
- build :
103
128
context : build
129
+ - deploy_qa :
130
+ context : deployments_qa
131
+ requires :
132
+ - build
133
+ filters :
134
+ branches :
135
+ only :
136
+ - qa
104
137
- deploy_staging :
105
138
context : deployments_staging
106
139
requires :
Original file line number Diff line number Diff line change @@ -34,7 +34,9 @@ const generateExpected = data => ({
34
34
guidePeople : data . guidePeople || [ ] ,
35
35
techSkill : data . techSkill || [ ] ,
36
36
otherSkill : data . otherSkill || [ ] ,
37
- userId : ''
37
+ userId : '' ,
38
+ agreeToReceiveCommunication : true ,
39
+ agreeToTOU : true
38
40
} )
39
41
40
42
it ( 'can submit a minimal form' , ( ) => {
Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ Cypress.Commands.add('fillInitialForm', data => {
23
23
}
24
24
25
25
// submission
26
- cy . get ( '[name="acknowledgement"]' ) . click ( )
26
+ cy . get ( '[name="agreeToTOU"]' ) . check ( )
27
+ cy . get ( '[name="agreeToReceiveCommunication"]' ) . check ( )
27
28
cy . get ( 'button' )
28
29
. contains ( 'Submit' )
29
30
. click ( )
Original file line number Diff line number Diff line change 34
34
"scripts" : {
35
35
"start" : " REACT_APP_NODE_ENV=LOCAL react-scripts start" ,
36
36
"build" : " react-scripts build && yarn run delete-maps" ,
37
+ "build:qa" : " REACT_APP_NODE_ENV=QA react-scripts build && yarn run delete-maps && mv build qa" ,
37
38
"build:staging" : " REACT_APP_NODE_ENV=STAGING react-scripts build && yarn run delete-maps && mv build staging" ,
38
39
"build:production" : " REACT_APP_NODE_ENV=PRODUCTION react-scripts build && yarn run delete-maps && mv build production" ,
39
40
"delete-maps" : " yarn run delete-map-files && yarn run delete-references-to-map-files" ,
Original file line number Diff line number Diff line change 35
35
{ "name" : " Transport and Logistics" , "_id" : " Transport and Logistics" },
36
36
{ "name" : " Other" , "_id" : " Other" }
37
37
],
38
+
38
39
"hearAboutCYFList" : [
40
+ { "name" : " Employer" , "_id" : " Employer" },
39
41
{ "name" : " Search engine" , "_id" : " Search engine" },
40
42
{ "name" : " Colleague or friend" , "_id" : " Colleague or friend" },
41
43
{ "name" : " Conference" , "_id" : " Conference" },
45
47
{ "name" : " Other" , "_id" : " Other" }
46
48
],
47
49
50
+ "employerList" : [
51
+ { "name" : " Capgemini" , "_id" : " Capgemini" },
52
+ { "name" : " Other" , "_id" : " Other" }
53
+ ],
54
+
48
55
"radioButtonList" : [
49
56
{ "value" : " None" , "_id" : " None" },
50
57
{ "value" : " Some" , "_id" : " Some" },
51
58
{ "value" : " Professional experience" , "_id" : " Professional experience" }
52
59
],
60
+
53
61
"guidePeopleSkillList" : [
54
62
{
55
63
"id" : " 98y439hf934" ,
64
72
"label" : " Help people learn public speaking"
65
73
}
66
74
],
75
+
67
76
"techSkillList" : [
68
77
{
69
78
"id" : " 8976tygsbhj3e" ,
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ export const initialState = {
10
10
interestedInCYF : '' ,
11
11
industry : '' ,
12
12
hearAboutCYF : '' ,
13
+ hearAboutCYFFromEmployer : false ,
14
+ employer : '' ,
13
15
guidePeople : ListsData . guidePeopleSkillList ,
14
16
techSkill : ListsData . techSkillList ,
15
17
otherSkill : ListsData . otherSkillList ,
Original file line number Diff line number Diff line change @@ -100,6 +100,9 @@ class Forms extends Component {
100
100
err : null
101
101
} )
102
102
}
103
+ if ( name === 'hearAboutCYF' ) {
104
+ this . setState ( { hearAboutCYFFromEmployer : value === 'Employer' } )
105
+ }
103
106
}
104
107
105
108
validateForm = values => {
@@ -154,6 +157,8 @@ class Forms extends Component {
154
157
interestedInCYF,
155
158
industry,
156
159
hearAboutCYF,
160
+ hearAboutCYFFromEmployer,
161
+ employer,
157
162
guidePeople,
158
163
techSkill,
159
164
otherSkill,
@@ -167,6 +172,7 @@ class Forms extends Component {
167
172
lastName,
168
173
email,
169
174
cityId,
175
+ employer : hearAboutCYFFromEmployer ? employer : true ,
170
176
interestedInVolunteer,
171
177
tel,
172
178
agreeToTOU,
@@ -191,6 +197,7 @@ class Forms extends Component {
191
197
interestedInCYF,
192
198
industry,
193
199
hearAboutCYF,
200
+ employer : hearAboutCYFFromEmployer ? employer : '' ,
194
201
guidePeople : filterEmptyValue ( guidePeople ) ,
195
202
techSkill : filterEmptyValue ( techSkill ) ,
196
203
otherSkill : filterEmptyValue ( otherSkill ) ,
Original file line number Diff line number Diff line change @@ -24,10 +24,12 @@ export default class VolunteerForm extends Component {
24
24
interestedInCYF,
25
25
industry,
26
26
hearAboutCYF,
27
+ hearAboutCYFFromEmployer,
27
28
onChangeCheckList,
28
29
guidePeople,
29
30
techSkill,
30
- otherSkill
31
+ otherSkill,
32
+ employer
31
33
} = this . props
32
34
33
35
return (
@@ -109,6 +111,7 @@ export default class VolunteerForm extends Component {
109
111
isEmpty = { errors . industry }
110
112
label = "What industry are you in?"
111
113
/>
114
+
112
115
< DropDown
113
116
onChange = { onChange }
114
117
value = { hearAboutCYF }
@@ -117,6 +120,16 @@ export default class VolunteerForm extends Component {
117
120
isEmpty = { errors . hearAboutCYF }
118
121
label = "Where did you hear about Code Your Future?"
119
122
/>
123
+ { hearAboutCYFFromEmployer && (
124
+ < DropDown
125
+ onChange = { onChange }
126
+ value = { employer }
127
+ name = "employer"
128
+ arrayList = { ListsData . employerList }
129
+ isEmpty = { errors . employer }
130
+ label = "Who is your employer? *"
131
+ />
132
+ ) }
120
133
< span className = "contact-interested" >
121
134
< span >
122
135
What would you like help Code Your Future with, and what is your
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ export const domain = () => {
5
5
switch ( env ) {
6
6
case 'LOCAL' :
7
7
return 'http://localhost:3001'
8
+ case 'QA' :
9
+ return 'https://cyf-api.qa.codeyourfuture.io'
8
10
case 'STAGING' :
9
11
return 'https://cyf-api.staging.codeyourfuture.io'
10
12
case 'PRODUCTION' :
You can’t perform that action at this time.
0 commit comments