Commit graph

10 commits

Author SHA1 Message Date
Dillon-Brown
674af51eea Update test namespaces
Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:22:42 +01:00
Dillon-Brown
06a6932496 Fix unit tests
- Update unit test bootstrap pathing
- Move new theme images to new legacy path
- Fix AccountsNewByMonthMock unit test warning
- Change startLegacyApp to follow the correct method signature

Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:22:36 +01:00
Dillon-Brown
5a8f382f03 Refactor all existing namespaces
Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:22:31 +01:00
Dillon-Brown
8c9b920e48 Update .gitignore to specify project specific ignores only
- Updated .gitignore placeholders to .gitkeep and removed the ones that are no longer needed.
- Updated root .gitignore with further project specific ignores.
- Removed all non-project ignores (IDE, filetypes, etc) from the root .gitignore

Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:22:07 +01:00
Clemente Raposo
21a831e9f3 Add date and time format config and preference mappers
- Update SystemConfigHander
-- Add ability to map config name
-- Add ability to map config value
-- Add SystemConfigMappers.php to store config mappers

- Update UserPreferenceHandler
-- Add ability to map preference name
-- Add ability to map preference value
-- Add UserPreferencesMappers to store preferences mappers

- Configure config mappers for date format
- Configure preference mappers for time format

- Update unit tests
2021-03-30 19:21:36 +01:00
Dillon-Brown
9197335343 Create a UnitTester bootstrap and update existing tests
- Add UnitTester to hook into codeception login when executing tests.
- Create _beforeSuite and _before methods to reduce code duplication and improve performance.
- Add static closures where possible for better scoping and performance.
- Fix missing typehints/PHPDocs.

Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:21:35 +01:00
Clemente Raposo
5d6aa45391 Add Route conversion on legacy
- Add legacy handler to access RouteConverter
- Add legacy handler to access ModuleNameMapper
- Add legacy handler to access ActionNameMapper
- Remove action and module name maps from Suite8 side

- Update frontend route converter to check for suite 8 routes
-- When link is a suite 8 route does not convert

- Add LegacyScopeState to allow for nested legacy handler calls
-- Add abstract getHandlerKey to base LegacyHandler
-- Implement getHandlerKey on all legacy handlers

- Update legacy handler init and close methods to use scope state
-- Check if withing an already open legacy handler scope
2021-03-30 19:21:34 +01:00
Clemente Raposo
6c3e266b5d Add legacy api re-direction
- Listen to legacy api calls on the LegacyRedirectListener
- Add LegacyApiRedirectHandler to re-direct to legacy endpoint
-- Using 307 re-direction response to support post re-direction
-- Using api_paths.yaml with the configuration with paths to check

- Setup API tests using codeception
-- Add helper methods to login in v4 and v8 API
- Add Api test to create account using v4 api
- Add Api test to create account using v8 api
- Add unit test for LegacyApiRedirectHandler
2021-03-30 19:21:34 +01:00
Clemente Raposo
b809e5c85b Add ClassicView routing
Redirect Suite7 requests to Suite8 ClassicView routes for valid actions
- Use Symfony kernel events
- Use Symfony service configuration and DI for module mapping

Add legacy redirection tests
- Add acceptance test support
-- Add config helper
- Fix issue when running `codcept run`
-- functional tests missing
- Add functional tests for legacy routing
- Add unit tests for legacy routing
2021-03-30 19:21:31 +01:00
Dillon-Brown
a787d0d82f Add codeception testing framework
This implements the basic structure that will be used for future unit, functional and acceptance tests.
2021-03-30 19:21:30 +01:00