diff --git a/bloclink/apps/pna/features/data/inputs.json b/bloclink/apps/pna/features/data/inputs.json new file mode 100644 index 0000000000000000000000000000000000000000..e5e42eccea8043399838c0418132d3569f8c9400 --- /dev/null +++ b/bloclink/apps/pna/features/data/inputs.json @@ -0,0 +1,145 @@ +{ + "buildingInfo": { + "building_id": "", + "firstName": "Jinalllll", + "lastName": "Soniiiii", + "email": "jinal@blocpower.io", + "phone": "333-333-2233", + "address": ["838888 PARK PLACE, BROOKLYN"], + "buildingSqFt": 3000, + "numberOfFloors": 3, + "unitInfo": { + "studio": 1, + "oneBedroom": 1, + "twoBedroom": 1, + "threeBedroom": 1, + "fourBedroom": 1, + "other": "other", + "numOfOther": 0 + } + }, + "remoteSurvey": { + "heatingSystem": { + "question_id": 1, + "question": "Heating System", + "answer_id": 3 + }, + "heatingFuelSource": { + "question_id": 2, + "question": "Heating Fuel Source", + "answer_id": 6 + }, + "DHWSameBoiler": { + "question_id": 3, + "question": "Is Domestic Hot Water (DHW) and heat prepared by the same boiler?", + "answer_id": 10 + }, + "ownerPayOwnElectricBill": { + "question_id": 16, + "question": "Do your tenants pay their own electricity bills?", + "answer_id": 9 + }, + "accessibleByStairwell": { + "question_id": 10, + "question": "Is the roof flat and easily accessible by a stairwell?", + "answer_id": 9 + }, + "meteredForElectricity": { + "question_id": 15, + "question": "Is the building direct metered for electricity (tenant pay ConEd bills)?", + "answer_id": 10 + }, + "ageOfHeatGenerateSystem": { + "question_id": 4, + "question": "Age of the heat generating system?", + "answer_id": 13 + }, + "tenantComplaintsWindows": { + "question_id": 14, + "question": "Any tenant complaints about drafty windows?", + "answer_id": 26 + }, + "stairwellsHeated": { + "question_id": 7, + "question": "Are the following building areas heated? (stairwells)", + "answer_id": 9 + }, + "hallwaysHeated": { + "question_id": 6, + "question": "Are the following building areas heated? (hallways)", + "answer_id": 10 + }, + "basementHeated": { + "question_id": 8, + "question": "Are the following building areas heated? (basement)", + "answer_id": 9 + }, + "tenantComplaintsComfort": { + "question_id": 13, + "question": "Any tenant complaints about comfort issues? (Temperature)", + "answer_id": 23 + }, + "planToReplaceHS": { + "question_id": 5, + "question": "When do you plan to replace the heating system?", + "answer_id": 16 + }, + "backFacadeAttached": { + "question_id": 11, + "question": "Is the back facade of your building attached to an adjacent building or structure?", + "answer_id": 10 + }, + "exteriorWallsAttached": { + "question_id": 12, + "question": "Are the exterior walls of your building attached to an adjacent building or structure?", + "answer_id": 10 + }, + "floorsHeated": { + "question_id": 9, + "question": "Are the following building areas heated? (floors)", + "answer_id": 9 + }, + "numberOfHeatingViolations": { + "question_id": 23, + "question": "Number of heating violations in 5 years?", + "answer_id": 45 + } + }, + "financialInitials": { + "bankruptcyPast": { + "question_id": 17, + "question": "Any bankruptcy in the past three years?", + "answer_id": 10 + }, + "currentOnEnergyBills": { + "question_id": 18, + "question": "Current on energy bills?", + "answer_id": 30 + }, + "currentMortgageBalance": { + "question_id": 19, + "question": "What is the current outstanding balance of the mortgage?", + "answer_id": 34 + }, + "profitable": { + "question_id": 20, + "question": "Is your building currently profitable?", + "answer_id": 40 + }, + "budgetForDownPayment": { + "question_id": 21, + "question": "What is your current budget for a down payment?", + "answer_id": 41 + }, + "legalOwnership": { + "question_id": 22, + "question": "Legal Ownership", + "answer_id": 53 + }, + "numberOfDobViolations": { + "question_id": 24, + "question": "Number of DOB violations?", + "answer_id": 48 + } + } +} diff --git a/bloclink/apps/pna/features/data/questionnaire_data.non_exist_building.json b/bloclink/apps/pna/features/data/questionnaire_data.non_exist_building.json deleted file mode 100644 index 331068c3b941f3a01de1ed78a13e805be8ee3fb0..0000000000000000000000000000000000000000 --- a/bloclink/apps/pna/features/data/questionnaire_data.non_exist_building.json +++ /dev/null @@ -1,147 +0,0 @@ -[ - { - "buildingInfo": { - "building_id": "", - "firstName": "Jinalllll", - "lastName": "Soniiiii", - "email": "jinal@blocpower.io", - "phone": "333-333-2233", - "address": ["838888 PARK PLACE, BROOKLYN"], - "buildingSqFt": 3000, - "numberOfFloors": 3, - "unitInfo": { - "studio": 1, - "oneBedroom": 1, - "twoBedroom": 1, - "threeBedroom": 1, - "fourBedroom": 1, - "other": "other", - "numOfOther": 0 - } - }, - "remoteSurvey": { - "heatingSystem": { - "question_id": 1, - "question": "Heating System", - "answer_id": 3 - }, - "heatingFuelSource": { - "question_id": 2, - "question": "Heating Fuel Source", - "answer_id": 6 - }, - "DHWSameBoiler": { - "question_id": 3, - "question": "Is Domestic Hot Water (DHW) and heat prepared by the same boiler?", - "answer_id": 10 - }, - "ownerPayOwnElectricBill": { - "question_id": 16, - "question": "Do your tenants pay their own electricity bills?", - "answer_id": 9 - }, - "accessibleByStairwell": { - "question_id": 10, - "question": "Is the roof flat and easily accessible by a stairwell?", - "answer_id": 9 - }, - "meteredForElectricity": { - "question_id": 15, - "question": "Is the building direct metered for electricity (tenant pay ConEd bills)?", - "answer_id": 10 - }, - "ageOfHeatGenerateSystem": { - "question_id": 4, - "question": "Age of the heat generating system?", - "answer_id": 13 - }, - "tenantComplaintsWindows": { - "question_id": 14, - "question": "Any tenant complaints about drafty windows?", - "answer_id": 26 - }, - "stairwellsHeated": { - "question_id": 7, - "question": "Are the following building areas heated? (stairwells)", - "answer_id": 9 - }, - "hallwaysHeated": { - "question_id": 6, - "question": "Are the following building areas heated? (hallways)", - "answer_id": 10 - }, - "basementHeated": { - "question_id": 8, - "question": "Are the following building areas heated? (basement)", - "answer_id": 9 - }, - "tenantComplaintsComfort": { - "question_id": 13, - "question": "Any tenant complaints about comfort issues? (Temperature)", - "answer_id": 23 - }, - "planToReplaceHS": { - "question_id": 5, - "question": "When do you plan to replace the heating system?", - "answer_id": 16 - }, - "backFacadeAttached": { - "question_id": 11, - "question": "Is the back facade of your building attached to an adjacent building or structure?", - "answer_id": 10 - }, - "exteriorWallsAttached": { - "question_id": 12, - "question": "Are the exterior walls of your building attached to an adjacent building or structure?", - "answer_id": 10 - }, - "floorsHeated": { - "question_id": 9, - "question": "Are the following building areas heated? (floors)", - "answer_id": 9 - }, - "numberOfHeatingViolations": { - "question_id": 23, - "question": "Number of heating violations in 5 years?", - "answer_id": 45 - } - }, - "financialInitials": { - "bankruptcyPast": { - "question_id": 17, - "question": "Any bankruptcy in the past three years?", - "answer_id": 10 - }, - "currentOnEnergyBills": { - "question_id": 18, - "question": "Current on energy bills?", - "answer_id": 30 - }, - "currentMortgageBalance": { - "question_id": 19, - "question": "What is the current outstanding balance of the mortgage?", - "answer_id": 34 - }, - "profitable": { - "question_id": 20, - "question": "Is your building currently profitable?", - "answer_id": 40 - }, - "budgetForDownPayment": { - "question_id": 21, - "question": "What is your current budget for a down payment?", - "answer_id": 41 - }, - "legalOwnership": { - "question_id": 22, - "question": "Legal Ownership", - "answer_id": 53 - }, - "numberOfDobViolations": { - "question_id": 24, - "question": "Number of DOB violations?", - "answer_id": 48 - } - } - } -] diff --git a/bloclink/apps/pna/features/data/questionnaire_data_default.json b/bloclink/apps/pna/features/data/questionnaire_data_default.json deleted file mode 100644 index bac05b3a55e8c1f4c19a549707db41a73d4d2fb0..0000000000000000000000000000000000000000 --- a/bloclink/apps/pna/features/data/questionnaire_data_default.json +++ /dev/null @@ -1,147 +0,0 @@ -[ - { - "buildingInfo": { - "building_id": "", - "firstName": "", - "lastName": "", - "email": "", - "phone": "", - "address": "", - "buildingSqFt": "", - "numberOfFloors": "", - "unitInfo": { - "studio": "", - "oneBedroom": "", - "twoBedroom": "", - "threeBedroom": "", - "fourBedroom": "", - "other": "", - "numOfOther": "" - } - }, - "remoteSurvey": { - "heatingSystem": { - "question_id": "", - "question": "", - "answer_id": "" - }, - "heatingFuelSource": { - "question_id": "", - "question": "", - "answer_id": "" - }, - "DHWSameBoiler": { - "question_id": "", - "question": "", - "answer_id": "" - }, - "ownerPayOwnElectricBill": { - "question_id": "", - "question": "", - "answer_id": "" - }, - "accessibleByStairwell": { - "question_id": "", - "question": "", - "answer_id": "" - }, - "meteredForElectricity": { - "question_id": "", - "question": "", - "answer_id": "" - }, - "ageOfHeatGenerateSystem": { - "question_id": "", - "question": "", - "answer_id": "" - }, - "tenantComplaintsWindows": { - "question_id": "", - "question": "", - "answer_id": "" - }, - "stairwellsHeated": { - "question_id": "", - "question": "", - "answer_id": "" - }, - "hallwaysHeated": { - "question_id": "", - "question": "", - "answer_id": "" - }, - "basementHeated": { - "question_id": "", - "question": "", - "answer_id": "" - }, - "tenantComplaintsComfort": { - "question_id": "", - "question": "", - "answer_id": "" - }, - "planToReplaceHS": { - "question_id": "", - "question": "", - "answer_id": "" - }, - "backFacadeAttached": { - "question_id": "", - "question": "", - "answer_id": "" - }, - "exteriorWallsAttached": { - "question_id": "", - "question": "", - "answer_id": "" - }, - "floorsHeated": { - "question_id": "", - "question": "", - "answer_id": "" - }, - "numberOfHeatingViolations": { - "question_id": "", - "question": "", - "answer_id": "" - } - }, - "financialInitials": { - "bankruptcyPast": { - "question_id": "", - "question": "", - "answer_id": "" - }, - "currentOnEnergyBills": { - "question_id": "", - "question": "", - "answer_id": "" - }, - "currentMortgageBalance": { - "question_id": "", - "question": "", - "answer_id": "" - }, - "profitable": { - "question_id": "", - "question": "", - "answer_id": "" - }, - "budgetForDownPayment": { - "question_id": "", - "question": "", - "answer_id": "" - }, - "legalOwnership": { - "question_id": "", - "question": "", - "answer_id": "" - }, - "numberOfDobViolations": { - "question_id": "", - "question": "", - "answer_id": "" - } - } - } -] diff --git a/bloclink/apps/pna/features/environment.py b/bloclink/apps/pna/features/environment.py index a9bc8ded1235b0d99554484ead63caa8aa94c8f4..419fefd5f76164a68bcad6f476494e813919e41b 100644 --- a/bloclink/apps/pna/features/environment.py +++ b/bloclink/apps/pna/features/environment.py @@ -9,17 +9,18 @@ import requests @fixture def load_questionnaire_inputs(context): - with open('features/data/questionnaire_data.non_exist_building.json', 'r') as outfile: - context.inputs = json.load(outfile)[0] + with open('features/data/inputs.json', 'r') as outfile: + context.inputs = json.load(outfile) def before_tag(context, tag): - if tag == "load_questionnaire_inputs": + if tag == "load.questionnaire.inputs": use_fixture(load_questionnaire_inputs, context) def before_all(context): prefix = 'http://' if config('ENVIRONMENT') == 'local' else 'https://' context.basePath = prefix + config('DOMAIN') + '/buildings/' context.endpoints = { + 'loadQuestionnaire' : '/pna/questionnaire/', 'submitQuestionnaire' : '/pna/questionnaire/', 'generateReport' : '/pna/report/generate/', 'downloadReport' : '/pna/report/download/', diff --git a/bloclink/apps/pna/features/questionnaire.feature b/bloclink/apps/pna/features/questionnaire.feature new file mode 100644 index 0000000000000000000000000000000000000000..b3db78295601b68fdc515856f01a78e65bdcd2c6 --- /dev/null +++ b/bloclink/apps/pna/features/questionnaire.feature @@ -0,0 +1,33 @@ +Feature: User can load and submit questionnaire + + Scenario Outline: User can load questionnaire + Given I have the building + When I load the questionnaire in Dashboard + Then load result page should contain