-
Notifications
You must be signed in to change notification settings - Fork 7
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
(test) O3-3610 : Unit test for rendering tutorials #8
Conversation
if (element) { | ||
console.log('Found element:', element); | ||
} else { | ||
console.log('Element not found for:', step.content); | ||
} |
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.
No need to use console logs here. You can use an assertion.
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.
const walkthroughButton = screen.getByText('Basic Tutorial').closest('.tutorialItem').querySelector('.walkthrough'); | ||
await user.click(walkthroughButton); | ||
|
||
await waitFor(() => { |
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 this test should do is it should check if it lists down all the tutorials. No need to click them nor to go through the steps.
Should be something like:
for all tutorial in tutorials:
expect the tutorial title and description is loaded properly
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.
Thanks @Vijaykv5 !
Requirements
For changes to apps
If applicable
Summary
Added test for rendering tutorials.
Screenshots
Related Issue
Other
O3-3610