This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 028f6c0 chore: Moves spec files to the src folder - iteration 6
(#16935)
028f6c0 is described below
commit 028f6c0d3f23543634a16ebc135c884b0316cdd7
Author: Michael S. Molina <[email protected]>
AuthorDate: Mon Oct 4 10:56:30 2021 -0300
chore: Moves spec files to the src folder - iteration 6 (#16935)
---
.../components/ColumnTypeLabel_spec.tsx | 87 ----------------------
.../middleware/asyncEvent.test.ts} | 0
.../middleware/logger.test.js} | 0
.../profile/components/App.test.tsx} | 0
.../profile/components/CreatedContent.test.tsx} | 0
.../profile/components/Favorites.test.tsx} | 0
.../profile/components/RecentActivity.test.tsx} | 0
.../profile/components/Security.test.tsx} | 0
.../profile/components/UserInfo.test.tsx} | 0
.../profile/components}/fixtures.tsx | 0
10 files changed, 87 deletions(-)
diff --git
a/superset-frontend/spec/javascripts/components/ColumnTypeLabel_spec.tsx
b/superset-frontend/spec/javascripts/components/ColumnTypeLabel_spec.tsx
deleted file mode 100644
index 42aab98..0000000
--- a/superset-frontend/spec/javascripts/components/ColumnTypeLabel_spec.tsx
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-import React from 'react';
-import { render, screen, cleanup } from 'spec/helpers/testing-library';
-
-import {
- ColumnTypeLabel,
- ColumnTypeLabelProps,
-} from '@superset-ui/chart-controls';
-import { GenericDataType } from '@superset-ui/core';
-
-const defaultProps = {
- type: GenericDataType.STRING,
-};
-
-const setup = (overrides?: ColumnTypeLabelProps) => (
- <div className="type-label">
- <ColumnTypeLabel {...defaultProps} {...overrides} />
- </div>
-);
-
-describe('ColumnOption RTL', () => {
- afterEach(cleanup);
- it('is a valid element', () => {
- expect(React.isValidElement(<ColumnTypeLabel {...defaultProps} />)).toBe(
- true,
- );
- });
-
- it('string type shows ABC icon', () => {
- render(setup(defaultProps));
-
- const labelIcon = screen.getByText(/abc/i);
- expect(labelIcon.innerHTML).toMatch(/abc/i);
- });
-
- it('int type shows # icon', () => {
- render(setup({ type: GenericDataType.NUMERIC }));
-
- const labelIcon = screen.getByText(/#/i);
- expect(labelIcon.innerHTML).toMatch(/#/i);
- });
-
- it('bool type shows T/F icon', () => {
- render(setup({ type: GenericDataType.BOOLEAN }));
-
- const labelIcon = screen.getByText(/t\/f/i);
- expect(labelIcon.innerHTML).toMatch(/t\/f/i);
- });
-
- it('expression type shows function icon', () => {
- render(setup({ type: 'expression' }));
-
- const labelIcon = screen.getByText('ƒ');
- expect(labelIcon.innerHTML).toMatch('ƒ');
- });
-
- it('unknown type shows question mark', () => {
- render(setup({ type: undefined }));
-
- const labelIcon = screen.getByText('?');
- expect(labelIcon.innerHTML).toMatch('?');
- });
-
- it('datetime type displays', () => {
- const rendered = render(setup({ type: GenericDataType.TEMPORAL }));
-
- const clockIcon = rendered.container.querySelector('.fa-clock-o');
- expect(clockIcon).toBeVisible();
- });
-});
diff --git a/superset-frontend/spec/javascripts/middleware/asyncEvent_spec.ts
b/superset-frontend/src/middleware/asyncEvent.test.ts
similarity index 100%
rename from superset-frontend/spec/javascripts/middleware/asyncEvent_spec.ts
rename to superset-frontend/src/middleware/asyncEvent.test.ts
diff --git a/superset-frontend/spec/javascripts/middleware/logger_spec.js
b/superset-frontend/src/middleware/logger.test.js
similarity index 100%
rename from superset-frontend/spec/javascripts/middleware/logger_spec.js
rename to superset-frontend/src/middleware/logger.test.js
diff --git a/superset-frontend/spec/javascripts/profile/App_spec.tsx
b/superset-frontend/src/profile/components/App.test.tsx
similarity index 100%
rename from superset-frontend/spec/javascripts/profile/App_spec.tsx
rename to superset-frontend/src/profile/components/App.test.tsx
diff --git a/superset-frontend/spec/javascripts/profile/CreatedContent_spec.tsx
b/superset-frontend/src/profile/components/CreatedContent.test.tsx
similarity index 100%
rename from superset-frontend/spec/javascripts/profile/CreatedContent_spec.tsx
rename to superset-frontend/src/profile/components/CreatedContent.test.tsx
diff --git a/superset-frontend/spec/javascripts/profile/Favorites_spec.tsx
b/superset-frontend/src/profile/components/Favorites.test.tsx
similarity index 100%
rename from superset-frontend/spec/javascripts/profile/Favorites_spec.tsx
rename to superset-frontend/src/profile/components/Favorites.test.tsx
diff --git a/superset-frontend/spec/javascripts/profile/RecentActivity_spec.tsx
b/superset-frontend/src/profile/components/RecentActivity.test.tsx
similarity index 100%
rename from superset-frontend/spec/javascripts/profile/RecentActivity_spec.tsx
rename to superset-frontend/src/profile/components/RecentActivity.test.tsx
diff --git a/superset-frontend/spec/javascripts/profile/Security_spec.tsx
b/superset-frontend/src/profile/components/Security.test.tsx
similarity index 100%
rename from superset-frontend/spec/javascripts/profile/Security_spec.tsx
rename to superset-frontend/src/profile/components/Security.test.tsx
diff --git a/superset-frontend/spec/javascripts/profile/UserInfo_spec.tsx
b/superset-frontend/src/profile/components/UserInfo.test.tsx
similarity index 100%
rename from superset-frontend/spec/javascripts/profile/UserInfo_spec.tsx
rename to superset-frontend/src/profile/components/UserInfo.test.tsx
diff --git a/superset-frontend/spec/javascripts/profile/fixtures.tsx
b/superset-frontend/src/profile/components/fixtures.tsx
similarity index 100%
rename from superset-frontend/spec/javascripts/profile/fixtures.tsx
rename to superset-frontend/src/profile/components/fixtures.tsx