Browse Source

Up tests

pull/4685/head
Artur Arseniev 3 years ago
parent
commit
08ef65e571
  1. 8
      test/specs/commands/view/Preview.js
  2. 2
      test/specs/dom_components/model/Component.js

8
test/specs/commands/view/Preview.js

@ -65,12 +65,12 @@ describe('Preview command', () => {
fakePanels.forEach(panel => expect(panel.get('visible')).toEqual(false));
});
it("should stop the 'sw-visibility' command if active", () => {
it("should stop the 'core:component-outline' command if active", () => {
Preview.run(fakeEditor);
expect(fakeEditor.stopCommand).not.toHaveBeenCalled();
fakeIsActive = true;
Preview.run(fakeEditor);
expect(fakeEditor.stopCommand).toHaveBeenCalledWith('sw-visibility');
expect(fakeEditor.stopCommand).toHaveBeenCalledWith('core:component-outline');
});
it('should not reset the `shouldRunSwVisibility` state once active if run multiple times', () => {
@ -91,12 +91,12 @@ describe('Preview command', () => {
fakePanels.forEach(panel => expect(panel.get('visible')).toEqual(true));
});
it("should run the 'sw-visibility' command if it was active before run", () => {
it("should run the 'core:component-outline' command if it was active before run", () => {
Preview.stop(fakeEditor);
expect(fakeEditor.runCommand).not.toHaveBeenCalled();
Preview.shouldRunSwVisibility = true;
Preview.stop(fakeEditor);
expect(fakeEditor.runCommand).toHaveBeenCalledWith('sw-visibility');
expect(fakeEditor.runCommand).toHaveBeenCalledWith('core:component-outline');
expect(Preview.shouldRunSwVisibility).toEqual(false);
});
});

2
test/specs/dom_components/model/Component.js

@ -541,7 +541,7 @@ describe('Text Node Component', () => {
attributes: { 'data-test': 'value' },
content: 'test content &<>"\'',
});
expect(obj.toHTML()).toEqual('test content &amp;&lt;&gt;&quot;&#039;');
expect(obj.toHTML()).toEqual('test content &amp;&lt;&gt;"\'');
});
});

Loading…
Cancel
Save