Skip to content

Commit 86bcbf6

Browse files
committed
fix CI after dependency updates
1 parent 295ac79 commit 86bcbf6

5 files changed

Lines changed: 14 additions & 28 deletions

File tree

packages/graphiql-e2e/cypress.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ export default defineConfig({
1616
e2e: {
1717
baseUrl: `http://localhost:${port}`,
1818
env: { target },
19+
expose: {
20+
A11Y_UPDATE_BASELINE: process.env.CYPRESS_A11Y_UPDATE_BASELINE === '1',
21+
},
1922
setupNodeEvents(on) {
2023
on('task', {
2124
writeBaseline({ filePath, data }: { filePath: string; data: unknown }) {

packages/graphiql-e2e/cypress/e2e/a11y.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type ViolationSummary = {
1111

1212
type Baseline = Record<string, ViolationSummary[]>;
1313

14-
const UPDATE_BASELINE = Boolean(Cypress.env('A11Y_UPDATE_BASELINE'));
14+
const UPDATE_BASELINE = Boolean(Cypress.expose('A11Y_UPDATE_BASELINE'));
1515

1616
const RULESET = {
1717
runOnly: {

packages/graphiql-react/src/components/settings-dialog/index.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,6 @@ export const SettingsDialog: FC<SettingsDialogProps> = ({
110110
const { setShouldPersistHeaders } = useGraphiQLActions();
111111
const [isDataCleared, setIsDataCleared] = useState(false);
112112

113-
// Reset the clear-storage confirmation when the dialog closes.
114-
useEffect(() => {
115-
if (!open) {
116-
setIsDataCleared(false);
117-
}
118-
}, [open]);
119-
120113
// The confirmation is transient: flash the checkmark, then hide it again,
121114
// mirroring the collections plugin's share confirmation.
122115
useEffect(() => {
@@ -135,6 +128,13 @@ export const SettingsDialog: FC<SettingsDialogProps> = ({
135128
setIsDataCleared(true);
136129
}
137130

131+
function handleOpenChange(nextOpen: boolean) {
132+
if (!nextOpen) {
133+
setIsDataCleared(false);
134+
}
135+
onOpenChange(nextOpen);
136+
}
137+
138138
// Keep Monaco editor font size in sync with the active preset.
139139
useEffect(() => {
140140
if (!monaco) {
@@ -163,7 +163,7 @@ export const SettingsDialog: FC<SettingsDialogProps> = ({
163163
return (
164164
<Dialog
165165
open={open}
166-
onOpenChange={onOpenChange}
166+
onOpenChange={handleOpenChange}
167167
restoreFocusRef={restoreFocusRef}
168168
>
169169
<div className="graphiql-settings-dialog">

pnpm-lock.yaml

Lines changed: 1 addition & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ minimumReleaseAge: 4320
1313
engineStrict: true
1414
nodeLinker: isolated
1515
linkWorkspacePackages: true
16+
preferWorkspacePackages: true
1617

1718
allowBuilds:
1819
'@vscode/vsce-sign': false

0 commit comments

Comments
 (0)