SYNC: chart screenshot

This commit is contained in:
SPRINX0\prochazka
2025-06-16 09:23:19 +02:00
committed by Diflow
parent cd7cf63144
commit eaa60c281e
5 changed files with 26 additions and 1 deletions

View File

@@ -488,4 +488,18 @@ describe('Data browser data', () => {
cy.testid('DataDeployTab_importIntoDb').click(); cy.testid('DataDeployTab_importIntoDb').click();
cy.themeshot('data-replicator'); cy.themeshot('data-replicator');
}); });
it('Public Knowledge base - show chart', () => {
cy.contains('MySql-connection').click();
cy.contains('MyChinook').click();
cy.testid('WidgetIconPanel_cloud-public').click();
cy.testid('public-cloud-file-tag-mysql/folder-MySQL/tag-premium/top-tables-row-count.sql').click();
cy.testid('chart-canvas').should($c => expect($c[0].toDataURL()).to.match(/^data:image\/png;base64/));
cy.themeshot('public-knowledge-base-tables-sizes');
});
// it('Private cloud - sign in', () => {
// cy.testid('WidgetIconPanel_cloudAccount').click();
// cy.themeshot('private-cloud-sign-in');
// });
}); });

View File

@@ -42,3 +42,11 @@ beforeEach(() => {
}); });
}); });
}); });
// Cypress.Screenshot.defaults({
// onBeforeScreenshot() {
// if (window.Chart) {
// Object.values(window.Chart.instances).forEach(c => c.resize());
// }
// },
// });

View File

@@ -1,4 +1,5 @@
CONNECTIONS=mysql,postgres,mongo,redis CONNECTIONS=mysql,postgres,mongo,redis
ALLOW_DBGATE_PRIVATE_CLOUD=1
LABEL_mysql=MySql-connection LABEL_mysql=MySql-connection
SERVER_mysql=localhost SERVER_mysql=localhost

View File

@@ -113,6 +113,7 @@
on:drop on:drop
bind:this={domDiv} bind:this={domDiv}
{...divProps} {...divProps}
data-testid={$$props['data-testid']}
> >
{#if checkedObjectsStore} {#if checkedObjectsStore}
<CheckboxField <CheckboxField
@@ -211,7 +212,7 @@
.isBold { .isBold {
font-weight: bold; font-weight: bold;
} }
.isGrayed { .isGrayed {
color: var(--theme-font-3); color: var(--theme-font-3);
} }

View File

@@ -37,6 +37,7 @@
menu={createMenu} menu={createMenu}
on:click={handleOpenSqlFile} on:click={handleOpenSqlFile}
isGrayed={_.intersection($currentActiveCloudTags, data.tags || []).length == 0} isGrayed={_.intersection($currentActiveCloudTags, data.tags || []).length == 0}
data-testid={`public-cloud-file-${data.path}`}
> >
{#if data.description} {#if data.description}
<div class="info"> <div class="info">