-
Notifications
You must be signed in to change notification settings - Fork 12
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
va-alert: force status to be defined #932
Conversation
* */ | ||
@Prop() type?: string = 'info'; |
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.
Changed this prop in the banner component because it gets passed as a status to alert and there were conflicting types between the 'string' definition here and the predefined list of the alert.
* */ | ||
@Prop() type?: string = 'info'; | ||
@Prop() type?: "info" | "warning" | "error" | "success" | "continue" = 'info'; |
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.
it('should set status to info if null', async () => { | ||
const page = await newE2EPage(); | ||
await page.setContent( | ||
'<va-alert uswds><h4 slot="headline">This is an alert</h4><div>This is the alert content</div>', |
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.
If these are tests specifically for the uswds
variation, can we mention that in the test name like the others? Also, should any of these tests be added for the v1 version too?
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.
Added and updated
Chromatic
https://61262-require-alert-icon--60f9b557105290003b387cd5.chromatic.com
Description
Update to ensure that there is always an icon/status for the alert and prevent the alert from rendering as text on a grey background.
Closes department-of-veterans-affairs/va.gov-team#61262
Testing done
Screenshots
Before:
After:
Acceptance criteria
Definition of done