Bug 35229: Fix DataProviders_spec.ts

The intercept was wrong:
Was intercepting GET instead of POST
Was intercepting /run route intead of /process_SUSHI_response (this naming was updated in the rest of the code but not here)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Pedro Amorim 2023-11-15 13:10:22 -01:00 committed by Tomas Cohen Arazi
parent e56153c510
commit fb1c01452d
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 19 additions and 15 deletions

View File

@ -692,21 +692,25 @@ describe("Data providers action buttons", () => {
.click();
cy.get(".modal_centered p").contains(dataProvider.name);
cy.intercept("GET", "/api/v1/erm/usage_data_providers/1/run*", {
statusCode: 200,
body: {
jobs: [
{
report_type: "TR_J1",
job_id: 1,
},
],
},
headers: {
"X-Base-Total-Count": "1",
"X-Total-Count": "1",
},
});
cy.intercept(
"POST",
"/api/v1/erm/usage_data_providers/1/process_SUSHI_response*",
{
statusCode: 200,
body: {
jobs: [
{
report_type: "TR_J1",
job_id: 1,
},
],
},
headers: {
"X-Base-Total-Count": "1",
"X-Total-Count": "1",
},
}
);
cy.get("#confirmation_input_begin_date+input").click();
cy.get(".flatpickr-current-month select")
.invoke("val")