-
Notifications
You must be signed in to change notification settings - Fork 13
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 #1035 from EcrituresNumeriques/feat/bump-deps
- Loading branch information
Showing
13 changed files
with
2,036 additions
and
7,141 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { describe, expect, test } from 'vitest' | ||
import { render, screen } from '@testing-library/react' | ||
import {getRoles} from '@testing-library/dom' | ||
import React from 'react' | ||
import Component from './Button.jsx' | ||
|
||
describe('Button', () => { | ||
test('renders as a button (default)', () => { | ||
render(<Component>Test</Component>) | ||
|
||
expect(screen.getByRole('button')).toHaveAttribute('type', 'button') | ||
}) | ||
|
||
test('renders as a submit button', () => { | ||
render(<Component primary>Test</Component>) | ||
expect(screen.getByRole('button')).toHaveAttribute('type', 'submit') | ||
}) | ||
|
||
test('renders with title, className and props', () => { | ||
render(<Component title="ok" disabled small link icon className="truc">Test</Component>) | ||
expect(screen.getByRole('button')).toHaveAttribute('title', 'ok') | ||
expect(screen.getByRole('button')).toHaveAttribute('disabled') | ||
expect(screen.getByRole('button')).toHaveClass(/small/) | ||
expect(screen.getByRole('button')).toHaveClass(/link/) | ||
expect(screen.getByRole('button')).toHaveClass(/icon/) | ||
expect(screen.getByRole('button')).toHaveClass('truc') | ||
}) | ||
}) |
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
129 changes: 129 additions & 0 deletions
129
front/src/helpers/__snapshots__/zotero/group-collection.bib
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,129 @@ | ||
|
||
@book{grossetie_test1_nodate, | ||
title = {test1}, | ||
publisher = {Moi}, | ||
author = {Grossetie, Guillaume}, | ||
} | ||
|
||
@misc{grossetie_hello_nodate, | ||
title = {Hello}, | ||
shorttitle = {Hi}, | ||
author = {Grossetie, Guillaume}, | ||
} | ||
|
||
@misc{grossetie_test_nodate, | ||
type = {yuzutech.fr}, | ||
title = {test}, | ||
journal = {How to}, | ||
author = {GROSSETIE, guillaume}, | ||
} | ||
|
||
@unpublished{noauthor_notitle_nodate, | ||
} | ||
|
||
@misc{noauthor_notitle_nodate-1, | ||
} | ||
|
||
@misc{noauthor_notitle_nodate-2, | ||
} | ||
|
||
@book{noauthor_test19_nodate, | ||
title = {test19}, | ||
} | ||
|
||
@book{noauthor_test26_nodate, | ||
title = {test26}, | ||
} | ||
|
||
@book{noauthor_test25_nodate, | ||
title = {test25}, | ||
} | ||
|
||
@book{noauthor_test24_nodate, | ||
title = {test24}, | ||
} | ||
|
||
@book{noauthor_test23_nodate, | ||
title = {test23}, | ||
} | ||
|
||
@book{noauthor_test22_nodate, | ||
title = {test22}, | ||
} | ||
|
||
@book{noauthor_test21_nodate, | ||
title = {test21}, | ||
} | ||
|
||
@book{noauthor_test20_nodate, | ||
title = {test20}, | ||
} | ||
|
||
@book{noauthor_test9_nodate, | ||
title = {test9}, | ||
} | ||
|
||
@book{noauthor_test8_nodate, | ||
title = {test8}, | ||
} | ||
|
||
@book{noauthor_test5_nodate, | ||
title = {test5}, | ||
} | ||
|
||
@book{noauthor_test7_nodate, | ||
title = {test7}, | ||
} | ||
|
||
@book{noauthor_test6_nodate, | ||
title = {test6}, | ||
} | ||
|
||
@book{noauthor_test4_nodate, | ||
title = {test4}, | ||
} | ||
|
||
@book{noauthor_test16_nodate, | ||
title = {test16}, | ||
} | ||
|
||
@book{noauthor_test15_nodate, | ||
title = {test15}, | ||
} | ||
|
||
@book{noauthor_test14_nodate, | ||
title = {test14}, | ||
} | ||
|
||
@book{noauthor_test12_nodate, | ||
title = {test12}, | ||
} | ||
|
||
@book{noauthor_test11_nodate, | ||
title = {test11}, | ||
} | ||
|
||
|
||
@book{noauthor_test3_nodate, | ||
title = {test3}, | ||
} | ||
|
||
@book{noauthor_test2_nodate, | ||
title = {test2}, | ||
} | ||
|
||
@book{noauthor_test18_nodate, | ||
title = {test18}, | ||
} | ||
|
||
@book{noauthor_test17_nodate, | ||
title = {test17}, | ||
} | ||
|
||
@book{noauthor_test13_nodate, | ||
title = {test13}, | ||
} | ||
|
||
@book{noauthor_test10_nodate, | ||
title = {test10}, | ||
} |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { afterEach, vi } from 'vitest' | ||
import { cleanup } from '@testing-library/react' | ||
import '@testing-library/jest-dom/vitest' | ||
|
||
vi.mock('react-router-dom') | ||
|
||
afterEach(() => cleanup()) |
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,23 @@ | ||
import React from 'react' | ||
import { render } from '@testing-library/react' | ||
import { Provider } from 'react-redux' | ||
import setupStore from '../src/createReduxStore.js' | ||
|
||
export function renderWithProviders(component, extendedRenderOptions = {}) { | ||
const { | ||
preloadedState = {}, | ||
// Automatically create a store instance if no store was passed in | ||
store = setupStore(preloadedState), | ||
...renderOptions | ||
} = extendedRenderOptions | ||
|
||
function Wrapper ({ children }) { | ||
<Provider store={store}>{children}</Provider> | ||
} | ||
|
||
// Return an object with the store and all of RTL's query functions | ||
return { | ||
store, | ||
...render(component, { wrapper: Wrapper, ...renderOptions }) | ||
} | ||
} |
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.