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