From cea7ca1e47d83ab5d6e165e6f3df0a2e153b4695 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Thu, 4 Jan 2024 11:52:43 +0000 Subject: [PATCH] Bug 35392: Update tests Run: yarn cypress run --spec "t/cypress/integration/ERM/DataProviders_spec.ts" Signed-off-by: David Nind Signed-off-by: Jonathan Druart Signed-off-by: Katrin Fischer (cherry picked from commit 57802a38696b99bbe46f90390f5b3d5920b90995) Signed-off-by: Fridolin Somers --- .../integration/ERM/DataProviders_spec.ts | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/t/cypress/integration/ERM/DataProviders_spec.ts b/t/cypress/integration/ERM/DataProviders_spec.ts index 47e70abfaf..06e3fa6597 100644 --- a/t/cypress/integration/ERM/DataProviders_spec.ts +++ b/t/cypress/integration/ERM/DataProviders_spec.ts @@ -618,6 +618,29 @@ describe("Data provider tab options", () => { cy.get("#import_file").click(); cy.get("#import_file").selectFile("t/cypress/fixtures/file.json"); cy.get("#files .file_information span").contains("file.json"); + + cy.intercept( + "POST", + "/api/v1/erm/usage_data_providers/1/process_COUNTER_file*", + { + statusCode: 200, + body: { + jobs: [ + { + job_id: 1, + }, + ], + }, + } + ); + + cy.get("#files > form > fieldset > input[type=submit]").click(); + + cy.get( + "#erm > div > div.main.container-fluid > div > div.col-sm-10.col-sm-push-2 > main > div.dialog.message > li" + ).contains( + "Job for uploaded file has been queued. Check job progress." + ); }); it("Should display import logs", () => { @@ -722,7 +745,7 @@ describe("Data providers action buttons", () => { cy.get( "#erm > div > div.main.container-fluid > div > div.col-sm-10.col-sm-push-2 > main > div.dialog.message > li" ).contains( - "Job for report type TR_J1 has been queued, click here to check its progress." + "Job for report type TR_J1 has been queued. Check job progress." ); }); -- 2.39.5