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

Remove Any Old Expressions from Codebase #2447

Merged
merged 3 commits into from
Dec 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/perspective-cli/test/js/superstore.spec.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

const { test, expect } = require("@playwright/test");
const { test, expect } = require("@finos/perspective-test");
const path = require("path");
const { host } = require("../../src/js/index.js");

2 changes: 1 addition & 1 deletion packages/perspective-jupyterlab/test/js/resize.spec.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

const { test } = require("@playwright/test");
const { test } = require("@finos/perspective-test");
import { compareContentsToSnapshot } from "@finos/perspective-test";

test.beforeEach(async ({ page }) => {
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

const { expect } = require("@playwright/test");
const { expect } = require("@finos/perspective-test");
const path = require("path");
const utils = require("@finos/perspective-test");
const {
2 changes: 1 addition & 1 deletion packages/perspective-viewer-d3fc/test/js/area.spec.ts
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

import { test } from "@playwright/test";
import { test } from "@finos/perspective-test";
import {
getSvgContentString,
run_standard_tests,
2 changes: 1 addition & 1 deletion packages/perspective-viewer-d3fc/test/js/bar.spec.ts
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

import { test } from "@playwright/test";
import { test } from "@finos/perspective-test";
import {
run_standard_tests,
getSvgContentString,
2 changes: 1 addition & 1 deletion packages/perspective-viewer-d3fc/test/js/barWidth.spec.ts
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

import { test, expect } from "@playwright/test";
import { test, expect } from "@finos/perspective-test";
import {
API_VERSION,
compareSVGContentsToSnapshot,
2 changes: 1 addition & 1 deletion packages/perspective-viewer-d3fc/test/js/events.spec.ts
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

import { test, expect } from "@playwright/test";
import { test, expect } from "@finos/perspective-test";
import { compareSVGContentsToSnapshot } from "@finos/perspective-test";

test.describe("Events test", () => {
2 changes: 1 addition & 1 deletion packages/perspective-viewer-d3fc/test/js/heatmap.spec.ts
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

import { test } from "@playwright/test";
import { test } from "@finos/perspective-test";
import {
getSvgContentString,
run_standard_tests,
2 changes: 1 addition & 1 deletion packages/perspective-viewer-d3fc/test/js/line.spec.ts
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

import { test } from "@playwright/test";
import { test } from "@finos/perspective-test";
import {
getSvgContentString,
run_standard_tests,
2 changes: 1 addition & 1 deletion packages/perspective-viewer-d3fc/test/js/scatter.spec.ts
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

import { test } from "@playwright/test";
import { test } from "@finos/perspective-test";
import {
compareSVGContentsToSnapshot,
getSvgContentString,
2 changes: 1 addition & 1 deletion packages/perspective-viewer-d3fc/test/js/sunburst.spec.ts
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

import { test } from "@playwright/test";
import { test } from "@finos/perspective-test";
import {
getSvgContentString,
run_standard_tests,
2 changes: 1 addition & 1 deletion packages/perspective-viewer-d3fc/test/js/treemap.spec.ts
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

import { test, expect } from "@playwright/test";
import { test, expect } from "@finos/perspective-test";
import {
getSvgContentString,
run_standard_tests,
2 changes: 1 addition & 1 deletion packages/perspective-viewer-d3fc/test/js/xy-line.spec.ts
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

import { test } from "@playwright/test";
import { test } from "@finos/perspective-test";
import {
getSvgContentString,
run_standard_tests,
2 changes: 1 addition & 1 deletion packages/perspective-viewer-d3fc/test/js/yscatter.spec.ts
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

import { test, expect } from "@playwright/test";
import { test, expect } from "@finos/perspective-test";
import {
getSvgContentString,
run_standard_tests,
4 changes: 3 additions & 1 deletion packages/perspective-viewer-datagrid/src/js/model/create.js
Original file line number Diff line number Diff line change
@@ -58,7 +58,9 @@ export async function createModel(regular, table, view, extend = {}) {
// Extract the entire expression string as typed by the user, so we can
// feed it into `validate_expressions` and get back the data types for
// each column without it being affected by a pivot.
const expressions = config.expressions.map((expr) => expr[1]);
const expressions = Object.fromEntries(
config.expressions.map((expr) => [expr[0], expr[1]])
);
const [
table_schema,
validated_expressions,
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

import { test, expect } from "@playwright/test";
import { test, expect } from "@finos/perspective-test";
import { compareContentsToSnapshot } from "@finos/perspective-test";

async function test_column(page, selector, selector2) {
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

import { test } from "@playwright/test";
import { test } from "@finos/perspective-test";
import {
compareContentsToSnapshot,
run_standard_tests,
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

import { test } from "@playwright/test";
import { test } from "@finos/perspective-test";
import { run_standard_tests } from "@finos/perspective-test";

async function get_contents(page) {
2 changes: 1 addition & 1 deletion packages/perspective-workspace/test/js/dom.spec.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

import { test } from "@playwright/test";
import { test } from "@finos/perspective-test";
import {
compareLightDOMContents,
compareShadowDOMContents,
2 changes: 1 addition & 1 deletion packages/perspective-workspace/test/js/html.spec.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

import { test } from "@playwright/test";
import { test } from "@finos/perspective-test";
import {
compareLightDOMContents,
compareShadowDOMContents,
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

const { convert } = require("@finos/perspective-viewer/dist/cjs/migrate.js");
import { test, expect } from "@playwright/test";
import { test, expect } from "@finos/perspective-test";
import {
API_VERSION,
compareLightDOMContents,
2 changes: 1 addition & 1 deletion packages/perspective-workspace/test/js/restore.spec.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

import { test, expect } from "@playwright/test";
import { test, expect } from "@finos/perspective-test";
import {
compareLightDOMContents,
compareShadowDOMContents,
2 changes: 1 addition & 1 deletion packages/perspective-workspace/test/js/visibility.spec.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

import { test } from "@playwright/test";
import { test } from "@finos/perspective-test";
import {
compareLightDOMContents,
compareShadowDOMContents,
2 changes: 1 addition & 1 deletion packages/perspective/test/js/clear.spec.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

const { test, expect } = require("@playwright/test");
const { test, expect } = require("@finos/perspective-test");
const perspective = require("@finos/perspective");

((perspective) => {
2 changes: 1 addition & 1 deletion packages/perspective/test/js/constructors.spec.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

const { test, expect } = require("@playwright/test");
const { test, expect } = require("@finos/perspective-test");
const perspective = require("@finos/perspective");

const moment = require("moment");
2 changes: 1 addition & 1 deletion packages/perspective/test/js/delete.spec.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

const { test, expect } = require("@playwright/test");
const { test, expect } = require("@finos/perspective-test");
const perspective = require("@finos/perspective");

function it_old_behavior(name, capture) {
2 changes: 1 addition & 1 deletion packages/perspective/test/js/delta.spec.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

const { test, expect } = require("@playwright/test");
const { test, expect } = require("@finos/perspective-test");
const perspective = require("@finos/perspective");

const _ = require("underscore");
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

const { test, expect } = require("@playwright/test");
const { test, expect } = require("@finos/perspective-test");
const perspective = require("@finos/perspective");

/**
2 changes: 1 addition & 1 deletion packages/perspective/test/js/expressions/datetime.spec.js
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@

const common = require("./common.js");

const { test, expect } = require("@playwright/test");
const { test, expect } = require("@finos/perspective-test");
const perspective = require("@finos/perspective");

/**
2 changes: 1 addition & 1 deletion packages/perspective/test/js/expressions/deltas.spec.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

const { test, expect } = require("@playwright/test");
const { test, expect } = require("@finos/perspective-test");
const perspective = require("@finos/perspective");

const match_delta = async function (perspective, delta, expected) {
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@

const expressions_common = require("./common.js");

const { test, expect } = require("@playwright/test");
const { test, expect } = require("@finos/perspective-test");
const perspective = require("@finos/perspective");

/**
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

const { test, expect } = require("@playwright/test");
const { test, expect } = require("@finos/perspective-test");
const perspective = require("@finos/perspective");

const expressions_common = require("./common.js");
2 changes: 1 addition & 1 deletion packages/perspective/test/js/expressions/numeric.spec.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

const { test, expect } = require("@playwright/test");
const { test, expect } = require("@finos/perspective-test");
const perspective = require("@finos/perspective");

const common = require("./common.js");
2 changes: 1 addition & 1 deletion packages/perspective/test/js/expressions/parsing.spec.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

const { test, expect } = require("@playwright/test");
const { test, expect } = require("@finos/perspective-test");
const perspective = require("@finos/perspective");

const common = require("./common.js");
2 changes: 1 addition & 1 deletion packages/perspective/test/js/expressions/string.spec.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

const { test, expect } = require("@playwright/test");
const { test, expect } = require("@finos/perspective-test");
const perspective = require("@finos/perspective");

const CHARS = ` !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~`;
2 changes: 1 addition & 1 deletion packages/perspective/test/js/expressions/updates.spec.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

const { test, expect } = require("@playwright/test");
const { test, expect } = require("@finos/perspective-test");
const perspective = require("@finos/perspective");

const common = require("./common.js");
2 changes: 1 addition & 1 deletion packages/perspective/test/js/expressions/vectors.spec.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

const { test, expect } = require("@playwright/test");
const { test, expect } = require("@finos/perspective-test");
const perspective = require("@finos/perspective");

const common = require("./common.js");
2 changes: 1 addition & 1 deletion packages/perspective/test/js/filters.spec.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

const { test, expect } = require("@playwright/test");
const { test, expect } = require("@finos/perspective-test");
const perspective = require("@finos/perspective");

var yesterday = new Date();
2 changes: 1 addition & 1 deletion packages/perspective/test/js/get_min_max.spec.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

const { test, expect } = require("@playwright/test");
const { test, expect } = require("@finos/perspective-test");
const perspective = require("@finos/perspective");

const data = {
Loading