From 703a1a4c5ba5f149b0438d8102c198ea8b96b9f5 Mon Sep 17 00:00:00 2001 From: Lisa Knox Date: Tue, 16 Jul 2024 15:03:55 -0400 Subject: [PATCH] 21720: * updated helpers test Arvados-DCO-1.1-Signed-off-by: Lisa Knox --- .../actions/{helpers.test.ts => helpers.cy.js} | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename services/workbench2/src/views-components/context-menu/actions/{helpers.test.ts => helpers.cy.js} (69%) diff --git a/services/workbench2/src/views-components/context-menu/actions/helpers.test.ts b/services/workbench2/src/views-components/context-menu/actions/helpers.cy.js similarity index 69% rename from services/workbench2/src/views-components/context-menu/actions/helpers.test.ts rename to services/workbench2/src/views-components/context-menu/actions/helpers.cy.js index 7776d0e5aa..e8adb669cb 100644 --- a/services/workbench2/src/views-components/context-menu/actions/helpers.test.ts +++ b/services/workbench2/src/views-components/context-menu/actions/helpers.cy.js @@ -15,7 +15,7 @@ describe('helpers', () => { const result = sanitizeToken(url); // then - expect(result).toBe('https://example.com/c=zzzzz-4zz18-0123456789abcde/LIMS/1.html?api_token=v2/a/b'); + expect(result).to.equal('https://example.com/c=zzzzz-4zz18-0123456789abcde/LIMS/1.html?api_token=v2/a/b'); }); }); @@ -25,7 +25,7 @@ describe('helpers', () => { const result = getCollectionItemClipboardUrl(url); // then - expect(result).toBe('http://localhost?redirectToDownload=https://example.com/c=zzzzz-4zz18-0123456789abcde/LIMS/1.html'); + expect(result).to.equal('http://localhost:8080?redirectToDownload=https://example.com/c=zzzzz-4zz18-0123456789abcde/LIMS/1.html'); }); }); @@ -38,13 +38,13 @@ describe('helpers', () => { // then expect(getInlineFileUrl(url, webDavDownloadUrl, webDavUrlA)) - .toBe('https://zzzzz-4zz18-0123456789abcde.collections.example.com/t=v2/a/b/LIMS/1.html'); + .to.equal('https://zzzzz-4zz18-0123456789abcde.collections.example.com/t=v2/a/b/LIMS/1.html'); expect(getInlineFileUrl(url, webDavDownloadUrl, webDavUrlB)) - .toBe('https://zzzzz-4zz18-0123456789abcde--collections.example.com/t=v2/a/b/LIMS/1.html'); + .to.equal('https://zzzzz-4zz18-0123456789abcde--collections.example.com/t=v2/a/b/LIMS/1.html'); expect(getInlineFileUrl(urlWithPdh, webDavDownloadUrl, webDavUrlA)) - .toBe('https://012345678901234567890123456789aa-0.collections.example.com/t=v2/a/b/LIMS/1.html'); + .to.equal('https://012345678901234567890123456789aa-0.collections.example.com/t=v2/a/b/LIMS/1.html'); expect(getInlineFileUrl(urlWithPdh, webDavDownloadUrl, webDavUrlB)) - .toBe('https://012345678901234567890123456789aa-0--collections.example.com/t=v2/a/b/LIMS/1.html'); + .to.equal('https://012345678901234567890123456789aa-0--collections.example.com/t=v2/a/b/LIMS/1.html'); }); it('should keep the url the same when no inline url available', () => { @@ -54,7 +54,7 @@ describe('helpers', () => { const result = getInlineFileUrl(url, webDavDownloadUrl, webDavUrl); // then - expect(result).toBe('https://example.com/c=zzzzz-4zz18-0123456789abcde/t=v2/a/b/LIMS/1.html'); + expect(result).to.equal('https://example.com/c=zzzzz-4zz18-0123456789abcde/t=v2/a/b/LIMS/1.html'); }); it('should replace the url when available', () => { @@ -64,7 +64,7 @@ describe('helpers', () => { const result = getInlineFileUrl(url, webDavDownloadUrl, webDavUrl); // then - expect(result).toBe('https://download.example.com/c=zzzzz-4zz18-0123456789abcde/t=v2/a/b/LIMS/1.html'); + expect(result).to.equal('https://download.example.com/c=zzzzz-4zz18-0123456789abcde/t=v2/a/b/LIMS/1.html'); }); }); }); -- 2.39.5