setHoverState(prevState => ({ ...prevState, Components: true })) } onMouseLeave={ () => setHoverState({ Components: false }) }>
Components
diff --git a/cypress/test/AlgoliaSearch.cy.js b/cypress/test/AlgoliaSearch.cy.js
new file mode 100644
index 00000000000..21d2654a6d2
--- /dev/null
+++ b/cypress/test/AlgoliaSearch.cy.js
@@ -0,0 +1,27 @@
+import { mount } from 'cypress/react'
+import AlgoliaSearch from '../../components/AlgoliaSearch'
+import { SearchButton } from '../../components/AlgoliaSearch';
+import { DocSearchModal } from '@docsearch/react'
+
+describe('AlgoliaSearch component', () => {
+ it('renders without errors', () => {
+ mount(
+
+ Search
+
+ )
+ })
+
+ it('performs search for a specific page', () => {
+ mount(
+
+ Open Search
+
+ );
+ cy.get('button').click(); // Open the search modal
+ cy.get('input[placeholder="Search resources"]').type('welcome')
+ cy.should('have.value', 'welcome')
+ // Check if the docsearch-list element contains the text 'Welcome'
+ cy.get('#docsearch-list').contains('Welcome')
+ });
+});
\ No newline at end of file
diff --git a/cypress/test/GeneratorInstallation.cy.js b/cypress/test/GeneratorInstallation.cy.js
new file mode 100644
index 00000000000..0428284badf
--- /dev/null
+++ b/cypress/test/GeneratorInstallation.cy.js
@@ -0,0 +1,8 @@
+import { mount } from 'cypress/react';
+import GeneratorInstallation from '../../components/GeneratorInstallation';
+
+describe('GeneratorInstallation', () => {
+ it('renders without errors', () => {
+ mount(
);
+ });
+});
\ No newline at end of file
diff --git a/cypress/test/OpenAPIComparison.cy.js b/cypress/test/OpenAPIComparison.cy.js
new file mode 100644
index 00000000000..86de5e2dd51
--- /dev/null
+++ b/cypress/test/OpenAPIComparison.cy.js
@@ -0,0 +1,57 @@
+import { mount } from '@cypress/react'
+import OpenAPIComparison from '../../components/OpenAPIComparison'
+
+describe('OpenAPIComparison', () => {
+ it('renders without errors', () => {
+ mount(
);
+
+ });
+
+ it('changes background color on hover', () => {
+ mount(
);
+
+ // Hover over the "Info" element
+ cy.contains('Info').trigger('mouseover');
+ cy.get('[data-testid="OpenAPI-sec-info"]').should('exist');
+
+ // Hover over the "Servers" element
+ cy.contains('Servers').trigger('mouseover');
+ cy.get('[data-testid="OpenAPI-sec-servers"]').should('exist');
+
+ // Hover over the "Paths" element
+ cy.contains('Paths').trigger('mouseover');
+ cy.get('[data-testid="OpenAPI-paths"]').should('exist');
+
+ // Hover over the "Path Item" element
+ cy.contains('Path Item').trigger('mouseover');
+ cy.get('[data-testid="OpenAPI-path-item"]').should('exist');
+
+ // Hover over the "Summary and description" element
+ cy.contains('Summary and description').trigger('mouseover');
+ cy.get('[data-testid="OpenAPI-summary"]').should('exist');
+
+ // Hover over the "Operation (GET, PUT, POST, etc.)" element
+ cy.contains('Operation (GET, PUT, POST, etc.)').trigger('mouseover');
+ cy.get('[data-testid="OpenAPI-operation"]').should('exist');
+
+ // Hover over the "Request" element
+ cy.contains('Request').trigger('mouseover');
+ cy.get('[data-testid="OpenAPI-request"]').should('exist');
+
+ // Hover over the "Responses" element
+ cy.contains('Responses').trigger('mouseover');
+ cy.get('[data-testid="OpenAPI-responses"]').should('exist');
+
+ // Hover over the "Tags" element
+ cy.contains('Tags').trigger('mouseover');
+ cy.get('[data-testid="OpenAPI-tags"]').should('exist');
+
+ // Hover over the "External Docs" element
+ cy.contains('External Docs').trigger('mouseover');
+ cy.get('[data-testid="OpenAPI-external"]').should('exist');
+
+ // Hover over the "Components" element
+ cy.contains('Components').trigger('mouseover');
+ cy.get('[data-testid="OpenAPI-components"]').should('exist');
+ });
+});