Skip to content

Commit

Permalink
Revert recent changes and change lockfile path
Browse files Browse the repository at this point in the history
  • Loading branch information
georgegevoian committed Sep 13, 2023
1 parent da18524 commit 71c1e12
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
run: |
mkdir -p $MOCHA_WEBDRIVER_LOGDIR
export GREP_TESTS=$(echo $TESTS | sed "s/.*:nbrowser-\([^:]*\).*/\1/")
MOCHA_WEBDRIVER_SKIP_CLEANUP=1 MOCHA_WEBDRIVER_HEADLESS=1 yarn run test:nbrowser
MOCHA_WEBDRIVER_SKIP_CLEANUP=1 MOCHA_WEBDRIVER_HEADLESS=1 yarn run test:nbrowser --parallel --jobs 3
env:
TESTS: ${{ matrix.tests }}
MOCHA_WEBDRIVER_LOGDIR: ${{ runner.temp }}/test-logs/webdriver
Expand Down
7 changes: 0 additions & 7 deletions app/client/components/Clipboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,8 @@ Clipboard.prototype._setCBdata = function(pasteObj, clipboardData) {

const plainText = tableUtil.makePasteText(pasteObj.data, pasteObj.selection);
clipboardData.setData('text/plain', plainText);
console.log('plainText', plainText);
const htmlText = tableUtil.makePasteHtml(pasteObj.data, pasteObj.selection);
clipboardData.setData('text/html', htmlText);
console.log('htmlText', htmlText);

this._setCutCallback(pasteObj, plainText);
};
Expand Down Expand Up @@ -211,10 +209,6 @@ Clipboard.prototype._onPaste = function(elem, event) {
const cb = event.originalEvent.clipboardData;
const plainText = cb.getData('text/plain');
const htmlText = cb.getData('text/html');
for (const type of cb.types) {
console.log('type', type);
console.log(cb.getData(type));
}
const pasteData = getPasteData(plainText, htmlText);
this._doPaste(pasteData, plainText);
};
Expand All @@ -241,7 +235,6 @@ Clipboard.prototype._doContextMenuPaste = async function() {
};

Clipboard.prototype._doPaste = function(pasteData, plainText) {
console.log(this._cutData, plainText, this._cutCallback);
if (this._cutData === plainText) {
if (this._cutCallback) {
// Cuts should only be possible on the first paste after a cut and only if the data being
Expand Down
4 changes: 0 additions & 4 deletions app/client/lib/tableUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ export function makePasteText(tableData: TableData, selection: CopySelection) {
// i.e. [["1-1", "1-2", "1-3"],["2-1", "2-2", "2-3"]]
const values = selection.rowIds.map(rowId =>
selection.columns.map(col => col.fmtGetter(rowId)));
const rawValues = selection.rowIds.map(rowId =>
selection.columns.map(col => col.rawGetter(rowId)));
console.log('makePasteText raw values', rawValues);
console.log('makePasteText values', values);
return tsvEncode(values);
}

Expand Down
5 changes: 3 additions & 2 deletions test/nbrowser/gristUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { Organization as APIOrganization, DocStateComparison,
import { Organization } from 'app/gen-server/entity/Organization';
import { Product } from 'app/gen-server/entity/Product';
import { create } from 'app/server/lib/create';
import { getAppRoot } from 'app/server/lib/places';

import { GristWebDriverUtils, PageWidgetPickerOptions,
WindowDimensions as WindowDimensionsBase } from 'test/nbrowser/gristWebDriverUtils';
Expand Down Expand Up @@ -3259,8 +3260,8 @@ class Clipboard implements IClipboard {
* parallel processes, such as Mocha tests.
*/
export async function withSafeClipboard(cb: (clipboard: IClipboard) => Promise<void>) {
const release = await lock('test', {
lockfilePath: 'test/.clipboard.lock',
const release = await lock(path.resolve(getAppRoot(), 'test'), {
lockfilePath: path.join(path.resolve(getAppRoot(), 'test'), '.clipboard.lock'),
retries: {
/* The clipboard generally isn't locked for long, so retry frequently. */
maxTimeout: 2000,
Expand Down

0 comments on commit 71c1e12

Please sign in to comment.