mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
fix tests
This commit is contained in:
parent
e57bd88bd2
commit
455cd74492
@ -156,7 +156,7 @@ describe('<MultiCredentialsLookup />', () => {
|
||||
});
|
||||
});
|
||||
wrapper.update();
|
||||
act(() => {
|
||||
await act(async () => {
|
||||
wrapper.find('Button[variant="primary"]').invoke('onClick')();
|
||||
});
|
||||
expect(onChange).toBeCalledWith([
|
||||
@ -201,7 +201,7 @@ describe('<MultiCredentialsLookup />', () => {
|
||||
});
|
||||
});
|
||||
wrapper.update();
|
||||
act(() => {
|
||||
await act(async () => {
|
||||
wrapper.find('Button[variant="primary"]').invoke('onClick')();
|
||||
});
|
||||
expect(onChange).toBeCalledWith([
|
||||
@ -248,7 +248,7 @@ describe('<MultiCredentialsLookup />', () => {
|
||||
});
|
||||
});
|
||||
wrapper.update();
|
||||
act(() => {
|
||||
await act(async () => {
|
||||
wrapper.find('Button[variant="primary"]').invoke('onClick')();
|
||||
});
|
||||
expect(onChange).toBeCalledWith([
|
||||
@ -301,7 +301,7 @@ describe('<MultiCredentialsLookup />', () => {
|
||||
});
|
||||
});
|
||||
wrapper.update();
|
||||
act(() => {
|
||||
await act(async () => {
|
||||
wrapper.find('Button[variant="primary"]').invoke('onClick')();
|
||||
});
|
||||
expect(onChange).toBeCalledWith([
|
||||
|
||||
@ -14,6 +14,9 @@ function PlaybookSelect({ projectId, isValid, field, onBlur, onError, i18n }) {
|
||||
error,
|
||||
} = useRequest(
|
||||
useCallback(async () => {
|
||||
if (!projectId) {
|
||||
return [];
|
||||
}
|
||||
const { data } = await ProjectsAPI.readPlaybooks(projectId);
|
||||
const opts = (data || []).map(playbook => ({
|
||||
value: playbook,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user