Closed delatrie closed 1 day ago
Presumably, we're trying to stringify too much here:
Hi, I'm encountering the same issue.
Instead of using JSON.stringify
, you can use something like this:
function safeStringify(obj, replacer, spaces) {
try {
return JSON.stringify(obj, replacer, spaces);
} catch (error) {
return `[Unserializable: ${error.message}]`;
}
};
Hello
Issue reproduces with latest allure-cypress version "3.0.0-beta.10"
@perrsikk thanks for the info
I am also having this issue. For now, it has happened when doing a cy.wrap()
inside a .each()
loop of a list of DOM elements, or at the end of a .within()
block.
For example:
within()
block
cy.get('[status="positive"]').first().within(() => {
cy.contains('Created');
cy.get([icon="clear"]).click();
});
each()
block
cy.get('[data-testid="loc-list"]').find('list')
.should('have.length', data.length)
.each(($loc, index) => {
const locName = data.at(index).name;
cy.wrap($loc).should('contain.text', locName);
});
@delatrie , any update on issue. it is kind of blocker for us.
The fix will be released as soon as #1127 gets reviewed & merged.
Discussed in https://github.com/orgs/allure-framework/discussions/2650