I would like to check if key-value pair exist on a object. I use should.js with syntax: cy.gey(selector).should('have.property', 'Compasny Feature: ', ['open space ']);
but I get this error Error: AssertionError: expected { Object (Company Feature: , Name: ) } to have property 'Company Feature: ' of [ 'open space ' ], but got [ 'open space ' ]
I totally have no idea which part the value does not match. or it is just a bug from should.js?
// debug output
{
"Company Feature: ": [
"open space "
],
"Name: ": [
"John, Amazon "
]
}
// test.ts
cy.gey(selector).should('have.property', 'Compasny Feature: ', ['open space ']);
// html
<div class="container">
<span>
<span class="title">Company Feature: </span>
<span class="text">open space </span>
</span>
<span>
<span class="title">Name: </span>
<span class="text">John, Amazon </span>
</span>
</div>