kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
173 lines (172 loc) • 25 kB
JavaScript
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _react = _interopRequireDefault(require("/Users/ihordykhta/Desktop/unfolded/kepler.gl/node_modules/react"));
var _useCloudListProvider = require("../hooks/use-cloud-list-provider");
var _componentJestUtils = require("../../../../test/helpers/component-jest-utils");
var _shareMapModal = _interopRequireDefault(require("./share-map-modal"));
var _src = require("/Users/ihordykhta/Desktop/unfolded/kepler.gl/src/constants/src");
var _react2 = require("@testing-library/react");
var _styledComponents = require("/Users/ihordykhta/Desktop/unfolded/kepler.gl/node_modules/styled-components");
var _reactIntl = require("/Users/ihordykhta/Desktop/unfolded/kepler.gl/node_modules/react-intl");
var _src2 = require("/Users/ihordykhta/Desktop/unfolded/kepler.gl/src/styles/src");
var _src3 = require("/Users/ihordykhta/Desktop/unfolded/kepler.gl/src/localization/src");
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } // SPDX-License-Identifier: MIT
// Copyright contributors to the kepler.gl project
// @ts-nocheck
jest.mock("../hooks/use-cloud-list-provider", function () {
return {
useCloudListProvider: jest.fn().mockImplementation(function () {
return {
provider: null,
setProvider: jest.fn(),
cloudProviders: []
};
})
};
});
var ShareMapUrlModal = (0, _shareMapModal["default"])();
var DEFAULT_PROPS = {
isProviderLoading: false,
onExport: jest.fn(),
providerError: null,
successInfo: undefined,
onUpdateImageSetting: jest.fn(),
cleanupExportImage: jest.fn()
};
describe('ShareMapModal', function () {
afterEach(function () {
jest.clearAllMocks();
});
test('renders only list of providers', function () {
var _renderWithTheme = (0, _componentJestUtils.renderWithTheme)( /*#__PURE__*/_react["default"].createElement(ShareMapUrlModal, DEFAULT_PROPS)),
getByText = _renderWithTheme.getByText,
queryByTestId = _renderWithTheme.queryByTestId;
expect(getByText('modal.shareMap.title')).toBeInTheDocument();
expect(queryByTestId(_src.dataTestIds.providerShareMap)).toBeNull();
});
test('renders list of provider and sharing section', function () {
var mapProvider = {
name: 'test provider',
icon: jest.fn(),
getManagementUrl: jest.fn().mockImplementation(function () {
return 'provider.url';
}),
listMaps: jest.fn().mockResolvedValue([]),
hasSharingUrl: jest.fn().mockImplementation(function () {
return true;
})
};
_useCloudListProvider.useCloudListProvider.mockImplementation(function () {
return {
provider: mapProvider,
setProvider: jest.fn(),
cloudProviders: []
};
});
var _renderWithTheme2 = (0, _componentJestUtils.renderWithTheme)( /*#__PURE__*/_react["default"].createElement(ShareMapUrlModal, DEFAULT_PROPS)),
getByText = _renderWithTheme2.getByText,
getByTestId = _renderWithTheme2.getByTestId;
expect(getByText('modal.shareMap.title')).toBeInTheDocument();
expect(getByTestId(_src.dataTestIds.providerShareMap)).toBeInTheDocument();
});
test('renders loading when isLoading is set to true', function () {
var mapProvider = {
name: 'test provider',
icon: jest.fn(),
getManagementUrl: jest.fn().mockImplementation(function () {
return 'provider.url';
}),
listMaps: jest.fn().mockResolvedValue([]),
hasSharingUrl: jest.fn().mockImplementation(function () {
return true;
})
};
_useCloudListProvider.useCloudListProvider.mockImplementation(function () {
return {
provider: mapProvider,
setProvider: jest.fn(),
cloudProviders: []
};
});
var providerLoadingProps = _objectSpread(_objectSpread({}, DEFAULT_PROPS), {}, {
isProviderLoading: true
});
var _renderWithTheme3 = (0, _componentJestUtils.renderWithTheme)( /*#__PURE__*/_react["default"].createElement(ShareMapUrlModal, providerLoadingProps)),
getByText = _renderWithTheme3.getByText;
expect(getByText('modal.statusPanel.mapUploading')).toBeInTheDocument();
});
test('calls onExport when provider is set correctly', function () {
var mapProvider = {
name: 'test provider',
icon: jest.fn(),
getManagementUrl: jest.fn().mockImplementation(function () {
return 'provider.url';
}),
listMaps: jest.fn().mockResolvedValue([]),
hasSharingUrl: jest.fn().mockImplementation(function () {
return true;
})
};
_useCloudListProvider.useCloudListProvider.mockImplementation(function () {
return {
provider: mapProvider,
setProvider: jest.fn(),
cloudProviders: []
};
});
(0, _componentJestUtils.renderWithTheme)( /*#__PURE__*/_react["default"].createElement(ShareMapUrlModal, DEFAULT_PROPS));
expect(DEFAULT_PROPS.onExport).toHaveBeenCalled();
});
test('calls onExport after provider was updated', function () {
var _renderWithTheme4 = (0, _componentJestUtils.renderWithTheme)( /*#__PURE__*/_react["default"].createElement(ShareMapUrlModal, DEFAULT_PROPS)),
rerender = _renderWithTheme4.rerender;
var mapProvider = {
name: 'test provider',
icon: jest.fn(),
getManagementUrl: jest.fn().mockImplementation(function () {
return 'provider.url';
}),
listMaps: jest.fn().mockResolvedValue([]),
hasSharingUrl: jest.fn().mockImplementation(function () {
return true;
})
};
_useCloudListProvider.useCloudListProvider.mockImplementation(function () {
return {
provider: mapProvider,
setProvider: jest.fn(),
cloudProviders: []
};
});
(0, _react2.act)(function () {
rerender( /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
theme: _src2.theme
}, /*#__PURE__*/_react["default"].createElement(_reactIntl.IntlProvider, {
locale: "en",
messages: _src3.messages
}, /*#__PURE__*/_react["default"].createElement(ShareMapUrlModal, DEFAULT_PROPS))));
});
expect(DEFAULT_PROPS.onExport).toHaveBeenCalled();
});
it('displays share URL when provided', function () {
var shareUrl = 'http://example.com';
var _renderWithTheme5 = (0, _componentJestUtils.renderWithTheme)( /*#__PURE__*/_react["default"].createElement(ShareMapUrlModal, (0, _extends2["default"])({}, DEFAULT_PROPS, {
successInfo: {
shareUrl: shareUrl
}
}))),
getByText = _renderWithTheme5.getByText;
expect(getByText('Share Url')).toBeInTheDocument();
});
it('renders errors', function () {
var _renderWithTheme6 = (0, _componentJestUtils.renderWithTheme)( /*#__PURE__*/_react["default"].createElement(ShareMapUrlModal, (0, _extends2["default"])({}, DEFAULT_PROPS, {
providerError: new Error('timeout')
}))),
getByText = _renderWithTheme6.getByText;
expect(getByText('modal.statusPanel.error')).toBeInTheDocument();
});
});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfcmVhY3QiLCJfaW50ZXJvcFJlcXVpcmVEZWZhdWx0IiwicmVxdWlyZSIsIl91c2VDbG91ZExpc3RQcm92aWRlciIsIl9jb21wb25lbnRKZXN0VXRpbHMiLCJfc2hhcmVNYXBNb2RhbCIsIl9zcmMiLCJfcmVhY3QyIiwiX3N0eWxlZENvbXBvbmVudHMiLCJfcmVhY3RJbnRsIiwiX3NyYzIiLCJfc3JjMyIsIm93bktleXMiLCJlIiwiciIsInQiLCJPYmplY3QiLCJrZXlzIiwiZ2V0T3duUHJvcGVydHlTeW1ib2xzIiwibyIsImZpbHRlciIsImdldE93blByb3BlcnR5RGVzY3JpcHRvciIsImVudW1lcmFibGUiLCJwdXNoIiwiYXBwbHkiLCJfb2JqZWN0U3ByZWFkIiwiYXJndW1lbnRzIiwibGVuZ3RoIiwiZm9yRWFjaCIsIl9kZWZpbmVQcm9wZXJ0eTIiLCJnZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3JzIiwiZGVmaW5lUHJvcGVydGllcyIsImRlZmluZVByb3BlcnR5IiwiamVzdCIsIm1vY2siLCJ1c2VDbG91ZExpc3RQcm92aWRlciIsImZuIiwibW9ja0ltcGxlbWVudGF0aW9uIiwicHJvdmlkZXIiLCJzZXRQcm92aWRlciIs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