Skip to content

Commit d1c7568

Browse files
author
vikasrohit
authored
Merge pull request #1210 from appirio-tech/feature/second-level-project-category-performance
Feature/second level project category performance
2 parents ba83087 + eefd933 commit d1c7568

File tree

2 files changed

+18
-24
lines changed

2 files changed

+18
-24
lines changed

src/components/ProjectType/ProjectType.jsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
import _ from 'lodash'
12
import React, {PropTypes} from 'react'
23
import './ProjectType.scss'
34
import PanelProject from '../PanelProject/PanelProject'
45
import TextTruncate from 'react-text-truncate'
6+
import { findCategory } from '../../config/projectWizard'
57
import {Link} from 'react-router'
68

79
const deviceMap = {
@@ -13,19 +15,11 @@ const deviceMap = {
1315
'android-watch': <div key="ANDROID_WEAR" className="icon icon-android-wear">Android Watch</div>
1416
}
1517

16-
/*eslint-disable camelcase */
17-
const typeMap = {
18-
app_dev: 'Design & Development Project',
19-
generic: 'Work Project', // needed for backward compatibility with templates < v1.1
20-
visual_design: 'Visual Design Project',
21-
visual_prototype: 'Visual Prototype Project'// needed for backward compatibility with templates < v1.1
22-
}
23-
2418
/*eslint-enable camelcase */
2519
const ProjectType = ({projectId, type, description, devices}) => (
2620
<PanelProject>
2721
<PanelProject.Heading>
28-
{typeMap[type]}
22+
{ _.get(findCategory(type), 'name', '') }
2923
</PanelProject.Heading>
3024
<TextTruncate
3125
containerClassName="project-description"

src/config/projectQuestions/real_world_testing.v1.0.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -127,31 +127,31 @@ const sections = [
127127
{
128128
icon: 'question',
129129
id: 'testingNeeds.description',
130-
fieldName: 'description',
130+
fieldName: 'details.testingNeeds.description',
131131
description: '',
132132
title: 'Please describe your website and/or application.',
133133
type: 'textbox'
134134
},
135135
{
136136
icon: 'question',
137137
id: 'testingNeeds.inScope',
138-
fieldName: 'In Scope',
138+
fieldName: 'details.testingNeeds.inScope',
139139
description: '',
140140
title: 'Please describe which features or components are in-scope in this testing effort.',
141141
type: 'textbox'
142142
},
143143
{
144144
icon: 'question',
145145
id: 'testingNeeds.outOfScope',
146-
fieldName: 'Out of Scope',
146+
fieldName: 'details.testingNeeds.outOfScope',
147147
description: '',
148148
title: 'Are any features or components out of scope? If yes, please describe.',
149149
type: 'textbox'
150150
},
151151
{
152152
icon: 'question',
153153
id: 'testingNeeds.duration',
154-
fieldName: 'Duration',
154+
fieldName: 'details.testingNeeds.duration',
155155
description: '',
156156
title: 'Do you have a specific timeline for testing? If so, please provide approximate start and end dates.',
157157
type: 'textbox'
@@ -168,23 +168,23 @@ const sections = [
168168
{
169169
icon: 'question',
170170
id: 'testerDetails.demographics',
171-
fieldName: 'demographics',
171+
fieldName: 'details.testerDetails.demographics',
172172
description: '',
173173
title: 'Do you have preferred demographics you would like to target?',
174174
type: 'textbox'
175175
},
176176
{
177177
icon: 'question',
178178
id: 'testerDetails.geographies',
179-
fieldName: 'Geographies',
179+
fieldName: 'details.testerDetails.geographies',
180180
description: '',
181181
title: 'Would you like to target any specific geographies?',
182182
type: 'textbox'
183183
},
184184
{
185185
icon: 'question',
186186
id: 'testerDetails.skills',
187-
fieldName: 'Skills',
187+
fieldName: 'details.testerDetails.skills',
188188
description: '',
189189
title: 'Are any specific skills required to test your application? If so, please list them.',
190190
type: 'textbox'
@@ -201,23 +201,23 @@ const sections = [
201201
{
202202
icon: 'question',
203203
id: 'testEnvironment.environmentDetails',
204-
fieldName: 'Environment Details',
204+
fieldName: 'details.testEnvironment.environmentDetails',
205205
description: '',
206206
title: 'Do you have a version of the application available for testers to access? If so, please provide details. Details can include a test URL, access information, etc.',
207207
type: 'textbox'
208208
},
209209
{
210210
icon: 'question',
211211
id: 'testEnvironment.assets',
212-
fieldName: 'Assets',
212+
fieldName: 'details.testEnvironment.assets',
213213
description: '',
214214
title: 'Are any test assets available? For exmaple: test plan, test scenario, test scripts, test data.',
215215
type: 'textbox'
216216
},
217217
{
218218
icon: 'question',
219219
id: 'testEnvironment.other',
220-
fieldName: 'Other Information',
220+
fieldName: 'details.testEnvironment.otherInformation',
221221
description: '',
222222
title: 'Are there any other specific details related to the environment you can share?',
223223
type: 'textbox'
@@ -234,23 +234,23 @@ const sections = [
234234
{
235235
icon: 'question',
236236
id: 'targetApplication.description',
237-
fieldName: 'Description',
237+
fieldName: 'details.targetApplication.description',
238238
description: '',
239239
title: 'Please describe your application.',
240240
type: 'textbox'
241241
},
242242
{
243243
icon: 'question',
244244
id: 'targetApplication.platform',
245-
fieldName: 'Platform',
245+
fieldName: 'details.targetApplication.platform',
246246
description: '',
247247
title: 'Please list all platforms the application should be tested on.',
248248
type: 'textbox'
249249
},
250250
{
251251
icon: 'question',
252252
id: 'targetApplication.training',
253-
fieldName: 'Training',
253+
fieldName: 'details.targetApplication.training',
254254
description: '',
255255
title: 'Does the application require training to utilize it properly? If so, are you able to provide these inputs?',
256256
type: 'textbox'
@@ -266,15 +266,15 @@ const sections = [
266266
{
267267
icon: 'question',
268268
id: 'preferences.suggestions',
269-
fieldName: 'Usability Suggestions',
269+
fieldName: 'details.cyclePreferences.usabilitySuggestions',
270270
description: '',
271271
title: 'Would you like usability suggestions included in the issue report?',
272272
type: 'textbox'
273273
},
274274
{
275275
icon: 'question',
276276
id: 'preferences.omissions',
277-
fieldName: 'Omissions',
277+
fieldName: 'details.cyclePreferences.omissions',
278278
description: '',
279279
title: 'Are there any types of defects you would like ommitted from issue reports?',
280280
type: 'textbox'

0 commit comments

Comments
 (0)