mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-08-12 21:58:33 +00:00
10 lines
442 B
JavaScript
10 lines
442 B
JavaScript
export function isValueExistsInElement(shouldInclude, content, domPathToContainer){
|
|
it(`should ${shouldInclude ? '' : 'not'} include '${content}'`, function () {
|
|
cy.get(domPathToContainer).then(htmlText => {
|
|
const allTextString = htmlText.text();
|
|
if (allTextString.includes(content) !== shouldInclude)
|
|
throw new Error(`One of the containers part contains ${content}`)
|
|
});
|
|
});
|
|
}
|