foreman_ansible 18.0.1 → 18.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/foreman_ansible/version.rb +1 -1
- data/webpack/components/AnsibleHostDetail/components/JobsTab/__test__/JobsTab.test.js +4 -5
- data/webpack/routes/HostgroupJobs/__test__/HostgroupJobs.test.js +4 -5
- data/webpack/testHelper.js +14 -0
- data/webpack/test_setup.js +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 81254059ae3afd7da949de49d526c17d8ec8c303860b03b1fd9d98a498189866
|
|
4
|
+
data.tar.gz: 6f18b8a590b069c84c74f8689a8036f4778d42ca4a4d5caafa3c38441c17da1b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d7d7ea1995e26efed921abe0cddc283237f724a74adb60eaf6694c4bc1cabab037447bb5b0203f324fdfc791ae5ddf48295fa668fb6d93bc6397760e276b8ee6
|
|
7
|
+
data.tar.gz: 940d50f5e7ed0de99a102cc3d33b0a6bcb8b9870f8f9a65185836a7202c240cb31a1e24bd5b5e11ae43ff9f7cf4a7380c48c772ba1382a8550831b99e47e14a7
|
|
@@ -26,6 +26,8 @@ import {
|
|
|
26
26
|
withMockedProvider,
|
|
27
27
|
withRedux,
|
|
28
28
|
historyMock,
|
|
29
|
+
formatLocalDateInput,
|
|
30
|
+
formatLocalTimeInput,
|
|
29
31
|
} from '../../../../../testHelper';
|
|
30
32
|
|
|
31
33
|
const TestComponent = withRedux(withRouter(withMockedProvider(JobsTab)));
|
|
@@ -110,14 +112,11 @@ describe('JobsTab', () => {
|
|
|
110
112
|
userEvent.selectOptions(screen.getByLabelText(/repeat/), 'weekly');
|
|
111
113
|
userEvent.type(
|
|
112
114
|
screen.getByLabelText(/startTime/),
|
|
113
|
-
futureDate
|
|
114
|
-
.toISOString()
|
|
115
|
-
.split('T')[1]
|
|
116
|
-
.slice(0, 5)
|
|
115
|
+
formatLocalTimeInput(futureDate)
|
|
117
116
|
);
|
|
118
117
|
userEvent.type(
|
|
119
118
|
screen.getByLabelText(/startDate/),
|
|
120
|
-
futureDate
|
|
119
|
+
formatLocalDateInput(futureDate)
|
|
121
120
|
);
|
|
122
121
|
expect(
|
|
123
122
|
screen.getByRole('button', { name: 'submit creating job' })
|
|
@@ -21,6 +21,8 @@ import {
|
|
|
21
21
|
withMockedProvider,
|
|
22
22
|
withRedux,
|
|
23
23
|
historyMock,
|
|
24
|
+
formatLocalDateInput,
|
|
25
|
+
formatLocalTimeInput,
|
|
24
26
|
} from '../../../testHelper';
|
|
25
27
|
|
|
26
28
|
import { toCron } from '../../../components/AnsibleHostDetail/components/JobsTab/NewRecurringJobHelper';
|
|
@@ -83,14 +85,11 @@ describe('HostgroupJobs', () => {
|
|
|
83
85
|
userEvent.selectOptions(screen.getByLabelText(/repeat/), 'weekly');
|
|
84
86
|
userEvent.type(
|
|
85
87
|
screen.getByLabelText(/startTime/),
|
|
86
|
-
futureDate
|
|
87
|
-
.toISOString()
|
|
88
|
-
.split('T')[1]
|
|
89
|
-
.slice(0, 5)
|
|
88
|
+
formatLocalTimeInput(futureDate)
|
|
90
89
|
);
|
|
91
90
|
userEvent.type(
|
|
92
91
|
screen.getByLabelText(/startDate/),
|
|
93
|
-
futureDate
|
|
92
|
+
formatLocalDateInput(futureDate)
|
|
94
93
|
);
|
|
95
94
|
expect(
|
|
96
95
|
screen.getByRole('button', { name: 'submit creating job' })
|
data/webpack/testHelper.js
CHANGED
|
@@ -101,6 +101,20 @@ export const intruder = userFactory('intruder', [
|
|
|
101
101
|
// use to resolve async mock requests for apollo MockedProvider
|
|
102
102
|
export const tick = () => new Promise(resolve => setTimeout(resolve, 0));
|
|
103
103
|
|
|
104
|
+
export const formatLocalDateInput = date => {
|
|
105
|
+
const pad = value => String(value).padStart(2, '0');
|
|
106
|
+
|
|
107
|
+
return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(
|
|
108
|
+
date.getDate()
|
|
109
|
+
)}`;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export const formatLocalTimeInput = date => {
|
|
113
|
+
const pad = value => String(value).padStart(2, '0');
|
|
114
|
+
|
|
115
|
+
return `${pad(date.getHours())}:${pad(date.getMinutes())}`;
|
|
116
|
+
};
|
|
117
|
+
|
|
104
118
|
export const historyMock = {
|
|
105
119
|
location: {
|
|
106
120
|
search: '',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import 'foremanJSTestSetup';
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: foreman_ansible
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 18.0.
|
|
4
|
+
version: 18.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daniel Lobato Garcia
|
|
@@ -440,6 +440,7 @@ files:
|
|
|
440
440
|
- webpack/routes/HostgroupJobs/index.js
|
|
441
441
|
- webpack/routes/routes.js
|
|
442
442
|
- webpack/testHelper.js
|
|
443
|
+
- webpack/test_setup.js
|
|
443
444
|
- webpack/toastHelper.js
|
|
444
445
|
homepage: https://github.com/theforeman/foreman_ansible
|
|
445
446
|
licenses:
|