var event = this.post(“livewire/messages/wire.updateProfileModal”, {name=“Pete”, lastName=“Nelson”}); for example.
Can that be done. It runs without error and the event.getResponse().getStatusCode() returns a 200, however none of the profile data was updated. This leads me to believe that nothing actually happened.
I assume that anything ran in the textbox virtual environment would actually update a database record?
Yes, it should be a full integration test, so everything should work as normal. Can you post your code so we can assist. Also is this using cbwire? @gcopley
No, I was unaware that a testing section was present on the CBWIRE docs. I took a look just now. It appears that this would require a separate CFC in the integration directory that mirrors the sample one except that it would extend cbwire.models.BaseWireTest vs. coldbox.system.testing.BaseTestCase?
I’m confused: I don’t have a url or anything that I know of that places “root” into the url. Root should not be in the URL and I’ve not been able to decipher why it is put in. I don’t have much experience with CBWire/Livewire.
I have:
wire( “forgotLogin” )
// Sets our data properties
.data( {event_key = ‘D8A5FF89-9E0B-4A47-BC62-87FDEC2A2167’, email = ‘robert.bryant@communitybrands.com’} )
// Verifies output in our template rendering
.see( “Email Address” )
// Runs the ‘clearTasks’ action
.call( “retrieveAccount” )
// Verifies updated template rendering
.dontSee( “An email with login details have been submitted” );
} );
I get in response from the testing harness: Value must be initialized before use.Its possible that a method called on a Java object created by CreateObject returned null.
Do I need to “pull up” so the forgot login page and then have the wire () part? Or is my approach above correct?