Skip to content

Commit 70cd5e4

Browse files
authored
Merge pull request #983
* chore(33212): replace tsconfig with clean defaults * chore(33212): fix version to avoid uncontrolled updates * chore(33212): fix ts configuration for Cypress * chore(33212): fix namespace warning * chore(33212): fix pnpm version * chore(33212): fix pnpm version * chore(33212): fix pnpm install * chore(33212): fix pnpm install * chore(33212): switch back to pnpm 9 * chore(33212): switch back to pnpm 9 * Revert "chore(33212): fix pnpm install"
1 parent 161d9f0 commit 70cd5e4

File tree

17 files changed

+10795
-8763
lines changed

17 files changed

+10795
-8763
lines changed

.github/actions/setup_node/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ runs:
1515
name: Install pnpm
1616
id: pnpm-install
1717
with:
18-
version: 8.4.0
18+
version: 9
1919
run_install: ${{ inputs.run-install }}
2020

2121
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4

hivemq-edge-frontend/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description = "Frontend for HiveMQ Edge"
1010
node {
1111
download.set(true)
1212
version.set("18.20.6")
13-
pnpmVersion.set("8")
13+
pnpmVersion.set("9")
1414
}
1515

1616
tasks.withType<PnpmTask>().configureEach {

hivemq-edge-frontend/cypress/cypress.d.ts

Lines changed: 0 additions & 26 deletions
This file was deleted.

hivemq-edge-frontend/cypress/support/a11y.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { RuleObject } from 'axe-core'
1+
import type { RuleObject } from 'axe-core'
22

33
export const ignoreGlobalRules: { rules: RuleObject } = {
44
rules: {

hivemq-edge-frontend/cypress/support/commands.ts

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,29 @@
1-
import { getByTestId } from './commands/getByTestId.ts'
2-
import { getByAriaLabel } from './commands/getByAriaLabel.ts'
3-
import { checkAccessibility } from './commands/checkAccessibility.ts'
4-
import { clearInterceptList } from './commands/clearInterceptList.ts'
1+
/// <reference types="cypress" />
2+
import type { ContextObject } from 'axe-core'
3+
import type { Options } from 'cypress-axe'
4+
import { getByTestId } from './commands/getByTestId'
5+
import { getByAriaLabel } from './commands/getByAriaLabel'
6+
import { checkAccessibility } from './commands/checkAccessibility'
7+
import { clearInterceptList } from './commands/clearInterceptList'
8+
9+
declare global {
10+
// eslint-disable-next-line @typescript-eslint/no-namespace
11+
namespace Cypress {
12+
interface Chainable {
13+
getByTestId(value: string): Chainable<JQuery<HTMLElement>>
14+
15+
getByAriaLabel(value: string): Chainable<JQuery<HTMLElement>>
16+
17+
checkAccessibility(
18+
context?: string | Node | ContextObject | undefined,
19+
options?: Options | undefined,
20+
skipFailures?: boolean
21+
): Chainable<JQuery<HTMLElement>>
22+
23+
clearInterceptList(interceptAlias: string): Chainable<JQuery<HTMLElement>>
24+
}
25+
}
26+
}
527

628
Cypress.Commands.add('getByTestId', getByTestId)
729
Cypress.Commands.add('getByAriaLabel', getByAriaLabel)

hivemq-edge-frontend/cypress/support/commands/checkAccessibility.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
/// <reference types="cypress" />
2+
import type { ContextObject, Result } from 'axe-core'
3+
import type { Options } from 'cypress-axe'
14
import { ignoreGlobalRules } from '../a11y.ts'
2-
import * as axe from 'axe-core'
3-
import { Options } from 'cypress-axe'
45

5-
const violationCallback = (violations: axe.Result[]) => {
6+
const violationCallback = (violations: Result[]) => {
67
for (const violation of violations) {
78
for (const node of violation.nodes) {
89
cy.log(violation.id, node.target, node.html)
@@ -11,7 +12,7 @@ const violationCallback = (violations: axe.Result[]) => {
1112
}
1213

1314
export const checkAccessibility = (
14-
context?: string | Node | axe.ContextObject | undefined,
15+
context?: string | Node | ContextObject | undefined,
1516
options?: Options | undefined,
1617
skipFailures?: boolean
1718
): void => {

hivemq-edge-frontend/cypress/support/commands/clearInterceptList.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// @ts-ignore an import is not working
2-
import { Interception } from 'cypress/types/net-stubbing'
2+
import type { Interception } from 'cypress/types/net-stubbing'
33

44
export const clearInterceptList = (interceptAlias: string): void => {
55
cy.get(interceptAlias + '.all').then((browserRequests: Interception) => {

hivemq-edge-frontend/cypress/support/component.ts

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,27 @@ import 'cypress-each'
33
import '@percy/cypress'
44
import 'cypress-real-events'
55
import '@cypress/code-coverage/support'
6+
import { type MountOptions, type MountReturn, mount } from 'cypress/react'
7+
import type { ReactNode } from 'react'
8+
import type { MemoryRouterProps } from 'react-router-dom'
69

7-
import './commands'
8-
import { mount } from 'cypress/react'
910
import { mountWithProviders } from './commands/mountWithProviders.tsx'
11+
import './commands'
12+
13+
declare global {
14+
// eslint-disable-next-line @typescript-eslint/no-namespace
15+
namespace Cypress {
16+
interface Chainable {
17+
mount(jsx: ReactNode, options?: MountOptions, rerenderKey?: string): Cypress.Chainable<MountReturn>
18+
mountWithProviders(
19+
component: React.ReactNode,
20+
options?: MountOptions & { routerProps?: MemoryRouterProps } & {
21+
wrapper?: React.JSXElementConstructor<{ children: React.ReactNode }>
22+
}
23+
): Cypress.Chainable<MountReturn>
24+
}
25+
}
26+
}
1027

1128
Cypress.Commands.add('mount', mount)
1229
Cypress.Commands.add('mountWithProviders', mountWithProviders)

hivemq-edge-frontend/cypress/support/e2e.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,3 @@ import './commands'
1010
import installLogsCollector from 'cypress-terminal-report/src/installLogsCollector'
1111

1212
installLogsCollector()
13-
14-
// Alternatively you can use CommonJS syntax:
15-
// require('./commands')

hivemq-edge-frontend/cypress/support/index.d.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)