Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate button icons with easyimage styles #1555

Merged
merged 7 commits into from
Feb 6, 2018
Merged

Conversation

f1ames
Copy link
Contributor

@f1ames f1ames commented Jan 31, 2018

What is the purpose of this pull request?

Task

Does your PR contain necessary tests?

All patches which change the editor code must include tests. You can always read more
on PR testing,
how to set the testing environment and
how to create tests
in the official CKEditor documentation.

This PR contains

  • Unit tests
  • Manual tests

What changes did you make?

This PR integrates #1531 with #1518 adding a proper icon paths passing from easyimage styles config object to button constructor, so that icons are visible in easyimage balloon toolbar.

To work properly it needs both #1531 and #1518 merged (unit test passes as it checks if icons path are properly propagated, however manual test is integrational one and it needs #1531 to work properly).

Now it targets t/932-3393 branch (#1518 PR), but can be also merged to t/932-2961 (main easyimage branch ATM) after #1518 is merged.

@Comandeer Comandeer force-pushed the t/932-3393 branch 2 times, most recently from 2145411 to c6b5a76 Compare February 2, 2018 14:08
@Comandeer Comandeer changed the base branch from t/932-3393 to t/932-2961 February 6, 2018 11:03
@Comandeer
Copy link
Member

Comandeer commented Feb 6, 2018

@f1ames could you rebase onto the latest t/932-2961?

@f1ames
Copy link
Contributor Author

f1ames commented Feb 6, 2018

@Comandeer here you go!

assert.ignore();
}

this.addButtonStub = sinon.stub( CKEDITOR.ui.prototype, 'addButton', function( name, definition ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Button stub causes tests to fail on built version of the editor due to the fact that contextmenu plugin is loaded and addContextMenuItems uses editor.ui.items to get info from toolbar's buttons.

Probably spying instead of stubbing will fix the issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spy doesn't give an easy solution to do this assert same way as with stub (or I am just bad at searching). I just added call to original function in the stub so it does not affect a normal flow in any way.

Copy link
Member

@Comandeer Comandeer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Comandeer Comandeer merged commit d6cd6c8 into t/932-2961 Feb 6, 2018
@Comandeer Comandeer deleted the t/932-3393-3428 branch February 6, 2018 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants