Merge branch 'master' of github.com:spotify/backstage into migrate-to-msw
* 'master' of github.com:spotify/backstage: (139 commits) Cleanup Update PinButton.test.tsx feat: update github insights plugin version (#2973) Ignore IntelliJ *.iml files (#2971) chore(deps): bump rollup-plugin-dts from 1.4.11 to 1.4.13 fix the plugin card on plugins page align 'Add to Marketplace' button on plugins page fix the PluginGrid on mobiles sizes use getBy query instead of queryBy when asserting for elements present in document (#2951) Update PinButton.tsx Add test case for Progress component (#2953) fix the styling of footer copy on mobile add changeset handle the case where no entities are available to show core-api: work around issue with ApiRef export const declarations core-api: move utility api system implementation into apis/system Update docs regarding npm config ignore-scripts flag Another try Fix Core Features configuration id (#2948) Fix test? ...
This commit is contained in:
@@ -19,6 +19,7 @@ import { GraphiQLPage } from './GraphiQLPage';
|
||||
import { ThemeProvider } from '@material-ui/core';
|
||||
import { lightTheme } from '@backstage/theme';
|
||||
import { ApiProvider, ApiRegistry } from '@backstage/core';
|
||||
import { act } from 'react-dom/test-utils';
|
||||
import { renderWithEffects } from '@backstage/test-utils';
|
||||
import { GraphQLBrowseApi, graphQlBrowseApiRef } from '../../lib/api';
|
||||
|
||||
@@ -28,6 +29,7 @@ jest.mock('../GraphiQLBrowser', () => ({
|
||||
|
||||
describe('GraphiQLPage', () => {
|
||||
it('should show progress', async () => {
|
||||
jest.useFakeTimers();
|
||||
const loadingApi: GraphQLBrowseApi = {
|
||||
async getEndpoints() {
|
||||
await new Promise(() => {});
|
||||
@@ -43,9 +45,12 @@ describe('GraphiQLPage', () => {
|
||||
,
|
||||
</ApiProvider>,
|
||||
);
|
||||
|
||||
act(() => {
|
||||
jest.advanceTimersByTime(250);
|
||||
});
|
||||
rendered.getByText('GraphiQL');
|
||||
rendered.getByTestId('progress');
|
||||
jest.useRealTimers();
|
||||
});
|
||||
|
||||
it('should show error', async () => {
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import {
|
||||
Content,
|
||||
@@ -21,7 +20,6 @@ import {
|
||||
HeaderLabel,
|
||||
Page,
|
||||
Progress,
|
||||
pageTheme,
|
||||
useApi,
|
||||
} from '@backstage/core';
|
||||
import { useAsync } from 'react-use';
|
||||
@@ -60,7 +58,7 @@ export const GraphiQLPage = () => {
|
||||
}
|
||||
|
||||
return (
|
||||
<Page theme={pageTheme.tool}>
|
||||
<Page themeId="tool">
|
||||
<Header title="GraphiQL">
|
||||
<HeaderLabel label="Owner" value="Spotify" />
|
||||
<HeaderLabel label="Lifecycle" value="Alpha" />
|
||||
|
||||
Reference in New Issue
Block a user