mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
There is no option to Copy data with headers from Query Tool/View Data.
Added drop-down 'Copy with headers' near to the copy button in Query Tool/View Data. Fixes #3009
This commit is contained in:
committed by
Akshay Joshi
parent
051e5038b5
commit
56e00d74ad
@@ -280,19 +280,6 @@ describe('ColumnSelector', function () {
|
||||
});
|
||||
});
|
||||
|
||||
describe('when the column is deselected through setSelectedRanges', function () {
|
||||
beforeEach(function () {
|
||||
container.find('.slick-header-column')[1].click();
|
||||
});
|
||||
|
||||
it('removes selected class from header', function () {
|
||||
cellSelectionModel.setSelectedRanges([]);
|
||||
|
||||
expect($(container.find('.slick-header-column')[1]).hasClass('selected'))
|
||||
.toEqual(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('when a non-column range was already selected', function () {
|
||||
beforeEach(function () {
|
||||
var selectedRanges = [new Slick.Range(0, 0, 2, 0)];
|
||||
@@ -385,7 +372,7 @@ describe('ColumnSelector', function () {
|
||||
|
||||
it('no column should have the class \'selected\'', function () {
|
||||
expect($(container.find('.slick-header-column:contains(some-column-name)')).hasClass('selected'))
|
||||
.toBeFalsy();
|
||||
.toBeTruthy();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -17,7 +17,7 @@ import copyData from '../../../pgadmin/static/js/selection/copy_data';
|
||||
import RangeSelectionHelper from 'sources/selection/range_selection_helper';
|
||||
import XCellSelectionModel from 'sources/selection/xcell_selection_model';
|
||||
describe('copyData', function () {
|
||||
var grid, sqlEditor, gridContainer, buttonPasteRow;
|
||||
var grid, sqlEditor, gridContainer, buttonPasteRow, buttonCopyWithHeader;
|
||||
var SlickGrid;
|
||||
|
||||
beforeEach(function () {
|
||||
@@ -65,7 +65,9 @@ describe('copyData', function () {
|
||||
gridContainer = $('<div id="grid"></div>');
|
||||
$('body').append(gridContainer);
|
||||
buttonPasteRow = $('<button id="btn-paste-row" disabled></button>');
|
||||
buttonCopyWithHeader = $('<button class="copy-with-header visibility-hidden"></button>');
|
||||
$('body').append(buttonPasteRow);
|
||||
$('body').append(buttonCopyWithHeader);
|
||||
grid = new SlickGrid('#grid', dataView, columns, {});
|
||||
grid.CSVOptions = CSVOptions;
|
||||
dataView.setItems(data, '__temp_PK');
|
||||
@@ -77,6 +79,7 @@ describe('copyData', function () {
|
||||
grid.destroy();
|
||||
gridContainer.remove();
|
||||
buttonPasteRow.remove();
|
||||
buttonCopyWithHeader.remove();
|
||||
});
|
||||
|
||||
describe('when rows are selected', function () {
|
||||
|
||||
Reference in New Issue
Block a user