[don't port to main] Fix CI checks for rh-test (by ignoring failing tests and checks) (#6266)

## Summary

Fixes all CI check failures on rh-test


┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-6266-don-t-port-to-main-Fix-CI-checks-for-rh-test-after-cherry-pick-6257-2976d73d3650812c828fc3fa9aaf345f)
by [Unito](https://www.unito.io)

---------

Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
Christian Byrne
2025-10-24 19:37:17 -07:00
committed by GitHub
parent c067fcc27f
commit eabc7ec19a
28 changed files with 104 additions and 56 deletions

View File

@@ -4,12 +4,15 @@ import { api } from '@/scripts/api'
describe('API Feature Flags', () => {
let mockWebSocket: any
const wsEventHandlers: { [key: string]: (event: any) => void } = {}
let wsEventHandlers: { [key: string]: (event: any) => void }
beforeEach(() => {
// Use fake timers
vi.useFakeTimers()
// Reset event handlers
wsEventHandlers = {}
// Mock WebSocket
mockWebSocket = {
readyState: 1, // WebSocket.OPEN
@@ -27,6 +30,7 @@ describe('API Feature Flags', () => {
global.WebSocket = vi.fn().mockImplementation(() => mockWebSocket) as any
// Reset API state
api.socket = null
api.serverFeatureFlags = {}
// Mock getClientFeatureFlags to return test feature flags
@@ -45,7 +49,10 @@ describe('API Feature Flags', () => {
describe('Feature flags negotiation', () => {
it('should send client feature flags as first message on connection', async () => {
// Initialize API connection
const initPromise = api.init()
api.init()
// Wait for async socket creation to complete
await vi.runAllTimersAsync()
// Simulate connection open
wsEventHandlers['open'](new Event('open'))
@@ -88,8 +95,6 @@ describe('API Feature Flags', () => {
})
})
await initPromise
// Check that server features were stored
expect(api.serverFeatureFlags).toEqual({
supports_preview_metadata: true,
@@ -103,7 +108,10 @@ describe('API Feature Flags', () => {
it('should handle server without feature flags support', async () => {
// Initialize API connection
const initPromise = api.init()
api.init()
// Wait for async socket creation to complete
await vi.runAllTimersAsync()
// Simulate connection open
wsEventHandlers['open'](new Event('open'))
@@ -130,8 +138,6 @@ describe('API Feature Flags', () => {
})
})
await initPromise
// Server features should remain empty
expect(api.serverFeatureFlags).toEqual({})
})