mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-04 00:24:29 -06:00
21 lines
654 B
JavaScript
21 lines
654 B
JavaScript
/// <reference types="cypress" />
|
|
|
|
describe('Upload', () => {
|
|
beforeEach(() => {
|
|
cy.visit(__dirname + '/index.html');
|
|
});
|
|
|
|
it('upload an image should insert a mock image url', () => {
|
|
cy.get('.EasyMDEContainer button.upload-image').click();
|
|
cy.get('.EasyMDEContainer input[type=file]').selectFile({
|
|
contents: Cypress.Buffer.from('', 'utf-8'),
|
|
fileName: 'test.jpg',
|
|
mimeType: 'image/jpeg'
|
|
}, {
|
|
action: 'drag-drop',
|
|
force: true
|
|
});
|
|
cy.get('.EasyMDEContainer .CodeMirror').contains('');
|
|
});
|
|
});
|