Skip to content

Commit b65f1e9

Browse files
E2e testing (#45)
* virtualization - define base virtualization strategies - define additional props - add tscript support to project * virtualization - refactor controlledtable and table * virtualization - no strategy & fe page strategy basics * virtualization - update props - update fe and none strategy * virtualization - fix bug for when to create a new virtualizer * virtualization * virtualization - copy/paste * virtualization - legacy behavior support (n-items + trailing) * virtualization - the build.. * virtualization - fix cell key * virtualization * virtualization - remove legacy (tail rows + display rows) - be page virtualization strategy - first be python prototypes * remove expanded_rows and collapsable logic * fix lint * - refactor virtualization strategies - placeholder for filter and sort - placeholder for prototype / "state" readonly props * - viewport props (viewport dataframe & indices) - ramda @types * virtualization * - virtualizer through memoize / controlled component instead of state * fix render loop caused by virtualization when linked to BE * be and fe usage examples * restructure project * refactor project structure * clean up * refactor virtualization (wip) * clean up fe/be virtualization + paging + examples * fix lint * virtualization * version 3.0.0dev * revert * revert * revert * fix lint * fix pyling * fix pylint * pagination display * pagination display * fix demo code... * fix pr comments * fix pylint * add tslint to build * refactor ControlledTable component + updates * improve fixed rows * refactor logic for creating headers and rows * Virtualization (#36) * virtualization - define base virtualization strategies - define additional props - add tscript support to project * virtualization - refactor controlledtable and table * virtualization - no strategy & fe page strategy basics * virtualization - update props - update fe and none strategy * virtualization - fix bug for when to create a new virtualizer * virtualization * virtualization - copy/paste * virtualization - legacy behavior support (n-items + trailing) * virtualization - the build.. * virtualization - fix cell key * virtualization * virtualization - remove legacy (tail rows + display rows) - be page virtualization strategy - first be python prototypes * remove expanded_rows and collapsable logic * fix lint * - refactor virtualization strategies - placeholder for filter and sort - placeholder for prototype / "state" readonly props * - viewport props (viewport dataframe & indices) - ramda @types * virtualization * - virtualizer through memoize / controlled component instead of state * fix render loop caused by virtualization when linked to BE * be and fe usage examples * restructure project * refactor project structure * clean up * refactor virtualization (wip) * clean up fe/be virtualization + paging + examples * fix lint * virtualization * version 3.0.0dev * revert * revert * revert * fix lint * fix pyling * fix pylint * pagination display * pagination display * fix demo code... * fix pr comments * fix pylint * add tslint to build * fixed columns * build * remove <Fragment> usage for 15.x support * fix lint * improve/fix styling in fixed_columns mode * fixed rows and columns (wip) * refactor some styling * fix rendering with fixed columns * fix binding * demo app * fix frozen columns (th cells) height * change default cell width * overflow scroll only if necessary * dropdown not clipped by container/overflow * fix percy test * update builds * update table style * clean up styles * cypress e2e stub * e2e stub * e2e stub * e2e stub * e2e stub * e2e stub * Fixed rows columns (#37) * virtualization - define base virtualization strategies - define additional props - add tscript support to project * virtualization - refactor controlledtable and table * virtualization - no strategy & fe page strategy basics * virtualization - update props - update fe and none strategy * virtualization - fix bug for when to create a new virtualizer * virtualization * virtualization - copy/paste * virtualization - legacy behavior support (n-items + trailing) * virtualization - the build.. * virtualization - fix cell key * virtualization * virtualization - remove legacy (tail rows + display rows) - be page virtualization strategy - first be python prototypes * remove expanded_rows and collapsable logic * fix lint * - refactor virtualization strategies - placeholder for filter and sort - placeholder for prototype / "state" readonly props * - viewport props (viewport dataframe & indices) - ramda @types * virtualization * - virtualizer through memoize / controlled component instead of state * fix render loop caused by virtualization when linked to BE * be and fe usage examples * restructure project * refactor project structure * clean up * refactor virtualization (wip) * clean up fe/be virtualization + paging + examples * fix lint * virtualization * version 3.0.0dev * revert * revert * revert * fix lint * fix pyling * fix pylint * pagination display * pagination display * fix demo code... * fix pr comments * fix pylint * add tslint to build * refactor ControlledTable component + updates * improve fixed rows * refactor logic for creating headers and rows * fixed columns * build * remove <Fragment> usage for 15.x support * fix lint * improve/fix styling in fixed_columns mode * fixed rows and columns (wip) * refactor some styling * fix rendering with fixed columns * fix binding * demo app * fix frozen columns (th cells) height * change default cell width * overflow scroll only if necessary * dropdown not clipped by container/overflow * fix percy test * update builds * update table style * clean up styles * fix FF styling * not editable div instead of input * fix header width * no-clipping dropdown + clipping fixed columns * fix fixed columns * Merge with master * readme update * sort * update python build * fix sort * rename version * performance improvements - use stylesheet element instead of inline styles for components - refactor stylesheets usage (facade) - switch out inputs for divs when inactive - refactor cell component to simplify props - update dataframe on blur instead of all changes * remove testing div wrapper * tslint - allow class arrow functions * fix regression in stylesheet * rebuild python dist * build python dist * cell reorder * fix dropdown regression * high level navigation and typing test * navigation and selection tests in typescript using cypress * remove old code * refactor + cypress tests against Python BE / functional in CI * add percy snapshots in JS * update python tests * pylint * pylint * pylint * pylint * pylint * pylint * pylint * python3 map changed * - improve stylesheet facade - fix column width bug - improve fixed columns / rows styling * fix dropdown menu regressions * sanitize stylesheet columns overrides (w/ and w/o units) * fix lint * 3.0 performance (#43) * performance improvements - use stylesheet element instead of inline styles for components - refactor stylesheets usage (facade) - switch out inputs for divs when inactive - refactor cell component to simplify props - update dataframe on blur instead of all changes * remove testing div wrapper * tslint - allow class arrow functions * fix regression in stylesheet * build python dist * cell reorder * fix dropdown regression * - improve stylesheet facade - fix column width bug - improve fixed columns / rows styling * fix dropdown menu regressions * sanitize stylesheet columns overrides (w/ and w/o units) * fix lint * fix click when value is undefined|null|empty * fix deletable columns * n_fixed_columns must take hidden columns into consideration * fix typo * fix header merge with fixed columns * update readme / limitations * fix fixed cell rendering after columns props change * fix fixed columns when hidden is not first or last of merged group * fix lint * cell alignment * fix dropdown alignment * fix e2e tests * fix column width regression on navigate + test * - improve keyboard navigation - add tests for keyboard navigation - add tests for column width - improve stability of python BE for tests * remove now renderer useless eslint file * clean up tests implementation * fix PR comments * fix dropdown keyboard navigation * pr - remove commented code
1 parent 151fe38 commit b65f1e9

40 files changed

+14715
-265
lines changed

packages/dash-table/.circleci/config.yml

Lines changed: 57 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,59 @@
11
version: 2
22

33
jobs:
4+
"test":
5+
docker:
6+
- image: circleci/python:3.6-node-browsers
7+
- image: cypress/base:8
8+
9+
steps:
10+
- checkout
11+
- restore_cache:
12+
key: deps1-{{ .Branch }}-{{ checksum "npm-shrinkwrap.json" }}-{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }}
13+
- run:
14+
name: Install npm packages
15+
command: npm install
16+
- run:
17+
name: Cypress Install
18+
command: |
19+
$(npm bin)/cypress install
20+
21+
- save_cache:
22+
key: deps1-{{ .Branch }}-{{ checksum "npm-shrinkwrap.json" }}-{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }}
23+
paths:
24+
- node_modules
25+
- /home/circleci/.cache/Cypress
26+
27+
- run:
28+
name: Create virtualenv
29+
command: |
30+
python3 -m venv venv
31+
32+
- run:
33+
name: Install requirements
34+
command: |
35+
. venv/bin/activate
36+
pip install -r tests/python_fixtures/requirements.txt --quiet
37+
38+
- save_cache:
39+
key: deps1-{{ .Branch }}-{{ checksum "tests/python_fixtures/requirements.txt" }}
40+
paths:
41+
- "venv"
42+
43+
- run:
44+
name: Run build:js
45+
command: npm run build:js
46+
47+
- run:
48+
name: Run build:py
49+
command: npm run build:py
50+
51+
- run:
52+
name: Run hosts
53+
command: |
54+
. venv/bin/activate
55+
npm run test
56+
457
"node":
558
docker:
659
- image: circleci/node:8.11.3
@@ -48,10 +101,10 @@ jobs:
48101
name: Install requirements
49102
command: |
50103
. venv/bin/activate
51-
pip install -r tests/requirements.txt --quiet
104+
pip install -r tests/python_fixtures/requirements.txt --quiet
52105
53106
- save_cache:
54-
key: deps1-{{ .Branch }}-{{ checksum "tests/requirements.txt" }}
107+
key: deps1-{{ .Branch }}-{{ checksum "tests/python_fixtures/requirements.txt" }}
55108
paths:
56109
- "venv"
57110

@@ -73,7 +126,7 @@ jobs:
73126
name: Integration Tests
74127
command: |
75128
. venv/bin/activate
76-
python -m unittest tests.test_render
129+
python -m unittest tests.python_fixtures.test_render
77130
when: always
78131

79132

@@ -83,3 +136,4 @@ workflows:
83136
jobs:
84137
- "python-3.6"
85138
- "node"
139+
- "test"

packages/dash-table/.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
*.css
2+
cypress/**
23
registerServiceWorker.js

packages/dash-table/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
# testing
1010
/coverage
11+
/tests/e2e/cypress/screenshots/**
12+
/storybook-static/**
1113

1214
# misc
1315
.DS_Store
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { configure, getStorybook, setAddon } from '@storybook/react';
2+
3+
import createPercyAddon from '@percy-io/percy-storybook';
4+
const { percyAddon, serializeStories } = createPercyAddon();
5+
setAddon(percyAddon);
6+
7+
const req = require.context('./../tests/visual/percy-storybook', true, /\.percy\./);
8+
function loadStories() {
9+
req.keys().forEach(req);
10+
}
11+
12+
configure(loadStories, module);
13+
serializeStories(getStorybook);
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
let config = require('./../webpack.config.js');
2+
3+
config.externals = {};
4+
5+
module.exports = config;

packages/dash-table/cypress.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"video": false,
3+
"fixturesFolder": "./tests/e2e/cypress/fixtures",
4+
"integrationFolder": "./tests/e2e/cypress/integration",
5+
"pluginsFile": "./tests/e2e/cypress/plugins/index.js",
6+
"screenshotsFolder": "./tests/e2e/cypress/screenshots",
7+
"supportFile": "./tests/e2e/cypress/support/index.js",
8+
"videoFolder": "./tests/e2e/cypress/videos"
9+
}

packages/dash-table/dash_table/bundle.js

Lines changed: 4394 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/dash-table/dash_table/demo.js

Lines changed: 4463 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/dash-table/dash_table/package.json

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
11
{
22
"name": "dash-table",
3-
"version": "3.0.0rc2",
3+
"version": "3.0.0rc3",
44
"description": "Dash table",
55
"main": "build/index.js",
66
"scripts": {
7-
"start": "webpack-dev-server --config ./webpack.config.js --content-base dash_table --mode development",
8-
"build:js-dev": "webpack --mode development",
9-
"build:js": "webpack --mode production",
7+
"preprivate::opentests": "run-s private::wait*",
8+
"preprivate::runtests": "run-s private::wait*",
9+
"private::build": "webpack --display-reasons --bail",
10+
"private::host_dash": "python tests/e2e/dash/v_be_page.py",
11+
"private::host_js": "http-server ./dash_table -c-1 --silent",
12+
"private::wait_dash": "wait-on http://localhost:8081",
13+
"private::wait_js": "wait-on http://localhost:8080",
14+
"private::lint.js": "eslint src",
15+
"private::lint.ts": "tslint --project . src/**/*.ts",
16+
"private::opentests": "cypress open",
17+
"private::runtests": "cypress run",
18+
"private::snapshots": "build-storybook && percy-storybook",
19+
"build.watch": "webpack-dev-server --content-base dash_table --mode development",
20+
"build:js-dev": "run-s \"private::build -- --mode development\"",
21+
"build:js": "run-s \"private::build -- --mode production\"",
1022
"build:py": "./extract-meta src/dash-table/components/Table.js > dash_table/metadata.json && cp package.json dash_table",
11-
"lint": "eslint src && tslint --project . src/**/*.ts"
23+
"lint": "run-s private::lint.js private::lint.ts",
24+
"test": "run-p --race private::host* private::runtests private::snapshots",
25+
"test.watch": "run-p --race \"private::build -- --mode development --watch\" --race private::host* private::opentests"
1226
},
1327
"author": "Chris P <[email protected]",
1428
"license": "MIT",
@@ -21,26 +35,34 @@
2135
"sheetclip": "^0.3.0"
2236
},
2337
"devDependencies": {
38+
"@cypress/webpack-preprocessor": "^2.0.1",
39+
"@percy-io/percy-storybook": "^2.0.0",
40+
"@storybook/cli": "^4.0.0-alpha.16",
41+
"@storybook/react": "^4.0.0-alpha.16",
2442
"@types/ramda": "^0.25.36",
2543
"babel-core": "^6.26.3",
2644
"babel-eslint": "^8.2.3",
2745
"babel-loader": "^7.1.4",
2846
"babel-preset-env": "^1.7.0",
2947
"babel-preset-react": "^6.24.1",
3048
"css-loader": "^0.28.11",
49+
"cypress": "^3.0.3",
3150
"eslint": "^4.19.1",
3251
"eslint-config-prettier": "^2.9.0",
3352
"eslint-plugin-import": "^2.12.0",
3453
"eslint-plugin-react": "^7.9.1",
3554
"file-loader": "^1.1.11",
55+
"http-server": "^0.11.1",
3656
"less": "^3.8.0",
3757
"less-loader": "^4.1.0",
3858
"npm": "^6.1.0",
59+
"npm-run-all": "^4.1.3",
3960
"react-docgen": "^2.20.1",
4061
"style-loader": "^0.21.0",
4162
"ts-loader": "^4.4.2",
4263
"tslint": "^5.11.0",
4364
"typescript": "^3.0.1",
65+
"wait-on": "^2.1.0",
4466
"webpack": "^4.8.3",
4567
"webpack-cli": "^2.1.3",
4668
"webpack-dev-server": "^3.1.5"

packages/dash-table/demo/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
44
import {Table} from 'dash-table';
55
import {mockData} from './data';
66
import Dropdown from 'react-select';
7-
import TestFixtures from 'tests/fixtures.json';
7+
import TestFixtures from 'tests/python_fixtures/fixtures.json';
88
import {merge} from 'ramda';
99
import { memoizeOne } from 'core/memoizer';
1010

0 commit comments

Comments
 (0)