Skip to content

Commit 65ff2f8

Browse files
committed
adding latest perf-tuning
1 parent 21d267e commit 65ff2f8

File tree

3 files changed

+149
-4
lines changed

3 files changed

+149
-4
lines changed
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
import _ from 'lodash'
2+
// import NumberText from '../../components/NumberText/NumberText'
3+
import { findProduct } from '../projectWizard'
4+
5+
6+
const isFileRequired = (project, subSections) => {
7+
const subSection = _.find(subSections, (s) => s.type === 'questions')
8+
const fields = _.filter(subSection.questions, q => q.type.indexOf('see-attached') > -1)
9+
// iterate over all seeAttached type fields to check
10+
// if any see attached is checked.
11+
return _.some(_.map(
12+
_.map(fields, 'fieldName'),
13+
fn => _.get(project, `${fn}.seeAttached`)
14+
))
15+
}
16+
17+
const sections = [
18+
{
19+
id: 'appDefinition',
20+
title: (project, showProduct) => {
21+
const product = _.get(project, 'details.products[0]')
22+
if (showProduct && product) {
23+
const prd = findProduct(product)
24+
if (prd) return prd.name
25+
}
26+
return 'Definition'
27+
},
28+
required: true,
29+
description: 'Please answer a few basic questions about your project. You can also provide the needed information in a supporting document--add a link in the notes section or upload it below.',
30+
subSections: [
31+
{
32+
id: 'projectName',
33+
required: true,
34+
validationError: 'Please provide a name to your project',
35+
fieldName: 'name',
36+
description: '',
37+
title: 'Project Name',
38+
type: 'project-name'
39+
},
40+
{
41+
id: 'questions',
42+
required: true,
43+
hideTitle: true,
44+
title: 'Questions',
45+
description: '',
46+
type: 'questions',
47+
questions: [
48+
{
49+
id: 'projectInfo',
50+
fieldName: 'description',
51+
// required is not needed if we specifiy validations
52+
// required: true,
53+
validations: 'isRequired,minLength:160',
54+
validationErrors: {
55+
isRequired: 'Please describe your application',
56+
minLength: 'Please enter at least 160 characters'
57+
},
58+
description: 'Brief Description of your application',
59+
title: 'Description',
60+
type: 'textbox'
61+
}
62+
63+
]
64+
},
65+
{
66+
id: 'notes',
67+
fieldName: 'details.appDefinition.notes',
68+
title: 'Additional Notes',
69+
description: 'Please detail any other additional information, you will be able to upload files on the next screen',
70+
type: 'notes'
71+
},
72+
{
73+
id: 'files',
74+
required: isFileRequired,
75+
title: (project) => `Project Files (${_.get(project, 'attachments', []).length})` || 'Files',
76+
description: '',
77+
type: 'files',
78+
fieldName: 'attachments'
79+
}
80+
81+
82+
83+
84+
]
85+
}
86+
87+
88+
]
89+
90+
export default sections
91+
92+
export const basicSections = [
93+
{
94+
id: 'appDefinition',
95+
title: '',
96+
required: true,
97+
description: 'Please answer a few basic questions about your project and, as an option, add links to supporting documents in the “Notes” section. If you have any files to upload, you’ll be able to do so later.',
98+
subSections: [
99+
{
100+
id: 'projectName',
101+
required: true,
102+
validationError: 'Please provide a name to your project',
103+
fieldName: 'name',
104+
description: '',
105+
title: 'Project Name',
106+
type: 'project-name'
107+
},
108+
{
109+
id: 'questions',
110+
required: true,
111+
hideTitle: true,
112+
title: 'Questions',
113+
description: '',
114+
type: 'questions',
115+
questions: [
116+
{
117+
id: 'projectInfo',
118+
fieldName: 'description',
119+
// required is not needed if we specifiy validations
120+
// required: true,
121+
validations: 'isRequired,minLength:160',
122+
validationErrors: {
123+
isRequired: 'Please provide a description of your application',
124+
minLength: 'Please enter at least 160 characters'
125+
},
126+
description: 'Brief Description of your application',
127+
title: 'Description',
128+
type: 'textbox'
129+
}
130+
131+
]
132+
},
133+
{
134+
id: 'notes',
135+
fieldName: 'details.appDefinition.notes',
136+
title: 'Additional Notes',
137+
description: 'Please detail any other additional information',
138+
type: 'notes'
139+
}
140+
]
141+
}
142+
143+
144+
]

src/config/projectSpecification/typeToSpecification.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"real_world_testing": "real_world_testing.v1.0",
1414
"mobility_testing": "mobility_testing.v1.0",
1515
"performance_testing": "performance_testing.v1.0",
16+
"performance_tuning": "performance_tuning.v1.0",
1617
"digital_accessability": "crowd_testing.v1.0",
1718
"open_source_automation": "crowd_testing.v1.0",
1819
"consulting_adivisory": "crowd_testing.v1.0",

src/config/projectWizard/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const products = {
6464
icon: 'product-qa-crowd-testing',
6565
id: 'computer_vision',
6666
aliases: ['computer-vision', 'computer_vision'],
67-
hidden : true
67+
hidden : false
6868
}, /*,
6969
'Algorithm Optimization': {
7070
brief: 'TBD',
@@ -87,7 +87,7 @@ const products = {
8787
icon: 'product-qa-crowd-testing',
8888
id: 'data_exploration',
8989
aliases: ['data-exploration', 'data_exploration'],
90-
hidden :true
90+
hidden : false
9191
}
9292
}
9393
},
@@ -203,7 +203,7 @@ const products = {
203203
id: 'performance_testing',
204204
aliases: ['performance-testing', 'performance_testing'],
205205
hidden: true
206-
},
206+
}
207207
'Digital Accessibility': {
208208
brief: 'TBD',
209209
details: 'Make sure you app or website conforms to all rules and regulations',
@@ -229,7 +229,7 @@ const products = {
229229
disabled: true
230230
}
231231
}
232-
}
232+
233233
/*
234234
Analytics: {
235235
icon: 'product-cat-qa',

0 commit comments

Comments
 (0)