move cypress into its own directory with package.json (#8627)

* move cypress into it's own directory with package.json

* update contributing and include cypress fixtures dir

* newline

* fix rebase

* add cypress dep

* bump cypress
This commit is contained in:
ʈᵃᵢ 2019-12-18 09:59:42 -08:00 committed by Maxime Beauchemin
parent 7a68cb7ca0
commit cbf860074b
51 changed files with 1767 additions and 329 deletions

View File

@ -55,7 +55,6 @@ little bit helps, and credit will always be given.
- [Merging DB migrations](#merging-db-migrations)
- [SQL Lab Async](#sql-lab-async)
## Orientation
Here's a list of repositories that contain Superset-related packages:
@ -82,7 +81,6 @@ Here's a list of repositories that contain Superset-related packages:
Github organization under which we manage Superset-related
small tools, forks and Superset-related experimental ideas.
## Types of Contributions
### Report Bug
@ -203,16 +201,16 @@ Triaging goals
First, add **Category labels (a.k.a. hash labels)**. Every issue/PR must have one hash label (except spam entry). Labels that begin with `#` defines issue/PR type:
| Label | for Issue | for PR |
|-------------------|-----------|--------|
| `#bug` | Bug report | Bug fix |
| `#code-quality` | Describe problem with code, architecture or productivity | Refactor, tests, tooling |
| `#feature` | New feature request | New feature implementation |
| `#refine` | Propose improvement that does not provide new features and is also not a bug fix nor refactor, such as adjust padding, refine UI style. | Implementation of improvement that does not provide new features and is also not a bug fix nor refactor, such as adjust padding, refine UI style. |
| `#doc` | Documentation | Documentation |
| `#question` | Troubleshooting: Installation, Running locally, Ask how to do something. Can be changed to `#bug` later. | N/A |
| `#SIP` | Superset Improvement Proposal | N/A |
| `#ASF` | Tasks related to Apache Software Foundation policy | Tasks related to Apache Software Foundation policy |
| Label | for Issue | for PR |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `#bug` | Bug report | Bug fix |
| `#code-quality` | Describe problem with code, architecture or productivity | Refactor, tests, tooling |
| `#feature` | New feature request | New feature implementation |
| `#refine` | Propose improvement that does not provide new features and is also not a bug fix nor refactor, such as adjust padding, refine UI style. | Implementation of improvement that does not provide new features and is also not a bug fix nor refactor, such as adjust padding, refine UI style. |
| `#doc` | Documentation | Documentation |
| `#question` | Troubleshooting: Installation, Running locally, Ask how to do something. Can be changed to `#bug` later. | N/A |
| `#SIP` | Superset Improvement Proposal | N/A |
| `#ASF` | Tasks related to Apache Software Foundation policy | Tasks related to Apache Software Foundation policy |
Then add other types of labels as appropriate.
@ -370,8 +368,8 @@ superset load_examples
FLASK_ENV=development superset run -p 8088 --with-threads --reload --debugger
```
**Note: the FLASK_APP env var should not need to be set, as it's currently controlled
via `.flaskenv`, however if needed, it should be set to `superset.app:create_app()`**
**Note: the FLASK_APP env var should not need to be set, as it's currently controlled
via `.flaskenv`, however if needed, it should be set to `superset.app:create_app()`**
If you have made changes to the FAB-managed templates, which are not built the same way as the newer, React-powered front-end assets, you need to start the app without the `--with-threads` argument like so:
`FLASK_ENV=development superset run -p 8088 --reload --debugger`
@ -472,12 +470,15 @@ best practices.
#### Feature flags
Superset supports a server-wide feature flag system, which eases the incremental development of features. To add a new feature flag, simply modify `superset_config.py` with something like the following:
```
FEATURE_FLAGS = {
'SCOPED_FILTER': True,
}
```
If you want to use the same flag in the client code, also add it to the FeatureFlag TypeScript enum in `superset/assets/src/featureFlags.ts`. For example,
```
export enum FeatureFlag {
SCOPED_FILTER = 'SCOPED_FILTER',
@ -514,7 +515,6 @@ npm run lint
The Python code is auto-formatted using [Black](https://github.com/python/black) which
is configured as a pre-commit hook. There are also numerous [editor integrations](https://black.readthedocs.io/en/stable/editor_integration.html).
## Conventions
### Python
@ -577,7 +577,6 @@ Note per [PEP-484](https://www.python.org/dev/peps/pep-0484/#exceptions) no
syntax for listing explicitly raised exceptions is proposed and thus the
recommendation is to put this information in a docstring, i.e.,
```python
import math
from typing import Union
@ -595,7 +594,6 @@ def sqrt(x: Union[float, int]) -> Union[float, int]:
return math.sqrt(x)
```
### JavaScript Testing
We use [Jest](https://jestjs.io/) and [Enzyme](https://airbnb.io/enzyme/) to test Javascript. Tests can be run with:
@ -623,7 +621,9 @@ Run Cypress tests:
```bash
cd superset/assets
npm run build
npm run install-cypress
cd cypress-base
npm install
npm run cypress run
# run tests from a specific file
@ -631,6 +631,9 @@ npm run cypress run -- --spec cypress/integration/explore/link.test.js
# run specific file with video capture
npm run cypress run -- --spec cypress/integration/dashboard/index.test.js --config video=true
# to open the cypress ui
npm run cypress open
```
See [`superset/assets/cypress_build.sh`](https://github.com/apache/incubator-superset/blob/master/superset/assets/cypress_build.sh).
@ -656,7 +659,7 @@ In JavaScript, the technique is similar:
we import `t` (simple translation), `tn` (translation containing a number).
```javascript
import { t, tn } from '@superset-ui/translation';
import { t, tn } from "@superset-ui/translation";
```
### Enabling language selection
@ -718,20 +721,20 @@ Then, [extract strings for the new language](#extracting-new-strings-for-transla
### Adding a new datasource
1. Create Models and Views for the datasource, add them under superset folder, like a new my_models.py
with models for cluster, datasources, columns and metrics and my_views.py with clustermodelview
and datasourcemodelview.
with models for cluster, datasources, columns and metrics and my_views.py with clustermodelview
and datasourcemodelview.
1. Create DB migration files for the new models
1. Specify this variable to add the datasource model and from which module it is from in config.py:
For example:
For example:
```python
ADDITIONAL_MODULE_DS_MAP = {'superset.my_models': ['MyDatasource', 'MyOtherDatasource']}
```
```python
ADDITIONAL_MODULE_DS_MAP = {'superset.my_models': ['MyDatasource', 'MyOtherDatasource']}
```
This means it'll register MyDatasource and MyOtherDatasource in superset.my_models module in the source registry.
This means it'll register MyDatasource and MyOtherDatasource in superset.my_models module in the source registry.
### Creating a new visualization type
@ -743,51 +746,51 @@ https://github.com/apache/incubator-superset/pull/3013
1. Alter the model you want to change. This example will add a `Column` Annotations model.
[Example commit](https://github.com/apache/incubator-superset/commit/6c25f549384d7c2fc288451222e50493a7b14104)
[Example commit](https://github.com/apache/incubator-superset/commit/6c25f549384d7c2fc288451222e50493a7b14104)
1. Generate the migration file
```bash
superset db migrate -m 'add_metadata_column_to_annotation_model.py'
```
```bash
superset db migrate -m 'add_metadata_column_to_annotation_model.py'
```
This will generate a file in `migrations/version/{SHA}_this_will_be_in_the_migration_filename.py`.
This will generate a file in `migrations/version/{SHA}_this_will_be_in_the_migration_filename.py`.
[Example commit](https://github.com/apache/incubator-superset/commit/d3e83b0fd572c9d6c1297543d415a332858e262)
[Example commit](https://github.com/apache/incubator-superset/commit/d3e83b0fd572c9d6c1297543d415a332858e262)
1. Upgrade the DB
```bash
superset db upgrade
```
```bash
superset db upgrade
```
The output should look like this:
The output should look like this:
```
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running upgrade 1a1d627ebd8e -> 40a0a483dd12, add_metadata_column_to_annotation_model.py
```
```
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running upgrade 1a1d627ebd8e -> 40a0a483dd12, add_metadata_column_to_annotation_model.py
```
1. Add column to view
Since there is a new column, we need to add it to the AppBuilder Model view.
Since there is a new column, we need to add it to the AppBuilder Model view.
[Example commit](https://github.com/apache/incubator-superset/pull/5745/commits/6220966e2a0a0cf3e6d87925491f8920fe8a3458)
[Example commit](https://github.com/apache/incubator-superset/pull/5745/commits/6220966e2a0a0cf3e6d87925491f8920fe8a3458)
1. Test the migration's `down` method
```bash
superset db downgrade
```
```bash
superset db downgrade
```
The output should look like this:
The output should look like this:
```
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running downgrade 40a0a483dd12 -> 1a1d627ebd8e, add_metadata_column_to_annotation_model.py
```
```
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running downgrade 40a0a483dd12 -> 1a1d627ebd8e, add_metadata_column_to_annotation_model.py
```
### Merging DB migrations
@ -804,23 +807,23 @@ To fix it:
1. Get the migration heads
```bash
superset db heads
```
```bash
superset db heads
```
This should list two or more migration hashes.
This should list two or more migration hashes.
1. Create a new merge migration
```bash
superset db merge {HASH1} {HASH2}
```
```bash
superset db merge {HASH1} {HASH2}
```
1. Upgrade the DB to the new checkpoint
```bash
superset db upgrade
```
```bash
superset db upgrade
```
### SQL Lab Async
@ -828,30 +831,33 @@ It's possible to configure a local database to operate in `async` mode,
to work on `async` related features.
To do this, you'll need to:
* Add an additional database entry. We recommend you copy the connection
- Add an additional database entry. We recommend you copy the connection
string from the database labeled `main`, and then enable `SQL Lab` and the
features you want to use. Don't forget to check the `Async` box
* Configure a results backend, here's a local `FileSystemCache` example,
- Configure a results backend, here's a local `FileSystemCache` example,
not recommended for production,
but perfect for testing (stores cache in `/tmp`)
```python
from werkzeug.contrib.cache import FileSystemCache
RESULTS_BACKEND = FileSystemCache('/tmp/sqllab')
```
```python
from werkzeug.contrib.cache import FileSystemCache
RESULTS_BACKEND = FileSystemCache('/tmp/sqllab')
```
* Start up a celery worker
```shell script
celery worker --app=superset.tasks.celery_app:app -Ofair
```
```shell script
celery worker --app=superset.tasks.celery_app:app -Ofair
```
Note that:
* for changes that affect the worker logic, you'll have to
- for changes that affect the worker logic, you'll have to
restart the `celery worker` process for the changes to be reflected.
* The message queue used is a `sqlite` database using the `SQLAlchemy`
- The message queue used is a `sqlite` database using the `SQLAlchemy`
experimental broker. Ok for testing, but not recommended in production
* In some cases, you may want to create a context that is more aligned
- In some cases, you may want to create a context that is more aligned
to your production environment, and use the similar broker as well as
results backend configuration
## Chart Parameters
Chart parameters are stored as a JSON encoded string the `slices.params` column and are often referenced throughout the code as form-data. Currently the form-data is neither versioned nor typed as thus is somewhat free-formed. Note in the future there may be merit in using something like [JSON Schema](https://json-schema.org/) to both annotate and validate the JSON object in addition to using a Mypy `TypedDict` (introduced in Python 3.8) for typing the form-data in the backend. This section serves as a potential primer for that work.
@ -863,314 +869,312 @@ Note not all fields are correctly catagorized. The fields vary based on visualiz
### Datasource & Chart Type
| Field | Type | Notes |
|-------------------|----------|-------------------------------------|
| `database_name` | *string* | *Deprecated?* |
| `datasource` | *string* | `<datasouce_id>__<datasource_type>` |
| `datasource_id` | *string* | *Deprecated?* See `datasource` |
| `datasource_name` | *string* | *Deprecated?* |
| `datasource_type` | *string* | *Deprecated?* See `datasource` |
| `viz_type` | *string* | The **Visualization Type** widget |
| ----------------- | -------- | ----------------------------------- |
| `database_name` | _string_ | _Deprecated?_ |
| `datasource` | _string_ | `<datasouce_id>__<datasource_type>` |
| `datasource_id` | _string_ | _Deprecated?_ See `datasource` |
| `datasource_name` | _string_ | _Deprecated?_ |
| `datasource_type` | _string_ | _Deprecated?_ See `datasource` |
| `viz_type` | _string_ | The **Visualization Type** widget |
### Time
| Field | Type | Notes |
|------------------------|-----------------|---------------------------------------|
| `date_filter` | *N/A* | *Deprecated?* |
| `date_time_format` | *N/A* | *Deprecated?* |
| `druid_time_origin` | *string* | The Druid **Origin** widget |
| `granularity` | *string* | The Druid **Time Granularity** widget |
| `granularity_sqla` | *string* | The SQLA **Time Column** widget |
| `time_grain_sqla` | *string* | The SQLA **Time Grain** widget |
| `time_range` | *string* | The **Time range** widget |
| `time_range_endpoints` | *array(string)* | Used by SIP-15 [HIDDEN] |
| ---------------------- | --------------- | ------------------------------------- |
| `date_filter` | _N/A_ | _Deprecated?_ |
| `date_time_format` | _N/A_ | _Deprecated?_ |
| `druid_time_origin` | _string_ | The Druid **Origin** widget |
| `granularity` | _string_ | The Druid **Time Granularity** widget |
| `granularity_sqla` | _string_ | The SQLA **Time Column** widget |
| `time_grain_sqla` | _string_ | The SQLA **Time Grain** widget |
| `time_range` | _string_ | The **Time range** widget |
| `time_range_endpoints` | _array(string)_ | Used by SIP-15 [HIDDEN] |
### GROUP BY
| Field | Type | Notes |
|---------------------------|-----------------|-----------------------------|
| `include_time` | *boolean* | The **Include Time** widget |
| `metrics` | *array(string)* | See Query section |
| ------------------------- | --------------- | --------------------------- |
| `include_time` | _boolean_ | The **Include Time** widget |
| `metrics` | _array(string)_ | See Query section |
| `order_asc` | - | See Query section |
| `percent_metrics` | - | See Query section |
| `row_limit` | - | See Query section |
| `timeseries_limit_metric` | - | See Query section |
### NOT GROUPED BY
| Field | Type | Notes |
|-----------------|-----------------|-------------------------|
| `all_columns` | *array(string)* | The **Columns** widget |
| `order_by_cols` | *array(string)* | The **Ordering** widget |
| --------------- | --------------- | ----------------------- |
| `all_columns` | _array(string)_ | The **Columns** widget |
| `order_by_cols` | _array(string)_ | The **Ordering** widget |
| `row_limit` | - | See Query section |
### Y Axis 1
| Field | Type | Notes |
|-----------------|------|----------------------------------------------------|
| --------------- | ---- | -------------------------------------------------- |
| `metric` | - | The **Left Axis Metric** widget. See Query section |
| `y_axis_format` | - | See Y Axis section |
### Y Axis 2
| Field | Type | Notes |
|-------------------|-----------------|-----------------------------------------------------|
| `metric_2` | - | The **Right Axis Metric** widget. See Query section |
| `y_axis_2_format` | *string* | The **Right Axis Format** widget |
| Field | Type | Notes |
| ----------------- | -------- | --------------------------------------------------- |
| `metric_2` | - | The **Right Axis Metric** widget. See Query section |
| `y_axis_2_format` | _string_ | The **Right Axis Format** widget |
### Query
| Field | Type | Notes |
|---------------------------|---------------------------------------------------|---------------------------------------------------|
| `adhoc_filters` | *array(object)* | The **Filters** widget |
| `all_columns_x` | *array(string)* | The **Numeric Columns** widget |
| `columns` | *array(string)* | The **Breakdowns** widget |
| `contribution` | *boolean* | The **Contribution** widget |
| `groupby` | *array(string)* | The **Group by** or **Series** widget |
| `limit` | *number* | The **Series Limit** widget |
| `max_bubble_size` | *number* | The **Max Bubble Size** widget |
| `metric`<br>`metric_2`<br>`metrics`<br>`percent_mertics`<br>`secondary_metric`<br>`size`<br>`x`<br>`y` | *string*,*object*,*array(string)*,*array(object)* | The metric(s) depending on the visualization type |
| `order_asc` | *boolean* | The **Sort Descending** widget |
| `row_limit` | *number* | The **Row limit** widget |
| `timeseries_limit_metric` | *object* | The **Sort By** widget |
| Field | Type | Notes |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------- | ------------------------------------------------- |
| `adhoc_filters` | _array(object)_ | The **Filters** widget |
| `all_columns_x` | _array(string)_ | The **Numeric Columns** widget |
| `columns` | _array(string)_ | The **Breakdowns** widget |
| `contribution` | _boolean_ | The **Contribution** widget |
| `groupby` | _array(string)_ | The **Group by** or **Series** widget |
| `limit` | _number_ | The **Series Limit** widget |
| `max_bubble_size` | _number_ | The **Max Bubble Size** widget |
| `metric`<br>`metric_2`<br>`metrics`<br>`percent_mertics`<br>`secondary_metric`<br>`size`<br>`x`<br>`y` | _string_,_object_,_array(string)_,_array(object)_ | The metric(s) depending on the visualization type |
| `order_asc` | _boolean_ | The **Sort Descending** widget |
| `row_limit` | _number_ | The **Row limit** widget |
| `timeseries_limit_metric` | _object_ | The **Sort By** widget |
The `metric` (or equivalent) and `timeseries_limit_metric` fields are all composed of either metric names or the JSON representation of the `AdhocMetric` JavaScript type. The `adhoc_filters` is composed of the JSON represent of the `AdhocFilter` JavaScript type (which can comprise of columns or metrics depending on whether it is a WHERE or HAVING clause). The `all_columns`, `all_columns_x`, `columns`, `groupby`, and `order_by_cols` fields all represent column names.
The `metric` (or equivalent) and `timeseries_limit_metric` fields are all composed of either metric names or the JSON representation of the `AdhocMetric` JavaScript type. The `adhoc_filters` is composed of the JSON represent of the `AdhocFilter` JavaScript type (which can comprise of columns or metrics depending on whether it is a WHERE or HAVING clause). The `all_columns`, `all_columns_x`, `columns`, `groupby`, and `order_by_cols` fields all represent column names.
### Filters Configuration
| Field | Type | Notes |
|------------------|---------------|-----------------------------------|
| ---------------- | ------------- | --------------------------------- |
| `filter_configs` | array(object) | The filter-box **Filters** widget |
The filter-box configuration references column names (via the `column` key) and optionally metric names (via the `metric` key) if sorting is defined.
The filter-box configuration references column names (via the `column` key) and optionally metric names (via the `metric` key) if sorting is defined.
### Options
| Field | Type | Notes |
|------------------------|-----------|--------------------------------------|
| `compare_lag` | *number* | The **Comparison Period Lag** widget |
| `compare_suffix` | *string* | The **Comparison suffix** widget |
| `show_trend_line` | *boolean* | The **Show Trend Line** widget |
| `start_y_axis_at_zero` | *boolean* | The **Start y-axis at 0** widget |
| ---------------------- | --------- | ------------------------------------ |
| `compare_lag` | _number_ | The **Comparison Period Lag** widget |
| `compare_suffix` | _string_ | The **Comparison suffix** widget |
| `show_trend_line` | _boolean_ | The **Show Trend Line** widget |
| `start_y_axis_at_zero` | _boolean_ | The **Start y-axis at 0** widget |
### Chart Options
| Field | Type | Notes |
|-----------------------|-----------|--------------------------------------------------|
| `color_picker` | *object* | The **Fixed Color** widget |
| `donut` | *boolean* | The **Donut** widget |
| `global_opacity` | *number* | The **Opacity** widget |
| `header_font_size` | *number* | The **Big Number Font Size** widget (or similar) |
| `label_colors` | *object* | The **Color Scheme** widget |
| `labels_outside` | *boolean* | The **Put labels outside** widget |
| `line_interpolation` | *string* | The **Line Style** widget |
| `link_length` | *number* | The **No of Bins** widget |
| `normalized` | *boolean* | The **Normalized** widget |
| `number_format` | *string* | The **Number format** widget |
| `pie_label_type` | *string* | [HIDDEN] |
| `rich_tooltip` | *boolean* | The **Rich Tooltip** widget |
| `send_time_range` | *boolean* | The **Show Markers** widget |
| `show_brush` | *string* | The **Show Range Filter** widget |
| `show_legend` | *boolean* | The **Legend** widget |
| `show_markers` | *string* | The **Show Markers** widget |
| `subheader_font_size` | *number* | The **Subheader Font Size** widget |
| --------------------- | --------- | ------------------------------------------------ |
| `color_picker` | _object_ | The **Fixed Color** widget |
| `donut` | _boolean_ | The **Donut** widget |
| `global_opacity` | _number_ | The **Opacity** widget |
| `header_font_size` | _number_ | The **Big Number Font Size** widget (or similar) |
| `label_colors` | _object_ | The **Color Scheme** widget |
| `labels_outside` | _boolean_ | The **Put labels outside** widget |
| `line_interpolation` | _string_ | The **Line Style** widget |
| `link_length` | _number_ | The **No of Bins** widget |
| `normalized` | _boolean_ | The **Normalized** widget |
| `number_format` | _string_ | The **Number format** widget |
| `pie_label_type` | _string_ | [HIDDEN] |
| `rich_tooltip` | _boolean_ | The **Rich Tooltip** widget |
| `send_time_range` | _boolean_ | The **Show Markers** widget |
| `show_brush` | _string_ | The **Show Range Filter** widget |
| `show_legend` | _boolean_ | The **Legend** widget |
| `show_markers` | _string_ | The **Show Markers** widget |
| `subheader_font_size` | _number_ | The **Subheader Font Size** widget |
### X Axis
| Field | Type | Notes |
|----------------------|-----------|------------------------------|
| `bottom_margin` | *string* | The **Bottom Margin** widget |
| `x_axis_format` | *string* | The **X Axis Format** widget |
| `x_axis_label` | *string* | The **X Axis Label** widget |
| `x_axis_showminmax` | *boolean* | The **X bounds** widget |
| `x_axis_time_format` | *N/A* | *Deprecated?* |
| `x_log_scale` | *N/A* | *Deprecated?* |
| `x_ticks_layout` | *string* | The **X Tick Layout** widget |
| -------------------- | --------- | ---------------------------- |
| `bottom_margin` | _string_ | The **Bottom Margin** widget |
| `x_axis_format` | _string_ | The **X Axis Format** widget |
| `x_axis_label` | _string_ | The **X Axis Label** widget |
| `x_axis_showminmax` | _boolean_ | The **X bounds** widget |
| `x_axis_time_format` | _N/A_ | _Deprecated?_ |
| `x_log_scale` | _N/A_ | _Deprecated?_ |
| `x_ticks_layout` | _string_ | The **X Tick Layout** widget |
### Y Axis
| Field | Type | Notes |
|---------------------|-----------------|------------------------------|
| `left_margin` | *number* | The **Left Margin** widget |
| `y_axis_2_label` | *N/A* | *Deprecated?* |
| `y_axis_bounds` | *array(string)* | The **Y Axis Bounds** widget |
| `y_axis_format` | *string* | The **Y Axis Format** widget |
| `y_axis_label` | *string* | The **Y Axis Label** widget |
| `y_axis_showminmax` | *boolean* | The **Y bounds** widget |
| `y_axis_zero` | *N/A* | *Deprecated?* |
| `y_log_scale` | *boolean* | The **Y Log Scale** widget |
| `yscale_interval` | *N/A* | *Deprecated?* |
| ------------------- | --------------- | ---------------------------- |
| `left_margin` | _number_ | The **Left Margin** widget |
| `y_axis_2_label` | _N/A_ | _Deprecated?_ |
| `y_axis_bounds` | _array(string)_ | The **Y Axis Bounds** widget |
| `y_axis_format` | _string_ | The **Y Axis Format** widget |
| `y_axis_label` | _string_ | The **Y Axis Label** widget |
| `y_axis_showminmax` | _boolean_ | The **Y bounds** widget |
| `y_axis_zero` | _N/A_ | _Deprecated?_ |
| `y_log_scale` | _boolean_ | The **Y Log Scale** widget |
| `yscale_interval` | _N/A_ | _Deprecated?_ |
Note the `y_axis_format` is defined under various section for some charts.
### Other
| Field | Type | Notes |
|----------------|----------|--------------|
| `color_scheme` | *string* | |
| `slice_id` | *number* | The slice ID |
| `url_params` | *object* | |
| -------------- | -------- | ------------ |
| `color_scheme` | _string_ | |
| `slice_id` | _number_ | The slice ID |
| `url_params` | _object_ | |
### Unclassified
| Field | Type | Notes |
|---------------------------------|-------|-------|
| `add_to_dash` | *N/A* | |
| `align_pn` | *N/A* | |
| `all_columns_y` | *N/A* | |
| `annotation_layers` | *N/A* | |
| `autozoom` | *N/A* | |
| `bar_stacked` | *N/A* | |
| `cache_timeout` | *N/A* | |
| `canvas_image_rendering` | *N/A* | |
| `cell_padding` | *N/A* | |
| `cell_radius` | *N/A* | |
| `cell_size` | *N/A* | |
| `charge` | *N/A* | |
| `clustering_radius` | *N/A* | |
| `code` | *N/A* | |
| `collapsed_fieldsets` | *N/A* | |
| `color_pn` | *N/A* | |
| `column_collection` | *N/A* | |
| `combine_metric` | *N/A* | |
| `comparison type` | *N/A* | |
| `contribution` | *N/A* | |
| `country_fieldtype` | *N/A* | |
| `date_filter` | *N/A* | |
| `deck_slices` | *N/A* | |
| `default_filters` | *N/A* | |
| `dimension` | *N/A* | |
| `domain_granularity` | *N/A* | |
| `end_spatial` | *N/A* | |
| `entity` | *N/A* | |
| `equal_date_size` | *N/A* | |
| `expanded_slices` | *N/A* | |
| `extra_filters` | *N/A* | |
| `extruded` | *N/A* | |
| `fill_color_picker` | *N/A* | |
| `filled` | *N/A* | |
| `filter_immune_slice_fields` | *N/A* | |
| `filter_immune_slices` | *N/A* | |
| `filter_nulls` | *N/A* | |
| `flt_col_0` | *N/A* | |
| `flt_col_1` | *N/A* | |
| `flt_eq_0` | *N/A* | |
| `flt_eq_1` | *N/A* | |
| `flt_op_0` | *N/A* | |
| `flt_op_1` | *N/A* | |
| `goto_dash` | *N/A* | |
| `grid_size` | *N/A* | |
| `horizon_color_scale` | *N/A* | |
| `import_time` | *N/A* | |
| `include_search` | *N/A* | |
| `include_series` | *N/A* | |
| `instant_filtering` | *N/A* | |
| `js_agg_function` | *N/A* | |
| `js_columns` | *N/A* | |
| `label` | *N/A* | |
| `labels_outside` | *N/A* | |
| `legend_position` | *N/A* | |
| `line_charts` | *N/A* | |
| `line_charts_2` | *N/A* | |
| `line_column` | *N/A* | |
| `line_type` | *N/A* | |
| `line_width` | *N/A* | |
| `linear_color_scheme` | *N/A* | |
| `log_scale` | *N/A* | |
| `mapbox_color` | *N/A* | |
| `mapbox_label` | *N/A* | |
| `mapbox_style` | *N/A* | |
| `marker_labels` | *N/A* | |
| `marker_line_labels` | *N/A* | |
| `marker_lines` | *N/A* | |
| `markers` | *N/A* | |
| `markup_type` | *N/A* | |
| `max_radius` | *N/A* | |
| `min_leaf_node_event_count` | *N/A* | |
| `min_periods` | *N/A* | |
| `min_radius` | *N/A* | |
| `multiplier` | *N/A* | |
| `new_dashboard_name` | *N/A* | |
| `new_slice_name` | *N/A* | |
| `normalize_across` | *N/A* | |
| `num_buckets` | *N/A* | |
| `num_period_compare` | *N/A* | |
| `order_bars` | *N/A* | |
| `order_by_entity` | *N/A* | |
| `order_desc` | *N/A* | |
| `page_length` | *N/A* | |
| `pandas_aggfunc` | *N/A* | |
| `partition_limit` | *N/A* | |
| `partition_threshold` | *N/A* | |
| `period_ratio_type` | *N/A* | |
| `perm` | *N/A* | |
| `pivot_margins` | *N/A* | |
| `point_radius` | *N/A* | |
| `point_radius_fixed` | *N/A* | |
| `point_radius_unit` | *N/A* | |
| `point_unit` | *N/A* | |
| `prefix_metric_with_slice_name` | *N/A* | |
| `range_labels` | *N/A* | |
| `ranges` | *N/A* | |
| `rdo_save` | *N/A* | |
| `reduce_x_ticks` | *N/A* | |
| `refresh_frequency` | *N/A* | |
| `remote_id` | *N/A* | |
| `render_while_dragging` | *N/A* | |
| `resample_fillmethod` | *N/A* | |
| `resample_how` | *N/A* | |
| `resample_method` | *N/A* | |
| `resample_rule` | *N/A* | |
| `reverse_long_lat` | *N/A* | |
| `rolling_periods` | *N/A* | |
| `rolling_type` | *N/A* | |
| `rose_area_proportion` | *N/A* | |
| `rotation` | *N/A* | |
| `save_to_dashboard_id` | *N/A* | |
| `schema` | *N/A* | |
| `select_country` | *N/A* | |
| `series` | *N/A* | |
| `series_height` | *N/A* | |
| `show_bar_value` | *N/A* | |
| `show_brush` | *N/A* | |
| `show_bubbles` | *N/A* | |
| `show_controls` | *N/A* | |
| `show_datatable` | *N/A* | |
| `show_druid_time_granularity` | *N/A* | |
| `show_druid_time_origin` | *N/A* | |
| `show_labels` | *N/A* | |
| `show_metric_name` | *N/A* | |
| `show_perc` | *N/A* | |
| `show_sqla_time_column` | *N/A* | |
| `show_sqla_time_granularity` | *N/A* | |
| `show_values` | *N/A* | |
| `size_from` | *N/A* | |
| `size_to` | *N/A* | |
| `slice_name` | *N/A* | |
| `sort_x_axis` | *N/A* | |
| `sort_y_axis` | *N/A* | |
| `spatial` | *N/A* | |
| `stacked_style` | *N/A* | |
| `start_spatial` | *N/A* | |
| `steps` | *N/A* | |
| `stroke_color_picker` | *N/A* | |
| `stroke_width` | *N/A* | |
| `stroked` | *N/A* | |
| `subdomain_granularity` | *N/A* | |
| `subheader` | *N/A* | |
| `table_filter` | *N/A* | |
| `table_timestamp_format` | *N/A* | |
| `time_compare` | *N/A* | |
| `time_series_option` | *N/A* | |
| `timed_refresh_immune_slices` | *N/A* | |
| `toggle_polygons` | *N/A* | |
| `transpose_pivot` | *N/A* | |
| `treemap_ratio` | *N/A* | |
| `url` | *N/A* | |
| `userid` | *N/A* | |
| `viewport` | *N/A* | |
| `viewport_latitude` | *N/A* | |
| `viewport_longitude` | *N/A* | |
| `viewport_zoom` | *N/A* | |
| `whisker_options` | *N/A* | |
| ------------------------------- | ----- | ----- |
| `add_to_dash` | _N/A_ | |
| `align_pn` | _N/A_ | |
| `all_columns_y` | _N/A_ | |
| `annotation_layers` | _N/A_ | |
| `autozoom` | _N/A_ | |
| `bar_stacked` | _N/A_ | |
| `cache_timeout` | _N/A_ | |
| `canvas_image_rendering` | _N/A_ | |
| `cell_padding` | _N/A_ | |
| `cell_radius` | _N/A_ | |
| `cell_size` | _N/A_ | |
| `charge` | _N/A_ | |
| `clustering_radius` | _N/A_ | |
| `code` | _N/A_ | |
| `collapsed_fieldsets` | _N/A_ | |
| `color_pn` | _N/A_ | |
| `column_collection` | _N/A_ | |
| `combine_metric` | _N/A_ | |
| `comparison type` | _N/A_ | |
| `contribution` | _N/A_ | |
| `country_fieldtype` | _N/A_ | |
| `date_filter` | _N/A_ | |
| `deck_slices` | _N/A_ | |
| `default_filters` | _N/A_ | |
| `dimension` | _N/A_ | |
| `domain_granularity` | _N/A_ | |
| `end_spatial` | _N/A_ | |
| `entity` | _N/A_ | |
| `equal_date_size` | _N/A_ | |
| `expanded_slices` | _N/A_ | |
| `extra_filters` | _N/A_ | |
| `extruded` | _N/A_ | |
| `fill_color_picker` | _N/A_ | |
| `filled` | _N/A_ | |
| `filter_immune_slice_fields` | _N/A_ | |
| `filter_immune_slices` | _N/A_ | |
| `filter_nulls` | _N/A_ | |
| `flt_col_0` | _N/A_ | |
| `flt_col_1` | _N/A_ | |
| `flt_eq_0` | _N/A_ | |
| `flt_eq_1` | _N/A_ | |
| `flt_op_0` | _N/A_ | |
| `flt_op_1` | _N/A_ | |
| `goto_dash` | _N/A_ | |
| `grid_size` | _N/A_ | |
| `horizon_color_scale` | _N/A_ | |
| `import_time` | _N/A_ | |
| `include_search` | _N/A_ | |
| `include_series` | _N/A_ | |
| `instant_filtering` | _N/A_ | |
| `js_agg_function` | _N/A_ | |
| `js_columns` | _N/A_ | |
| `label` | _N/A_ | |
| `labels_outside` | _N/A_ | |
| `legend_position` | _N/A_ | |
| `line_charts` | _N/A_ | |
| `line_charts_2` | _N/A_ | |
| `line_column` | _N/A_ | |
| `line_type` | _N/A_ | |
| `line_width` | _N/A_ | |
| `linear_color_scheme` | _N/A_ | |
| `log_scale` | _N/A_ | |
| `mapbox_color` | _N/A_ | |
| `mapbox_label` | _N/A_ | |
| `mapbox_style` | _N/A_ | |
| `marker_labels` | _N/A_ | |
| `marker_line_labels` | _N/A_ | |
| `marker_lines` | _N/A_ | |
| `markers` | _N/A_ | |
| `markup_type` | _N/A_ | |
| `max_radius` | _N/A_ | |
| `min_leaf_node_event_count` | _N/A_ | |
| `min_periods` | _N/A_ | |
| `min_radius` | _N/A_ | |
| `multiplier` | _N/A_ | |
| `new_dashboard_name` | _N/A_ | |
| `new_slice_name` | _N/A_ | |
| `normalize_across` | _N/A_ | |
| `num_buckets` | _N/A_ | |
| `num_period_compare` | _N/A_ | |
| `order_bars` | _N/A_ | |
| `order_by_entity` | _N/A_ | |
| `order_desc` | _N/A_ | |
| `page_length` | _N/A_ | |
| `pandas_aggfunc` | _N/A_ | |
| `partition_limit` | _N/A_ | |
| `partition_threshold` | _N/A_ | |
| `period_ratio_type` | _N/A_ | |
| `perm` | _N/A_ | |
| `pivot_margins` | _N/A_ | |
| `point_radius` | _N/A_ | |
| `point_radius_fixed` | _N/A_ | |
| `point_radius_unit` | _N/A_ | |
| `point_unit` | _N/A_ | |
| `prefix_metric_with_slice_name` | _N/A_ | |
| `range_labels` | _N/A_ | |
| `ranges` | _N/A_ | |
| `rdo_save` | _N/A_ | |
| `reduce_x_ticks` | _N/A_ | |
| `refresh_frequency` | _N/A_ | |
| `remote_id` | _N/A_ | |
| `render_while_dragging` | _N/A_ | |
| `resample_fillmethod` | _N/A_ | |
| `resample_how` | _N/A_ | |
| `resample_method` | _N/A_ | |
| `resample_rule` | _N/A_ | |
| `reverse_long_lat` | _N/A_ | |
| `rolling_periods` | _N/A_ | |
| `rolling_type` | _N/A_ | |
| `rose_area_proportion` | _N/A_ | |
| `rotation` | _N/A_ | |
| `save_to_dashboard_id` | _N/A_ | |
| `schema` | _N/A_ | |
| `select_country` | _N/A_ | |
| `series` | _N/A_ | |
| `series_height` | _N/A_ | |
| `show_bar_value` | _N/A_ | |
| `show_brush` | _N/A_ | |
| `show_bubbles` | _N/A_ | |
| `show_controls` | _N/A_ | |
| `show_datatable` | _N/A_ | |
| `show_druid_time_granularity` | _N/A_ | |
| `show_druid_time_origin` | _N/A_ | |
| `show_labels` | _N/A_ | |
| `show_metric_name` | _N/A_ | |
| `show_perc` | _N/A_ | |
| `show_sqla_time_column` | _N/A_ | |
| `show_sqla_time_granularity` | _N/A_ | |
| `show_values` | _N/A_ | |
| `size_from` | _N/A_ | |
| `size_to` | _N/A_ | |
| `slice_name` | _N/A_ | |
| `sort_x_axis` | _N/A_ | |
| `sort_y_axis` | _N/A_ | |
| `spatial` | _N/A_ | |
| `stacked_style` | _N/A_ | |
| `start_spatial` | _N/A_ | |
| `steps` | _N/A_ | |
| `stroke_color_picker` | _N/A_ | |
| `stroke_width` | _N/A_ | |
| `stroked` | _N/A_ | |
| `subdomain_granularity` | _N/A_ | |
| `subheader` | _N/A_ | |
| `table_filter` | _N/A_ | |
| `table_timestamp_format` | _N/A_ | |
| `time_compare` | _N/A_ | |
| `time_series_option` | _N/A_ | |
| `timed_refresh_immune_slices` | _N/A_ | |
| `toggle_polygons` | _N/A_ | |
| `transpose_pivot` | _N/A_ | |
| `treemap_ratio` | _N/A_ | |
| `url` | _N/A_ | |
| `userid` | _N/A_ | |
| `viewport` | _N/A_ | |
| `viewport_latitude` | _N/A_ | |
| `viewport_longitude` | _N/A_ | |
| `viewport_zoom` | _N/A_ | |
| `whisker_options` | _N/A_ | |

View File

@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,15 @@
{
"name": "superset-cypress",
"version": "1.0.0",
"description": "run cypress against superset",
"scripts": {
"cypress": "cypress",
"cypress-debug": "cypress open --config watchForFileChanges=true"
},
"author": "Apcahe",
"license": "Apache-2.0",
"dependencies": {
"cypress": "^3.6.1",
"shortid": "^2.2.15"
}
}

View File

@ -29,10 +29,12 @@ flask run -p 8081 --with-threads --reload --debugger &
#block on the longer running javascript process
time npm ci
time npm run install-cypress
time npm run build
echo "[completed js build steps]"
#setup cypress
cd cypress-base
time npm ci
CYPRESS_PATH='cypress/integration/'${1}'/*'
time npm run cypress run -- --spec "$CYPRESS_PATH" --record false --config video=false

View File

@ -17,10 +17,7 @@
"build": "cross-env NODE_OPTIONS=--max_old_space_size=8192 NODE_ENV=production webpack --mode=production --colors --progress",
"lint": "eslint --ignore-path=.eslintignore --ext .js,.jsx . && tslint -c tslint.json ./{src,spec}/**/*.ts{,x}",
"lint-fix": "eslint --fix --ignore-path=.eslintignore --ext .js,.jsx . && tslint -c tslint.json --fix ./{src,spec}/**/*.ts{,x} && npm run clean-css",
"clean-css": "prettier --write 'src/**/*.{css,less,sass,scss}'",
"cypress": "cypress",
"cypress-debug": "cypress open --config watchForFileChanges=true",
"install-cypress": "npm install cypress@3.6.1"
"clean-css": "prettier --write 'src/**/*.{css,less,sass,scss}'"
},
"repository": {
"type": "git",