gray-kilobyte-89541
12/19/2022, 1:00 AMmost-secretary-62975
12/19/2022, 1:07 AMgreen-fish-63208
12/19/2022, 2:50 PMfresh-doctor-14925
12/19/2022, 2:52 PMcontext()
within your describe block insteadgreen-fish-63208
12/19/2022, 2:57 PMfresh-doctor-14925
12/19/2022, 3:00 PMgray-kilobyte-89541
12/19/2022, 3:47 PMgreen-fish-63208
12/19/2022, 3:59 PMcold-cat-63632
12/19/2022, 4:17 PMcold-cat-63632
12/19/2022, 4:17 PMfresh-doctor-14925
12/19/2022, 4:18 PM.invoke('val')
or
.its('value')
one of those should workcold-cat-63632
12/19/2022, 4:18 PMfresh-doctor-14925
12/19/2022, 4:20 PM.should('have.value', true)
That's the cleanest way imocold-cat-63632
12/19/2022, 4:22 PMfresh-doctor-14925
12/19/2022, 4:22 PMcold-cat-63632
12/19/2022, 4:23 PMcold-cat-63632
12/19/2022, 4:24 PMcold-cat-63632
12/19/2022, 4:25 PMfresh-doctor-14925
12/19/2022, 4:25 PM.should('have.value', true)
isn't workingcold-cat-63632
12/19/2022, 4:28 PMcold-cat-63632
12/19/2022, 4:30 PMfresh-doctor-14925
12/19/2022, 4:31 PM.eq(123)
.its('data-field')
Looking again at your code, I think you need to get the contents of that attribute, and then do an assertion on the objectcold-cat-63632
12/19/2022, 4:34 PMcold-cat-63632
12/19/2022, 4:36 PMcold-cat-63632
12/19/2022, 4:36 PMfresh-doctor-14925
12/19/2022, 6:35 PMclass
, data-field
is something that you should be able to access with its()
thankful-wire-37848
12/19/2022, 7:19 PMcy.get(...).its('data-field').then(field => JSON.parse(field).value).should('be.true')
. Not sure though if .its('data-field')
will work though as that is not a DOM property of input.fresh-doctor-14925
12/19/2022, 7:31 PM.should('deep.include', { 'value': true })
Instead of the JSON parsingthankful-wire-37848
12/19/2022, 7:34 PM.its('dataset.field')
might work btwgray-kilobyte-89541
12/19/2022, 8:27 PMdata-field
attribute with stringified JSON object?