mirror of
https://github.com/ansible/awx.git
synced 2026-03-19 18:07:33 -02:30
Tweak Schedules props to include the options request callback needed to load the list after rebasing.
This commit is contained in:
@@ -3,7 +3,12 @@ import { withI18n } from '@lingui/react';
|
|||||||
import { Switch, Route, useRouteMatch } from 'react-router-dom';
|
import { Switch, Route, useRouteMatch } from 'react-router-dom';
|
||||||
import { Schedule, ScheduleList } from '@components/Schedule';
|
import { Schedule, ScheduleList } from '@components/Schedule';
|
||||||
|
|
||||||
function Schedules({ setBreadcrumb, unifiedJobTemplate, loadSchedules }) {
|
function Schedules({
|
||||||
|
setBreadcrumb,
|
||||||
|
unifiedJobTemplate,
|
||||||
|
loadSchedules,
|
||||||
|
loadScheduleOptions,
|
||||||
|
}) {
|
||||||
const match = useRouteMatch();
|
const match = useRouteMatch();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -22,7 +27,12 @@ function Schedules({ setBreadcrumb, unifiedJobTemplate, loadSchedules }) {
|
|||||||
key="list"
|
key="list"
|
||||||
path={`${match.path}`}
|
path={`${match.path}`}
|
||||||
render={() => {
|
render={() => {
|
||||||
return <ScheduleList loadSchedules={loadSchedules} />;
|
return (
|
||||||
|
<ScheduleList
|
||||||
|
loadSchedules={loadSchedules}
|
||||||
|
loadScheduleOptions={loadScheduleOptions}
|
||||||
|
/>
|
||||||
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Switch>
|
</Switch>
|
||||||
|
|||||||
@@ -14,7 +14,12 @@ describe('<Schedules />', () => {
|
|||||||
|
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
wrapper = mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
<Schedules setBreadcrumb={() => {}} jobTemplate={jobTemplate} />,
|
<Schedules
|
||||||
|
setBreadcrumb={() => {}}
|
||||||
|
jobTemplate={jobTemplate}
|
||||||
|
loadSchedules={() => {}}
|
||||||
|
loadScheduleOptions={() => {}}
|
||||||
|
/>,
|
||||||
|
|
||||||
{
|
{
|
||||||
context: {
|
context: {
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ describe('<Template />', () => {
|
|||||||
const tabs = await waitForElement(
|
const tabs = await waitForElement(
|
||||||
wrapper,
|
wrapper,
|
||||||
'.pf-c-tabs__item',
|
'.pf-c-tabs__item',
|
||||||
el => el.length === 6
|
el => el.length === 7
|
||||||
);
|
);
|
||||||
expect(tabs.at(2).text()).toEqual('Notifications');
|
expect(tabs.at(2).text()).toEqual('Notifications');
|
||||||
done();
|
done();
|
||||||
|
|||||||
Reference in New Issue
Block a user