From 96bc83fae5d9775f40589d47b16b157ee56acfd7 Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Thu, 8 Aug 2024 12:40:00 -0600 Subject: [PATCH 1/4] Add vitest to GHA --- .github/workflows/test.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000000..5366d2cae9 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,23 @@ +name: Test +on: + pull_request: + paths: + - 'src/**' + - '.github/workflows/test.yml' + types: + - opened + - synchronize + - reopened + - ready_for_review + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 'latest' + - run: npm install + - run: npx vitest src/components \ No newline at end of file From 080ef1f1528cb490abecaaf072e7f0951fd95de6 Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Thu, 8 Aug 2024 14:01:44 -0600 Subject: [PATCH 2/4] Make a clean install --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5366d2cae9..eca44774e7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,5 +19,5 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 'latest' - - run: npm install + - run: npm ci - run: npx vitest src/components \ No newline at end of file From eb7127863547ce6abaf8cee4f06e6f3aae4627f2 Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Thu, 8 Aug 2024 15:21:18 -0500 Subject: [PATCH 3/4] switching from jsx to React.createElement() --- src/components/omniSidebarNav/helpers.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/omniSidebarNav/helpers.js b/src/components/omniSidebarNav/helpers.js index a4e15c571e..4c9d7636e5 100644 --- a/src/components/omniSidebarNav/helpers.js +++ b/src/components/omniSidebarNav/helpers.js @@ -17,10 +17,12 @@ const turnItemsIntoLinks = (item, activePage) => { // If the link is external, add an icon to indicate that. // Internal links will start with a slash. if (item.link.startsWith('http')) { - linkText = ( - <> - {item.title} - + linkText = React.createElement( + React.Fragment, + null, + React.createElement(Icon, { iconName: "externalLink" }), + " ", + item.title ); } From 948473a85a29254f89551ef9a1659bb27255de76 Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Thu, 8 Aug 2024 15:36:54 -0500 Subject: [PATCH 4/4] Update and rename test.yml to vitest.yml --- .github/workflows/{test.yml => vitest.yml} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename .github/workflows/{test.yml => vitest.yml} (76%) diff --git a/.github/workflows/test.yml b/.github/workflows/vitest.yml similarity index 76% rename from .github/workflows/test.yml rename to .github/workflows/vitest.yml index eca44774e7..fd7c0f1c38 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/vitest.yml @@ -1,9 +1,9 @@ -name: Test +name: JavaScript Unit Tests on: pull_request: paths: - 'src/**' - - '.github/workflows/test.yml' + - '.github/workflows/vitest.yml' types: - opened - synchronize @@ -20,4 +20,4 @@ jobs: with: node-version: 'latest' - run: npm ci - - run: npx vitest src/components \ No newline at end of file + - run: npx vitest src/components