Skip to content

Commit

Permalink
fix: fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
Flaminia Cavallo authored and Flaminia Cavallo committed Jul 25, 2024
1 parent 01b06b2 commit a899bdf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/components/view/submit-modal/submit-modal.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { faker } from '@faker-js/faker'
import { getReportText } from './submit-modal'
import { getReportText } from './submit-modal.js'

describe('getReportText', () => {
it('returns the report name', () => {
Expand Down
32 changes: 16 additions & 16 deletions src/pages/data.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ import React from 'react'
import { MemoryRouter, Route } from 'react-router-dom'
import { QueryParamProvider } from 'use-query-params'
import { ReactRouter6Adapter } from 'use-query-params/adapters/react-router-6'
import { formatData } from '../components/view/data-workspace/requests-display'
import { getRelativeTimeDifference } from '../components/view/data-workspace/title-bar'
import { getReportText } from '../components/view/submit-modal/submit-modal'
import { AppContext, UserContext } from '../context'
import { formatData } from '../components/view/data-workspace/requests-display/index.js'
import { getRelativeTimeDifference } from '../components/view/data-workspace/title-bar/index.js'
import { getReportText } from '../components/view/submit-modal/submit-modal.js'
import { AppContext, UserContext } from '../context/index.js'
import {
testDataExchange,
testDataExchangeSourceData,
testImportSummary,
testRequest,
testUserContext,
} from '../utils/builders.js'
import { DataPage } from './data'
import { DataPage } from './data.js'

const lastAnalyticsTableSuccess = '2024-07-07T21:47:58.383'
const serverDate = '2024-07-18T17:36:38.164'
Expand Down Expand Up @@ -106,7 +106,7 @@ beforeEach(() => {
describe('<DataPage/>', () => {
it('should display a drop down to select an exchange', async () => {
const exchanges = [testDataExchange(), testDataExchange()]
const { screen, aggregateDataExchanges } = setUp(<DataPage />, {
const { screen } = setUp(<DataPage />, {
aggregateDataExchanges: exchanges,
})

Expand All @@ -119,15 +119,15 @@ describe('<DataPage/>', () => {
})

it('should display a genera message when no exchange is selected ', async () => {
const { screen, aggregateDataExchanges } = setUp(<DataPage />)
const { screen } = setUp(<DataPage />)

expect(screen.getByTestId('entry-screen-message')).toBeInTheDocument()
})

it('should select and clear the selected exchange', async () => {
const anExchange = testDataExchange()
const exchanges = [anExchange, testDataExchange()]
const { screen, router } = setUp(<DataPage />, {
const { screen } = setUp(<DataPage />, {
aggregateDataExchanges: exchanges,
})

Expand All @@ -151,7 +151,7 @@ describe('<DataPage/>', () => {
it('should display the correct exchange specified in url if the param is present', async () => {
const anExchange = testDataExchange()
const exchanges = [anExchange, testDataExchange()]
const { screen, router } = setUp(<DataPage />, {
const { screen } = setUp(<DataPage />, {
aggregateDataExchanges: exchanges,
exchangeId: anExchange.id,
})
Expand All @@ -166,7 +166,7 @@ describe('<DataPage/>', () => {

const exchanges = [anExchange]
const exchangeData = testDataExchangeSourceData()
const { screen, router } = setUp(<DataPage />, {
const { screen } = setUp(<DataPage />, {
aggregateDataExchanges: exchanges,
exchangeId: anExchange.id,
exchangeData,
Expand Down Expand Up @@ -226,7 +226,7 @@ describe('<DataPage/>', () => {

const exchanges = [anExchange]
const exchangeData = testDataExchangeSourceData()
const { screen, router } = setUp(<DataPage />, {
const { screen } = setUp(<DataPage />, {
aggregateDataExchanges: exchanges,
exchangeId: anExchange.id,
exchangeData,
Expand Down Expand Up @@ -260,7 +260,7 @@ describe('<DataPage/>', () => {
})
const exchanges = [anExchange]
const exchangeData = testDataExchangeSourceData()
const { screen, router } = setUp(<DataPage />, {
const { screen } = setUp(<DataPage />, {
aggregateDataExchanges: exchanges,
exchangeId: anExchange.id,
exchangeData,
Expand Down Expand Up @@ -291,7 +291,7 @@ describe('<DataPage/>', () => {
})

const exchanges = [anExchange]
const { screen, router } = setUp(<DataPage />, {
const { screen } = setUp(<DataPage />, {
aggregateDataExchanges: exchanges,
exchangeId: anExchange.id,
importSummaryResponse: { importSummaries },
Expand Down Expand Up @@ -373,7 +373,7 @@ describe('<DataPage/>', () => {
})

const exchanges = [anExchange]
const { screen, router } = setUp(<DataPage />, {
const { screen } = setUp(<DataPage />, {
aggregateDataExchanges: exchanges,
exchangeId: anExchange.id,
importSummaryResponse: {
Expand Down Expand Up @@ -402,7 +402,7 @@ describe('<DataPage/>', () => {
const anExchange = testDataExchange()
const exchanges = [anExchange]

const { screen, router } = setUp(<DataPage />, {
const { screen } = setUp(<DataPage />, {
aggregateDataExchanges: exchanges,
exchangeId: anExchange.id,
loadExchangeDataForever: true,
Expand All @@ -415,7 +415,7 @@ describe('<DataPage/>', () => {
it('should display a warning if there are no requests', async () => {
const anExchange = testDataExchange({ requests: null })
const exchanges = [anExchange, testDataExchange()]
const { screen, router } = setUp(<DataPage />, {
const { screen } = setUp(<DataPage />, {
aggregateDataExchanges: exchanges,
exchangeId: anExchange.id,
})
Expand Down

0 comments on commit a899bdf

Please sign in to comment.