In this task you will create the decorator function decorateWithTiming. in the  src/common/helpers/pw.js file. This decorator will wrap the test.step function and measure how long it takes to execute, then log the duration.
- 
Open the forked repo in VSCode.
 - 
Create a new branch by running
git checkout -b task_solution. - 
Run the installation commands:
npm cinpx playwright install
 
- Open the 
src/common/helpers/pw.jsfile and familarize the code of the decorator functionsdecorateWithUserId&decorateWithTitleFromFunction; - Review the 
src/ui/pages/BasePage.js&src/ui/components/BaseComponent.jsconstuctors where the wrappedthis.stepis defined with the help of decorators. - Create the decorator function 
decorateWithTiming. in thesrc/common/helpers/pw.jsfile. 
- Decorator function accepts another function as input 
(fn); - Returns a new function that wraps original function and measure how long it takes to execute, then log the duration.
 - Use 
const startTime = Date.now();andconst endTime = Date.now();to log the start and end of the function execution. - User singleton logger instance 
const logger = Logger.getInstanse(); - Log the duration of the 
fnfunction execution withlogger.info()method. 
- Decorate the 
this.stepwith new decorator function in thesrc/ui/pages/BasePage.js&src/ui/components/BaseComponent.jsconstructors. - Change the 
LOG_LEVELtoinfoin theenv/.env.stagingfile. - Run the tests and make sure the logs with each step execution are present in the console.
 - Change the 
LOG_LEVELback toerrorinfo in theenv/.env.stagingfile. - Run the tests and make sure the logs with each step execution are NOT present in the console.
 
- Add and commit all your updates.
 - Push the code to the origin.
 - Create a PR for your changes.
 - Keep implementing suggestions from code review until your PR is approved.