mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 01:13:23 -04:00
Fix flaky conditional actions test (#154138)
Fixes: #154132 Char '0' was missing in hours padStart function
This commit is contained in:
parent
1f2f3a801f
commit
7d24915193
1 changed files with 5 additions and 7 deletions
|
@ -1361,14 +1361,12 @@ instanceStateValue: true
|
|||
|
||||
it('should filter alerts by hours', async () => {
|
||||
const now = new Date();
|
||||
now.setMinutes(now.getMinutes() + 10);
|
||||
const hour = padStart(now.getUTCHours().toString(), 2);
|
||||
const minutesStart = padStart(now.getUTCMinutes().toString(), 2, '0');
|
||||
now.setMinutes(now.getMinutes() + 1);
|
||||
const minutesEnd = padStart(now.getUTCMinutes().toString(), 2, '0');
|
||||
now.setHours(now.getHours() + 1);
|
||||
const hour = padStart(now.getUTCHours().toString(), 2, '0');
|
||||
const minutes = padStart(now.getUTCMinutes().toString(), 2, '0');
|
||||
|
||||
const start = `${hour}:${minutesStart}`;
|
||||
const end = `${hour}:${minutesEnd}`;
|
||||
const start = `${hour}:${minutes}`;
|
||||
const end = `${hour}:${minutes}`;
|
||||
|
||||
const reference = alertUtils.generateReference();
|
||||
const response = await alertUtils.createAlwaysFiringSummaryAction({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue