}
return (
- <>
+ <main>
<A11ySkipTarget anchor="admin_main" />
<Outlet />
- </>
+ </main>
);
}
}
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render correctly 1`] = `
-<Fragment>
+<main>
<A11ySkipTarget
anchor="admin_main"
/>
<Outlet />
-</Fragment>
+</main>
`;
</div>
</header>
- <Outlet />
+ <main>
+ <Outlet />
+ </main>
</div>
);
}
const { dateRange, downloadStarted, housekeepingPolicy, selection } = props;
return (
- <div className="page page-limited" id="marketplace-page">
+ <main className="page page-limited" id="marketplace-page">
<Suggestions suggestions="audit-logs" />
<Helmet title={translate('audit_logs.page')} />
<header className="page-header">
- <h1 className="page-title">{translate('audit_logs.page')}</h1>
+ <h2 className="page-title">{translate('audit_logs.page')}</h2>
</header>
<p className="big-spacer-bottom">
</p>
<div className="huge-spacer-bottom">
- <h2 className="big-spacer-bottom">{translate('audit_logs.download')}</h2>
+ <h3 className="big-spacer-bottom">{translate('audit_logs.download')}</h3>
<ul>
{getRangeOptions(housekeepingPolicy).map((option) => (
onStartDownload={props.handleStartDownload}
selection={selection}
/>
- </div>
+ </main>
);
}
const query = this.props.location.query.query || '';
return (
- <div className="page page-limited">
+ <main className="page page-limited">
<Suggestions suggestions="background_tasks" />
<Helmet defer={false} title={translate('background_tasks.page')} />
<Header component={component} />
pageSize={pagination.pageSize}
total={pagination.total}
/>
- </div>
+ </main>
);
}
}
`;
exports[`should render correctly: loaded 1`] = `
-<div
+<main
className="page page-limited"
>
<Suggestions
loading={false}
total={2}
/>
-</div>
+</main>
`;
const isPortfolio = isPortfolioLike(qualifier);
return (
- <div className="page page-limited">
+ <main className="page page-limited">
<A11ySkipTarget anchor="code_main" />
{!canBrowseAllChildProjects && isPortfolio && (
<StyledAlert variant="warning" className="it__portfolio_warning">
</div>
)}
</div>
- </div>
+ </main>
);
}
}
)}
</ScreenPositionHelper>
- <div className="layout-page-main">
+ <main className="layout-page-main">
<div className="layout-page-header-panel layout-page-main-header">
<div className="layout-page-header-panel-inner layout-page-main-header-inner">
<div className="layout-page-main-inner">
</>
)}
</div>
- </div>
+ </main>
</div>
</>
);
>
<Component />
</ScreenPositionHelper>
- <div
+ <main
className="layout-page-main"
>
<div
total={0}
/>
</div>
- </div>
+ </main>
</div>
</Fragment>
`;
>
<Component />
</ScreenPositionHelper>
- <div
+ <main
className="layout-page-main"
>
<div
>
<ul />
</div>
- </div>
+ </main>
</div>
</Fragment>
`;
if (hideDrilldown) {
return (
- <div className="layout-page-main">
+ <main className="layout-page-main">
<div className="layout-page-main-inner">
<div className="note">{translate('component_measures.details_are_not_available')}</div>
</div>
- </div>
+ </main>
);
}
const { branchLike, className, component, leakPeriod, loading, rootComponent } = this.props;
const displayLeak = hasFullMeasures(branchLike);
return (
- <div className={className}>
+ <main className={className}>
<div className="layout-page-header-panel layout-page-main-header">
<A11ySkipTarget anchor="measures_main" />
<DeferredSpinner loading={loading} />
{!loading && this.renderContent()}
</div>
- </div>
+ </main>
);
}
}
>
<Component />
</ScreenPositionHelper>
- <div
+ <main
className="layout-page-main"
>
<div
component_measures.details_are_not_available
</div>
</div>
- </div>
+ </main>
</div>
</div>
`;
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render correctly: default 1`] = `
-<div>
+<main>
<div
className="layout-page-header-panel layout-page-main-header"
>
updateSelected={[MockFunction]}
/>
</div>
-</div>
+</main>
`;
exports[`should render correctly: has leak period 1`] = `
-<div>
+<main>
<div
className="layout-page-header-panel layout-page-main-header"
>
updateSelected={[MockFunction]}
/>
</div>
-</div>
+</main>
`;
exports[`should render correctly: is file 1`] = `
-<div>
+<main>
<div
className="layout-page-header-panel layout-page-main-header"
>
/>
</div>
</div>
-</div>
+</main>
`;
exports[`should render correctly: loading 1`] = `
-<div>
+<main>
<div
className="layout-page-header-panel layout-page-main-header"
>
loading={true}
/>
</div>
-</div>
+</main>
`;
<>
<Suggestions suggestions="user_groups" />
<Helmet defer={false} title={translate('user_groups.page')} />
- <div className="page page-limited" id="groups-page">
+ <main className="page page-limited" id="groups-page">
<Header onCreate={this.handleCreate} />
<SearchBox
onSubmit={this.handleEdit}
/>
)}
- </div>
+ </main>
</>
);
}
prioritizeSeoTags={false}
title="user_groups.page"
/>
- <div
+ <main
className="page page-limited"
id="groups-page"
>
placeholder="search.search_by_name"
value=""
/>
- </div>
+ </main>
</Fragment>
`;
prioritizeSeoTags={false}
title="user_groups.page"
/>
- <div
+ <main
className="page page-limited"
id="groups-page"
>
total={5}
/>
</div>
- </div>
+ </main>
</Fragment>
`;
riskConsent === RiskConsent.Accepted;
return (
- <div className="page page-limited" id="marketplace-page">
+ <main className="page page-limited" id="marketplace-page">
<Suggestions suggestions="marketplace" />
<Helmet title={translate('marketplace.page')} />
<Header currentEdition={currentEdition} />
<EditionBoxes currentEdition={currentEdition} />
<header className="page-header">
- <h1 className="page-title">{translate('marketplace.page.plugins')}</h1>
+ <h2 className="page-title">{translate('marketplace.page.plugins')}</h2>
<div className="page-description">
<p>{translate('marketplace.page.plugins.description')}</p>
{currentEdition !== EditionKey.community && (
</>
)}
</DeferredSpinner>
- </div>
+ </main>
);
}
}
export default function Header({ currentEdition }: Props) {
return (
<header className="page-header" id="marketplace-header">
- <h1 className="page-title">{translate('marketplace.page')}</h1>
+ <h2 className="page-title">{translate('marketplace.page')}</h2>
{currentEdition && (
<h3 className="page-description">
{translate('marketplace.page.you_are_running', currentEdition)}
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render correctly: loaded 1`] = `
-<div
+<main
className="page page-limited"
id="marketplace-page"
>
<header
className="page-header"
>
- <h1
+ <h2
className="page-title"
>
marketplace.page.plugins
- </h1>
+ </h2>
<div
className="page-description"
>
total={1}
/>
</DeferredSpinner>
-</div>
+</main>
`;
exports[`should render correctly: loading 1`] = `
-<div
+<main
className="page page-limited"
id="marketplace-page"
>
<header
className="page-header"
>
- <h1
+ <h2
className="page-title"
>
marketplace.page.plugins
- </h1>
+ </h2>
<div
className="page-description"
>
>
marketplace.plugin_list.no_plugins.all
</DeferredSpinner>
-</div>
+</main>
`;
exports[`should render correctly: not readonly 1`] = `
-<div
+<main
className="page page-limited"
id="marketplace-page"
>
<header
className="page-header"
>
- <h1
+ <h2
className="page-title"
>
marketplace.page.plugins
- </h1>
+ </h2>
<div
className="page-description"
>
total={1}
/>
</DeferredSpinner>
-</div>
+</main>
`;
className="page-header"
id="marketplace-header"
>
- <h1
+ <h2
className="page-title"
>
marketplace.page
- </h1>
+ </h2>
<h3
className="page-description"
>
className="page-header"
id="marketplace-header"
>
- <h1
+ <h2
className="page-title"
>
marketplace.page
- </h1>
+ </h2>
<h3
className="page-description"
>
}
return isPullRequest(branchLike) ? (
- <>
+ <main>
<Suggestions suggestions="pull_requests" />
<PullRequestOverview branchLike={branchLike} component={component} />
- </>
+ </main>
) : (
- <>
+ <main>
<Suggestions suggestions="overview" />
{!component.analysisDate && (
projectBinding={projectBinding}
/>
)}
- </>
+ </main>
);
}
}
*/
import { shallow } from 'enzyme';
import * as React from 'react';
+import { mockPullRequest } from '../../../../helpers/mocks/branch-like';
import BranchOverview from '../../branches/BranchOverview';
+import PullRequestOverview from '../../pullRequests/PullRequestOverview';
import { App } from '../App';
const component = {
it('should render BranchOverview', () => {
expect(getWrapper().find(BranchOverview).exists()).toBe(true);
+ expect(getWrapper({ branchLike: mockPullRequest() }).find(PullRequestOverview).exists()).toBe(
+ true
+ );
});
function getWrapper(props = {}) {
render() {
const { id } = this.props.location.query;
return (
- <div>
+ <main>
<Suggestions suggestions="permission_templates" />
<Helmet defer={false} title={translate('permission_templates.page')} />
{id && this.renderTemplate(id)}
{!id && this.renderHome()}
- </div>
+ </main>
);
}
}
'global_permissions'
);
return (
- <div className="page page-limited">
+ <main className="page page-limited">
<Suggestions suggestions="global_permissions" />
<Helmet defer={false} title={translate('global_permissions.permission')} />
<PageHeader loading={loading} />
users={users}
usersPaging={usersPaging}
/>
- </div>
+ </main>
);
}
}
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render correctly 1`] = `
-<div
+<main
className="page page-limited"
>
<Suggestions
revokePermissionFromUser={[Function]}
users={[]}
/>
-</div>
+</main>
`;
exports[`should render correctly 2`] = `
-<div
+<main
className="page page-limited"
>
<Suggestions
}
}
/>
-</div>
+</main>
`;
(configuration ? configuration.showHistory : false);
const canDeleteAnalyses = configuration ? configuration.showHistory : false;
return (
- <div className="page page-limited" id="project-activity">
+ <main className="page page-limited" id="project-activity">
<Suggestions suggestions="project_activity" />
<Helmet defer={false} title={translate('project_activity.page')} />
/>
</div>
</div>
- </div>
+ </main>
);
}
const { currentUser } = this.props;
const { defaultProjectVisibility } = this.state;
return (
- <div className="page page-limited" id="projects-management-page">
+ <main className="page page-limited" id="projects-management-page">
<Suggestions suggestions="projects_management" />
<Helmet defer={false} title={translate('projects_management')} />
onProjectCreated={this.requestProjects}
/>
)}
- </div>
+ </main>
);
}
}
<ScreenPositionHelper className="layout-page-side-outer">
{({ top }) => (
- <div className="layout-page-side" style={{ top }}>
+ <nav className="layout-page-side" style={{ top }}>
<div className="layout-page-side-inner">
<div className="layout-page-filters">
<ListHeader
</DeferredSpinner>
</div>
</div>
- </div>
+ </nav>
)}
</ScreenPositionHelper>
const { loading, qualityGate, updatedConditionId } = this.state;
return (
- <div className="layout-page-main">
+ <main className="layout-page-main">
<DeferredSpinner loading={loading} timeout={200}>
{qualityGate && (
<>
</>
)}
</DeferredSpinner>
- </div>
+ </main>
);
}
}
isComparable={filteredProfiles.length > 1}
updateProfiles={context.updateProfiles}
/>
- <Outlet context={{ profile, ...context }} />
+ <main>
+ <Outlet context={{ profile, ...context }} />
+ </main>
</div>
);
}
const isChangeLogPage = location.pathname.endsWith(`/${QualityProfilePath.CHANGELOG}`);
return (
- <div className="page-header quality-profile-header">
+ <header className="page-header quality-profile-header">
{(isComparePage || isChangeLogPage) && (
<Helmet
defer={false}
/>
</div>
)}
- </div>
+ </header>
);
}
<PageHeader {...context} />
<div className="page-with-sidebar">
- <div className="page-main">
+ <main className="page-main">
<ProfilesList {...context} language={selectedLanguage} />
- </div>
- <div className="page-sidebar">
+ </main>
+ <aside className="page-sidebar">
<Evolution {...context} />
- </div>
+ </aside>
</div>
</div>
);
)}
</ScreenPositionHelper>
- <div className="layout-page-main">
+ <main className="layout-page-main">
<HotspotViewer
component={component}
hotspotKey={selectedHotspot.key}
onLocationClick={props.onLocationClick}
selectedHotspotLocation={selectedHotspotLocation}
/>
- </div>
+ </main>
</div>
))}
</div>
(!isProjectSettings && foundAdditionalCategory.availableGlobally));
return (
- <div id="settings-page">
+ <main id="settings-page">
<Suggestions suggestions="settings" />
<Helmet defer={false} title={translate('settings.page')} />
<PageHeader component={component} definitions={definitions} />
</div>
</div>
</div>
- </div>
+ </main>
);
}
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render almintegration correctly 1`] = `
-<div
+<main
id="settings-page"
>
<Suggestions
</div>
</div>
</div>
-</div>
+</main>
`;
exports[`should render default view correctly 1`] = `
-<div
+<main
id="settings-page"
>
<Suggestions
</div>
</div>
</div>
-</div>
+</main>
`;
exports[`should render default view correctly: All Categories List 1`] = `
`;
exports[`should render exclusions correctly 1`] = `
-<div
+<main
id="settings-page"
>
<Suggestions
</div>
</div>
</div>
-</div>
+</main>
`;
exports[`should render languages correctly 1`] = `
-<div
+<main
id="settings-page"
>
<Suggestions
</div>
</div>
</div>
-</div>
+</main>
`;
exports[`should render new_code_period correctly 1`] = `
-<div
+<main
id="settings-page"
>
<Suggestions
</div>
</div>
</div>
-</div>
+</main>
`;
exports[`should render pull_request_decoration_binding correctly 1`] = `
-<div
+<main
id="settings-page"
>
<Suggestions
</div>
</div>
</div>
-</div>
+</main>
`;
render() {
const { loading, sysInfoData } = this.state;
return (
- <div className="page page-limited">
+ <main className="page page-limited">
<Suggestions suggestions="system_info" />
<Helmet defer={false} title={translate('system_info.page')} />
<div className="page-notifs">
/>
)}
{this.renderSysInfo()}
- </div>
+ </main>
);
}
}
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render correctly: cluster sysinfo 1`] = `
-<div
+<main
className="page page-limited"
>
<Suggestions
}
toggleCard={[Function]}
/>
-</div>
+</main>
`;
exports[`should render correctly: loading 1`] = `
-<div
+<main
className="page page-limited"
>
<Suggestions
dismissable={false}
/>
</div>
-</div>
+</main>
`;
exports[`should render correctly: stand-alone sysinfo 1`] = `
-<div
+<main
className="page page-limited"
>
<Suggestions
}
toggleCard={[Function]}
/>
-</div>
+</main>
`;
const query = parseQuery(this.props.location.query);
const { loading, paging, users } = this.state;
return (
- <div className="page page-limited" id="users-page">
+ <main className="page page-limited" id="users-page">
<Suggestions suggestions="users" />
<Helmet defer={false} title={translate('users.page')} />
<Header loading={loading} onUpdateUsers={this.fetchUsers} />
total={paging.total}
/>
)}
- </div>
+ </main>
);
}
}
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render correctly 1`] = `
-<div
+<main
className="page page-limited"
id="users-page"
>
updateTokensCount={[Function]}
users={[]}
/>
-</div>
+</main>
`;
exports[`should render correctly 2`] = `
-<div
+<main
className="page page-limited"
id="users-page"
>
ready={true}
total={2}
/>
-</div>
+</main>
`;