diff --git a/test/component/cypress/specs/ExportWins/Details.cy.jsx b/test/component/cypress/specs/ExportWins/Details.cy.jsx deleted file mode 100644 index fe3b2046d38..00000000000 --- a/test/component/cypress/specs/ExportWins/Details.cy.jsx +++ /dev/null @@ -1,40 +0,0 @@ -import React from 'react' - -import { assertBreadcrumbs } from '../../../../functional/cypress/support/assertions' -import ExportWinDetails from '../../../../../src/client/modules/ExportWins/Details' -import urls from '../../../../../src/lib/urls' -import DataHubProvider from '../provider' - -describe('Export wins tab navigation', () => { - const Component = (props) => ( - - - - ) - - context('when rendering the breadcrumbs', () => { - it('should render...', () => { - cy.mount() - assertBreadcrumbs({ - Home: urls.dashboard.index(), - 'Export wins': urls.companies.exportWins.index(), - 'Rolls Reece cars to United Arab Emirates': null, - }) - }) - }) - - context('when rendering the title', () => { - it('should render Export wins', () => { - cy.mount() - cy.get('[data-test="heading"]').should( - 'have.text', - 'Rolls Reece cars to United Arab Emirates' - ) - }) - }) -}) diff --git a/test/component/cypress/specs/ExportWins/Table.cy.jsx b/test/component/cypress/specs/ExportWins/Table.cy.jsx deleted file mode 100644 index 0421a7a46ef..00000000000 --- a/test/component/cypress/specs/ExportWins/Table.cy.jsx +++ /dev/null @@ -1,87 +0,0 @@ -import React from 'react' - -import DataHubProvider from '../provider' -import { ExportWinsTable } from '../../../../../src/client/modules/ExportWins/Confirmed/ConfirmedWinsTable' -import { exportWinsFaker } from '../../../../functional/cypress/fakers/export-wins' -import { currencyGBP } from '../../../../../src/client/utils/number-utils' -import { formatMediumDate } from '../../../../../src/client/utils/date' -import { assertGovReactTable } from '../../../../functional/cypress/support/assertions' -import urls from '../../../../../src/lib/urls' - -const exportWinToRow = (exportWin) => [ - exportWin.company.name, - exportWin.country.name, - currencyGBP(exportWin.total_expected_export_value), - formatMediumDate(exportWin.date), - formatMediumDate(exportWin.customer_response.created_on), - 'View details', -] - -describe('Export wins table', () => { - it('should render Export wins table', () => { - const EXPORT_WINS = [ - { - company: { - name: 'Company 1', - id: 'company-1', - }, - country: { - name: 'Slovakia', - }, - total_expected_export_value: 1111111, - date: '1111-11-11', - customer_response: { - created_on: '1212-12-12', - }, - }, - { - company: { - name: 'Company 2', - id: 'company-2', - }, - country: { - name: 'Czech Republic', - }, - total_expected_export_value: 222222, - date: '0101-01-01', - customer_response: { - created_on: '0202-02-02', - }, - }, - exportWinsFaker(), - ] - - cy.mount( - - - - ) - - assertGovReactTable({ - element: 'table', - headings: [ - 'UK Company', - 'Destination', - 'Export amount', - 'Date won', - 'Date responded', - 'Details', - ], - rows: EXPORT_WINS.map(exportWinToRow), - }) - - EXPORT_WINS.forEach((exportWin, i) => - cy - .get(`tbody tr`) - .eq(i) - .contains(exportWin.company.name) - .should( - 'have.attr', - 'href', - urls.companies.detail(exportWin.company.id) - ) - ) - - // TODO: Assert "View details" link in the last column - }) -})