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:
@@ -24,7 +24,6 @@ import {
|
||||
useApi,
|
||||
Content,
|
||||
Page,
|
||||
pageTheme,
|
||||
Header,
|
||||
} from '@backstage/core';
|
||||
import { catalogApiRef } from '@backstage/plugin-catalog';
|
||||
@@ -43,7 +42,7 @@ export const TechDocsHome = () => {
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<Page theme={pageTheme.documentation}>
|
||||
<Page themeId="documentation">
|
||||
<Header
|
||||
title="Documentation"
|
||||
subtitle="Documentation available in Backstage"
|
||||
@@ -57,7 +56,7 @@ export const TechDocsHome = () => {
|
||||
|
||||
if (error) {
|
||||
return (
|
||||
<Page theme={pageTheme.documentation}>
|
||||
<Page themeId="documentation">
|
||||
<Header
|
||||
title="Documentation"
|
||||
subtitle="Documentation available in Backstage"
|
||||
@@ -70,7 +69,7 @@ export const TechDocsHome = () => {
|
||||
}
|
||||
|
||||
return (
|
||||
<Page theme={pageTheme.documentation}>
|
||||
<Page themeId="documentation">
|
||||
<Header
|
||||
title="Documentation"
|
||||
subtitle="Documentation available in Backstage"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
import React, { useState } from 'react';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import { Content, Page, pageTheme, useApi } from '@backstage/core';
|
||||
import { Content, Page, useApi } from '@backstage/core';
|
||||
import { Reader } from './Reader';
|
||||
import { useAsync } from 'react-use';
|
||||
import { TechDocsPageHeader } from './TechDocsPageHeader';
|
||||
@@ -45,7 +45,7 @@ export const TechDocsPage = () => {
|
||||
};
|
||||
|
||||
return (
|
||||
<Page theme={pageTheme.documentation}>
|
||||
<Page themeId="documentation">
|
||||
<TechDocsPageHeader
|
||||
metadataRequest={{
|
||||
mkdocs: mkdocsMetadataRequest,
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import GitHubIcon from '@material-ui/icons/GitHub';
|
||||
import CodeIcon from '@material-ui/icons/Code';
|
||||
import { Header, HeaderLabel, Link } from '@backstage/core';
|
||||
import { CircularProgress } from '@material-ui/core';
|
||||
import { ParsedEntityId } from '../../types';
|
||||
@@ -73,7 +73,7 @@ export const TechDocsPageHeader = ({
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<GitHubIcon style={{ marginTop: '-25px', fill: '#fff' }} />
|
||||
<CodeIcon style={{ marginTop: '-25px', fill: '#fff' }} />
|
||||
</a>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -25,12 +25,14 @@ jest.useFakeTimers();
|
||||
describe('<TechDocsProgressBar />', () => {
|
||||
it('should render a message if techdocs page takes more time to load', () => {
|
||||
const rendered = render(wrapInTestApp(<TechDocsProgressBar />));
|
||||
|
||||
expect(rendered.getByTestId('progress')).toBeDefined();
|
||||
act(() => {
|
||||
jest.advanceTimersByTime(250);
|
||||
});
|
||||
expect(rendered.getByTestId('progress')).toBeInTheDocument();
|
||||
expect(rendered.queryByTestId('delay-reason')).toBeNull();
|
||||
act(() => {
|
||||
jest.advanceTimersByTime(5000);
|
||||
});
|
||||
expect(rendered.getByTestId('delay-reason')).toBeDefined();
|
||||
expect(rendered.getByTestId('delay-reason')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user