feat: add hideUnusedParticipants and some cleanup

This commit is contained in:
Yash-Singh1
2022-04-14 19:19:18 -07:00
parent 85485d850c
commit 4c93870580
14 changed files with 1455 additions and 2005 deletions

View File

@@ -18,7 +18,7 @@ export const mermaidUrl = (graphStr, options, api) => {
return url;
};
export const imgSnapshotTest = (graphStr, _options, api) => {
export const imgSnapshotTest = (graphStr, _options, api = false, validation) => {
cy.log(_options);
const options = Object.assign(_options);
if (!options.fontFamily) {
@@ -46,8 +46,8 @@ export const imgSnapshotTest = (graphStr, _options, api) => {
const url = mermaidUrl(graphStr, options, api);
cy.visit(url);
if (validation) cy.get('svg').should(validation);
cy.get('svg');
// cy.percySnapshot();
// Default name to test title
const name = (options.name || cy.state('runnable').fullTitle()).replace(/\s+/g, '-');