chore(frontend): Spelling (#25452)
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> Co-authored-by: Geido <60598000+geido@users.noreply.github.com> Co-authored-by: Evan Rusackas <evan@preset.io>
This commit is contained in:
parent
dd4f223a39
commit
d0c9cde0ba
|
|
@ -225,11 +225,11 @@ function setFilterBarOrientation(orientation: 'vertical' | 'horizontal') {
|
|||
}
|
||||
}
|
||||
|
||||
function openMoreFilters(intercetFilterState = true) {
|
||||
function openMoreFilters(waitFilterState = true) {
|
||||
interceptFilterState();
|
||||
cy.getBySel('dropdown-container-btn').click();
|
||||
|
||||
if (intercetFilterState) {
|
||||
if (waitFilterState) {
|
||||
cy.wait('@postFilterState');
|
||||
}
|
||||
}
|
||||
|
|
@ -568,7 +568,7 @@ describe('Native filters', () => {
|
|||
]);
|
||||
enterNativeFilterEditModal();
|
||||
selectFilter(1);
|
||||
// Select dependdent option and auto use platform for genre
|
||||
// Select dependent option and auto use platform for genre
|
||||
cy.get(nativeFilters.filterConfigurationSections.displayedSection).within(
|
||||
() => {
|
||||
cy.contains('Values are dependent on other filters')
|
||||
|
|
|
|||
|
|
@ -204,9 +204,9 @@ export function expandFilterOnLeftPanel() {
|
|||
}
|
||||
|
||||
/** ************************************************************************
|
||||
* Collapes Native Filter from the left panel on dashboard
|
||||
* Collapses Native Filter from the left panel on dashboard
|
||||
* @returns {None}
|
||||
* @summary helper for collape native filter
|
||||
* @summary helper for collapse native filter
|
||||
************************************************************************* */
|
||||
export function collapseFilterOnLeftPanel() {
|
||||
cy.get(nativeFilters.filterFromDashboardView.collapse)
|
||||
|
|
@ -429,7 +429,7 @@ export function undoDeleteNativeFilter() {
|
|||
|
||||
/** ************************************************************************
|
||||
* Check Native Filter tooltip content
|
||||
* @param index: tooltip indext to check
|
||||
* @param index: tooltip index to check
|
||||
* @param value: tooltip value to check
|
||||
* @return {null}
|
||||
* @summary helper for checking native filter tooltip content by index
|
||||
|
|
@ -475,10 +475,10 @@ export function applyAdvancedTimeRangeFilterOnDashboard(
|
|||
}
|
||||
|
||||
/** ************************************************************************
|
||||
* Input default valule in Native filter in filter settings
|
||||
* Input default value in Native filter in filter settings
|
||||
* @param defaultValue: default value for native filter
|
||||
* @return {null}
|
||||
* @summary helper for input default valule in Native filter in filter settings
|
||||
* @summary helper for input default value in Native filter in filter settings
|
||||
************************************************************************* */
|
||||
export function inputNativeFilterDefaultValue(
|
||||
defaultValue: string,
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ describe.skip('SqlLab datasource panel', () => {
|
|||
cy.visit('/sqllab');
|
||||
});
|
||||
|
||||
// TODO the test bellow is flaky, and has been disabled for the time being
|
||||
// TODO the test below is flaky, and has been disabled for the time being
|
||||
// (notice the `it.skip`)
|
||||
it('creates a table preview when a database, schema, and table are selected', () => {
|
||||
cy.intercept('/superset/table/**').as('tableMetadata');
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ const { getConfig, setConfig } = failOnConsoleError({
|
|||
],
|
||||
});
|
||||
|
||||
// Set infividual tests to allow certain console erros to NOT fail, e.g
|
||||
// Set individual tests to allow certain console errors to NOT fail, e.g
|
||||
// cy.allowConsoleErrors(['foo', /^some bar-regex.*/]);
|
||||
// This will be reset between tests.
|
||||
Cypress.Commands.addAll({
|
||||
|
|
|
|||
|
|
@ -26,4 +26,4 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|||
|
||||
### Features
|
||||
|
||||
- add certified icon to columoption ([#1330](https://github.com/apache-superset/superset-ui/issues/1330)) ([a415c41](https://github.com/apache-superset/superset-ui/commit/a415c413954bc9c093ab5dfde62d458cf3224073))
|
||||
- add certified icon to columnoption ([#1330](https://github.com/apache-superset/superset-ui/issues/1330)) ([a415c41](https://github.com/apache-superset/superset-ui/commit/a415c413954bc9c093ab5dfde62d458cf3224073))
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ test('returns empty array if timeseries_limit_metric and x_axis_sort are include
|
|||
).toEqual([]);
|
||||
});
|
||||
|
||||
test('returns emoty array if timeseries_limit_metric is an empty array', () => {
|
||||
test('returns empty array if timeseries_limit_metric is an empty array', () => {
|
||||
expect(
|
||||
extractExtraMetrics({
|
||||
...baseFormData,
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ describe('defineSavedMetrics', () => {
|
|||
expect(defineSavedMetrics({ ...dataset, metrics: undefined })).toEqual([]);
|
||||
});
|
||||
|
||||
it('returns default saved metrics if souce is a Query', () => {
|
||||
it('returns default saved metrics if source is a Query', () => {
|
||||
expect(defineSavedMetrics(testQuery as QueryResponse)).toEqual(
|
||||
DEFAULT_METRICS,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ export enum QueryState {
|
|||
TimedOut = 'timed_out',
|
||||
}
|
||||
|
||||
// Inidcates a Query's state is still processing
|
||||
// Indicates a Query's state is still processing
|
||||
export const runningQueryStateList: QueryState[] = [
|
||||
QueryState.Running,
|
||||
QueryState.Started,
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ export type QueryFormExtraFilter = {
|
|||
}
|
||||
);
|
||||
|
||||
/** These properties will be appended to those pre-existing in the form data/query object */
|
||||
/** These properties will be appended to those preexisting in the form data/query object */
|
||||
export type ExtraFormDataAppend = {
|
||||
adhoc_filters?: AdhocFilter[];
|
||||
filters?: QueryObjectFilterClause[];
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ describe('callApi()', () => {
|
|||
const unstringified = (calls[0][1] as RequestInit).body as FormData;
|
||||
const hasCorruptKey = unstringified.has('corrupt');
|
||||
expect(hasCorruptKey).toBeFalsy();
|
||||
// When a corrupt attribute is encountred, a console.error call is made with info about the corrupt attribute
|
||||
// When a corrupt attribute is encountered, a console.error call is made with info about the corrupt attribute
|
||||
// eslint-disable-next-line no-console
|
||||
expect(console.error).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
import { overrideExtraFormData } from '../../src/query/processExtraFormData';
|
||||
|
||||
describe('overrideExtraFormData', () => {
|
||||
it('should assign allowed non-existent value', () => {
|
||||
it('should assign allowed nonexistent value', () => {
|
||||
expect(
|
||||
overrideExtraFormData(
|
||||
{
|
||||
|
|
@ -82,7 +82,7 @@ describe('overrideExtraFormData', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it('should override pre-existing extra value', () => {
|
||||
it('should override preexisting extra value', () => {
|
||||
expect(
|
||||
overrideExtraFormData(
|
||||
{
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ export const basicData = {
|
|||
data: [
|
||||
{
|
||||
location: 'AMEA',
|
||||
program_language: 'Javscript',
|
||||
program_language: 'JavaScript',
|
||||
Count: 134,
|
||||
'Most Recent Data': '2022-07-25 13:00:00.000',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ export const getLayer: getLayerType<unknown> = (
|
|||
?.reverse() as Color[];
|
||||
|
||||
return new HeatmapLayer({
|
||||
id: `heatmp-layer-${fd.slice_id}` as const,
|
||||
id: `heatmap-layer-${fd.slice_id}` as const,
|
||||
data,
|
||||
intensity,
|
||||
radiusPixels,
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ const config: ControlPanelConfig = {
|
|||
name: 'intensity',
|
||||
config: {
|
||||
type: 'SelectControl',
|
||||
label: t('Intesity'),
|
||||
label: t('Intensity'),
|
||||
description: t(
|
||||
'Intensity is the value multiplied by the weight to obtain the final weight',
|
||||
),
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ export const showControls: CustomControlItem = {
|
|||
default: false,
|
||||
description: t(
|
||||
'Whether to show extra controls or not. Extra controls ' +
|
||||
'include things like making mulitBar charts stacked ' +
|
||||
'include things like making multiBar charts stacked ' +
|
||||
'or side by side.',
|
||||
),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ const config: ControlPanelConfig = {
|
|||
default: false,
|
||||
description: t(
|
||||
'Whether to show extra controls or not. Extra controls ' +
|
||||
'include things like making mulitBar charts stacked ' +
|
||||
'include things like making multiBar charts stacked ' +
|
||||
'or side by side.',
|
||||
),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ describe('EchartsGraph transformProps', () => {
|
|||
);
|
||||
});
|
||||
|
||||
it('should transform chart props for viz with category and falsey normalization', () => {
|
||||
it('should transform chart props for viz with category and falsy normalization', () => {
|
||||
const formData: SqlaFormData = {
|
||||
colorScheme: 'bnbColors',
|
||||
datasource: '3__table',
|
||||
|
|
|
|||
|
|
@ -1038,7 +1038,7 @@ export default function TableChart<D extends DataRecord = DataRecord>(
|
|||
|
||||
useLayoutEffect(() => {
|
||||
// After initial load the table should resize only when the new sizes
|
||||
// Are not only scrollbar updates, otherwise, the table would twicth
|
||||
// Are not only scrollbar updates, otherwise, the table would twitch
|
||||
const scrollBarSize = getScrollBarSize();
|
||||
const { width: tableWidth, height: tableHeight } = tableSize;
|
||||
// Table is increasing its original size
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ test('returns server error description', async () => {
|
|||
);
|
||||
});
|
||||
|
||||
test('returns sesion expire description when CSRF token expired', async () => {
|
||||
test('returns session expire description when CSRF token expired', async () => {
|
||||
const errorMessage = 'CSRF token expired';
|
||||
fetchMock.post(
|
||||
queryValidationApiRoute,
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ describe('QueryAutoRefresh', () => {
|
|||
expect(fetchMock.calls(refreshApi)).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('Does not fail and attempts to refresh when given pending query and invlaid query', async () => {
|
||||
it('Does not fail and attempts to refresh when given pending query and invalid query', async () => {
|
||||
const store = mockStore();
|
||||
fetchMock.get(refreshApi, {
|
||||
result: [
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ export interface QueryAutoRefreshProps {
|
|||
queriesLastUpdate: number;
|
||||
}
|
||||
|
||||
// returns true if the Query.state matches one of the specifc values indicating the query is still processing on server
|
||||
// returns true if the Query.state matches one of the specific values indicating the query is still processing on server
|
||||
export const isQueryRunning = (q: Query): boolean =>
|
||||
runningQueryStateList.includes(q?.state);
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import { ISaveableDatasource } from 'src/SqlLab/components/SaveDatasetModal';
|
|||
|
||||
export const mockedActions = sinon.stub({ ...actions });
|
||||
|
||||
export const alert = { bsStyle: 'danger', msg: 'Ooops', id: 'lksvmcx32' };
|
||||
export const alert = { bsStyle: 'danger', msg: 'Oops', id: 'lksvmcx32' };
|
||||
export const table = {
|
||||
dbId: 1,
|
||||
selectStar: 'SELECT * FROM ab_user',
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ test('does not handle onClicks when disabled', () => {
|
|||
// test stories from the storybook!
|
||||
test('All the sorybook gallery variants mount', () => {
|
||||
const { getAllByRole } = render(<ButtonGallery />);
|
||||
|
||||
const permutationCount =
|
||||
Object.values(buttonStyles.options).filter(o => o).length *
|
||||
Object.values(buttonSizes.options).length;
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ export default function DrillByModal({
|
|||
config.column,
|
||||
config.groupbyFieldName,
|
||||
);
|
||||
acc.overridenGroupbyFields.add(config.groupbyFieldName);
|
||||
acc.overriddenGroupbyFields.add(config.groupbyFieldName);
|
||||
}
|
||||
const adhocFilterFieldName =
|
||||
config?.adhocFilterFieldName || DEFAULT_ADHOC_FILTER_FIELD_NAME;
|
||||
|
|
@ -241,14 +241,14 @@ export default function DrillByModal({
|
|||
simpleFilterToAdhoc(filter),
|
||||
),
|
||||
];
|
||||
acc.overridenAdhocFilterFields.add(adhocFilterFieldName);
|
||||
acc.overriddenAdhocFilterFields.add(adhocFilterFieldName);
|
||||
|
||||
return acc;
|
||||
},
|
||||
{
|
||||
formData: {},
|
||||
overridenGroupbyFields: new Set<string>(),
|
||||
overridenAdhocFilterFields: new Set<string>(),
|
||||
overriddenGroupbyFields: new Set<string>(),
|
||||
overriddenAdhocFilterFields: new Set<string>(),
|
||||
},
|
||||
),
|
||||
[getNewGroupby],
|
||||
|
|
@ -288,14 +288,14 @@ export default function DrillByModal({
|
|||
if (index === 0) {
|
||||
return formData;
|
||||
}
|
||||
const { formData: overrideFormData, overridenAdhocFilterFields } =
|
||||
const { formData: overrideFormData, overriddenAdhocFilterFields } =
|
||||
getFormDataChangesFromConfigs(drillByConfigs.slice(0, index));
|
||||
|
||||
const newFormData = {
|
||||
...formData,
|
||||
...overrideFormData,
|
||||
};
|
||||
overridenAdhocFilterFields.forEach(adhocFilterField => ({
|
||||
overriddenAdhocFilterFields.forEach(adhocFilterField => ({
|
||||
...newFormData,
|
||||
[adhocFilterField]: [
|
||||
...formData[adhocFilterField],
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ export function useListViewState({
|
|||
);
|
||||
|
||||
const columnsWithSelect = useMemo(() => {
|
||||
// add exact filter type so filters with falsey values are not filtered out
|
||||
// add exact filter type so filters with falsy values are not filtered out
|
||||
const columnsWithFilter = columns.map(f => ({ ...f, filter: 'exact' }));
|
||||
return bulkSelectMode
|
||||
? [bulkSelectColumnConfig, ...columnsWithFilter]
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ test('renders underlined text and emits event when clickable', () => {
|
|||
expect(style.textDecoration).toBe('underline');
|
||||
});
|
||||
|
||||
test('renders clicable items with blue icons when the bar is collapsed', async () => {
|
||||
test('renders clickable items with blue icons when the bar is collapsed', async () => {
|
||||
await runWithBarCollapsed(async () => {
|
||||
const onClick = jest.fn();
|
||||
const items = [{ ...ITEMS[0], onClick }, ITEMS[1]];
|
||||
|
|
|
|||
|
|
@ -109,8 +109,8 @@ const StyledItem = styled.div<{
|
|||
`}
|
||||
`;
|
||||
|
||||
// Make sure big tootips are truncated
|
||||
const TootipContent = styled.div`
|
||||
// Make sure big tooltips are truncated
|
||||
const TooltipContent = styled.div`
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 20;
|
||||
-webkit-box-orient: vertical;
|
||||
|
|
@ -161,7 +161,7 @@ const Item = ({
|
|||
return isTruncated || collapsed || (tooltip && tooltip !== title) ? (
|
||||
<Tooltip
|
||||
placement={tooltipPlacement}
|
||||
title={<TootipContent>{tooltip}</TootipContent>}
|
||||
title={<TooltipContent>{tooltip}</TooltipContent>}
|
||||
>
|
||||
{content}
|
||||
</Tooltip>
|
||||
|
|
|
|||
|
|
@ -121,14 +121,14 @@ const basicData: BasicData[] = [
|
|||
{
|
||||
key: 3,
|
||||
name: '128 GB SSD',
|
||||
category: 'Hardrive',
|
||||
category: 'Harddrive',
|
||||
price: 49.99,
|
||||
description: 'Reliable and fast data storage',
|
||||
},
|
||||
{
|
||||
key: 4,
|
||||
name: '128 GB SSD',
|
||||
category: 'Hardrive',
|
||||
category: 'Harddrive',
|
||||
price: 49.99,
|
||||
description: 'Reliable and fast data storage',
|
||||
},
|
||||
|
|
@ -149,14 +149,14 @@ const basicData: BasicData[] = [
|
|||
{
|
||||
key: 7,
|
||||
name: '256 GB SSD',
|
||||
category: 'Hardrive',
|
||||
category: 'Harddrive',
|
||||
price: 175,
|
||||
description: 'Reliable and fast data storage',
|
||||
},
|
||||
{
|
||||
key: 8,
|
||||
name: '1 TB SSD',
|
||||
category: 'Hardrive',
|
||||
category: 'Harddrive',
|
||||
price: 349.99,
|
||||
description: 'Reliable and fast data storage',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ const basicData: = [
|
|||
{
|
||||
key: 3,
|
||||
name: '128 GB SSD',
|
||||
category: 'Hardrive',
|
||||
category: 'Harddrive',
|
||||
price: '49.99'
|
||||
description: 'Reliable and fast data storage',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ test('alphabeticalSort bad inputs no errors', () => {
|
|||
// incorrect non-object values
|
||||
// @ts-ignore
|
||||
expect(alphabeticalSort('name', 3, [])).toBe(undefined);
|
||||
// incorrect object values without specificed key
|
||||
// incorrect object values without specified key
|
||||
expect(alphabeticalSort('name', {}, {})).toBe(undefined);
|
||||
// Object as value for name when it should be a string
|
||||
expect(
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ test('use the default timezone when an invalid timezone is provided', async () =
|
|||
expect(onTimezoneChange).toHaveBeenLastCalledWith('Africa/Abidjan');
|
||||
});
|
||||
|
||||
test('render timezones in correct oder for standard time', async () => {
|
||||
test('render timezones in correct order for standard time', async () => {
|
||||
const TimezoneSelector = await loadComponent('2022-01-01');
|
||||
const onTimezoneChange = jest.fn();
|
||||
render(
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import userEvent from '@testing-library/user-event';
|
|||
import TooltipParagraph from '.';
|
||||
|
||||
test('starts hidden with default props', () => {
|
||||
render(<TooltipParagraph>This is tootlip description.</TooltipParagraph>);
|
||||
render(<TooltipParagraph>This is tooltip description.</TooltipParagraph>);
|
||||
expect(screen.queryByRole('tooltip')).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ export {
|
|||
/*
|
||||
* Components that conflict with the ones in src/components.
|
||||
* We should try to avoid using Ant Design directly. The components
|
||||
* listed bellow may need review. Avoid incrementing this list by using
|
||||
* listed below may need review. Avoid incrementing this list by using
|
||||
* or extending the components in src/components.
|
||||
*/
|
||||
export {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ jest.mock('src/dashboard/actions/dashboardState', () => ({
|
|||
}));
|
||||
jest.mock('src/components/ResizableSidebar/useStoredSidebarWidth');
|
||||
|
||||
// mock following dependant components to fix the prop warnings
|
||||
// mock following dependent components to fix the prop warnings
|
||||
jest.mock('src/components/Select/Select', () => () => (
|
||||
<div data-test="mock-select" />
|
||||
));
|
||||
|
|
@ -169,7 +169,7 @@ describe('DashboardBuilder', () => {
|
|||
const expectedCount =
|
||||
undoableDashboardLayoutWithTabs.present.TABS_ID.children.length;
|
||||
const tabPanels = within(parentSize).getAllByRole('tabpanel', {
|
||||
// to include invisiable tab panels
|
||||
// to include invisible tab panels
|
||||
hidden: true,
|
||||
});
|
||||
expect(tabPanels.length).toBe(expectedCount);
|
||||
|
|
@ -190,7 +190,7 @@ describe('DashboardBuilder', () => {
|
|||
const expectedCount =
|
||||
undoableDashboardLayoutWithTabs.present.TABS_ID.children.length;
|
||||
const tabPanels = within(parentSize).getAllByRole('tabpanel', {
|
||||
// to include invisiable tab panels
|
||||
// to include invisible tab panels
|
||||
hidden: true,
|
||||
});
|
||||
expect(tabPanels.length).toBe(expectedCount);
|
||||
|
|
|
|||
|
|
@ -360,7 +360,7 @@ test('should show all roles', async () => {
|
|||
spyIsFeatureEnabled.mockReturnValue(true);
|
||||
|
||||
const props = createProps();
|
||||
const propsWithDashboardIndo = { ...props, dashboardInfo };
|
||||
const propsWithDashboardInfo = { ...props, dashboardInfo };
|
||||
|
||||
const open = () => waitFor(() => userEvent.click(getSelect()));
|
||||
const getSelect = () =>
|
||||
|
|
@ -372,7 +372,7 @@ test('should show all roles', async () => {
|
|||
const findAllSelectOptions = () =>
|
||||
waitFor(() => getElementsByClassName('.ant-select-item-option-content'));
|
||||
|
||||
render(<PropertiesModal {...propsWithDashboardIndo} />, {
|
||||
render(<PropertiesModal {...propsWithDashboardInfo} />, {
|
||||
useRedux: true,
|
||||
});
|
||||
|
||||
|
|
@ -393,7 +393,7 @@ test('should show active owners with dashboard rbac', async () => {
|
|||
spyIsFeatureEnabled.mockReturnValue(true);
|
||||
|
||||
const props = createProps();
|
||||
const propsWithDashboardIndo = { ...props, dashboardInfo };
|
||||
const propsWithDashboardInfo = { ...props, dashboardInfo };
|
||||
|
||||
const open = () => waitFor(() => userEvent.click(getSelect()));
|
||||
const getSelect = () =>
|
||||
|
|
@ -405,7 +405,7 @@ test('should show active owners with dashboard rbac', async () => {
|
|||
const findAllSelectOptions = () =>
|
||||
waitFor(() => getElementsByClassName('.ant-select-item-option-content'));
|
||||
|
||||
render(<PropertiesModal {...propsWithDashboardIndo} />, {
|
||||
render(<PropertiesModal {...propsWithDashboardInfo} />, {
|
||||
useRedux: true,
|
||||
});
|
||||
|
||||
|
|
@ -426,7 +426,7 @@ test('should show active owners without dashboard rbac', async () => {
|
|||
spyIsFeatureEnabled.mockReturnValue(false);
|
||||
|
||||
const props = createProps();
|
||||
const propsWithDashboardIndo = { ...props, dashboardInfo };
|
||||
const propsWithDashboardInfo = { ...props, dashboardInfo };
|
||||
|
||||
const open = () => waitFor(() => userEvent.click(getSelect()));
|
||||
const getSelect = () =>
|
||||
|
|
@ -438,7 +438,7 @@ test('should show active owners without dashboard rbac', async () => {
|
|||
const findAllSelectOptions = () =>
|
||||
waitFor(() => getElementsByClassName('.ant-select-item-option-content'));
|
||||
|
||||
render(<PropertiesModal {...propsWithDashboardIndo} />, {
|
||||
render(<PropertiesModal {...propsWithDashboardInfo} />, {
|
||||
useRedux: true,
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -356,7 +356,7 @@ test('Should render "annotationsError"', () => {
|
|||
render(<SliceHeader {...props} />, { useRedux: true, useRouter: true });
|
||||
expect(
|
||||
screen.getByRole('img', {
|
||||
name: 'One ore more annotation layers failed loading.',
|
||||
name: 'One or more annotation layers failed loading.',
|
||||
}),
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
|
|
@ -368,7 +368,7 @@ test('Should not render "annotationsError" and "annotationsLoading"', () => {
|
|||
render(<SliceHeader {...props} />, { useRedux: true, useRouter: true });
|
||||
expect(
|
||||
screen.queryByRole('img', {
|
||||
name: 'One ore more annotation layers failed loading.',
|
||||
name: 'One or more annotation layers failed loading.',
|
||||
}),
|
||||
).not.toBeInTheDocument();
|
||||
expect(
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ type SliceHeaderProps = SliceHeaderControlsProps & {
|
|||
};
|
||||
|
||||
const annotationsLoading = t('Annotation layers are still loading.');
|
||||
const annotationsError = t('One ore more annotation layers failed loading.');
|
||||
const annotationsError = t('One or more annotation layers failed loading.');
|
||||
const CrossFilterIcon = styled(Icons.ApartmentOutlined)`
|
||||
${({ theme }) => `
|
||||
cursor: default;
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ class Chart extends Component {
|
|||
return true;
|
||||
}
|
||||
|
||||
// `cacheBusterProp` is jected by react-hot-loader
|
||||
// `cacheBusterProp` is injected by react-hot-loader
|
||||
return this.props.cacheBusterProp !== nextProps.cacheBusterProp;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -789,7 +789,7 @@ const FiltersConfigForm = (
|
|||
filterValues={(column: Column) => !!column.is_dttm}
|
||||
datasetId={datasetId}
|
||||
onChange={column => {
|
||||
// We need reset default value when when column changed
|
||||
// We need reset default value when column changed
|
||||
setNativeFilterFieldValues(form, filterId, {
|
||||
granularity_sqla: column,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ test('Clicking on checkbox', () => {
|
|||
expect(props.forceUpdate).toBeCalled();
|
||||
});
|
||||
|
||||
test('Clicking on checkbox when resetConfig:flase', () => {
|
||||
test('Clicking on checkbox when resetConfig:false', () => {
|
||||
const props = createProps();
|
||||
(getControlItems as jest.Mock).mockReturnValue([
|
||||
{ name: 'name_1', config: { renderTrigger: true, resetConfig: false } },
|
||||
|
|
|
|||
|
|
@ -379,7 +379,7 @@ test('deletes a filter', async () => {
|
|||
onSave,
|
||||
});
|
||||
const removeButtons = screen.getAllByRole('img', { name: 'trash' });
|
||||
// remove NATIVE_FILTER-3 which isn't a dependancy of any other filter
|
||||
// remove NATIVE_FILTER-3 which isn't a dependency of any other filter
|
||||
userEvent.click(removeButtons[2]);
|
||||
userEvent.click(screen.getByRole('button', { name: SAVE_REGEX }));
|
||||
await waitFor(() =>
|
||||
|
|
@ -420,7 +420,7 @@ test('deletes a filter including dependencies', async () => {
|
|||
onSave,
|
||||
});
|
||||
const removeButtons = screen.getAllByRole('img', { name: 'trash' });
|
||||
// remove NATIVE_FILTER-2 which is a dependancy of NATIVE_FILTER-1
|
||||
// remove NATIVE_FILTER-2 which is a dependency of NATIVE_FILTER-1
|
||||
userEvent.click(removeButtons[1]);
|
||||
userEvent.click(screen.getByRole('button', { name: SAVE_REGEX }));
|
||||
await waitFor(() =>
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ describe('getChartIdsFromLayout', () => {
|
|||
windowSpy.mockImplementation(() => ({
|
||||
location: {
|
||||
origin: 'https://localhost',
|
||||
search: '?unkown_param=value',
|
||||
search: '?unknown_param=value',
|
||||
},
|
||||
}));
|
||||
const urlWithStandalone = getDashboardUrl({
|
||||
|
|
@ -97,7 +97,7 @@ describe('getChartIdsFromLayout', () => {
|
|||
standalone: DashboardStandaloneMode.HideNav,
|
||||
});
|
||||
expect(urlWithStandalone).toBe(
|
||||
`path?unkown_param=value&standalone=${DashboardStandaloneMode.HideNav}`,
|
||||
`path?unknown_param=value&standalone=${DashboardStandaloneMode.HideNav}`,
|
||||
);
|
||||
windowSpy.mockRestore();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ const SAVE_AS_DATASET = 'save_as_dataset';
|
|||
// a tooltip for user can see the full name by hovering over the visually truncated string in UI
|
||||
const VISIBLE_TITLE_LENGTH = 25;
|
||||
|
||||
// Assign icon for each DatasourceType. If no icon assingment is found in the lookup, no icon will render
|
||||
// Assign icon for each DatasourceType. If no icon assignment is found in the lookup, no icon will render
|
||||
export const datasourceIconLookup = {
|
||||
[DatasourceType.Query]: (
|
||||
<Icons.ConsoleSqlOutlined className="datasource-svg" />
|
||||
|
|
@ -188,7 +188,7 @@ class DatasourceControl extends PureComponent {
|
|||
const { columns } = datasource;
|
||||
// the current granularity_sqla might not be a temporal column anymore
|
||||
const timeCol = this.props.form_data?.granularity_sqla;
|
||||
const isGranularitySqalTemporal = columns.find(
|
||||
const isGranularitySqlaTemporal = columns.find(
|
||||
({ column_name }) => column_name === timeCol,
|
||||
)?.is_dttm;
|
||||
// the current main_dttm_col might not be a temporal column anymore
|
||||
|
|
@ -198,7 +198,7 @@ class DatasourceControl extends PureComponent {
|
|||
|
||||
// if the current granularity_sqla is empty or it is not a temporal column anymore
|
||||
// let's update the control value
|
||||
if (datasource.type === 'table' && !isGranularitySqalTemporal) {
|
||||
if (datasource.type === 'table' && !isGranularitySqlaTemporal) {
|
||||
const temporalColumn = isDefaultTemporal
|
||||
? defaultTemporalColumn
|
||||
: temporalColumns?.[0];
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ describe('controlUtils', () => {
|
|||
expect(control?.value).toBeNull();
|
||||
});
|
||||
|
||||
it('returns null for non-existent field', () => {
|
||||
it('returns null for nonexistent field', () => {
|
||||
const control = getControlState('NON_EXISTENT', 'table', state);
|
||||
expect(control).toBeNull();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ export class StandardizedFormData {
|
|||
controlsState: ControlStateMapping;
|
||||
} {
|
||||
/*
|
||||
* Transfrom form_data between different viz. Return new form_data and controlsState.
|
||||
* Transform form_data between different viz. Return new form_data and controlsState.
|
||||
* 1. get memorized form_data by viz type or get previous form_data
|
||||
* 2. collect public control values
|
||||
* 3. generate initial targetControlsState
|
||||
|
|
|
|||
|
|
@ -63,8 +63,8 @@ export interface IDatabaseTable {
|
|||
}
|
||||
|
||||
/**
|
||||
* Checks if a given item matches the isIDatabsetTable interface
|
||||
* @param item Object to check if it matches the isIDatabsetTable interface
|
||||
* Checks if a given item matches the isIDatabaseTable interface
|
||||
* @param item Object to check if it matches the isIDatabaseTable interface
|
||||
* @returns boolean true if matches interface
|
||||
*/
|
||||
export const isIDatabaseTable = (item: any): boolean => {
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ test('searches for a table name', async () => {
|
|||
});
|
||||
});
|
||||
|
||||
test('renders a warning icon when a table name has a pre-existing dataset', async () => {
|
||||
test('renders a warning icon when a table name has a preexisting dataset', async () => {
|
||||
render(
|
||||
<LeftPanel
|
||||
setDataset={mockFun}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ const useGetDatasetRelatedCounts = (id: string) => {
|
|||
);
|
||||
|
||||
useEffect(() => {
|
||||
// Todo: this useEffect should be used to call all count methods conncurently
|
||||
// Todo: this useEffect should be used to call all count methods concurrently
|
||||
// when we populate data for the new tabs. For right separating out this
|
||||
// api call for building the usage page.
|
||||
if (id) {
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ const RightMenu = ({
|
|||
SupersetClient.get({
|
||||
endpoint: `/api/v1/database/?q=${rison.encode(payload)}`,
|
||||
}).then(({ json }: Record<string, any>) => {
|
||||
// There might be some existings Gsheets and Clickhouse DBs
|
||||
// There might be some existing Gsheets and Clickhouse DBs
|
||||
// with allow_file_upload set as True which is not possible from now on
|
||||
const allowedDatabasesWithFileUpload =
|
||||
json?.result?.filter(
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ describe('QueryPreviewModal', () => {
|
|||
await waitForComponentToPaint(wrapper);
|
||||
});
|
||||
|
||||
it('renders a SynxHighlighter', () => {
|
||||
it('renders a SyntaxHighlighter', () => {
|
||||
expect(wrapper.find(SyntaxHighlighter)).toExist();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ export interface RowLevelSecurityModalProps {
|
|||
show: boolean;
|
||||
}
|
||||
|
||||
const DEAFULT_RULE = {
|
||||
const DEFAULT_RULE = {
|
||||
name: '',
|
||||
filter_type: FilterType.Regular,
|
||||
tables: [],
|
||||
|
|
@ -133,7 +133,7 @@ function RowLevelSecurityModal(props: RowLevelSecurityModalProps) {
|
|||
const { rule, addDangerToast, addSuccessToast, onHide, show } = props;
|
||||
|
||||
const [currentRule, setCurrentRule] = useState<RLSObject>({
|
||||
...DEAFULT_RULE,
|
||||
...DEFAULT_RULE,
|
||||
});
|
||||
const [disableSave, setDisableSave] = useState<boolean>(true);
|
||||
|
||||
|
|
@ -204,7 +204,7 @@ function RowLevelSecurityModal(props: RowLevelSecurityModalProps) {
|
|||
// initialize
|
||||
useEffect(() => {
|
||||
if (!isEditMode) {
|
||||
setCurrentRule({ ...DEAFULT_RULE });
|
||||
setCurrentRule({ ...DEFAULT_RULE });
|
||||
} else if (rule?.id !== null && !loading && !fetchError) {
|
||||
fetchResource(rule.id as number);
|
||||
}
|
||||
|
|
@ -249,7 +249,7 @@ function RowLevelSecurityModal(props: RowLevelSecurityModalProps) {
|
|||
|
||||
const hide = () => {
|
||||
clearError();
|
||||
setCurrentRule({ ...DEAFULT_RULE });
|
||||
setCurrentRule({ ...DEFAULT_RULE });
|
||||
onHide();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ export enum ResourceStatus {
|
|||
export type Resource<T> = LoadingState | CompleteState<T> | ErrorState;
|
||||
|
||||
// Trying out something a little different: a separate type per status.
|
||||
// This should let Typescript know whether a Resource has a result or error.
|
||||
// It's possible that I'm expecting too much from Typescript here.
|
||||
// This should let TypeScript know whether a Resource has a result or error.
|
||||
// It's possible that I'm expecting too much from TypeScript here.
|
||||
// If this ends up causing problems, we can change the type to:
|
||||
//
|
||||
// export type Resource<T> = {
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ export type TableMetaData = {
|
|||
columns: Column[];
|
||||
};
|
||||
|
||||
type TableMetadataReponse = {
|
||||
type TableMetadataResponse = {
|
||||
json: TableMetaData;
|
||||
response: Response;
|
||||
};
|
||||
|
|
@ -130,7 +130,7 @@ const tableApi = api.injectEndpoints({
|
|||
catalog,
|
||||
schema,
|
||||
})}`,
|
||||
transformResponse: ({ json }: TableMetadataReponse) => json,
|
||||
transformResponse: ({ json }: TableMetadataResponse) => json,
|
||||
}),
|
||||
}),
|
||||
tableExtendedMetadata: builder.query<
|
||||
|
|
|
|||
|
|
@ -281,7 +281,7 @@ function DatabaseList({
|
|||
SupersetClient.get({
|
||||
endpoint: `/api/v1/database/?q=${rison.encode(payload)}`,
|
||||
}).then(({ json }: Record<string, any>) => {
|
||||
// There might be some existings Gsheets and Clickhouse DBs
|
||||
// There might be some existing Gsheets and Clickhouse DBs
|
||||
// with allow_file_upload set as True which is not possible from now on
|
||||
const allowedDatabasesWithFileUpload =
|
||||
json?.result?.filter(
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ describe('DatasetList', () => {
|
|||
).toBeFalsy();
|
||||
act(() => {
|
||||
wrapper
|
||||
.find('#duplicate-action-tooltop')
|
||||
.find('#duplicate-action-tooltip')
|
||||
.at(0)
|
||||
.find('.action-button')
|
||||
.props()
|
||||
|
|
@ -212,7 +212,7 @@ describe('DatasetList', () => {
|
|||
await waitForComponentToPaint(wrapper);
|
||||
await act(async () => {
|
||||
wrapper
|
||||
.find('#duplicate-action-tooltop')
|
||||
.find('#duplicate-action-tooltip')
|
||||
.at(0)
|
||||
.find('.action-button')
|
||||
.props()
|
||||
|
|
|
|||
|
|
@ -478,7 +478,7 @@ const DatasetList: FunctionComponent<DatasetListProps> = ({
|
|||
)}
|
||||
{canDuplicate && original.kind === 'virtual' && (
|
||||
<Tooltip
|
||||
id="duplicate-action-tooltop"
|
||||
id="duplicate-action-tooltip"
|
||||
title={t('Duplicate')}
|
||||
placement="bottom"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -197,14 +197,14 @@ describe('RuleList RTL', () => {
|
|||
expect(table).toBeInTheDocument();
|
||||
|
||||
const nameColumn = await within(table).findByText('Name');
|
||||
const fitlerTypeColumn = await within(table).findByText('Filter Type');
|
||||
const filterTypeColumn = await within(table).findByText('Filter Type');
|
||||
const groupKeyColumn = await within(table).findByText('Group Key');
|
||||
const clauseColumn = await within(table).findByText('Clause');
|
||||
const modifiedColumn = await within(table).findByText('Last modified');
|
||||
const actionsColumn = await within(table).findByText('Actions');
|
||||
|
||||
expect(nameColumn).toBeInTheDocument();
|
||||
expect(fitlerTypeColumn).toBeInTheDocument();
|
||||
expect(filterTypeColumn).toBeInTheDocument();
|
||||
expect(groupKeyColumn).toBeInTheDocument();
|
||||
expect(clauseColumn).toBeInTheDocument();
|
||||
expect(modifiedColumn).toBeInTheDocument();
|
||||
|
|
|
|||
|
|
@ -28,6 +28,6 @@ describe('isFrontendRoute', () => {
|
|||
});
|
||||
|
||||
it('returns false if a route does not match', () => {
|
||||
expect(isFrontendRoute('/non-existent/path/')).toBe(false);
|
||||
expect(isFrontendRoute('/nonexistent/path/')).toBe(false);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ const reducers = {
|
|||
explore,
|
||||
};
|
||||
|
||||
/* In some cases the jinja template injects two seperate React apps into basic.html
|
||||
/* In some cases the jinja template injects two separate React apps into basic.html
|
||||
* One for the top navigation Menu and one for the application below the Menu
|
||||
* The first app to connect to the Redux debugger wins which is the menu blocking
|
||||
* the application from being able to connect to the redux debugger.
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ module.exports = {
|
|||
context.report({
|
||||
node,
|
||||
message:
|
||||
"Don't use variables in translation string templates. Flask-babel is a static translation translation service, so it can’t handle strings that include variables",
|
||||
"Don't use variables in translation string templates. Flask-babel is a static translation service, so it can’t handle strings that include variables",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5499,7 +5499,7 @@ msgstr ""
|
|||
msgid "Intervals"
|
||||
msgstr ""
|
||||
|
||||
msgid "Intesity"
|
||||
msgid "Intensity"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
|
|
@ -6977,7 +6977,7 @@ msgstr ""
|
|||
msgid "One or more parameters specified in the query are missing."
|
||||
msgstr ""
|
||||
|
||||
msgid "One ore more annotation layers failed loading."
|
||||
msgid "One or more annotation layers failed loading."
|
||||
msgstr ""
|
||||
|
||||
msgid "Only SELECT statements are allowed against this database."
|
||||
|
|
@ -12168,7 +12168,7 @@ msgstr ""
|
|||
|
||||
msgid ""
|
||||
"Whether to show extra controls or not. Extra controls include things like"
|
||||
" making mulitBar charts stacked or side by side."
|
||||
" making multiBar charts stacked or side by side."
|
||||
msgstr ""
|
||||
|
||||
msgid "Whether to show minor ticks on the axis"
|
||||
|
|
|
|||
|
|
@ -5498,7 +5498,7 @@ msgstr ""
|
|||
msgid "Intervals"
|
||||
msgstr ""
|
||||
|
||||
msgid "Intesity"
|
||||
msgid "Intensity"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
|
|
@ -6974,7 +6974,7 @@ msgstr ""
|
|||
msgid "One or more parameters specified in the query are missing."
|
||||
msgstr ""
|
||||
|
||||
msgid "One ore more annotation layers failed loading."
|
||||
msgid "One or more annotation layers failed loading."
|
||||
msgstr ""
|
||||
|
||||
msgid "Only SELECT statements are allowed against this database."
|
||||
|
|
@ -12155,7 +12155,7 @@ msgstr ""
|
|||
|
||||
msgid ""
|
||||
"Whether to show extra controls or not. Extra controls include things like"
|
||||
" making mulitBar charts stacked or side by side."
|
||||
" making multiBar charts stacked or side by side."
|
||||
msgstr ""
|
||||
|
||||
msgid "Whether to show minor ticks on the axis"
|
||||
|
|
|
|||
Loading…
Reference in New Issue