Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iCasework Missing Fields Test - Test for FIREARMS-75, 167 and 173 #455

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,32 +163,32 @@ steps:
- feature/*
event: pull_request

- name: linting_branch
<<: *linting
when:
branch:
include:
- master
- feature/*
event: pull_request

- name: unit_tests_branch
<<: *unit_tests
when:
branch:
include:
- master
- feature/*
event: pull_request

- name: sonar_scanner_branch
<<: *sonar_scanner
when:
branch:
include:
- master
- feature/*
event: pull_request
# - name: linting_branch
# <<: *linting
# when:
# branch:
# include:
# - master
# - feature/*
# event: pull_request

# - name: unit_tests_branch
# <<: *unit_tests
# when:
# branch:
# include:
# - master
# - feature/*
# event: pull_request
#
# - name: sonar_scanner_branch
# <<: *sonar_scanner
# when:
# branch:
# include:
# - master
# - feature/*
# event: pull_request

- name: build_acceptance_branch
pull: if-not-exists
Expand Down
37 changes: 13 additions & 24 deletions apps/new-dealer/models/submission.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,24 @@ module.exports = (data, token) => {
{ activity: 'vary', response: 'Vary' }
];

response.AuthorityType = authorityType(data.usage);
response.ApplicationType = data.activity ?
_.find(activity, { activity: data.activity }).response : 'Renewal';

response['Customer.Organisation'] = data[`${data.organisation}-name`];
response['Customer.Category'] = data.organisation;
response['Customer.Name'] = data['first-authority-holders-name'];
response['Customer.Address'] = data['first-authority-holders-address-manual']
|| data['first-authority-holders-address-lookup'];

let addressKey;
let contactKey;
if (data['contact-holder'] === 'first') {
addressKey = 'first-authority-holders';
contactKey = addressKey;
} else if (data['contact-holder'] === 'second') {
addressKey = 'second-authority-holders';
contactKey = addressKey;
} else if (data['contact-holder'] === 'other') {
addressKey = 'contact';
contactKey = 'someone-else';
}

response['Agent.Address'] = data[`${addressKey}-address-manual`] || data[`${addressKey}-address-lookup`];

response['Agent.Name'] = data[`${contactKey}-name`];
response['Customer.Email'] = data['contact-email'];
response['Agent.Email'] = data['contact-email'];
response['Agent.Phone'] = data['contact-phone'];
response.AuthorityType = 'Carriers and Dealers';
response['Customer.Organisation'] = 'Customer Organisation Name';
response['Customer.Category'] = 'company';
response['Customer.Name'] = 'Customer Name';
response['Customer.Address'] = 'Customer Address';
response['Customer.Email'] = 'Customer Email';

response['Agent.Name'] = 'Agent Name';
response['Agent.Address'] = 'Agent Address';
response['Agent.Email'] = 'Agent Email';
response['Agent.Phone'] = 'Agent Phone';



if (data['weapons-ammunition'].includes('weapons')) {
response.AuthorityCoversWeapons = 'Yes';
Expand Down
21 changes: 11 additions & 10 deletions apps/shooting-clubs/models/submission.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,20 @@ module.exports = (data, token) => {
response.ApplicationType = 'Renewal';
}

response['Customer.Name'] = data['club-name'];
response['Customer.Address'] = data['club-address'];
response['Customer.Name'] = 'Club Name'; // Club Name
response['Customer.Address'] = 'Club Address'; // Club Address

response['Agent.Name'] = data['club-secretary-name'];
response['Agent.Address'] = data['club-secretary-address'];
response['Agent.Name'] = 'Club Secretary Name'; // Club Secretary Name
response['Agent.Address'] = 'Club Secretary Address'; // Club Secretary Address
response['Customer.Email'] = 'Club Secretary Email'; // Club Secretary Email
response['Customer.Phone'] = 'Club Secretary Phone'; // Club Secretary Phone

response['SecondaryContact.Name'] = 'Secondary Contact Name';
response['SecondaryContact.Address'] = 'Secondary Contact Address';
response['SecondaryContact.Email'] = 'Secondary Contact Email';
response['SecondaryContact.Phone'] = 'Secondary Contact Phone';

response['Customer.Email'] = data['club-secretary-email'];
response['Customer.Phone'] = data['club-secretary-phone'];

response['SecondaryContact.Name'] = data['second-contact-name'];
response['SecondaryContact.Address'] = data['second-contact-address'];
response['SecondaryContact.Email'] = data['second-contact-email'];
response['SecondaryContact.Phone'] = data['second-contact-phone'];

data['location-addresses'].forEach((address, i) => {
const index = i + 1;
Expand Down