diff --git a/superset-frontend/cypress-base/cypress/integration/explore/link.test.ts b/superset-frontend/cypress-base/cypress/integration/explore/link.test.ts
index fdbf6f5f983..f825fe01d09 100644
--- a/superset-frontend/cypress-base/cypress/integration/explore/link.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/explore/link.test.ts
@@ -48,7 +48,7 @@ describe('Test explore links', () => {
});
});
- it('Visit short link', () => {
+ it('Test if short link is generated', () => {
cy.intercept('POST', 'r/shortner/').as('getShortUrl');
cy.visitChartByName('Growth Rate');
@@ -58,13 +58,6 @@ describe('Test explore links', () => {
// explicitly wait for the url response
cy.wait('@getShortUrl');
-
- cy.get('#shorturl-popover [data-test="short-url"]')
- .invoke('text')
- .then(text => {
- cy.visit(text);
- });
- cy.verifySliceSuccess({ waitAlias: '@chartData' });
});
it('Test iframe link', () => {
diff --git a/superset-frontend/spec/javascripts/dashboard/components/HeaderActionsDropdown_spec.jsx b/superset-frontend/spec/javascripts/dashboard/components/HeaderActionsDropdown_spec.jsx
index 17bc7bc3c4e..ea3b65ca28e 100644
--- a/superset-frontend/spec/javascripts/dashboard/components/HeaderActionsDropdown_spec.jsx
+++ b/superset-frontend/spec/javascripts/dashboard/components/HeaderActionsDropdown_spec.jsx
@@ -20,11 +20,11 @@ import React from 'react';
import { shallow } from 'enzyme';
import { Menu, NoAnimationDropdown } from 'src/common/components';
import RefreshIntervalModal from 'src/dashboard/components/RefreshIntervalModal';
-import URLShortLinkModal from 'src/components/URLShortLinkModal';
import HeaderActionsDropdown from 'src/dashboard/components/HeaderActionsDropdown';
import SaveModal from 'src/dashboard/components/SaveModal';
import CssEditor from 'src/dashboard/components/CssEditor';
import fetchMock from 'fetch-mock';
+import ShareMenuItems from 'src/dashboard/components/menu/ShareMenuItems';
fetchMock.get('glob:*/csstemplateasyncmodelview/api/read', {});
@@ -79,9 +79,9 @@ describe('HeaderActionsDropdown', () => {
expect(menu.find(SaveModal)).not.toExist();
});
- it('should render five Menu items', () => {
+ it('should render available Menu items', () => {
const { menu } = setup(overrideProps);
- expect(menu.find(Menu.Item)).toHaveLength(5);
+ expect(menu.find(Menu.Item)).toHaveLength(4);
});
it('should render the RefreshIntervalModal', () => {
@@ -89,9 +89,9 @@ describe('HeaderActionsDropdown', () => {
expect(menu.find(RefreshIntervalModal)).toExist();
});
- it('should render the URLShortLinkModal', () => {
+ it('should render the ShareMenuItems', () => {
const { menu } = setup(overrideProps);
- expect(menu.find(URLShortLinkModal)).toExist();
+ expect(menu.find(ShareMenuItems)).toExist();
});
it('should not render the CssEditor', () => {
@@ -113,9 +113,9 @@ describe('HeaderActionsDropdown', () => {
expect(menu.find(SaveModal)).toExist();
});
- it('should render six Menu items', () => {
+ it('should render available Menu items', () => {
const { menu } = setup(overrideProps);
- expect(menu.find(Menu.Item)).toHaveLength(6);
+ expect(menu.find(Menu.Item)).toHaveLength(5);
});
it('should render the RefreshIntervalModal', () => {
@@ -123,9 +123,9 @@ describe('HeaderActionsDropdown', () => {
expect(menu.find(RefreshIntervalModal)).toExist();
});
- it('should render the URLShortLinkModal', () => {
+ it('should render the ShareMenuItems', () => {
const { menu } = setup(overrideProps);
- expect(menu.find(URLShortLinkModal)).toExist();
+ expect(menu.find(ShareMenuItems)).toExist();
});
it('should not render the CssEditor', () => {
@@ -147,9 +147,9 @@ describe('HeaderActionsDropdown', () => {
expect(menu.find(SaveModal)).toExist();
});
- it('should render seven MenuItems', () => {
+ it('should render available MenuItems', () => {
const { menu } = setup(overrideProps);
- expect(menu.find(Menu.Item)).toHaveLength(7);
+ expect(menu.find(Menu.Item)).toHaveLength(6);
});
it('should render the RefreshIntervalModal', () => {
@@ -157,9 +157,9 @@ describe('HeaderActionsDropdown', () => {
expect(menu.find(RefreshIntervalModal)).toExist();
});
- it('should render the URLShortLinkModal', () => {
+ it('should render the ShareMenuItems', () => {
const { menu } = setup(overrideProps);
- expect(menu.find(URLShortLinkModal)).toExist();
+ expect(menu.find(ShareMenuItems)).toExist();
});
it('should render the CssEditor', () => {
diff --git a/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Chart_spec.jsx b/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Chart_spec.jsx
index 52dc41c2e18..513fe4923fc 100644
--- a/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Chart_spec.jsx
+++ b/superset-frontend/spec/javascripts/dashboard/components/gridComponents/Chart_spec.jsx
@@ -57,6 +57,7 @@ describe('Chart', () => {
changeFilter() {},
setFocusedFilterField() {},
unsetFocusedFilterField() {},
+ addSuccessToast() {},
addDangerToast() {},
componentId: 'test',
dashboardId: 111,
diff --git a/superset-frontend/spec/javascripts/explore/components/EmbedCodeButton_spec.jsx b/superset-frontend/spec/javascripts/explore/components/EmbedCodeButton_spec.jsx
index 74c0d21e38c..2c61cceaaee 100644
--- a/superset-frontend/spec/javascripts/explore/components/EmbedCodeButton_spec.jsx
+++ b/superset-frontend/spec/javascripts/explore/components/EmbedCodeButton_spec.jsx
@@ -86,8 +86,12 @@ describe('EmbedCodeButton', () => {
const stub = sinon
.stub(exploreUtils, 'getURIDirectory')
.callsFake(() => 'endpoint_url');
- const wrapper = mount(