From 8cf98d33da75b43d363ef0b1fed803718d52caa3 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 3 Oct 2023 16:30:46 +0200 Subject: [PATCH] Bug 32474: Adjust tests We need to use the same data, for instance we had "license name" and "first license name" for the license with license_id=1 Signed-off-by: Matt Blenkinsop Signed-off-by: Jonathan Druart --- t/cypress/integration/ERM/Agreements_spec.ts | 26 +++++++------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/t/cypress/integration/ERM/Agreements_spec.ts b/t/cypress/integration/ERM/Agreements_spec.ts index 045d549af1c..f682aaee0e5 100644 --- a/t/cypress/integration/ERM/Agreements_spec.ts +++ b/t/cypress/integration/ERM/Agreements_spec.ts @@ -9,6 +9,7 @@ const dates = { tomorrow_us: dayjs().add(1, "day").format("MM/DD/YYYY"), }; function get_agreement() { + let licenses = get_licenses_to_relate(); return { agreement_id: 1, closure_reason: "", @@ -39,14 +40,8 @@ function get_agreement() { { agreement_id: 1, agreement_license_id: 3, - license: { - description: "license description", - license_id: 1, - name: "license name", - status: "expired", - type: "alliance", - }, - license_id: 1, + license: licenses[0], + license_id: licenses[0].license_id, notes: "license notes", physical_location: "cupboard", status: "controlling", @@ -55,14 +50,8 @@ function get_agreement() { { agreement_id: 1, agreement_license_id: 4, - license: { - description: "second license description", - license_id: 2, - name: "second license name", - status: "expired", - type: "alliance", - }, - license_id: 2, + license: licenses[1], + license_id: licenses[1].license_id, notes: "second license notes", physical_location: "cupboard", status: "future", @@ -101,8 +90,11 @@ function get_licenses_to_relate() { return [ { license_id: 1, - description: "a license", + description: "license description", + license_id: 1, name: "first license name", + status: "expired", + type: "alliance", }, { license_id: 2, -- 2.34.1