From 6175e8c56b70753b63e426822be221d53761b631 Mon Sep 17 00:00:00 2001 From: Stevan Freeborn <65925598+StevanFreeborn@users.noreply.github.com> Date: Fri, 17 Feb 2023 18:01:17 -0600 Subject: [PATCH] feat: begin writing report integration tests --- .../Reports/getReportById.spec.ts | 22 +++++++++++++++++++ .../Reports/getReportsByAppId.spec.ts | 0 2 files changed, 22 insertions(+) create mode 100644 integrationTests/Reports/getReportById.spec.ts create mode 100644 integrationTests/Reports/getReportsByAppId.spec.ts diff --git a/integrationTests/Reports/getReportById.spec.ts b/integrationTests/Reports/getReportById.spec.ts new file mode 100644 index 0000000..95b2dcd --- /dev/null +++ b/integrationTests/Reports/getReportById.spec.ts @@ -0,0 +1,22 @@ +import { OnspringClient } from './../../src'; +import { expect } from 'chai'; +import { baseURL, apiKey } from '../mochaRootHooks'; + +describe('getReportById', function () { + this.timeout(30000); + this.retries(3); + + it('should return a report', async function () {}); + + it('should return report data for a report with chart data when report data is requested', async function () {}); + + it('should return chart data for a report with a chart when chart data is requested', async function () {}); + + it('should return a 400 error if chart data is requested for a report without chart data', async function () {}); + + it('should return a 401 error if the api key is invalid', async function () {}); + + it('should return a 403 error if the api key does not have access to the report', async function () {}); + + it('should return a 404 error if the report does not exist', async function () {}); +}); diff --git a/integrationTests/Reports/getReportsByAppId.spec.ts b/integrationTests/Reports/getReportsByAppId.spec.ts new file mode 100644 index 0000000..e69de29