2023-09-08 10:51:59 -05:00
|
|
|
import { e2e } from '../utils';
|
2022-08-01 09:20:49 -05:00
|
|
|
|
2023-09-13 07:24:20 -05:00
|
|
|
describe('Create a public dashboard with template variables shows a template variable warning', () => {
|
|
|
|
beforeEach(() => {
|
2023-09-27 05:33:00 -05:00
|
|
|
e2e.flows.login(Cypress.env('USERNAME'), Cypress.env('PASSWORD'));
|
2023-09-13 07:24:20 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
it('Create a public dashboard with template variables shows a template variable warning', () => {
|
2022-08-01 09:20:49 -05:00
|
|
|
// Opening a dashboard with template variables
|
|
|
|
e2e.flows.openDashboard({ uid: 'HYaGDGIMk' });
|
|
|
|
|
|
|
|
// Open sharing modal
|
2024-01-08 07:42:24 -06:00
|
|
|
e2e.pages.Dashboard.DashNav.shareButton().click();
|
2022-08-01 09:20:49 -05:00
|
|
|
|
|
|
|
// Select public dashboards tab
|
2024-06-24 11:48:26 -05:00
|
|
|
e2e.components.Tab.title('Public dashboard').click();
|
2022-08-01 09:20:49 -05:00
|
|
|
|
|
|
|
// Warning Alert dashboard cannot be made public because it has template variables
|
|
|
|
e2e.pages.ShareDashboardModal.PublicDashboard.TemplateVariablesWarningAlert().should('be.visible');
|
|
|
|
|
|
|
|
// Configuration elements for public dashboards should not exist
|
2023-02-24 09:36:29 -06:00
|
|
|
e2e.pages.ShareDashboardModal.PublicDashboard.WillBePublicCheckbox().should('exist');
|
|
|
|
e2e.pages.ShareDashboardModal.PublicDashboard.LimitedDSCheckbox().should('exist');
|
|
|
|
e2e.pages.ShareDashboardModal.PublicDashboard.CostIncreaseCheckbox().should('exist');
|
|
|
|
e2e.pages.ShareDashboardModal.PublicDashboard.CreateButton().should('exist');
|
|
|
|
|
|
|
|
e2e.pages.ShareDashboardModal.PublicDashboard.PauseSwitch().should('not.exist');
|
2023-09-13 07:24:20 -05:00
|
|
|
});
|
2022-08-01 09:20:49 -05:00
|
|
|
});
|