diff --git a/cypress/integration/marketing/homepage.spec.js b/cypress/integration/marketing/homepage.spec.js deleted file mode 100644 index 4c30c82c1..000000000 --- a/cypress/integration/marketing/homepage.spec.js +++ /dev/null @@ -1,26 +0,0 @@ -/* eslint-disable cypress/no-unnecessary-waiting */ -/// - -describe('test for built in marketing pages in app', () => { - const urls = [ - '/', - '/mindshare/', - '/ai/', - '/why-zesty/', - '/marketplace/installed/', - '/marketplace/register/', - ]; - - urls.forEach((url) => { - it(`should load URL: ${url} without encountering 404`, () => { - cy.request({ - url: Cypress.config().baseUrl + url, - failOnStatusCode: false, - }).then((response) => { - expect(response.status).to.not.equal(404); - expect(response.body).not.to.contain('404 Not Found'); - cy.get('body').should('exist'); - }); - }); - }); -}); diff --git a/cypress/integration/marketing/marketing.spec.js b/cypress/integration/marketing/marketing.spec.js new file mode 100644 index 000000000..ca133a5c8 --- /dev/null +++ b/cypress/integration/marketing/marketing.spec.js @@ -0,0 +1,27 @@ +/* eslint-disable cypress/no-unnecessary-waiting */ +/// + +import routes from '../../../src/components/globals/FillerContent'; + +describe('test for routes in marketing pages', () => { + const urls = routes.routingJSON.slice(0, 3); + + const requests = urls.map((route) => { + return cy.request({ + url: Cypress.config().baseUrl + route.uri, + failOnStatusCode: false, + }); + }); + + it('should load all URLs without encountering 404', () => { + return Promise.all(requests).then((responses) => { + responses.forEach((response, index) => { + expect(response.status, `URL: ${urls[index].url}`).to.not.equal(404); + expect(response.body, `URL: ${urls[index].url}`).not.to.contain( + '404 Not Found', + ); + }); + cy.get('body').should('exist'); + }); + }); +}); diff --git a/next.config.js b/next.config.js index c408d1d70..548eae68c 100644 --- a/next.config.js +++ b/next.config.js @@ -17,16 +17,4 @@ module.exports = { ], }, swcMinify: true, - - webpack: (config, { dev, isServer }) => { - if (!dev && !isServer) { - Object.assign(config.resolve.alias, { - 'react/jsx-runtime.js': 'preact/compat/jsx-runtime', - react: 'preact/compat', - 'react-dom/test-utils': 'preact/test-utils', - 'react-dom': 'preact/compat', - }); - } - return config; - }, };