-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3461 from navikt/feature/tenor-personsoek
Feature/tenor personsoek
- Loading branch information
Showing
54 changed files
with
2,125 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
apps/dolly-frontend/src/main/js/cypress/e2e/TenorSoek.cy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import { CypressSelector } from '../mocks/Selectors' | ||
import { | ||
responseFalse, | ||
responseTrue, | ||
tenorSoekOversiktMock, | ||
tenorSoekTestdataMock, | ||
} from '../mocks/BasicMocks' | ||
|
||
describe('Tenor-søk testing', () => { | ||
const tenorSoekOversikt = new RegExp( | ||
/testnav-tenor-search-service\/api\/v1\/tenor\/testdata\/oversikt\?antall=10&side=0/, | ||
) | ||
const tenorSoekTestdata = new RegExp( | ||
/testnav-tenor-search-service\/api\/v1\/tenor\/testdata\?kilde=FREG&type=AlleFelter/, | ||
) | ||
const dollyBackendFinnesTrue = new RegExp(/dolly-backend\/api\/v1\/ident\/finnes\/12345678912/) | ||
const dollyBackendFinnesFalse = new RegExp(/dolly-backend\/api\/v1\/ident\/finnes\/98765432198/) | ||
|
||
it('passes', () => { | ||
cy.visit('') | ||
|
||
cy.intercept({ method: 'POST', url: tenorSoekOversikt }, tenorSoekOversiktMock) | ||
cy.intercept({ method: 'POST', url: tenorSoekTestdata }, tenorSoekTestdataMock) | ||
cy.intercept({ method: 'GET', url: dollyBackendFinnesTrue }, responseTrue) | ||
cy.intercept({ method: 'GET', url: dollyBackendFinnesFalse }, responseFalse) | ||
|
||
// Naviger til Tenor-soek og gjoer et soek | ||
cy.dollyGet(CypressSelector.BUTTON_HEADER_FINNPERSON).click() | ||
cy.dollyGet(CypressSelector.BUTTON_HEADER_TENOR).click() | ||
cy.get('h1').contains('Søk etter personer i Tenor').should('exist') | ||
cy.dollyGet(CypressSelector.CHECKBOX_TENORSOEK).click() | ||
cy.wait(1000) | ||
|
||
// Velg person som ikke ligger i Dolly og start import av personen | ||
cy.get('div').contains('TIGER ULV').click() | ||
cy.get('h2').contains('TIGER ULV').should('exist') | ||
cy.dollyGet(CypressSelector.BUTTON_IMPORTER_PERSONER).click() | ||
cy.wait(500) | ||
cy.get('h1').contains('Importer person').should('exist') | ||
cy.dollyGet(CypressSelector.BUTTON_IMPORTER).click() | ||
cy.wait(500) | ||
cy.get('.bestillingsveileder').should('exist') | ||
cy.dollyGet(CypressSelector.BUTTON_AVBRYT).click() | ||
cy.wait(500) | ||
cy.dollyGet(CypressSelector.BUTTON_BEKREFT).click() | ||
cy.wait(1000) | ||
cy.get('h1').contains('Søk etter personer i Tenor').should('exist') | ||
|
||
// Naviger til foerste person som ligger i Dolly | ||
cy.dollyGet(CypressSelector.BUTTON_VIS_I_GRUPPE).first().click() | ||
cy.wait(500) | ||
cy.get('h1').contains('Testytest').should('exist') | ||
|
||
// Gaa til soek fra gruppe | ||
cy.dollyGet(CypressSelector.BUTTON_IMPORTER_PERSONER).click() | ||
cy.get('h1').contains('Søk etter personer i Tenor').should('exist') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
apps/dolly-frontend/src/main/js/src/assets/icons/custom/TenorLogo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...rontend/src/main/js/src/components/fagsystem/skatteetaten/visning/SkatteetatenVisning.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import React from 'react' | ||
import Loading from '@/components/ui/loading/Loading' | ||
import Icon from '@/components/ui/icon/Icon' | ||
import { TitleValue } from '@/components/ui/titleValue/TitleValue' | ||
|
||
type SkatteetatenVisningProps = { | ||
data: { | ||
tenorRelasjoner: string[] | ||
} | ||
loading: boolean | ||
} | ||
|
||
// Midlertidig visning av daglig leder-rolle fra Tenor. Skrives om naar det er behov for aa vise flere Tenor-data. | ||
export const SkatteetatenVisning = ({ data, loading }: SkatteetatenVisningProps) => { | ||
if (loading) { | ||
return <Loading label="Laster Tenor-data ..." /> | ||
} | ||
|
||
const harDagligLederRolle = data?.tenorRelasjoner?.includes('BrregErFr') | ||
|
||
if (!data || !harDagligLederRolle) { | ||
return null | ||
} | ||
|
||
return ( | ||
<div style={{ marginTop: '15px' }}> | ||
<div className="sub-overskrift" style={{ backgroundColor: '#4B797A', color: '#fff' }}> | ||
<Icon fontSize={'1.5rem'} kind="tenor" /> | ||
<h3>Data fra Tenor</h3> | ||
</div> | ||
<h4 style={{ margin: '10px 0' }}>Enhetsregisteret og Foretaksregisteret</h4> | ||
<div className="person-visning_content"> | ||
<TitleValue title="Roller" value="Daglig leder" /> | ||
</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.