From 12e76ec901e89e725168326f1a4e649b4661f476 Mon Sep 17 00:00:00 2001 From: Farhanam76 Date: Mon, 14 Oct 2024 09:09:23 +0100 Subject: [PATCH 1/5] Change text to dataset schema in the supplementary data --- eq-author/src/App/dataSettings/SupplementaryDataPage/index.js | 4 ++-- .../src/App/dataSettings/SupplementaryDataPage/index.test.js | 4 ++-- eq-author/src/components/buttons/UnlinkButton/index.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eq-author/src/App/dataSettings/SupplementaryDataPage/index.js b/eq-author/src/App/dataSettings/SupplementaryDataPage/index.js index e1694d7832..deeeaa37e7 100644 --- a/eq-author/src/App/dataSettings/SupplementaryDataPage/index.js +++ b/eq-author/src/App/dataSettings/SupplementaryDataPage/index.js @@ -193,9 +193,9 @@ const SupplementaryDataPage = () => { return ( <> unlinkDataset()} onClose={() => setShowUnlinkModal(false)} diff --git a/eq-author/src/App/dataSettings/SupplementaryDataPage/index.test.js b/eq-author/src/App/dataSettings/SupplementaryDataPage/index.test.js index 6852c7fe8a..496683a559 100644 --- a/eq-author/src/App/dataSettings/SupplementaryDataPage/index.test.js +++ b/eq-author/src/App/dataSettings/SupplementaryDataPage/index.test.js @@ -246,7 +246,7 @@ describe("Supplementary dataset page", () => { }); describe("Unlink dataset", () => { - it("should display the Unlink dataset modal", async () => { + it("should display the Unlink dataset schema modal", async () => { useQuery.mockImplementation(() => ({ loading: false, error: false, @@ -315,7 +315,7 @@ describe("Supplementary dataset page", () => { expect(queryByTestId("modal")).not.toBeInTheDocument(); }); - it("should close the Unlink dataset modal", async () => { + it("should close the Unlink dataset schema modal", async () => { useQuery.mockImplementationOnce(() => ({ loading: false, error: false, diff --git a/eq-author/src/components/buttons/UnlinkButton/index.js b/eq-author/src/components/buttons/UnlinkButton/index.js index 42f0b15aa2..f9760014d7 100644 --- a/eq-author/src/components/buttons/UnlinkButton/index.js +++ b/eq-author/src/components/buttons/UnlinkButton/index.js @@ -41,7 +41,7 @@ const UnlinkTooltip = ({ children }) => ( const UnlinkButton = ({ hideText, - iconText = "Unlink dataset", + iconText = "Unlink dataset schema", ...otherProps }) => { const Wrapper = hideText ? UnlinkTooltip : React.Fragment; @@ -68,7 +68,7 @@ UnlinkButton.propTypes = { UnlinkButton.defaultProps = { hideText: false, - iconText: "Unlink dataset", + iconText: "Unlink dataset schema", disabledIcon: false, }; From 669db725acde8de40d946c1387d239e929e19429 Mon Sep 17 00:00:00 2001 From: Farhanam76 Date: Mon, 14 Oct 2024 09:10:23 +0100 Subject: [PATCH 2/5] changed text to dataset schema --- .../src/App/dataSettings/SupplementaryDataPage/index.js | 5 +++-- eq-author/src/components/buttons/UnlinkButton/index.js | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/eq-author/src/App/dataSettings/SupplementaryDataPage/index.js b/eq-author/src/App/dataSettings/SupplementaryDataPage/index.js index deeeaa37e7..f7a2c4543d 100644 --- a/eq-author/src/App/dataSettings/SupplementaryDataPage/index.js +++ b/eq-author/src/App/dataSettings/SupplementaryDataPage/index.js @@ -312,8 +312,9 @@ const SupplementaryDataPage = () => { A respondent's answers to previous questions are stored in supplementary datasets - as data fields. Data fields can be piped into - question and section pages using the toolbar. + schemas as data fields. Data fields can be piped + into question and section pages using the + toolbar. Data fields are defined as either: diff --git a/eq-author/src/components/buttons/UnlinkButton/index.js b/eq-author/src/components/buttons/UnlinkButton/index.js index f9760014d7..4645bce039 100644 --- a/eq-author/src/components/buttons/UnlinkButton/index.js +++ b/eq-author/src/components/buttons/UnlinkButton/index.js @@ -34,7 +34,11 @@ const StyledUnlinkButton = styled(Button).attrs({ `; const UnlinkTooltip = ({ children }) => ( - + {children} ); From 1af39968643f2c09cccbd47829d29ee7499131f7 Mon Sep 17 00:00:00 2001 From: Farhanam76 Date: Tue, 15 Oct 2024 09:23:48 +0100 Subject: [PATCH 3/5] added schema to the header and the button --- .../src/App/dataSettings/SupplementaryDataPage/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/eq-author/src/App/dataSettings/SupplementaryDataPage/index.js b/eq-author/src/App/dataSettings/SupplementaryDataPage/index.js index f7a2c4543d..957e2f64bd 100644 --- a/eq-author/src/App/dataSettings/SupplementaryDataPage/index.js +++ b/eq-author/src/App/dataSettings/SupplementaryDataPage/index.js @@ -267,7 +267,8 @@ const SupplementaryDataPage = () => { - Dataset for survey ID {tableData.surveyId} + Dataset schema for survey ID{" "} + {tableData.surveyId} @@ -276,7 +277,7 @@ const SupplementaryDataPage = () => { data-test="btn-unlink-dataset" onClick={handleUnlinkClick} > - Unlink dataset + Unlink dataset schema @@ -311,7 +312,7 @@ const SupplementaryDataPage = () => { A respondent's answers to previous - questions are stored in supplementary datasets + questions are stored in supplementary dataset schemas as data fields. Data fields can be piped into question and section pages using the toolbar. From a6c0c410238577eb8aa70516dde81ff0c987bc13 Mon Sep 17 00:00:00 2001 From: Farhanam76 Date: Tue, 15 Oct 2024 09:57:54 +0100 Subject: [PATCH 4/5] changed width to make the button text one line --- eq-author/src/components/buttons/UnlinkButton/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eq-author/src/components/buttons/UnlinkButton/index.js b/eq-author/src/components/buttons/UnlinkButton/index.js index 4645bce039..890b598c1b 100644 --- a/eq-author/src/components/buttons/UnlinkButton/index.js +++ b/eq-author/src/components/buttons/UnlinkButton/index.js @@ -18,7 +18,7 @@ const StyledUnlinkButton = styled(Button).attrs({ fill: ${colors.blue}; } - width: 11em; + width: 14em; height: 2.5em; align-items: center; margin: 0 0 0 auto; From 36342e7c751a8059a0d3aea4e41845c1072277fb Mon Sep 17 00:00:00 2001 From: Farhanam76 Date: Tue, 15 Oct 2024 12:11:09 +0100 Subject: [PATCH 5/5] updated the survey loading and error and the tests to reflect new change --- .../src/App/dataSettings/SupplementaryDataPage/index.js | 6 ++++-- .../App/dataSettings/SupplementaryDataPage/index.test.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/eq-author/src/App/dataSettings/SupplementaryDataPage/index.js b/eq-author/src/App/dataSettings/SupplementaryDataPage/index.js index 957e2f64bd..f969d71d8d 100644 --- a/eq-author/src/App/dataSettings/SupplementaryDataPage/index.js +++ b/eq-author/src/App/dataSettings/SupplementaryDataPage/index.js @@ -183,11 +183,13 @@ const SupplementaryDataPage = () => { }; if (surveyLoading) { - return Dataset page is loading...; + return ( + Supplementary data page is loading... + ); } if (surveyError) { - return Dataset page error; + return Supplementary data page error; } return ( diff --git a/eq-author/src/App/dataSettings/SupplementaryDataPage/index.test.js b/eq-author/src/App/dataSettings/SupplementaryDataPage/index.test.js index 496683a559..f1d0044bd2 100644 --- a/eq-author/src/App/dataSettings/SupplementaryDataPage/index.test.js +++ b/eq-author/src/App/dataSettings/SupplementaryDataPage/index.test.js @@ -236,7 +236,7 @@ describe("Supplementary dataset page", () => { user, mocks ); - expect(getByText("Dataset for survey ID 068")).toBeTruthy(); + expect(getByText("Dataset schema for survey ID 068")).toBeTruthy(); expect(getByText("ID:")).toBeTruthy(); expect(getByText("Version:")).toBeTruthy(); expect(getByText("Date created:")).toBeTruthy();