Add and correct tests for admin module
Formatting is also done, and we mocked the necessary component to avoid console.error in the output of the tests.
Formatting is also done, and we mocked the necessary component to avoid console.error in the output of the tests.