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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3bfc1e0ec9bd53f84fb2bc0e3c67ace28f1d7c9b815920f6c070e959e9673279
4
- data.tar.gz: 390b3c8884187b896de02ef033c32c2bc9ca872a21d0cf6edf7d694ee7f1033b
3
+ metadata.gz: 81254059ae3afd7da949de49d526c17d8ec8c303860b03b1fd9d98a498189866
4
+ data.tar.gz: 6f18b8a590b069c84c74f8689a8036f4778d42ca4a4d5caafa3c38441c17da1b
5
5
  SHA512:
6
- metadata.gz: bde8eab4025394f1e67711c742451359651fae34bfe753603a7217a8b6414ca4a63323fc2c1df9236ce2482964bd4d13b29c2ce4c7e3c7e0326381817491ef01
7
- data.tar.gz: a95bfbc31bf0570b8e8a24946e6e453044018ea5f633a4c74a75f52a418f5609970fe99d9a2170d1a7e41d0b31c33145cfceeb71bfd443d0fdab3b809beeaacc
6
+ metadata.gz: d7d7ea1995e26efed921abe0cddc283237f724a74adb60eaf6694c4bc1cabab037447bb5b0203f324fdfc791ae5ddf48295fa668fb6d93bc6397760e276b8ee6
7
+ data.tar.gz: 940d50f5e7ed0de99a102cc3d33b0a6bcb8b9870f8f9a65185836a7202c240cb31a1e24bd5b5e11ae43ff9f7cf4a7380c48c772ba1382a8550831b99e47e14a7
@@ -4,5 +4,5 @@
4
4
  # This way other parts of Foreman can just call ForemanAnsible::VERSION
5
5
  # and detect what version the plugin is running.
6
6
  module ForemanAnsible
7
- VERSION = '18.0.1'
7
+ VERSION = '18.0.2'
8
8
  end
@@ -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.toISOString().split('T')[0]
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.toISOString().split('T')[0]
92
+ formatLocalDateInput(futureDate)
94
93
  );
95
94
  expect(
96
95
  screen.getByRole('button', { name: 'submit creating job' })
@@ -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.1
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: