@flourish/info-popup
Advanced tools
Comparing version 7.0.2 to 8.0.0
{ | ||
"name": "@flourish/info-popup", | ||
"type": "module", | ||
"version": "7.0.2", | ||
"version": "8.0.0", | ||
"private": false, | ||
@@ -9,2 +9,5 @@ "description": "Popup with data insertion", | ||
"module": "src/index.js", | ||
"exports": { | ||
".": "./src/index.js" | ||
}, | ||
"mocha": { | ||
@@ -37,3 +40,3 @@ "recursive": true, | ||
"uglify-js": "^3.15.4", | ||
"@flourish/cypress": "^8.0.0" | ||
"@flourish/cypress": "^9.0.0" | ||
}, | ||
@@ -47,5 +50,5 @@ "dependencies": { | ||
"d3-transition": "^1.3.2", | ||
"@flourish/formatters": "^1.0.4", | ||
"@flourish/popup": "^2.1.5", | ||
"@flourish/pocket-knife": "^1.3.2" | ||
"@flourish/formatters": "^2.0.0", | ||
"@flourish/pocket-knife": "^2.0.0", | ||
"@flourish/popup": "^3.0.0" | ||
}, | ||
@@ -57,3 +60,3 @@ "repository": { | ||
"scripts": { | ||
"mocha": "mocha", | ||
"mocha": "npm run build && mocha", | ||
"lint": "eslint .", | ||
@@ -60,0 +63,0 @@ "build": "rollup -c", |
@@ -288,38 +288,3 @@ # Flourish Info Popup | ||
## Importable tests | ||
This module has importable tests :tada:. To run them in a template: | ||
1. Create a new file in `cypress/integrations` called `info_popup.js` | ||
2. Import the tests at the top of the file: | ||
``` | ||
import { infoPopupTests } from '@flourish/info-popup/template_test' | ||
``` | ||
3. Write a `triggerPopupClick` function that triggers the clicking of a popup e.g: | ||
``` | ||
function triggerPopupClick({state, data}) { | ||
// you have access to state and data but you may not need to use it | ||
cy.get(".bubble:first-of-type").click(); | ||
} | ||
``` | ||
4. Write a `triggerPopupMouseover` function | ||
``` | ||
function triggerPopupMouseover({state, data}) { | ||
// you have access to state and data but you may not need to use it | ||
cy.get(".bubble:first-of-type").trigger("mouseover"); | ||
} | ||
``` | ||
5. Call `infoPopupTests()` and pass it an object: | ||
``` | ||
infoPopupTests({ | ||
triggerPopupClick, | ||
triggerPopupMouseover, | ||
primary_datasheet_name // optional (see below) | ||
}) | ||
``` | ||
6. Run cypress tests as usual and these tests should run as part of the existing template cypress tests! | ||
#### For templates with multiple datasheets | ||
If a template has multiple datasheets you will need to pass in the name of the datasheet that the info popup binding relates to. If it is not passed in the tests will use the first datasheet in the `column_names` object. |
@@ -0,1 +1,6 @@ | ||
# 8.0.0 | ||
* Switch to preferring ESM by default on recent versions of Node.js by adding an `exports` field to `package.json`. | ||
* Run build script as part of `prepublishOnly` instead of `prepare`. | ||
* Remove `@flourish/info-popup/template_test` export path. | ||
# 7.0.2 | ||
@@ -2,0 +7,0 @@ * Fix bug with HTML appearing in aria label content |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
427445
17
7203
290
+ Added@flourish/formatters@2.2.0(transitive)
+ Added@flourish/interpreter@9.1.3(transitive)
+ Added@flourish/pocket-knife@2.1.1(transitive)
+ Added@flourish/popup@3.1.1(transitive)
+ Added@jridgewell/gen-mapping@0.3.8(transitive)
+ Added@jridgewell/resolve-uri@3.1.2(transitive)
+ Added@jridgewell/set-array@1.2.1(transitive)
+ Added@jridgewell/source-map@0.3.6(transitive)
+ Added@jridgewell/sourcemap-codec@1.5.0(transitive)
+ Added@jridgewell/trace-mapping@0.3.25(transitive)
+ Addedacorn@8.14.0(transitive)
+ Addedassertion-error@2.0.1(transitive)
+ Addedbuffer-from@1.1.2(transitive)
+ Addedchai@5.1.2(transitive)
+ Addedcheck-error@2.1.1(transitive)
+ Addedcommander@2.20.3(transitive)
+ Addeddeep-eql@5.0.2(transitive)
+ Addedloupe@3.1.3(transitive)
+ Addedpathval@2.0.0(transitive)
+ Addedsource-map@0.6.1(transitive)
+ Addedsource-map-support@0.5.21(transitive)
+ Addedterser@5.38.2(transitive)
- Removed@flourish/formatters@1.0.4(transitive)
- Removed@flourish/interpreter@8.6.0(transitive)
- Removed@flourish/pocket-knife@1.3.2(transitive)
- Removed@flourish/popup@2.1.5(transitive)
Updated@flourish/formatters@^2.0.0
Updated@flourish/popup@^3.0.0