diff --git a/cypress/e2e/claude-explain.cy.ts b/cypress/e2e/claude-explain.cy.ts index 5fe2f8493..4ce9cd7c1 100644 --- a/cypress/e2e/claude-explain.cy.ts +++ b/cypress/e2e/claude-explain.cy.ts @@ -397,7 +397,7 @@ describe('Claude Explain feature', () => { }).as('getOptions'); let explainCallCount = 0; - cy.intercept('POST', 'http://test.localhost/fake-api/explain', (req: any) => { + cy.intercept('POST', 'http://test.localhost/fake-api/explain', (req: Cypress.Interception) => { explainCallCount++; req.reply({ status: 'success', @@ -470,7 +470,7 @@ describe('Claude Explain feature', () => { mockClaudeExplainAPIWithOptions(); let callCount = 0; - cy.intercept('POST', 'http://test.localhost/fake-api/explain', (req: any) => { + cy.intercept('POST', 'http://test.localhost/fake-api/explain', (req: Cypress.Interception) => { callCount++; const isBypassCache = req.body.bypassCache === true; req.reply({ @@ -512,7 +512,7 @@ describe('Claude Explain feature', () => { mockClaudeExplainAPIWithOptions(); let explainCount = 0; - cy.intercept('POST', 'http://test.localhost/fake-api/explain', (req: any) => { + cy.intercept('POST', 'http://test.localhost/fake-api/explain', (req: Cypress.Interception) => { explainCount++; req.reply({ status: 'success', @@ -576,7 +576,7 @@ describe('Claude Explain feature', () => { cy.wait('@explainRequest'); // Get the current URL (which includes state) - cy.url().then((url: any) => { + cy.url().then((url: string) => { // Clear intercepts from previous test cy.state('routes', []); cy.state('aliases', {}); diff --git a/cypress/support/utils.ts b/cypress/support/utils.ts index 46d5710ff..10fe69921 100644 --- a/cypress/support/utils.ts +++ b/cypress/support/utils.ts @@ -17,7 +17,7 @@ export function assertNoConsoleOutput() { */ export function clearAllIntercepts() { // Clear any existing intercepts by visiting a clean page and resetting - cy.window().then((win: any) => { + cy.window().then((win: Cypress.AUTWindow) => { // Reset any cached state win.compilerExplorerOptions = {}; }); @@ -38,7 +38,7 @@ export function setMonacoEditorContent(content: string, editorIndex = 0) { // Trigger a paste event with our content cy.get('.monaco-editor textarea') .eq(editorIndex) - .then(($element: any) => { + .then(($element: JQuery) => { const el = $element[0]; // Create and dispatch a paste event with our data @@ -56,7 +56,7 @@ export function setMonacoEditorContent(content: string, editorIndex = 0) { }); // Wait for compilation to complete after content change (if compiler exists) - cy.get('body').then(($body: any) => { + cy.get('body').then(($body: JQuery) => { if ($body.find('.compiler-wrapper').length > 0) { cy.get('.compiler-wrapper').should('not.have.class', 'compiling'); }