|
17 | 17 | * under the License.
|
18 | 18 | */
|
19 | 19 | describe('Visualization > Bubble', () => {
|
| 20 | + beforeEach(() => { |
| 21 | + cy.preserveLogin(); |
| 22 | + cy.intercept('POST', '/superset/explore_json/**').as('getJson'); |
| 23 | + }); |
| 24 | + |
20 | 25 | const BUBBLE_FORM_DATA = {
|
21 | 26 | datasource: '2__table',
|
22 | 27 | viz_type: 'bubble',
|
@@ -51,33 +56,6 @@ describe('Visualization > Bubble', () => {
|
51 | 56 | cy.verifySliceSuccess({ waitAlias: '@getJson', chartSelector: 'svg' });
|
52 | 57 | }
|
53 | 58 |
|
54 |
| - beforeEach(() => { |
55 |
| - cy.login(); |
56 |
| - cy.intercept('POST', '/superset/explore_json/**').as('getJson'); |
57 |
| - }); |
58 |
| - |
59 |
| - // Number of circles are pretty unstable when there are a lot of circles |
60 |
| - // Since main functionality is already covered in filter test below, |
61 |
| - // skip this test until we find a solution. |
62 |
| - it.skip('should work', () => { |
63 |
| - cy.visitChartByParams(BUBBLE_FORM_DATA).then(() => { |
64 |
| - cy.wait('@getJson').then(xhr => { |
65 |
| - let expectedBubblesNumber = 0; |
66 |
| - xhr.responseBody.data.forEach(element => { |
67 |
| - expectedBubblesNumber += element.values.length; |
68 |
| - }); |
69 |
| - cy.get('[data-test="chart-container"]') |
70 |
| - .should('be.visible', { timeout: 15000 }) |
71 |
| - .within(() => { |
72 |
| - cy.get('svg') |
73 |
| - .should('exist') |
74 |
| - .find('.nv-point-clips circle') |
75 |
| - .should('have.length', expectedBubblesNumber); |
76 |
| - }); |
77 |
| - }); |
78 |
| - }); |
79 |
| - }); |
80 |
| - |
81 | 59 | it('should work with filter', () => {
|
82 | 60 | verify({
|
83 | 61 | ...BUBBLE_FORM_DATA,
|
@@ -109,6 +87,8 @@ describe('Visualization > Bubble', () => {
|
109 | 87 | });
|
110 | 88 |
|
111 | 89 | it('should allow type to search color schemes and apply the scheme', () => {
|
| 90 | + cy.visitChartByParams(BUBBLE_FORM_DATA); |
| 91 | + |
112 | 92 | cy.get('.Control[data-test="color_scheme"]').scrollIntoView();
|
113 | 93 | cy.get('.Control[data-test="color_scheme"] input[type="search"]')
|
114 | 94 | .focus()
|
|
0 commit comments