mirror of
https://github.com/portainer/portainer.git
synced 2025-07-25 08:19:40 +02:00
refactor(app): create access-control-form react component [EE-2332] (#6346)
* refactor(app): create access-control-form react component [EE-2332] fix [EE-2332] * chore(tests): setup msw for async tests and stories chore(sb): add msw support for storybook * refactor(access-control): move loading into component * fix(app): fix users and teams selector stories * chore(access-control): write test for validation
This commit is contained in:
parent
8dbb802fb1
commit
ecd0eb6170
41 changed files with 1841 additions and 72 deletions
10
app/setup-tests/setup-msw.ts
Normal file
10
app/setup-tests/setup-msw.ts
Normal file
|
@ -0,0 +1,10 @@
|
|||
// test/setup-env.js
|
||||
// add this to your setupFilesAfterEnv config in jest so it's imported for every test file
|
||||
import { server } from './server';
|
||||
|
||||
beforeAll(() => server.listen());
|
||||
// if you need to add a handler after calling setupServer for some specific test
|
||||
// this will remove that handler for the rest of them
|
||||
// (which is important for test isolation):
|
||||
afterEach(() => server.resetHandlers());
|
||||
afterAll(() => server.close());
|
Loading…
Add table
Add a link
Reference in a new issue