-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into tadhg/mypy-weirdness
- Loading branch information
Showing
13 changed files
with
194 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
Re-useable code for testing the dissemination table. | ||
*/ | ||
|
||
const API_GOV_JWT = Cypress.env('API_GOV_JWT') || ''; | ||
const API_GOV_KEY = Cypress.env('API_GOV_KEY') || ''; | ||
const API_GOV_URL = Cypress.env('API_GOV_URL'); | ||
|
||
const requestOptions = { | ||
method: 'GET', | ||
url: `${API_GOV_URL}/general`, | ||
headers: { | ||
Authorization: `Bearer ${API_GOV_JWT}`, | ||
'X-Api-Key': API_GOV_KEY, | ||
}, | ||
} | ||
|
||
export function testReportIdNotFound(reportId) { | ||
cy.request({ | ||
...requestOptions, | ||
qs: {report_id: `eq.${reportId}`}, | ||
}).should((response) => { | ||
expect(response.body).to.have.length(0); | ||
}); | ||
} | ||
|
||
export function testReportIdFound(reportId) { | ||
cy.request({ | ||
...requestOptions, | ||
qs: {report_id: `eq.${reportId}`}, | ||
}).should((response) => { | ||
expect(response.body).to.have.length(1); | ||
const hasAgency = !!(response.body[0]?.cognizant_agency || response.body[0]?.oversight_agency); | ||
expect(hasAgency).to.be.true; | ||
}); | ||
} |
Oops, something went wrong.