-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CORE-196] Refactor feedbackURL and articleURL in feature preview log…
…ic (#5224)
- Loading branch information
1 parent
f24ac07
commit 84c6873
Showing
3 changed files
with
8 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,11 +50,6 @@ export type FeaturePreview = { | |
* Optional date string for the last updated date. Shown on the feature previews page. | ||
*/ | ||
readonly lastUpdated?: string; | ||
|
||
/** | ||
* Optional URL for an article about the feature. Shown on the feature previews page. | ||
*/ | ||
readonly articleUrl?: string; | ||
}; | ||
|
||
const featurePreviewsConfig: readonly FeaturePreview[] = [ | ||
|
@@ -99,11 +94,8 @@ const featurePreviewsConfig: readonly FeaturePreview[] = [ | |
title: 'Terra Workflow Repository Improvements', | ||
description: | ||
'Enabling this feature will allow creating and editing workflows with the built-in Terra Workflow Repository UI. This replaces the external Broad Methods Repository. Changes made in Terra are reflected in the external Broad Methods Repository, and vice-versa.', | ||
feedbackUrl: `mailto:[email protected]?subject=${encodeURIComponent( | ||
'Feedback on Terra Workflow Repository Improvements' | ||
)}`, | ||
feedbackUrl: 'https://support.terra.bio/hc/en-us/articles/31191238873243', | ||
lastUpdated: '1/7/2025', | ||
articleUrl: 'https://support.terra.bio/hc/en-us/articles/31191238873243', | ||
}, | ||
{ | ||
id: COHORT_BUILDER_CARD, | ||
|
@@ -121,34 +113,25 @@ const featurePreviewsConfig: readonly FeaturePreview[] = [ | |
title: 'Improved Spend Reports', | ||
description: | ||
'Enabling this feature will show billing project owners costs associated with all workspaces in billing projects with spend reporting enabled. Additional updates to spend reports coming soon!', | ||
feedbackUrl: `mailto:[email protected]?subject=${encodeURIComponent( | ||
'Feedback on Improved Spend Reports' | ||
)}`, | ||
feedbackUrl: 'https://support.terra.bio/hc/en-us/articles/31182586327323', | ||
lastUpdated: '01/17/2025', | ||
articleUrl: 'https://support.terra.bio/hc/en-us/articles/31182586327323', | ||
}, | ||
{ | ||
id: AUTO_GENERATE_DATA_TABLES, | ||
title: 'Autogenerate data table for single and paired end sequencing', | ||
description: | ||
'Enabling this feature will show a new option in the data uploader to autogenerate a data table instead of uploading your own TSV. This feature will attempt to automatch known file patterns for single and paired end sequencing and autogenerate a data table linking to those files.', | ||
feedbackUrl: `mailto:[email protected]?subject=${encodeURIComponent( | ||
'Feedback on Autogenerate data table for single and paired end sequencing' | ||
)}`, | ||
feedbackUrl: 'https://support.terra.bio/hc/en-us/articles/31258673632923', | ||
lastUpdated: '11/26/2024', | ||
articleUrl: 'https://support.terra.bio/hc/en-us/articles/31258673632923', | ||
}, | ||
{ | ||
id: PREVIEW_COST_CAPPING, | ||
title: 'Workflow Cost Capping', | ||
description: | ||
'Enabling this feature will show a new workflow configuration option to add a user-configurable cost cap to the workflow. Workflows will be terminated once they exceed the configured value.', | ||
groups: ['preview-cost-capping'], | ||
feedbackUrl: `mailto:[email protected]?subject=${encodeURIComponent( | ||
'Feedback on Workflow Cost Capping' | ||
)}`, | ||
feedbackUrl: 'https://support.terra.bio/hc/en-us/articles/31269696049307', | ||
lastUpdated: '12/6/2024', | ||
articleUrl: 'https://support.terra.bio/hc/en-us/articles/31269696049307', | ||
}, | ||
{ | ||
id: GCP_BATCH, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,6 @@ describe('FeaturePreviews', () => { | |
id: 'feature1', | ||
title: 'Feature #1', | ||
description: 'A new feature', | ||
articleUrl: 'https://example.com/article', | ||
documentationUrl: 'https://example.com/feature-1-docs', | ||
lastUpdated: '2024-11-01', | ||
}, | ||
|
@@ -92,24 +91,11 @@ describe('FeaturePreviews', () => { | |
|
||
it('should render feedback link if provided', () => { | ||
const { getAllByText } = render(h(FeaturePreviews)); | ||
const feedbackLinks = getAllByText('Submit feedback'); | ||
const feedbackLinks = getAllByText('Learn more and provide feedback'); | ||
expect(feedbackLinks.length).toBe(1); | ||
expect(feedbackLinks[0].getAttribute('href')).toBe('mailto:[email protected]'); | ||
}); | ||
|
||
it('displays the correct link based on articleUrl', async () => { | ||
const { getByRole } = render(h(FeaturePreviews)); | ||
|
||
const link1 = getByRole('link', { name: 'Learn more and provide feedback' }); | ||
expect(link1).toHaveAttribute('href', 'https://example.com/article'); | ||
|
||
const link2 = getByRole('link', { name: 'Documentation' }); | ||
expect(link2).toHaveAttribute('href', 'https://example.com/feature-1-docs'); | ||
|
||
const link3 = getByRole('link', { name: 'Submit feedback' }); | ||
expect(link3).toHaveAttribute('href', 'mailto:[email protected]'); | ||
}); | ||
|
||
it('should render "Go to Workspaces List" link', () => { | ||
const { getByRole } = render(h(FeaturePreviews)); | ||
const link = getByRole('link', { name: 'Go to Workspaces List' }); | ||
|