Closed PatrikMatiasko closed 1 month ago
The recent updates to the project mainly enhance the mock server, shared UI, and testing infrastructure. Key changes include adding body-parsing middleware and environment configuration for the mock server, improving route handling for device and snippet services, and refining test setups and scenarios using Playwright. Post-validation and new routes have been introduced in the snippet-service backend. Additionally, UI components received improvements for better interaction and testing capabilities.
Files/Paths | Change Summaries |
---|---|
src/index.js | Added body-parser middleware, dotenv for configuration, and caching for GitHub API responses using versionData . |
src/routes/devices.js | Updated device routes with loadResponseStreamFromFile and lodash get for query handling. |
src/routes/snippet-service.js | Added validation, new routes, flags (configurationsAdd , configurationsDeleted ), and enhanced filtering logic. |
shared-ui (subproject) | Commit hash update from 49a3f3fd1e3935345bef18df891a2f3d6e251c52 to 2b72225d968c1ecb82e79af045086d61228bba26 . |
playwright/global-setup.ts | Replaced direct URL navigation with login(page) , added version data storage in local storage. |
playwright/playwright.config.ts | Enhanced expect methods and updated viewport settings for tests. |
playwright/tests/devices/detail.spec.ts | Updated device detail tests with new interactions, expectations, and viewport adjustments. |
playwright/tests/devices/list.spec.ts | Enhanced device list tests with viewport settings and improved screenshot expectations. |
playwright/tests/login.spec.ts | Removed and commented out Keycloak login interactions. |
playwright/tests/logout.spec.ts | Commented out logout action test logic. |
playwright/tests/snippet-service/configurations/detail.spec.ts | Added tests for configuration details including views, interactions, and validations. |
playwright/tests/snippet-service/configurations/list.spec.ts | Introduced tests for configuration list including form interactions and modal handling. |
playwright/tests/utils.ts | Added login function for handling Playwright login procedures. |
src/containers/Common/DetailHeaderLayout/DetailHeaderLayout.tsx | Added dataTestId prop to DeleteModal component. |
src/containers/Common/DetailHeaderLayout/DetailHeaderLayout.types.ts | Added deleteModal property to Props type. |
src/containers/Common/PageListTemplate/PageListTemplate.tsx | Modified actions for invoking, deleting, and viewing items in a table row. |
src/containers/Devices/Detail/DevicesDetailsPage/Tabs/Tab2/Tab2.tsx | Added logging statements before updateDevicesResourceApi function call. |
src/containers/SnippetService/Configurations/AddPage/AddPage.tsx | Added dataTestId attributes to buttons for testing purposes. |
src/containers/SnippetService/Configurations/DetailPage/DetailHeader.tsx | Added dataTestId to buttons and delete modal in the DetailHeader component. |
src/containers/SnippetService/Configurations/DetailPage/DetailPage.tsx | Added dataTestId attributes to InvokeModal and improved button event handling. |
src/containers/SnippetService/Configurations/DetailPage/JsonConfigModal.tsx | Enhanced JsonConfigModal with useMemo , validation, and dataTestId attributes. |
src/containers/SnippetService/Configurations/DetailPage/Tabs/Tab1/Tab1.tsx | Added dataTestId attributes to components for better identification in tests. |
src/containers/SnippetService/Configurations/DetailPage/Tabs/Tab2/Tab2.tsx | Added dataTestId attributes to table and button elements. |
src/containers/SnippetService/Configurations/DetailPage/Tabs/Tab3/Tab3.tsx | Added data-test-id and dataTestId attributes to elements. |
src/containers/SnippetService/Configurations/InvokeModal/InvokeModal.tsx | Added truncate for labels and dataTestId for various elements in InvokeModal . |
src/containers/SnippetService/Configurations/InvokeModal/InvokeModal.types.ts | Included optional dataTestId property in Props type. |
src/containers/SnippetService/Configurations/ListPage/ListPage.tsx | Added dataTestId to the add configuration button and invoke modal. |
src/testId.ts | Expanded testId object with detailed identifiers for snippetService configurations, buttons, and modals. |
In code we trust, we pave the way,
With tests and routes in bright array.
Devices talk and snippets sing,
A symphony of code we bring.
From login screens to detail views,
Our software grows, with fewer blues.
🎵✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Issues
2 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.5% Duplication on New Code
Updated Playwright Tests: The existing Playwright tests have been revised to improve accuracy, reliability, and coverage. This includes refactoring test scripts, updating test data, and enhancing test assertions.
New Playwright Tests with Mock Server: Introduced new Playwright tests that utilize a mock server to simulate API responses. This allows for more controlled and isolated testing environments, ensuring that tests can run independently of external service dependencies.