-
Notifications
You must be signed in to change notification settings - Fork 67
Writing tests
There are 2 kinds of tests here - cypress component tests, and cypress e2e tests.
Lives side by side with code, frontend/**/Thing.cy.tsx
tests frontend/**/Thing.tsx
.
Uses mock data, no real APIs.
Can be run in parallel, random order, fast.
Use for testing any component-specific logic. (Pagination paginates, filter sets triggers queries, etc.)
Run with npm run cypress:run:component
.
Example: Jobs.cy.tsx
Lives in cypress/
, uses real APIs,
shared servers run somewhere in cloud.
Run with npm run cypress:run:e2e
? TODO: auth?
Tests are expected to run in a shared environment - need to create a unique item, search for it, test any actions, and clean up. (Automatic cleanup should happen automatically that cleans old items ..overnight?)
TODO: there's a naming convention for the new items, what is it?
TODO: not available for hub yet
prefix names with e2e
aap-dev
PageFramework
PageHeader
PageLayout
PageDashboard
PageDashboardCarousel
PageDetails
PageForm
PageTable
PageTabs
PageToolbar
BulkActionDialog
BulkConfirmationDialog
EmptyState
PageCarousel
ReorderItems
useBreakPoint
useFrameworkTranslations
useInMemoryView
useIsMounted
useOpen
usePageNavigate
useSearchParams
useSelectDialog
useTableItems
useView
useWindowLocation
useDeleteRequest
useGet
useGetAllPagesAWX
useGetItem
useGetRequest
useOptions
usePatchRequest
usePostRequest