Skip to content
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

fix: Response objects couldn't open #1867

Merged
merged 2 commits into from
Jan 24, 2022

Conversation

DepickereSven
Copy link
Contributor

What/Why/How?

When you clicked on a response object you would get the following error.

Uncaught TypeError: can't access property "expanded", this is undefined

Reference

No reference

Testing

Added some cypress tests

Screenshots (optional)

Check yourself

  • Code is linted
  • Tested
  • All new/updated code is covered with tests

.should('have.attr', 'aria-expanded', 'true')
.parent()
.find('div h5')
.then($h5 => $h5[0].firstChild!.nodeValue!.trim())
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to get the value of the h5 element.
If I would just do .should('have.text', 'Response Schema:') on that h5 it would throw an error. Because the span values would also be in that comparison.

@DepickereSven DepickereSven changed the title Response objects couldn't open fix: Response objects couldn't open Jan 22, 2022
@Oprysk
Copy link
Contributor

Oprysk commented Jan 24, 2022

@DepickereSven Thank you for the fix!

@Oprysk Oprysk merged commit 18f943d into Redocly:master Jan 24, 2022
@DepickereSven DepickereSven deleted the response-couldn't-open branch January 24, 2022 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants