mirror of
https://github.com/codex-team/editor.js
synced 2024-06-29 02:40:23 +02:00
* add custom Chai assertion "be.calledWithBatchedEvents" for testing onchange * chore(api): blocks.update(id, data) method improved - `blocks.update(id, data)` now can accept partial data object — it will update only passed properties, others will remain the same. - `blocks.update(id, data)` now will trigger onChange with only `block-change` event. - `blocks.update(id, data)` will return a promise with BlockAPI object of changed block. * fix tests * Update blocks.cy.ts
37 lines
694 B
TypeScript
37 lines
694 B
TypeScript
/**
|
|
* This file is processed and
|
|
* loaded automatically before the test files.
|
|
*
|
|
* This is a great place to put global configuration and
|
|
* behavior that modifies Cypress.
|
|
*/
|
|
|
|
import '@cypress/code-coverage/support';
|
|
import installLogsCollector from 'cypress-terminal-report/src/installLogsCollector';
|
|
|
|
installLogsCollector();
|
|
|
|
/**
|
|
* File with the helpful commands
|
|
*/
|
|
import './commands';
|
|
|
|
/**
|
|
* File with custom assertions
|
|
*/
|
|
import './e2e';
|
|
|
|
import chaiSubset from 'chai-subset';
|
|
|
|
/**
|
|
* "containSubset" object properties matcher
|
|
*/
|
|
chai.use(chaiSubset);
|
|
|
|
/**
|
|
* Before-each hook for the cypress tests
|
|
*/
|
|
beforeEach((): void => {
|
|
cy.visit('test/cypress/fixtures/test.html');
|
|
});
|