2023-11-02 08:06:33 -07:00
|
|
|
import workflow from '../fixtures/Manual_wait_set.json';
|
2024-07-03 06:14:26 -07:00
|
|
|
import { importWorkflow, visitDemoPage } from '../pages/demo';
|
2023-11-02 08:06:33 -07:00
|
|
|
import { WorkflowPage } from '../pages/workflow';
|
2024-07-03 06:14:26 -07:00
|
|
|
import { errorToast } from '../pages/notifications';
|
2023-11-02 08:06:33 -07:00
|
|
|
|
|
|
|
const workflowPage = new WorkflowPage();
|
|
|
|
|
|
|
|
describe('Demo', () => {
|
2024-07-03 06:14:26 -07:00
|
|
|
beforeEach(() => {
|
|
|
|
cy.overrideSettings({ previewMode: true });
|
|
|
|
cy.signout();
|
|
|
|
});
|
|
|
|
|
2023-11-02 08:06:33 -07:00
|
|
|
it('can import template', () => {
|
2024-07-03 06:14:26 -07:00
|
|
|
visitDemoPage();
|
|
|
|
errorToast().should('not.exist');
|
2023-11-02 08:06:33 -07:00
|
|
|
importWorkflow(workflow);
|
|
|
|
workflowPage.getters.canvasNodes().should('have.length', 3);
|
|
|
|
});
|
|
|
|
|
|
|
|
it('can override theme to dark', () => {
|
2024-07-03 06:14:26 -07:00
|
|
|
visitDemoPage('dark');
|
2023-11-02 08:06:33 -07:00
|
|
|
cy.get('body').should('have.attr', 'data-theme', 'dark');
|
2024-07-03 06:14:26 -07:00
|
|
|
errorToast().should('not.exist');
|
2023-11-02 08:06:33 -07:00
|
|
|
});
|
|
|
|
|
|
|
|
it('can override theme to light', () => {
|
2024-07-03 06:14:26 -07:00
|
|
|
visitDemoPage('light');
|
2023-11-02 08:06:33 -07:00
|
|
|
cy.get('body').should('have.attr', 'data-theme', 'light');
|
2024-07-03 06:14:26 -07:00
|
|
|
errorToast().should('not.exist');
|
2023-11-02 08:06:33 -07:00
|
|
|
});
|
|
|
|
});
|