question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'enabled' assertion and text insertion issues

See original GitHub issue

Hi 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

  1. The enabled / disabled assertions were failing as the button is reported as notDisplayed when disabled, causing a timeout.
  2. 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:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
lefthandedgoatcommented, Oct 6, 2021

I get this:

../app/Build.fsproj(10,3): error MSB4019: The imported project "../app/.paket/Paket.Restore.targets" was not found. 
Confirm that the expression in the Import declaration ".paket/Paket.Restore.targets" is correct, 
and that the file exists on disk.

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

0reactions
teknikal-wizardcommented, Oct 7, 2021

Amazing! Thank you so much 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found