by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 15:17
    egil commented #164
  • 15:17
    egil commented #164
  • 14:58
    KameshRajandran commented #164
  • 14:42
    egil commented #164
  • 14:33
    KameshRajandran commented #164
  • 14:31
    KameshRajandran commented #164
  • 14:24
    egil commented #164
  • 13:57
    KameshRajandran commented #164
  • 13:55
    KameshRajandran commented #164
  • 13:54
    KameshRajandran commented #164
  • 13:54
    KameshRajandran commented #164
  • 13:11
    egil commented #164
  • 13:05
    egil closed #163
  • 13:05
    egil commented #163
  • 11:55
    JaniceSalintha labeled #164
  • 11:55
    JaniceSalintha opened #164
  • 04:36
    JaniceSalintha edited #163
  • Jul 08 14:48
    egil commented #163
  • Jul 08 13:03
    JaniceSalintha labeled #163
  • Jul 08 13:03
    JaniceSalintha opened #163
Egil Hansen
@egil
To me, a Mock is something I can assert against. If it is just something that provides data to functionality to a system under test, I think of it more as a Fake or Stub.
DarthPedro
@DarthPedro
Yes, this provides an implementation and data to the auth system so that the tests can run. A unit test wouldn't be verifying/asserting data from these classes.
Seems like Fake is a better name.
Egil Hansen
@egil
master has been renamed to main, and a new tag named master has been created, so old links still work.
Egil Hansen
@egil
Hey @DarthPedro, great work so far on #151. Lets see if we can get the syntax/API even more dev friendly for this specific testing purpose.
Marcus Bullock
@MarcusBullock
hey - love the tool. is it possible to find html elements by their id?
ah ok right, just seen that .Find takes a cssSelector, cheers anyway
Egil Hansen
@egil
@MarcusBullock thanks. Yep, use the Find and FindAll and you should be golden. Alternative is cut.Nodes.GetElementById()
cut.Nodes is basically a DOM that has all the normal DOM APIs.
DarthPedro
@DarthPedro
Thanks @egil. Working on your PR comments.
pm64
@pm64
@egil just started listening to your guest spot on DotNetRocks .. nicely done, sir.
Egil Hansen
@egil
Thank you @pm64, much appreciated!
Egil Hansen
@egil
Hey folks, could use some input on this: egil/bUnit#155
Peter Morris
@mrpmorris
Done
Egil Hansen
@egil
Thanks @mrpmorris, followed up :-)
Peter Morris
@mrpmorris
Responded
Egil Hansen
@egil
re-responseded :)
Peter Morris
@mrpmorris
rereresponded
Egil Hansen
@egil
Hey folk, do this make sense or can somethings be made more clear?
https://bunit.egilhansen.com/docs/interaction/awaiting-async-state.html
Ahh, wait a sec, the build is still running, nothing to see yet.
Egil Hansen
@egil
now its ready for review
Peter Morris
@mrpmorris
@egil I added two more comments
Ultimately it is up to you what you call it, but I think Parent.Components.Add(XXX) reminds me of CUT.Parent = XXX
Egil Hansen
@egil
@mrpmorris I really love designing APIs, and this sort of discussion is what it is all about. Thanks for taking part.
Added another comment myself. Ultimately, unless we can get to an API that looks structural and can mimic the structure that will be created, I think it will be hard to make it unambiguous for everybody. Language is too imprecise in this case, it seems.
anyway, off to bed. maybe a good nights sleep will solve the mistery.
pm64
@pm64
Night @egil
Brett McDonald
@bfmsoft
Question: I want to select an Option for Select? I want to simulate a user doing it to test a component. Is there a sample or some code do get me close?
Egil Hansen
@egil
@bfmsoft I believe you use do cut.Find("myselect").Change(selected value)
It depends a little on the on-xxxx event you have bound your event handler to
It's likely to be one of these event dispatcher helper methods though: https://bunit.egilhansen.com/api/Bunit.InputEventDispatchExtensions.html
Egil Hansen
@egil
Another page on the docs site done - Verifying Markup - let me know what you think.
Egil Hansen
@egil
Big thanks to @DarthPedro for his work on #151, a fake authorization implementation that makes it simple to test Blazor auth code.
litrann
@litrann
Question: I have component that uses fluent validation within a edit form and I want to trigger the a submit but I am not sure how to hook up my tests to display the render html with the fluent validation inside it.
Egil Hansen
@egil
Hi @litrann sorry didn't see your message. If haven't figured it out, please post a question in the issues list the bUnit repo. I need an example of the component you are trying to test to help you.
litrann
@litrann
@egil Good morning, I posted the question in the bUnit repo under issues as suggested.
Egil Hansen
@egil
Great, and good you found the solution.
litrann
@litrann
image.png
Hello, I am using a 3rd party component and have a button attached a tag that won't show up in the rendered html. Is there a solution get it render? It is code inside of the <FooterTemplate>
litrann
@litrann
image.png
This is the rendered html. I tried finding the form and putting input text inside but seems to not show either.
Egil Hansen
@egil
hi @litrann start by making sure that other markup in the footer is rendered as you expect. Also, when debugging an issue like this, try to just write a test for the 3rd party component only, not included in anything else, and see if you get it rendered.
Egil Hansen
@egil
I assume it is the content inside FooterTemplate inside BlazoredTypeahead? In that case, you can also ping @chrissainty, I think he is the man behind that library.
Chris Sainty
@chrissainty
Someone called?
Chris Sainty
@chrissainty
The footer is only rendered when the suggestions list is open
Egil Hansen
@egil
indeed, @litrann might have a problem you can solve.
litrann
@litrann
Thank you @egil. I try out your recommendation. @chrissainty thank you for that information.
Egil Hansen
@egil
my pleasure
Chris Sainty
@chrissainty
happy to help