-
Notifications
You must be signed in to change notification settings - Fork 22
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
Feature/242 a11y modal #657
Conversation
it("modal appears in non-experience-cloud context and element is accessible", () => { | ||
element.isCommunity = false; | ||
document.body.appendChild(element); | ||
|
||
return global.flushPromises().then(async () => { | ||
const modal = element.shadowRoot.querySelector("c-modal"); | ||
|
||
// Modal will only display with a spinner loaded | ||
expect(modal).not.toBeNull(); | ||
modal.dispatchEvent(new CustomEvent("dialogclose")); | ||
|
||
// TODO: Validate accessibility when each step is loads. | ||
global.isAccessible(element); | ||
}); | ||
}); | ||
|
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.
We'll have to replace this test using the new modal functionality. It's unclear in the short term how this is done - more research required.
I did add some of the test components required to make the existing test pass, we'll leverage those in the new test as well.
<labels> | ||
<fullName>Service_Schedule_Wizard</fullName> | ||
<language>en_US</language> | ||
<protected>true</protected> | ||
<shortDescription>Service Schedule Wizard</shortDescription> | ||
<value>Service Schedule Wizard</value> | ||
</labels> |
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.
@fanwar-salesforce This is the label used in the description for the wizard modal. I kept it very generic since it is used in a variety of situations, but not displayed on screen.
Note to reviewer: I kept the experience cloud functionality as-is. As demonstrated in an earlier call, we're seeing an issue where exp cloud displays an extra empty modal using the new component. We'll create a new WI to investigate if this is a core issue. |
this[NavigationMixin.Navigate]({ | ||
type: "standard__objectPage", | ||
attributes: { | ||
objectApiName: prefixNamespace(SERVICE_SCHEDULE), |
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.
@jjbennett It would have been better to just use the object schema import here and call this with objectApiName: SERVICE_SCHEDULE.objectApiName
?
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.
yea probably
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.
Code looks good, I am wondering about passing down the serviceId and a couple other variables you have. I did some testing and it's definitely not setting the serviceId but I am now running install prod to see if that was introduced here or elsewhere.
@api content; | ||
serviceId; | ||
recordTypeId; | ||
ssCreator; |
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.
What is this for?
force-app/main/default/lwc/serviceScheduleCreatorModal/serviceScheduleCreatorModal.js
Outdated
Show resolved
Hide resolved
this[NavigationMixin.Navigate]({ | ||
type: "standard__objectPage", | ||
attributes: { | ||
objectApiName: prefixNamespace(SERVICE_SCHEDULE), |
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.
yea probably
Critical Changes
Changes
Converts existing service schedule wizard modals to lightning-modal to better support accessibility.
Issues Closed
New Metadata
Deleted Metadata
Definition of Done
Refer to Asteroids DoD document to see any additional details for the items below