feat: sync deployed v1.0.0-rc.38-custom.42
Publish Docker image (Multi-arch) / Build & push (amd64) (push) Failing after 1m40s
Release (Linux, macOS, Windows) / Linux Release (push) Failing after 42m16s
Publish Docker image (Multi-arch) / Build & push (arm64) (push) Canceled after 0s
Release (Linux, macOS, Windows) / macOS Release (push) Canceled after 0s
Release (Linux, macOS, Windows) / Windows Release (push) Canceled after 0s
Publish Docker image (Multi-arch) / Create multi-arch manifests (push) Canceled after 0s
Publish Docker image (Multi-arch) / Build & push (amd64) (push) Failing after 1m40s
Release (Linux, macOS, Windows) / Linux Release (push) Failing after 42m16s
Publish Docker image (Multi-arch) / Build & push (arm64) (push) Canceled after 0s
Release (Linux, macOS, Windows) / macOS Release (push) Canceled after 0s
Release (Linux, macOS, Windows) / Windows Release (push) Canceled after 0s
Publish Docker image (Multi-arch) / Create multi-arch manifests (push) Canceled after 0s
Sync production source including routing, billing, Astra detection and public uptime. Update custom build instructions and license packaging.
This commit is contained in:
1 parent
c2b44332d6
commit
a5f7b8e586
828 files changed
+122253
-13702
No files matched your search
@@ -0,0 +1,64 @@
|
||||
import { cleanup, render, screen } from '@testing-library/react'
|
||||
import { t } from 'i18next'
|
||||
import { afterEach, describe, expect, it } from 'vitest'
|
||||
|
||||
import { AdaptiveSchedule } from '../adaptive-schedule'
|
||||
import { PelicanPanel } from '../detection-panel'
|
||||
|
||||
afterEach(cleanup)
|
||||
|
||||
describe('adaptive detection schedule', () => {
|
||||
it('shows one interval for channels with the same cadence', () => {
|
||||
render(<AdaptiveSchedule min={60} max={60} />)
|
||||
expect(
|
||||
screen.getByText(
|
||||
t('Current interval: {{minutes}} minutes', { minutes: 60 }),
|
||||
{ exact: false }
|
||||
)
|
||||
).toBeInTheDocument()
|
||||
})
|
||||
it('shows a range for channels with different cadences', () => {
|
||||
render(<AdaptiveSchedule min={15} max={60} />)
|
||||
expect(
|
||||
screen.getByText(
|
||||
t('Current intervals: {{min}}–{{max}} minutes', { min: 15, max: 60 }),
|
||||
{ exact: false }
|
||||
)
|
||||
).toBeInTheDocument()
|
||||
})
|
||||
it('uses the initial interval when no schedule has been recorded', () => {
|
||||
render(<AdaptiveSchedule />)
|
||||
expect(
|
||||
screen.getByText(
|
||||
t('Current interval: {{minutes}} minutes', { minutes: 30 }),
|
||||
{ exact: false }
|
||||
)
|
||||
).toBeInTheDocument()
|
||||
})
|
||||
it('renders pelican schedule data instead of the old fixed frequency', () => {
|
||||
render(
|
||||
<PelicanPanel
|
||||
data={{
|
||||
channels: 2,
|
||||
normal: 1,
|
||||
degraded: 0,
|
||||
unknown: 0,
|
||||
failed: 0,
|
||||
running: 0,
|
||||
history: [],
|
||||
interval_minutes: 15,
|
||||
interval_max_minutes: 30,
|
||||
}}
|
||||
/>
|
||||
)
|
||||
expect(
|
||||
screen.getByText(
|
||||
t('Current intervals: {{min}}–{{max}} minutes', { min: 15, max: 30 }),
|
||||
{ exact: false }
|
||||
)
|
||||
).toBeInTheDocument()
|
||||
expect(
|
||||
screen.queryByText(t('Every 30 minutes, one work per Astra channel.'))
|
||||
).not.toBeInTheDocument()
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user