File tree Expand file tree Collapse file tree 3 files changed +43
-1
lines changed Expand file tree Collapse file tree 3 files changed +43
-1
lines changed Original file line number Diff line number Diff line change @@ -1484,6 +1484,16 @@ export const components = [
1484
1484
{
1485
1485
name : 'VueUiWordCloud' ,
1486
1486
dataset : 'Lorem ipsum dolor sit amet Lorem Lorem Lorem sit sit ipsum' ,
1487
+ config : {
1488
+ style : {
1489
+ chart : {
1490
+ title : {
1491
+ text : 'Title' ,
1492
+ subtitle : { text : 'Subtitle' }
1493
+ }
1494
+ }
1495
+ }
1496
+ } ,
1487
1497
wrapperClass : '.vue-ui-word-cloud'
1488
1498
} ,
1489
1499
{
Original file line number Diff line number Diff line change
1
+ import VueUiWordCloud from "./vue-ui-word-cloud.vue" ;
2
+ import { components } from "../../cypress/fixtures/vdui-components" ;
3
+ import { testCommonFeatures } from "../../cypress/fixtures" ;
4
+
5
+ const { dataset, config } = components . find ( c => c . name === 'VueUiWordCloud' ) ;
6
+
7
+ describe ( '<VueUiWordCloud />' , ( ) => {
8
+
9
+ it ( 'renders' , ( ) => {
10
+ cy . viewport ( 500 , 570 ) ;
11
+ cy . mount ( VueUiWordCloud , {
12
+ props : {
13
+ dataset,
14
+ config
15
+ }
16
+ } ) . then ( ( ) => {
17
+
18
+ testCommonFeatures ( {
19
+ userOptions : true ,
20
+ title : true ,
21
+ subtitle : true ,
22
+ dataTable : true ,
23
+ tooltipCallback : ( ) => {
24
+ cy . get ( '[data-cy="datapoint-word"]' ) . first ( ) . trigger ( 'mouseover' , { force : true } )
25
+ }
26
+ } ) ;
27
+
28
+ cy . get ( '[data-cy="datapoint-word"]' ) . should ( 'exist' ) . and ( 'be.visible' ) . and ( 'have.length' , 5 ) ;
29
+ } ) ;
30
+ } ) ;
31
+ } ) ;
Original file line number Diff line number Diff line change @@ -530,7 +530,8 @@ function useTooltip(word) {
530
530
<g
531
531
:transform =" `translate(${(svg.width <= 0 ? 10 : svg.width) / 2}, ${(svg.height <= 0 ? 10 : svg.height) / 2})`" >
532
532
<g v-for =" (word, index) in positionedWords" >
533
- <text
533
+ <text
534
+ data-cy =" datapoint-word"
534
535
:fill =" word.color"
535
536
:font-weight =" FINAL_CONFIG.style.chart.words.bold ? 'bold' : 'normal'" :key =" index"
536
537
:x =" word.x" :y =" word.y" :font-size =" word.fontSize"
You can’t perform that action at this time.
0 commit comments