Skip to content

Commit

Permalink
Merge pull request #6753 from ckeditor/i/6702
Browse files Browse the repository at this point in the history
Other (table): Changed insert row above/below buttons order in the table dropdown. Closes #6702.
  • Loading branch information
jodator authored May 7, 2020
2 parents 5e79676 + 869f122 commit a78bca8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions packages/ckeditor5-table/src/tableui.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,15 @@ export default class TableUI extends Plugin {
{
type: 'button',
model: {
commandName: 'insertTableRowBelow',
label: t( 'Insert row below' )
commandName: 'insertTableRowAbove',
label: t( 'Insert row above' )
}
},
{
type: 'button',
model: {
commandName: 'insertTableRowAbove',
label: t( 'Insert row above' )
commandName: 'insertTableRowBelow',
label: t( 'Insert row below' )
}
},
{
Expand Down
6 changes: 3 additions & 3 deletions packages/ckeditor5-table/tests/tableui.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ describe( 'TableUI', () => {
const labels = listView.items.map( item => item instanceof ListSeparatorView ? '|' : item.children.first.label );

expect( labels ).to.deep.equal(
[ 'Header row', '|', 'Insert row below', 'Insert row above', 'Delete row', 'Select row' ]
[ 'Header row', '|', 'Insert row above', 'Insert row below', 'Delete row', 'Select row' ]
);
} );

Expand Down Expand Up @@ -170,12 +170,12 @@ describe( 'TableUI', () => {
expect( items.first.children.first.isEnabled ).to.be.false;
expect( dropdown.buttonView.isEnabled ).to.be.true;

insertRowBelowCommand.isEnabled = false;
insertRowAboveCommand.isEnabled = false;

expect( items.get( 2 ).children.first.isEnabled ).to.be.false;
expect( dropdown.buttonView.isEnabled ).to.be.true;

insertRowAboveCommand.isEnabled = false;
insertRowBelowCommand.isEnabled = false;
expect( items.get( 3 ).children.first.isEnabled ).to.be.false;
expect( dropdown.buttonView.isEnabled ).to.be.true;

Expand Down

0 comments on commit a78bca8

Please sign in to comment.