Skip to content

Commit

Permalink
[Reporting/Screenshots] add error for no shared items container found…
Browse files Browse the repository at this point in the history
… on the page
  • Loading branch information
tsullivan committed Dec 6, 2019
1 parent 3368ce0 commit 149022b
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,11 @@ export const getElementPositionAndAttributes = async (
args: [layout.selectors.screenshot, { title: 'data-title', description: 'data-description' }],
});

if (elementsPositionAndAttributes.length === 0) {
throw new Error(
`No shared items containers were found on the page! Reporting requires an element with the '${layout.selectors.screenshot}' attributes on the page.`
);
}

return elementsPositionAndAttributes;
};

0 comments on commit 149022b

Please sign in to comment.