//////////////////////////////////////////////////////////////////////////
//
// pgAdmin 4 - PostgreSQL Tools
//
// Copyright (C) 2013 - 2018, The pgAdmin Development Team
// This software is released under the PostgreSQL Licence
//
//////////////////////////////////////////////////////////////////////////
import $ from 'jquery';
import Slick from 'slickgrid';
import 'slickgrid.grid';
import clipboard from '../../../pgadmin/static/js/selection/clipboard';
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 SlickGrid;
beforeEach(function () {
SlickGrid = Slick.Grid;
var data = [{'id': 1, 'brand':'leopord', 'size':12, '__temp_PK': '123'},
{'id': 2, 'brand':'lion', 'size':13, '__temp_PK': '456'},
{'id': 3, 'brand':'puma', 'size':9, '__temp_PK': '789'}],
dataView = new Slick.Data.DataView();
var CSVOptions = {'quoting': 'strings', 'quote_char': '"', 'field_separator': ','};
var columns = [
{
id: 'row-header-column',
name: 'row header column name',
selectable: false,
display_name: 'row header column name',
column_type: 'text',
},
{
name: 'id',
field: 'id',
pos: 0,
label: 'id
numeric',
cell: 'number',
can_edit: false,
type: 'numeric',
}, {
name: 'brand',
field: 'brand',
pos: 1,
label: 'flavor
character varying',
cell: 'string',
can_edit: false,
type: 'character varying',
}, {
name: 'size',
field: 'size',
pos: 2,
label: 'size
numeric',
cell: 'number',
can_edit: false,
type: 'numeric',
},
];
gridContainer = $('