-
Notifications
You must be signed in to change notification settings - Fork 3
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 #2200 from navikt/react-18
[TPO-31] Oppgrader til react 18
- Loading branch information
Showing
233 changed files
with
1,409 additions
and
3,197 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import * as React from 'react'; | ||
import * as ReactDOM from 'react-dom'; | ||
import { createRoot } from 'react-dom/client'; | ||
import AppContainer from './AppContainer'; | ||
|
||
it('renders without crashing', () => { | ||
const div = document.createElement('div'); | ||
div.id = 'root'; | ||
document.body.appendChild(div); | ||
|
||
ReactDOM.render(<AppContainer />, div); | ||
const root = createRoot(div); | ||
root.render(<AppContainer />); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import * as React from 'react'; | ||
import { mount } from 'enzyme'; | ||
import { render } from '@testing-library/react'; | ||
|
||
import BrukerprofilSide from './BrukerprofilSide'; | ||
import TestProvider from '../../test/Testprovider'; | ||
|
||
test('Smoketeste brukerprofil', () => { | ||
const brukerprofil = mount( | ||
const { container } = render( | ||
<TestProvider> | ||
<BrukerprofilSide /> | ||
</TestProvider> | ||
); | ||
|
||
expect(brukerprofil).toMatchSnapshot(); | ||
expect(container).toMatchSnapshot(); | ||
}); |
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
70 changes: 69 additions & 1 deletion
70
src/app/brukerprofil/__snapshots__/BrukeprofilSide.test.tsx.snap
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 |
---|---|---|
@@ -1,3 +1,71 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`Smoketeste brukerprofil 1`] = `ReactWrapper {}`; | ||
exports[`Smoketeste brukerprofil 1`] = ` | ||
.c0 { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
flex-grow: 1; | ||
} | ||
.c0 >*:first-child { | ||
margin-bottom: 1rem; | ||
} | ||
<div> | ||
<div | ||
class="c0" | ||
> | ||
<div | ||
class="alertstripe alertstripe--info" | ||
> | ||
<span | ||
class="alertstripe__ikon" | ||
> | ||
<span | ||
class="sr-only" | ||
> | ||
info | ||
</span> | ||
<svg | ||
aria-label="info-ikon" | ||
focusable="false" | ||
height="1.5em" | ||
kind="info-sirkel-fyll" | ||
role="img" | ||
viewBox="0 0 24 24" | ||
width="1.5em" | ||
> | ||
<g | ||
fill="none" | ||
> | ||
<path | ||
d="M12 0C5.382 0 0 5.382 0 12s5.382 12 12 12c6.617 0 12-5.382 12-12S18.617 0 12 0z" | ||
fill="#337C9B" | ||
/> | ||
<path | ||
d="M12 5a1.566 1.566 0 1 1 .11 3.13A1.566 1.566 0 0 1 12 5zm2.976 12.01c.563 0 1.043.431 1.043.991s-.48.992-1.043.992H9.39c-.564 0-1.043-.431-1.043-.992 0-.56.479-.99 1.043-.99h1.6v-5.016h-.986c-.565 0-1.044-.43-1.044-.991 0-.56.48-.991 1.044-.991h2.03c.563 0 1.043.43 1.043.99v6.007h1.899z" | ||
fill="#FFF" | ||
/> | ||
</g> | ||
</svg> | ||
</span> | ||
<div | ||
class="typo-normal alertstripe__tekst" | ||
> | ||
Redigering av brukerprofil er flyttet | ||
</div> | ||
</div> | ||
<a | ||
class="lenkepanel" | ||
href="" | ||
> | ||
Gå til den nye personforvalteren | ||
<span | ||
class="lenkepanel__indikator" | ||
/> | ||
</a> | ||
</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
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
2 changes: 1 addition & 1 deletion
2
src/app/internarbeidsflatedecorator/EasterEggs/nisselue/Nisselue.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
2 changes: 1 addition & 1 deletion
2
src/app/internarbeidsflatedecorator/EasterEggs/nisselue/Sno.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
2 changes: 1 addition & 1 deletion
2
src/app/internarbeidsflatedecorator/EasterEggs/partyhatt/Fireworks.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
2 changes: 1 addition & 1 deletion
2
src/app/internarbeidsflatedecorator/EasterEggs/partyhatt/Partyhatt.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
2 changes: 1 addition & 1 deletion
2
src/app/internarbeidsflatedecorator/EasterEggs/paskeegg/Chick.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
2 changes: 1 addition & 1 deletion
2
src/app/internarbeidsflatedecorator/EasterEggs/paskeegg/PaaskeEgg.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
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
Oops, something went wrong.