Skip to content

Commit

Permalink
Merge pull request aptible#66 from sandersonet/sdlcfix
Browse files Browse the repository at this point in the history
add sdlc group
  • Loading branch information
skylar-anderson committed Apr 20, 2016
2 parents 86c6350 + 7382704 commit 07b387a
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/utils/build-security-control-groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const dataEnvironmentProviderMap = {
export const globalSecurityControlGroups = [
'application_security_controls', 'email_security_controls',
'security_procedures_security_controls', 'workforce_security_controls',
'workstation_security_controls'];
'workstation_security_controls', 'software_development_lifecycle_security_controls'];

export default function(dataEnvironments, organization, store) {
let organizationUrl = organization.get('data.links.self');
Expand Down
9 changes: 5 additions & 4 deletions tests/acceptance/setup/security-control-group-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,18 @@ test('clicking next will finish SPD if on last group', function(assert) {
workstation_security_controls: {},
aptible_security_controls: {},
gmail_security_controls: {},
email_security_controls: {}
email_security_controls: {},
software_development_lifecycle_security_controls: {}
});
stubProfile({ currentStep: 'security-controls'});
stubRequests();
signInAndVisit(`${securityControlsUrl}/workstation_security_controls`);
signInAndVisit(`${securityControlsUrl}/software_development_lifecycle_security_controls`);

stubRequest('post', '/attestations', function(request) {
let json = this.json(request);

assert.ok(true, 'posts to /attestations');
assert.equal(json.handle, 'workstation_security_controls');
assert.equal(json.handle, 'software_development_lifecycle_security_controls');

return this.success({ id: 1 });
});
Expand All @@ -118,7 +119,7 @@ test('clicking next will finish SPD if on last group', function(assert) {

andThen(() => {
let title = findWithAssert('.security-control-group-title');
assert.ok(title.is(':contains(Workstation)'), 'Workstation control group');
assert.ok(title.is(':contains(Software)'), 'sdlc control group');
});

andThen(clickContinueButton);
Expand Down
3 changes: 2 additions & 1 deletion tests/acceptance/setup/security-controls-index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ test('Clicking next with all completed groups will finish SPD', function(assert)
workstation_security_controls: {},
aptible_security_controls: {},
gmail_security_controls: {},
email_security_controls: {}
email_security_controls: {},
software_development_lifecycle_security_controls: {}
});
stubProfile({ currentStep: 'security-controls'});
stubRequests();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
export default {
"$schema":"http://json-schema.org/draft-04/schema#",
"id": "software_development_lifecycle_security_controls/1",
"type":"object",
"title":"Software Development Lifecycle",
"properties":{
"secureProcedure0":{
"type": "object",
"required": ["implemented"],
"title":"Do you secure?",
"properties": {
"implemented": {
"type":"boolean",
"description":"??",
"displayProperties":{
"useToggle":true,
"showLabels":true,
"labels":{
"trueLabel":"Yes",
"falseLabel":"No"
}
}
}
}
}
},

"required":[
"identifyAllComponentsAndDependencies"
]
};
4 changes: 3 additions & 1 deletion tests/helpers/schemas-api-stub.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import securityProceduresSecurityControlsSchema from '../fixtures/schemas/securi
import workforceSecurityControlsSchema from '../fixtures/schemas/workforce-security-controls';
import workstationSecurityControlsSchema from '../fixtures/schemas/workstation-security-controls';
import emailSecurityControlsSchema from '../fixtures/schemas/email-security-controls';
import softwareDevelopmentLifecycleSecurityControlsSchema from '../fixtures/schemas/software-development-lifecycle-security-controls';

Ember.Test.registerHelper('stubSchemasAPI', function(app, options = {}) {
// accept an array of handles to exclude. Useful for individual tests providing
Expand All @@ -38,7 +39,8 @@ Ember.Test.registerHelper('stubSchemasAPI', function(app, options = {}) {
google_security_controls: googleSecurityControlsSchema,
gmail_security_controls: gmailSecurityControlsSchema,
workstation_security_controls: workstationSecurityControlsSchema,
email_security_controls: emailSecurityControlsSchema };
email_security_controls: emailSecurityControlsSchema,
software_development_lifecycle_security_controls: softwareDevelopmentLifecycleSecurityControlsSchema} ;

Ember.keys(schemas).forEach((handle) => {
if (except.indexOf(handle) === -1) {
Expand Down

0 comments on commit 07b387a

Please sign in to comment.