feat: enforce Guanghu-native HoloLake runtime laws

This commit is contained in:
冰朔 2026-08-04 23:11:25 +08:00
commit 67e6fcdd38
57 changed files with 1765 additions and 1504 deletions

View file

@ -3,8 +3,6 @@ import { beforeEach, describe, expect, it, vi } from 'vitest'
import { FeedbackDialog } from './FeedbackDialog'
import {
CIRCLECI_HOME_URL,
CODACY_HOME_URL,
CODESCENE_HOME_URL,
REFACTORING_HOME_URL,
TOLARIA_GITHUB_CONTRIBUTING_URL,
TOLARIA_GITHUB_DISCUSSIONS_URL,
@ -48,8 +46,6 @@ describe('FeedbackDialog', () => {
expect(screen.getByText('Report a bug')).toBeInTheDocument()
expect(screen.getByText(/Refactoring is my newsletter and community/i)).toBeInTheDocument()
expect(screen.getByText(/HoloLake Era is supported by a panel of tools/i)).toBeInTheDocument()
expect(screen.getByRole('button', { name: 'Open Codacy' })).toBeInTheDocument()
expect(screen.getByRole('button', { name: 'Open CodeScene' })).toBeInTheDocument()
expect(screen.getByRole('button', { name: 'Open CircleCI' })).toBeInTheDocument()
expect(screen.getByRole('button', { name: 'Open Unblocked' })).toBeInTheDocument()
expect(screen.getByText('Search on the board first, upvote existing ideas, and create new posts when genuinely new!')).toBeInTheDocument()
@ -81,8 +77,6 @@ describe('FeedbackDialog', () => {
render(<FeedbackDialog open={true} onClose={onClose} buildNumber="b281" releaseChannel={null} />)
fireEvent.click(screen.getByRole('button', { name: 'Check out Refactoring' }))
fireEvent.click(screen.getByRole('button', { name: 'Open Codacy' }))
fireEvent.click(screen.getByRole('button', { name: 'Open CodeScene' }))
fireEvent.click(screen.getByRole('button', { name: 'Open CircleCI' }))
fireEvent.click(screen.getByRole('button', { name: 'Open Unblocked' }))
fireEvent.click(screen.getByRole('button', { name: 'Open Product Board' }))
@ -92,15 +86,13 @@ describe('FeedbackDialog', () => {
fireEvent.click(screen.getByRole('button', { name: 'Open GitHub Issues' }))
await waitFor(() => expect(openExternalUrl).toHaveBeenNthCalledWith(1, REFACTORING_HOME_URL))
expect(openExternalUrl).toHaveBeenNthCalledWith(2, CODACY_HOME_URL)
expect(openExternalUrl).toHaveBeenNthCalledWith(3, CODESCENE_HOME_URL)
expect(openExternalUrl).toHaveBeenNthCalledWith(4, CIRCLECI_HOME_URL)
expect(openExternalUrl).toHaveBeenNthCalledWith(5, UNBLOCKED_HOME_URL)
expect(openExternalUrl).toHaveBeenNthCalledWith(6, TOLARIA_PRODUCT_BOARD_URL)
expect(openExternalUrl).toHaveBeenNthCalledWith(7, TOLARIA_GITHUB_DISCUSSIONS_URL)
expect(openExternalUrl).toHaveBeenNthCalledWith(8, TOLARIA_GITHUB_PULL_REQUESTS_URL)
expect(openExternalUrl).toHaveBeenNthCalledWith(9, TOLARIA_GITHUB_CONTRIBUTING_URL)
expect(openExternalUrl).toHaveBeenNthCalledWith(10, TOLARIA_GITHUB_ISSUES_URL)
expect(openExternalUrl).toHaveBeenNthCalledWith(2, CIRCLECI_HOME_URL)
expect(openExternalUrl).toHaveBeenNthCalledWith(3, UNBLOCKED_HOME_URL)
expect(openExternalUrl).toHaveBeenNthCalledWith(4, TOLARIA_PRODUCT_BOARD_URL)
expect(openExternalUrl).toHaveBeenNthCalledWith(5, TOLARIA_GITHUB_DISCUSSIONS_URL)
expect(openExternalUrl).toHaveBeenNthCalledWith(6, TOLARIA_GITHUB_PULL_REQUESTS_URL)
expect(openExternalUrl).toHaveBeenNthCalledWith(7, TOLARIA_GITHUB_CONTRIBUTING_URL)
expect(openExternalUrl).toHaveBeenNthCalledWith(8, TOLARIA_GITHUB_ISSUES_URL)
expect(onClose).not.toHaveBeenCalled()
expect(screen.getByTestId('feedback-dialog')).toBeInTheDocument()
})