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

Add test coverage for turbo-frame[disabled] #67

Merged
merged 1 commit into from
Jan 29, 2021

Conversation

seanpdoyle
Copy link
Contributor

@seanpdoyle seanpdoyle commented Jan 3, 2021

Support for the [disabled] attribute pre-dates this commit, but is
largely untested. Prior to hotwired/turbo-site#32 and
hotwired/turbo-site#36, there were no mentions of the attribute in
the Turbo Handbook or Reference documentation.

This commit adds functional test-level coverage for the existing
behavior. When an <a> or <form> element targets a <turbo-frame disabled> element, Turbo skips intercepting and intervening, and
instead navigates the page.

Testing

In addition, to avoid conflating [data-turbo="false"] and
<turbo-frame disabled>, this commit also renames test and test fixture
mentions of "disabled" to more accurately reflect which manner of
skipping behavior is being tested.

@seanpdoyle seanpdoyle requested a review from sstephenson January 3, 2021 16:33
@seanpdoyle seanpdoyle force-pushed the turbo-frame-disabled branch 2 times, most recently from d4e9d4c to fc3d9d8 Compare January 22, 2021 12:56
Support for the `[disabled]` attribute pre-dates this commit, but is
largely untested. Prior to [hotwired/turbo-site#32][] and
[hotwired/turbo-site#36][], there were no mentions of the attribute in
the Turbo [Handbook][] or [Reference][] documentation.

This commit adds functional test-level coverage for the existing
behavior. When an `<a>` or `<form>` element targets a `<turbo-frame
disabled>` element, Turbo skips intercepting and intervening, and
instead navigates the page.

Testing
---

In addition, to avoid conflating `[data-turbo="false"]` and
`<turbo-frame disabled>`, this commit also renames test and test fixture
mentions of "disabled" to more accurately reflect which manner of
skipping behavior is being tested.

[Handbook]: https://github.com/hotwired/turbo-site/blob/52d5e7f1dfc26ac7a6e01c6a715857ccf5ed5081/docs/handbook/03_frames.md
[Reference]: https://github.com/hotwired/turbo-site/blob/52d5e7f1dfc26ac7a6e01c6a715857ccf5ed5081/docs/reference/frames.md
[hotwired/turbo-site#32]: hotwired/turbo-site#32
[hotwired/turbo-site#36]: hotwired/turbo-site#36
@seanpdoyle seanpdoyle force-pushed the turbo-frame-disabled branch from fc3d9d8 to 578aa8d Compare January 29, 2021 17:01
@sstephenson sstephenson merged commit 385b01a into main Jan 29, 2021
@sstephenson sstephenson deleted the turbo-frame-disabled branch January 29, 2021 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants