-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: refactor version-alert text #674
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: b604737 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -5,25 +5,24 @@ import { | |||
removeVersionFromPath, | |||
} from '../version-select/util' | |||
import s from './style.module.css' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This cuts down some logic in this component, and makes it closer to a purely presentational component
|
||
expect(getByTestId('tag')).toHaveTextContent('old version') | ||
expect(getByTestId('text')).toHaveTextContent('Some Text') | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleaned up tests due to slimmed down logic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is only one thing to test for now — if versionInPath
is present, or not.
📦 Canary Packages PublishedLatest commit: 2077a09 Published 1 packages@hashicorp/react-docs-page@17.3.2-canary-20220802201454
|
Co-authored-by: Bryce Kalow <bkalow@hashicorp.com>
This updates the version-alert to use the
display
value that is returned from the ContentAPI