Commit Graph

39 Commits

Author SHA1 Message Date
Patrik Oldsberg ae6250ce3e test-utils: remove unnecessary wrapInTestApp wrapping that broke mount point discovery
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-04-01 14:45:39 +02:00
Oliver Sand 2fe195e8f2 Revert everything except the test
Signed-off-by: Oliver Sand <oliver.sand@sda-se.com>
2021-03-19 11:40:51 +01:00
Oliver Sand 06dd774eac Support routes of type SubRouteRef in mountedRoutes parameter of renderInTestApp
Signed-off-by: Oliver Sand <oliver.sand@sda-se.com>
2021-03-19 10:34:42 +01:00
Patrik Oldsberg 47c11f3748 test-utils: add workaround for external routes no longer being resolved when mounted
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-03-08 19:14:41 +01:00
Johan Haals 34b710f0c0 test-utils: Attach mountPoint to Page
Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-02-16 16:08:08 +01:00
Johan Haals dc12852c9e test-utils: Allow ExternalRouteRef on mountedRoutes
Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-02-16 14:54:35 +01:00
Patrik Oldsberg 0e640893df test-utils: add mountedRoutes option to wrapInTestApp 2021-02-05 13:56:53 +01:00
Fredrik Adelöw 5d52e20a44 core-api: run bindRoutes in the app impl and inject provider 2020-12-17 13:18:13 +01:00
Askar a6a2ca6204 remove React's FC type from codebase (#3527)
* WIP-packages: remove React's FC type from codebase

* remove FC from other directories

* fix build failures

* add types to required packages
2020-12-10 11:23:29 +01:00
Fredrik Adelöw fae3fafcfa silence some new ts squigglies in the editor (#3435) 2020-11-25 09:57:16 +01:00
blam a8d7e4cfe3 chore: fixing remaining tests and merge conflicts 2020-10-20 00:59:50 +02:00
blam fdf090b57f feat(msw); refactor away the setup commands into ttestutils 2020-10-07 17:20:26 +02:00
Patrik Oldsberg a5741ff0aa test-utils: switch to new auto DI api 2020-09-08 11:31:48 +02:00
Fredrik Adelöw 82ba3169fe chore(deps): prepare us to typescript 4 2020-08-31 10:46:56 +02:00
Fredrik Adelöw 7389f326d9 chore: add import/newline-after-import lint rule 2020-07-02 11:25:04 +02:00
Fredrik Adelöw 879bc21893 feat(test-utils): mock storage api 2020-06-26 13:24:31 +02:00
Patrik Oldsberg 9a37995151 packages/core-api: split AppComponent into AppRouter and AppRoutes 2020-06-16 11:35:35 +02:00
blam 0cd9a8a7d4 chore(react-router-v6): tidy up parts of the PR i wasn't happy with 2020-06-11 20:42:39 +02:00
blam 7ecfceac0f chore(react-router-v6): made some more progress on getting the tests passing 2020-06-11 18:35:53 +02:00
blam 48aacfbe17 Merge branch 'master' of github.com:spotify/backstage into blam/react-router
* 'master' of github.com:spotify/backstage: (89 commits)
  Use URLSearchParams
  Use location?.type once more
  chore(catalog): clean up CatalogTable, use only Entity
  chore(catalog): clean up ComponentPage, use only Entity
  chore(catalog): tweak getEntityByName a bit, handle 404s properly
  chore(catalog/star): only set the cache if there are entries from the response
  chore(catalog/star): added a comment about why we are using a simple cache here
  chore(catalog/star): removing msw dependency, wrong branch
  chore(catalog): consistent use of named exports
  chore(msw): Added msw dependency
  chore(catalog/star): fixing issues with unmocked deps
  chore(catalog/star): adding a simple cache to stop flicker as a stopgap
  chore(catalog/star): reworking how the starring works, it now stores uri sort of references for entities
  fix(core): Tabs useEffect dependency list
  docs: format with prettier (#1218)
  Optional namespace and name as one part of URL
  docs/auth: added overview, oauth description and glossary
  docs: added plantuml generation script
  docs: added prettier config
  Remove deleted UserBadge component from Sidebar story
  ...
2020-06-11 17:36:19 +02:00
blam cf204edeb2 chore:(react-router-v6): Moving more logic across to react-router-v6 2020-06-09 11:57:48 +02:00
Patrik Oldsberg 2bbdf644c8 Merge pull request #1203 from spotify/rugvip/apimocks
packages/test-utils: added MockErrorApi and include in all test apps
2020-06-08 18:57:08 +02:00
Patrik Oldsberg 47d3f04bb7 Merge pull request #1201 from spotify/rugvip/nestapis
packages/core-api,test-utils
2020-06-08 18:21:01 +02:00
Patrik Oldsberg b5b95138f4 packages/test-utils: initial test registry with ErrorApi mock + tests 2020-06-08 18:00:19 +02:00
Patrik Oldsberg c01fe79642 packages/test-utils: added MockErrorApi 2020-06-08 18:00:19 +02:00
Patrik Oldsberg 676c4af4fd package/test-utils: provide renderInTestApp + act wrapping + docs + tests 2020-06-08 17:57:49 +02:00
Patrik Oldsberg c40a2a5e61 packages/core-api: move router component inside app and configure it with base path 2020-06-06 17:06:18 +02:00
Patrik Oldsberg 65ab1685f4 packages/core-api: make App configLoader optional and synchronous when missing 2020-06-01 14:59:28 +02:00
Patrik Oldsberg 44f61015f5 packages/test-utils: add missing wrappapper props 2020-06-01 14:19:23 +02:00
Patrik Oldsberg e32f5a49ff packages/test-utils: do app wrapping with actual app + remove wrapInThemedTestApp 2020-06-01 13:43:51 +02:00
Marcus Eide 324245586f Change import of jest-dom in setupTests.ts according to change in api 2020-05-18 11:11:58 +02:00
Patrik Oldsberg d766d7aac4 packages,plugins: use lightTheme/darkTheme exports from theme package 2020-04-16 11:44:30 +02:00
Patrik Oldsberg 9cf2de0511 packages/test-utils: added simple test for app wrapper 2020-04-14 21:18:31 +02:00
Patrik Oldsberg eed736f2e8 package/test-utils: move some test utils to separate package so test-utils can depend on core 2020-04-14 19:50:05 +02:00
Patrik Oldsberg a6167ce02a Merge pull request #509 from spotify/rugvip/logcollect
packages/test-utils: port logCollector to TypeScript + add tests
2020-04-12 13:21:56 +02:00
Patrik Oldsberg 4e26d21a85 packages/test-utils: split app wrappers and testing library utils out from index (#510) 2020-04-12 08:26:47 +02:00
Patrik Oldsberg 83fb640207 packages/test-utils: add tests for logCollector 2020-04-07 18:20:15 +02:00
Patrik Oldsberg 742e94a754 packages/test-utils: port logCollector to TS 2020-04-07 18:19:34 +02:00
Patrik Oldsberg 29094608c2 packages/testUtils: renamed dir to test-utils 2020-04-07 17:22:50 +02:00