US-EPA-CAMD / easey-testing

EASEY Test Automation
https://epa.gov/airmarkets
MIT License
3 stars 0 forks source link

Emissions Module: Export Daily Calibration data Test Automation v1.0 - Sprint 11.1 #151

Closed JanellC closed 1 year ago

JanellC commented 1 year ago

Context

Complete a Test automation script to export a daily calibration file

Refer to ZH ticket API: Export Daily Calibration Data#3896 for additional information

The emissions-api should follow the same approach as qa-certifications-api for the emissions module as far as the official vs workspace behavior within ECMPS.

It is recommended to complete the official endpoint first and then copy to the workspace since the logic is the same but just uses different references to the workspace entities, repos, etc.

Both of the endpoints should return the top level EmissionsDTO created in ticket #3902

Add export endpoint to the official emissions module controller GET /emissions-mgmt/emissions/export

Create and add export endpoint to the workspace emissions module controller GET /emissions-mgmt/workspace/emissions/export

Required parameters: monitorPlanId, year, and quarter parameters are single select

Data being returned:

Emissions: orisCode: number; year: number; quarter: number; submissionComment?: string; monitorPlanId: string; reportingPeriodId: number; lastUpdated?: Date; updatedStatusFlg?: string; needsEvalFlag?: string; chkSessionId?: string; submissionId?: number; submissionAvailabilityCd?: string;

Daily Test Summary Data: stackPipeId: string; unitId: string; date: Date; hour: number; minute: number; monitoringSystemId?: string; componentId?: string; testTypeCode: string; testResultCode: string; spanScaleCode?: string; id: string; reportingPeriodId: number; monitoringLocationId: string; calcTestResultCode: string; userId?: string; addDate?: Date; updateDate?: Date;

Daily Calibration Data: onLineOffLineIndicator?: number; upscaleGasCode?: string; zeroInjectionDate?: Date; zeroInjectionHour?: number; zeroInjectionMinute?: number; upscaleInjectionDate?: Date; upscaleInjectionHour?: number; upscaleInjectionMinute?: number; zeroMeasuredValue?: number; upscaleMeasuredValue?: number; zeroAPSIndicator?: number; upscaleAPSIndicator?: number; zeroCalibrationError?: number; upscaleCalibrationError?: number; zeroReferenceValue?: number; upscaleReferenceValue?: number; upscaleGasTypeCode?: string; cylinderIdentifier?: string; vendorIdentifier?: string; expirationDate?: Date; injectionProtocolCode?: string;

Testing Test Case: TC863 Tester: @JanellC

The emissions-api should follow the same approach as qa-certifications-api for the emissions module as far as the official vs workspace behavior within ECMPS.

It is recommended to complete the official endpoint first and then copy to the workspace since the logic is the same but just uses different references to the workspace entities, repos, etc.

Both of the endpoints should return the top level EmissionsDTO created in ticket #3902

Add export endpoint to the official emissions module controller GET /emissions-mgmt/emissions/export

Create and add export endpoint to the workspace emissions module controller GET /emissions-mgmt/workspace/emissions/export

Required parameters: monitorPlanId, year, and quarter parameters are single select

Data being returned:

Emissions: orisCode: number; year: number; quarter: number; submissionComment?: string; monitorPlanId: string; reportingPeriodId: number; lastUpdated?: Date; updatedStatusFlg?: string; needsEvalFlag?: string; chkSessionId?: string; submissionId?: number; submissionAvailabilityCd?: string;

Daily Test Summary Data: stackPipeId: string; unitId: string; date: Date; hour: number; minute: number; monitoringSystemId?: string; componentId?: string; testTypeCode: string; testResultCode: string; spanScaleCode?: string; id: string; reportingPeriodId: number; monitoringLocationId: string; calcTestResultCode: string; userId?: string; addDate?: Date; updateDate?: Date;

Daily Calibration Data: onLineOffLineIndicator?: number; upscaleGasCode?: string; zeroInjectionDate?: Date; zeroInjectionHour?: number; zeroInjectionMinute?: number; upscaleInjectionDate?: Date; upscaleInjectionHour?: number; upscaleInjectionMinute?: number; zeroMeasuredValue?: number; upscaleMeasuredValue?: number; zeroAPSIndicator?: number; upscaleAPSIndicator?: number; zeroCalibrationError?: number; upscaleCalibrationError?: number; zeroReferenceValue?: number; upscaleReferenceValue?: number; upscaleGasTypeCode?: string; cylinderIdentifier?: string; vendorIdentifier?: string; expirationDate?: Date; injectionProtocolCode?: string;

Testing Test Case: TC863 Tester: @AmandaMNelson