It's not a bug. You need to set required: false for the content item, because Geb defaults it to required: true. http://www.gebish.org/manual/current/#code-required-code
On Thu, Aug 11, 2016 at 4:59 PM, Paul Sukow <[email protected]> wrote: > Hi, > > I'm working on a test for a scheduling part of our app in which I do the > following steps: > 1. Create a shift > 2. Verify that the shift was created. > 3. Delete the shift > 4. Verify that the shift was deleted. > > I am using the page object pattern and I have a selector in my page for > the shift like: > newShift { $('.newShiftClass') } > > I am able to verify when a new shift is created in my test by: > newShift != null > > When I try to verify that the shift was deleted by: > newShift == null > An geb.error.RequiredPageContentNotPresent exception is thrown and the > test fails. > > I can, however, use the selector in my test like: > $('.newShiftClass') == null > And the test will pass and no exceptions will be thrown. > > > It seems to me that this might be a bug in Geb, but I'm not sure. Does > anyone have any advice? > > -- > You received this message because you are subscribed to the Google Groups > "Geb User Mailing List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/geb-user/54a451e1-cf93-408f-9700-007774b15f84%40googlegroups.com > <https://groups.google.com/d/msgid/geb-user/54a451e1-cf93-408f-9700-007774b15f84%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/CAB06vMDkQV_kOuSpDNo649s_57NnEx2DL%2B53YO9WRHOJdcayOQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
