Skip to content

Commit

Permalink
#8: Source Button Position
Browse files Browse the repository at this point in the history
- Changed tests
  • Loading branch information
serh-mosk committed Jun 8, 2023
1 parent 414d560 commit c427d79
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Changelog
- Enh #91: Update JS dependencies
- Fix #59: @ becomes @@ when copying mentioning in wiki editor
- Enh #30: Tabulator Support
- Enh #102: Source Button Position


1.1.3 (Unreleased)
Expand Down
4 changes: 2 additions & 2 deletions src/editor/core/menu/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from "./menu"
export {menuBar} from "./menubar"
export * from "./menu";
export {menuBar} from "./menubar";
1 change: 1 addition & 0 deletions src/editor/core/plugins/source/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const switchMode = function (context) {
id: 'source',
title: context.translate("Switch editor mode"),
icon: icons.markdown,
hideOnCollapse: true,
run: (state, dispatch) => {
if (isSourceMode(state)) {
switchToRichtextMode(context);
Expand Down
2 changes: 0 additions & 2 deletions test/menu/test-menu-accessibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ describe("Menu:accessibility", () => {
navigate(DIR_RIGHT, 'linkItem');
navigate(DIR_RIGHT, 'insertEmoji');
navigate(DIR_RIGHT, 'insert-dropdown');
navigate(DIR_RIGHT, 'source');
navigate(DIR_RIGHT, 'resizeNav');
done();
});
Expand All @@ -70,7 +69,6 @@ describe("Menu:accessibility", () => {
initEditor();
focusMenuItem('resizeNav');
expectFocus('resizeNav');
navigate(DIR_LEFT, 'source');
navigate(DIR_LEFT, 'insert-dropdown');
navigate(DIR_LEFT, 'insertEmoji');
navigate(DIR_LEFT, 'linkItem');
Expand Down
6 changes: 3 additions & 3 deletions test/plugins/resize_nav/test-resizenav.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ describe("Plugin:resize_nav", () => {
let invisibleOnInit = [
['helper-group', 'helper-group'],
['format-group', 'format-group'],
['fullscreen', 'fullScreen'],
['insertTable', 'insertTable'],
['fullscreen', 'fullScreen'],
['source', 'source-group'],
];

let visibleOnInit = [
['text types', 'type'],
['emoji', 'insertEmoji'],
['insert dropdown', 'insert-dropdown'],
['marks-group', 'marks-group'],
['text types', 'type'],
['source', 'source-group'],
['resize nav ', 'resizeNav'],
]

Expand Down
1 change: 1 addition & 0 deletions test/plugins/source/test-source.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ describe("Plugin:source", () => {

it("test editor focus on switch mode", (done) => {
const editor = initEditor('Test source mode');
clickMenuItem('resizeNav');
clickMenuItem('source');
expect(editor.hasFocus()).to.be.true;
expect(editor.context.$source.is(':focus')).to.be.true;
Expand Down

0 comments on commit c427d79

Please sign in to comment.