foreman_ansible 18.0.0 → 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: '087d3ebdcf70f8891bf6de236413f46c971950589ecc7a9b32aa781b747f0d64'
4
- data.tar.gz: 11d10eeff06402af8baaeda250d021c44db0fc21bd86450a1123f47d19083353
3
+ metadata.gz: 81254059ae3afd7da949de49d526c17d8ec8c303860b03b1fd9d98a498189866
4
+ data.tar.gz: 6f18b8a590b069c84c74f8689a8036f4778d42ca4a4d5caafa3c38441c17da1b
5
5
  SHA512:
6
- metadata.gz: 550e5075d68631d646f73b56b370d7816dc2f59a784cc1d828c04b453fde61871d14293aba62fbdca70aa063eec4d74cbe77d5b8d2b1eedd9bafd12c0f24d610
7
- data.tar.gz: 4b459dcf5991a72248fe82f8bc348a28f10593834fb5c3b352fbebc55a22020efee2af4fe593cd2a67d161f7b197ef4fd0e96682b0e0f5a5de93184a9f0149da
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.0'
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.0
4
+ version: 18.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Lobato Garcia
@@ -44,9 +44,6 @@ dependencies:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
46
  version: '14.0'
47
- - - "<"
48
- - !ruby/object:Gem::Version
49
- version: '17'
50
47
  type: :runtime
51
48
  prerelease: false
52
49
  version_requirements: !ruby/object:Gem::Requirement
@@ -54,9 +51,6 @@ dependencies:
54
51
  - - ">="
55
52
  - !ruby/object:Gem::Version
56
53
  version: '14.0'
57
- - - "<"
58
- - !ruby/object:Gem::Version
59
- version: '17'
60
54
  - !ruby/object:Gem::Dependency
61
55
  name: foreman-tasks
62
56
  requirement: !ruby/object:Gem::Requirement
@@ -446,6 +440,7 @@ files:
446
440
  - webpack/routes/HostgroupJobs/index.js
447
441
  - webpack/routes/routes.js
448
442
  - webpack/testHelper.js
443
+ - webpack/test_setup.js
449
444
  - webpack/toastHelper.js
450
445
  homepage: https://github.com/theforeman/foreman_ansible
451
446
  licenses: