Skip to content

Commit

Permalink
[Reporting/Screenshots] add error for no shared items found on the pa…
Browse files Browse the repository at this point in the history
…ge (#52022)

* [Reporting/Screenshots] add error for no shared items container found on the page

* wording adjustment
  • Loading branch information
tsullivan authored Dec 12, 2019
1 parent 2d36989 commit 31a6b50
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 a container element with the '${layout.selectors.screenshot}' attribute on the page.`
);
}

return elementsPositionAndAttributes;
};

0 comments on commit 31a6b50

Please sign in to comment.