Skip to content

Commit

Permalink
fix updating comment
Browse files Browse the repository at this point in the history
  • Loading branch information
villebro committed Dec 1, 2021
1 parent 0c999b6 commit f0df8ef
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ assists people when migrating to a new version.

### Other

- [17589](https://github.com/apache/incubator-superset/pull/17589): It is now possible to limit access to usersä recent activity data by setting the `ENABLE_PUBLIC_ACTIVITY_ACCESS` config flag to false, or customizing the `raise_for_user_activity_access` method in the security manager.
- [17589](https://github.com/apache/incubator-superset/pull/17589): It is now possible to limit access to users' recent activity data by setting the `ENABLE_PUBLIC_ACTIVITY_ACCESS` config flag to false, or customizing the `raise_for_user_activity_access` method in the security manager.
- [16809](https://github.com/apache/incubator-superset/pull/16809): When building the superset frontend assets manually, you should now use Node 16 (previously Node 14 was required/recommended). Node 14 will most likely still work for at least some time, but is no longer actively tested for on CI.

## 1.3.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,18 @@ import { storeWithState } from 'spec/fixtures/mockStore';
import ToastContainer from 'src/components/MessageToasts/ToastContainer';
import TableLoader, { TableLoaderProps } from '.';

fetchMock.get('glob:*/api/v1/mock', [
const NO_DATA_TEXT = 'No data available';
const MOCK_GLOB = 'glob:*/api/v1/mock';

fetchMock.get(MOCK_GLOB, [
{ id: 1, name: 'John Doe' },
{ id: 2, name: 'Jane Doe' },
]);

const defaultProps: TableLoaderProps = {
dataEndpoint: '/api/v1/mock',
addDangerToast: jest.fn(),
noDataText: 'No data available',
noDataText: NO_DATA_TEXT,
};

function renderWithProps(props: TableLoaderProps = defaultProps) {
Expand Down Expand Up @@ -85,7 +88,7 @@ test('renders with mutator', async () => {
});

test('renders empty message', async () => {
fetchMock.mock('glob:*/api/v1/mock', [], {
fetchMock.mock(MOCK_GLOB, [], {
overwriteRoutes: true,
});

Expand All @@ -95,7 +98,7 @@ test('renders empty message', async () => {
});

test('renders blocked message', async () => {
fetchMock.mock('glob:*/api/v1/mock', 403, {
fetchMock.mock(MOCK_GLOB, 403, {
overwriteRoutes: true,
});

Expand All @@ -108,12 +111,12 @@ test('renders blocked message', async () => {
});

test('renders error message', async () => {
fetchMock.mock('glob:*/api/v1/mock', 500, {
fetchMock.mock(MOCK_GLOB, 500, {
overwriteRoutes: true,
});

renderWithProps();

expect(await screen.findByText('No data available')).toBeInTheDocument();
expect(await screen.findByText(NO_DATA_TEXT)).toBeInTheDocument();
expect(await screen.findByRole('alert')).toBeInTheDocument();
});

0 comments on commit f0df8ef

Please sign in to comment.