editor.js/test/cypress/tests/initialization.spec.ts
Peter Savchenko 73ac3e3f5f
Release 2.19.2 (#1597)
Save 2.19.2 changes
2021-03-15 22:05:53 +03:00

29 lines
720 B
TypeScript

// eslint-disable-next-line spaced-comment
/// <reference path="../support/index.d.ts" />
describe('Editor basic initialization', () => {
describe('Zero-config initialization', () => {
/**
* In this test suite we use zero (omitted) configuration
*/
const editorConfig = {};
beforeEach(() => {
if (this.editorInstance) {
this.editorInstance.destroy();
} else {
cy.createEditor(editorConfig).as('editorInstance');
}
});
it('should create a visible UI', () => {
/**
* Assert if created instance is visible or not.
*/
cy.get('[data-cy=editorjs]')
.get('div.codex-editor')
.should('be.visible');
});
});
});