'enabled' assertion and text insertion issues
See original GitHub issueHi there,
I’m just updating some of our SAFE stack course modules, and I am finding some issues with canopy.
I have a button that is enabled when a text box has content, and disabled when it is empty.
I tried to write a simple test for this and it wasn’t working.
I found that
- The
enabled
/disabled
assertions were failing as the button is reported asnotDisplayed
when disabled, causing a timeout. - Emptying the text box programmatically does not trigger the
onChanged
event so the button remains active, however adding text does trigger it)
I have attached a sample showing these cases.
Use dotnet run
in the root for the main app
app.zip
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
I got stuck with a problem in Flutter: The following assertion ...
The exception explains what happens: TextField widgets require a Material widget ancestor. To introduce such Material widget, ...
Read more >Add, Delete, Enable, Disable Assertions - TechDocs
(Add Assertion) button in the Assertions Tool Bar. Use keyboard shortcut. Ctrl + Right. to insert an assertion into an Active Policy editor...
Read more >Add assertions levels · Issue #2977 · lvgl/lvgl
Introduce the problem There are currently multiple asserts, but none to check if a condition is evaluated to be true /*Enable asserts if...
Read more >Assertion fails when canceling "insert into" statement #1849
Problem description. I insert into a table and cancel the statement while it is executing its batch via a concurrent thread.
Read more >Programming With Assertions
This document shows you how to program with assertions. It covers the topics: Introduction; Putting Assertions Into Your Code; Compiling Files That Use ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I get this:
If you can just give me a snippet of the line that is failing and then a snippet of the html for the control you are trying to test that would probably work.
Displayed/Not displayed checks the display tag and the opacity. Your code may be visually disabling the control in a different way and you may have to write your own custom validator for that.
https://github.com/lefthandedgoat/canopy/blob/master/src/canopy/canopy.parallell.functions.fs#L604-L607
Amazing! Thank you so much 😃