From cccd6e5143a41f47c3cf5708948a89af702544d6 Mon Sep 17 00:00:00 2001 From: Jason Stirnaman Date: Fri, 12 Dec 2025 13:15:22 -0600 Subject: [PATCH] test(api): Remove deprecated tab-related tests Remove tests for tabs and 3-column layout that no longer exist. Keep basic API reference tests and RapiDoc Mini component tests. --- cypress/e2e/content/api-reference.cy.js | 110 ++---------------------- 1 file changed, 6 insertions(+), 104 deletions(-) diff --git a/cypress/e2e/content/api-reference.cy.js b/cypress/e2e/content/api-reference.cy.js index a1e6bc4bb..ca9d4e47c 100644 --- a/cypress/e2e/content/api-reference.cy.js +++ b/cypress/e2e/content/api-reference.cy.js @@ -127,12 +127,11 @@ describe('API reference content', () => { }); /** - * 3-Column API Reference Layout Tests - * Tests the new layout for InfluxDB 3 Core/Enterprise API documentation - * Tests individual API endpoint pages which use the 3-column layout with tabs + * API Reference Layout Tests + * Tests layout and renderer for InfluxDB 3 Core/Enterprise API documentation */ -describe('API reference 3-column layout', () => { - // Individual API endpoint pages (not index pages) have the 3-column layout +describe('API reference layout', () => { + // API tag pages have RapiDoc renderer const layoutSubjects = [ '/influxdb3/core/api/v3/engine/', '/influxdb3/enterprise/api/v3/engine/', @@ -160,94 +159,9 @@ describe('API reference 3-column layout', () => { }); it('displays API content area', () => { - cy.get('.api-content, .content-wrapper').should('exist'); - }); - - it('displays TOC on desktop viewport', () => { - cy.viewport(1280, 800); - cy.get('.api-toc').should('be.visible'); - }); - - it('hides TOC on mobile viewport', () => { - cy.viewport(375, 667); - cy.get('.api-toc').should('not.be.visible'); - }); - }); - - describe('API Navigation', () => { - it('displays API navigation section', () => { - cy.get('.api-nav').should('exist'); - }); - - it('has collapsible navigation groups', () => { - cy.get('.api-nav-group').should('have.length.at.least', 1); - }); - - it('toggles group expand/collapse', () => { - cy.get('.api-nav-group-header').first().as('header'); - cy.get('@header').click(); - cy.get('@header') - .should('have.attr', 'aria-expanded') - .and('match', /true|false/); - }); - }); - - describe('Tab Navigation', () => { - it('displays tabs', () => { - cy.get('.api-tabs-wrapper').should('exist'); - }); - - it('shows Operations tab content by default', () => { - cy.get('[data-tab-panel="operations"]').should('be.visible'); - }); - - it('switches tabs on click without page jump', () => { - // Get initial scroll position - cy.window().then((win) => { - const initialScroll = win.scrollY; - - // Click the second tab - cy.get('.api-tabs-nav a').eq(1).click(); - - // Verify tabs are still visible (not jumped away) - cy.get('.api-tabs-wrapper').should('be.visible'); - - // Verify the clicked tab is now active - cy.get('.api-tabs-nav a').eq(1).should('have.class', 'is-active'); - - // Verify the first tab is no longer active - cy.get('.api-tabs-nav a') - .eq(0) - .should('not.have.class', 'is-active'); - }); - }); - - it('updates URL hash when switching tabs', () => { - cy.get('.api-tabs-nav a[data-tab="server"]').click(); - cy.url().should('include', '#server'); - }); - - it('restores tab from URL hash on page load', () => { - // Use the current subject URL with hash instead of hardcoded old reference URL - cy.visit(`${subject}#authentication`); - cy.get('.api-tabs-nav a[data-tab="authentication"]').should( - 'have.class', - 'is-active' + cy.get('.api-content, .content-wrapper, .article--content').should( + 'exist' ); - cy.get('[data-tab-panel="authentication"]').should('be.visible'); - }); - }); - - describe('Table of Contents', () => { - it('displays TOC header', () => { - cy.viewport(1280, 800); - cy.get('.api-toc-header').should('contain', 'ON THIS PAGE'); - }); - - it('generates TOC from headings', () => { - cy.viewport(1280, 800); - cy.wait(500); // Wait for component initialization - cy.get('.api-toc-nav').should('exist'); }); }); @@ -257,18 +171,6 @@ describe('API reference 3-column layout', () => { '.api-reference-container, rapi-doc, .api-reference-wrapper' ).should('exist'); }); - - it('displays spec download link', () => { - cy.get('.api-spec-download').should('exist'); - }); - }); - - describe('Accessibility', () => { - it('has ARIA attributes on nav groups', () => { - cy.get('.api-nav-group-header').each(($header) => { - cy.wrap($header).should('have.attr', 'aria-expanded'); - }); - }); }); }); });