@syngrisi/syngrisi 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nvmrc +1 -0
- package/LICENSE.md +9 -0
- package/README.md +139 -0
- package/config.js +17 -0
- package/dist/config.js +16 -0
- package/dist/src/server/models/index.js +508 -0
- package/dist/src/server/models/plugins/index.js +4 -0
- package/dist/src/server/models/plugins/paginate.plugin.js +76 -0
- package/dist/src/server/models/plugins/paginateDistinct.plugin.js +76 -0
- package/dist/src/server/models/plugins/toJSON.plugin.js +39 -0
- package/dist/src/server/schemas/createCheck.shema.js +17 -0
- package/dist/src/server/schemas/getBaseline.shema.js +12 -0
- package/dist/src/server/utils/paramsGuard.js +18 -0
- package/dist/src/tasks/backup.js +68 -0
- package/dist/src/tasks/lib/common.js +14 -0
- package/dist/src/tasks/lib/utils.js +14 -0
- package/dist/src/tasks/migrations/2.0.migration.js +86 -0
- package/dist/src/tasks/migrations/2.0.migration_mql.js +57 -0
- package/dist/src/tasks/reindex.js +28 -0
- package/dist/src/tasks/restore.js +86 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/docker-compose.yml +70 -0
- package/mvc/views/react/admin/index.html +22 -0
- package/mvc/views/react/assets/LogicalGroup.95929360.js +15993 -0
- package/mvc/views/react/assets/PasswordInput.8a73fdd2.js +299 -0
- package/mvc/views/react/assets/admin.94703bdc.js +14448 -0
- package/mvc/views/react/assets/auth.748478ef.js +673 -0
- package/mvc/views/react/assets/bg_2_0_dark_L2.3a31edc0.png +0 -0
- package/mvc/views/react/assets/favicon.bf5828d5.svg +7 -0
- package/mvc/views/react/assets/index.a5606313.css +23 -0
- package/mvc/views/react/assets/roboto-v30-latin-100.0f303f31.woff2 +0 -0
- package/mvc/views/react/assets/roboto-v30-latin-100.34e9582c.woff +0 -0
- package/mvc/views/react/assets/roboto-v30-latin-500.9ce7f3ac.woff +0 -0
- package/mvc/views/react/assets/roboto-v30-latin-500.b0195382.woff2 +0 -0
- package/mvc/views/react/assets/roboto-v30-latin-700.e0fd57c0.woff +0 -0
- package/mvc/views/react/assets/roboto-v30-latin-700.f5aebdfe.woff2 +0 -0
- package/mvc/views/react/assets/roboto-v30-latin-regular.f2abf7fb.woff +0 -0
- package/mvc/views/react/assets/roboto-v30-latin-regular.f6734f81.woff2 +0 -0
- package/mvc/views/react/assets/root.136e0ea3.js +25451 -0
- package/mvc/views/react/assets/use-form.57ebe175.js +24472 -0
- package/mvc/views/react/assets/use-form.ecb4391b.css +36 -0
- package/mvc/views/react/auth/index.html +22 -0
- package/mvc/views/react/index.html +19 -0
- package/mvc/views/react/index2/index.html +21 -0
- package/package.json +144 -0
- package/server.js +166 -0
- package/src/server/controllers/app.controller.js +21 -0
- package/src/server/controllers/auth.controller.js +156 -0
- package/src/server/controllers/baseline.controller.js +24 -0
- package/src/server/controllers/check.controller.js +56 -0
- package/src/server/controllers/client.controller.js +173 -0
- package/src/server/controllers/index.js +12 -0
- package/src/server/controllers/logs.controller.js +30 -0
- package/src/server/controllers/runs.controller.js +25 -0
- package/src/server/controllers/settings.controller.js +23 -0
- package/src/server/controllers/snapshots.controller.js +17 -0
- package/src/server/controllers/suite.controller.js +24 -0
- package/src/server/controllers/tasks.controller.js +47 -0
- package/src/server/controllers/test.controller.js +70 -0
- package/src/server/controllers/users.controller.js +79 -0
- package/src/server/data/custom_devices.json +8 -0
- package/src/server/data/devices.json +773 -0
- package/src/server/data/get_devices.sh +2 -0
- package/src/server/lib/AppSettings.js +56 -0
- package/src/server/lib/admin.json +9 -0
- package/src/server/lib/comparator.js +147 -0
- package/src/server/lib/compareImagesNode.js +60 -0
- package/src/server/lib/dbItems.js +215 -0
- package/src/server/lib/ensureLogin/ensureLoggedIn.js +223 -0
- package/src/server/lib/ensureLogin/ensureLoggedOut.js +44 -0
- package/src/server/lib/getElementsByPixPositionsFromDump.js +72 -0
- package/src/server/lib/guest.json +9 -0
- package/src/server/lib/initialAppSettings.json +18 -0
- package/src/server/lib/logger.js +95 -0
- package/src/server/lib/onStart.js +53 -0
- package/src/server/lib/parseDiff.js.bak +72 -0
- package/src/server/lib/testAdmin.json +9 -0
- package/src/server/lib/testUsers.json +41 -0
- package/src/server/middlewares/authorization.js +50 -0
- package/src/server/middlewares/disableCors.js +19 -0
- package/src/server/models/index.js +534 -0
- package/src/server/models/plugins/index.js +3 -0
- package/src/server/models/plugins/paginate.plugin.js +83 -0
- package/src/server/models/plugins/paginateDistinct.plugin.js +80 -0
- package/src/server/models/plugins/toJSON.plugin.js +44 -0
- package/src/server/routes/ui/admin.js +20 -0
- package/src/server/routes/ui/auth.js +15 -0
- package/src/server/routes/ui/index.js +19 -0
- package/src/server/routes/v1/app.route.js +9 -0
- package/src/server/routes/v1/auth.route.js +12 -0
- package/src/server/routes/v1/baselines.route.js +14 -0
- package/src/server/routes/v1/checks.route.js +25 -0
- package/src/server/routes/v1/client.route.js +39 -0
- package/src/server/routes/v1/index.js +82 -0
- package/src/server/routes/v1/logs.route.js +16 -0
- package/src/server/routes/v1/runs.route.js +15 -0
- package/src/server/routes/v1/settings.route.js +23 -0
- package/src/server/routes/v1/snapshots.route.js +11 -0
- package/src/server/routes/v1/suites.route.js +15 -0
- package/src/server/routes/v1/tasks.route.js +59 -0
- package/src/server/routes/v1/test.route.js +20 -0
- package/src/server/routes/v1/test_distinct.route.js +14 -0
- package/src/server/routes/v1/users.route.js +36 -0
- package/src/server/schemas/createCheck.shema.ts +17 -0
- package/src/server/schemas/getBaseline.shema.ts +12 -0
- package/src/server/services/app.service.js +23 -0
- package/src/server/services/check.service.js +178 -0
- package/src/server/services/client.service.js +648 -0
- package/src/server/services/generic.service.js +51 -0
- package/src/server/services/index.js +12 -0
- package/src/server/services/logs.service.js +38 -0
- package/src/server/services/run.service.js +40 -0
- package/src/server/services/suite.service.js +39 -0
- package/src/server/services/tasks.service.js +536 -0
- package/src/server/services/test.service.js +72 -0
- package/src/server/services/user.service.js +128 -0
- package/src/server/utils/ApiError.js +14 -0
- package/src/server/utils/catchAsync.js +8 -0
- package/src/server/utils/check.js +58 -0
- package/src/server/utils/dateToISO8601.js +2 -0
- package/src/server/utils/deserializeIfJSON.js +9 -0
- package/src/server/utils/formatISOToDateTime.js +6 -0
- package/src/server/utils/index.js +10 -0
- package/src/server/utils/isJSON.js +6 -0
- package/src/server/utils/paramsGuard.ts +15 -0
- package/src/server/utils/pick.js +15 -0
- package/src/server/utils/prettyCheckParams.js +13 -0
- package/src/server/utils/snapshots.js +73 -0
- package/src/server/utils/subDays.js +7 -0
- package/src/server/utils/tests.js +36 -0
- package/src/server/utils/utils.js +146 -0
- package/src/tasks/backup.js.bak +84 -0
- package/src/tasks/backup.ts +53 -0
- package/src/tasks/lib/common.js +24 -0
- package/src/tasks/lib/utils.js +15 -0
- package/src/tasks/migrations/2.0.migration.js +86 -0
- package/src/tasks/migrations/2.0.migration.ts +95 -0
- package/src/tasks/migrations/2.0.migration_mql.js +63 -0
- package/src/tasks/reindex.js +36 -0
- package/src/tasks/restore.js.bak +100 -0
- package/src/tasks/restore.ts +75 -0
- package/src/ui-app/.eslintrc.json +119 -0
- package/src/ui-app/README.md +15 -0
- package/src/ui-app/admin/AdminLayout.tsx +38 -0
- package/src/ui-app/admin/App.tsx +108 -0
- package/src/ui-app/admin/AppContext.ts +3 -0
- package/src/ui-app/admin/components/Header/AdminHeader.tsx +148 -0
- package/src/ui-app/admin/components/Logs/AdminLogs.tsx +142 -0
- package/src/ui-app/admin/components/Logs/RefreshActionIcon.tsx +60 -0
- package/src/ui-app/admin/components/Logs/Table/AdminLogsTable.tsx +81 -0
- package/src/ui-app/admin/components/Logs/Table/AdminLogsTableFilter.tsx +170 -0
- package/src/ui-app/admin/components/Logs/Table/AdminLogsTableHeads.tsx +50 -0
- package/src/ui-app/admin/components/Logs/Table/AdminLogsTableRows.tsx +207 -0
- package/src/ui-app/admin/components/Logs/Table/AdminLogsTableSettings.tsx +95 -0
- package/src/ui-app/admin/components/Logs/Table/InfinityScrollSkeleton.tsx +77 -0
- package/src/ui-app/admin/components/Logs/Table/InfinityScrollSkeletonFIller.tsx +57 -0
- package/src/ui-app/admin/components/Logs/Table/PagesCountAffix.tsx +61 -0
- package/src/ui-app/admin/components/Logs/Table/adminLogsCreateStyle.tsx +36 -0
- package/src/ui-app/admin/components/Logs/Table/adminLogsTableColumns.ts +52 -0
- package/src/ui-app/admin/components/Logs/UnfoldActionIcon.tsx +39 -0
- package/src/ui-app/admin/components/Navbar/AdminNavbar.tsx +50 -0
- package/src/ui-app/admin/components/Navbar/NavbarLinksGroup.tsx +104 -0
- package/src/ui-app/admin/components/Settings/AdminSettings.tsx +51 -0
- package/src/ui-app/admin/components/Settings/Forms/Boolean.tsx +59 -0
- package/src/ui-app/admin/components/Settings/Forms/FormWrapper.tsx +45 -0
- package/src/ui-app/admin/components/Settings/Forms/index.tsx +5 -0
- package/src/ui-app/admin/components/Settings/Forms/interfaces.tsx +17 -0
- package/src/ui-app/admin/components/Tasks/Task.tsx +138 -0
- package/src/ui-app/admin/components/Tasks/TaskWrapper.tsx +11 -0
- package/src/ui-app/admin/components/Tasks/tasksList.ts +59 -0
- package/src/ui-app/admin/components/Users/AdminUsers.tsx +182 -0
- package/src/ui-app/admin/components/Users/UserAddForm.tsx +137 -0
- package/src/ui-app/admin/components/Users/UserForm.tsx +196 -0
- package/src/ui-app/admin/hooks/useParams.tsx +18 -0
- package/src/ui-app/admin/index.html +17 -0
- package/src/ui-app/admin/main.tsx +24 -0
- package/src/ui-app/asserts/css/auth/index.css +23 -0
- package/src/ui-app/asserts/css/styles.css +36 -0
- package/src/ui-app/asserts/fonts/roboto/roboto-v30-latin-100.eot +0 -0
- package/src/ui-app/asserts/fonts/roboto/roboto-v30-latin-100.svg +313 -0
- package/src/ui-app/asserts/fonts/roboto/roboto-v30-latin-100.ttf +0 -0
- package/src/ui-app/asserts/fonts/roboto/roboto-v30-latin-100.woff +0 -0
- package/src/ui-app/asserts/fonts/roboto/roboto-v30-latin-100.woff2 +0 -0
- package/src/ui-app/asserts/fonts/roboto/roboto-v30-latin-500.eot +0 -0
- package/src/ui-app/asserts/fonts/roboto/roboto-v30-latin-500.svg +305 -0
- package/src/ui-app/asserts/fonts/roboto/roboto-v30-latin-500.ttf +0 -0
- package/src/ui-app/asserts/fonts/roboto/roboto-v30-latin-500.woff +0 -0
- package/src/ui-app/asserts/fonts/roboto/roboto-v30-latin-500.woff2 +0 -0
- package/src/ui-app/asserts/fonts/roboto/roboto-v30-latin-700.eot +0 -0
- package/src/ui-app/asserts/fonts/roboto/roboto-v30-latin-700.svg +309 -0
- package/src/ui-app/asserts/fonts/roboto/roboto-v30-latin-700.ttf +0 -0
- package/src/ui-app/asserts/fonts/roboto/roboto-v30-latin-700.woff +0 -0
- package/src/ui-app/asserts/fonts/roboto/roboto-v30-latin-700.woff2 +0 -0
- package/src/ui-app/asserts/fonts/roboto/roboto-v30-latin-regular.eot +0 -0
- package/src/ui-app/asserts/fonts/roboto/roboto-v30-latin-regular.svg +308 -0
- package/src/ui-app/asserts/fonts/roboto/roboto-v30-latin-regular.ttf +0 -0
- package/src/ui-app/asserts/fonts/roboto/roboto-v30-latin-regular.woff +0 -0
- package/src/ui-app/asserts/fonts/roboto/roboto-v30-latin-regular.woff2 +0 -0
- package/src/ui-app/asserts/images/background.jpg +0 -0
- package/src/ui-app/asserts/images/bg_2_0_dark_L2.png +0 -0
- package/src/ui-app/asserts/images/favicon.svg +7 -0
- package/src/ui-app/auth/App.tsx +82 -0
- package/src/ui-app/auth/commonStyles.tsx +26 -0
- package/src/ui-app/auth/components/AuthFooter.tsx +51 -0
- package/src/ui-app/auth/components/AuthLogo.tsx +58 -0
- package/src/ui-app/auth/components/ChangePasswordForm.tsx +216 -0
- package/src/ui-app/auth/components/ChangePasswordSuccessForm.tsx +38 -0
- package/src/ui-app/auth/components/LoginForm.tsx +148 -0
- package/src/ui-app/auth/components/LogoutForm.tsx +89 -0
- package/src/ui-app/auth/components/ToggleThemeButton.tsx +41 -0
- package/src/ui-app/auth/components/change-password/Bars.tsx +45 -0
- package/src/ui-app/auth/components/change-password/PasswordRequirement.tsx +14 -0
- package/src/ui-app/auth/components/change-password/requirements.tsx +6 -0
- package/src/ui-app/auth/index.html +17 -0
- package/src/ui-app/auth/main.tsx +12 -0
- package/src/ui-app/auth/routes.tsx +26 -0
- package/src/ui-app/config.ts +15 -0
- package/src/ui-app/index.html +12 -0
- package/src/ui-app/index2/App.tsx +162 -0
- package/src/ui-app/index2/AppContext.ts +3 -0
- package/src/ui-app/index2/IndexLayout.tsx +34 -0
- package/src/ui-app/index2/components/Header/HeaderIndex.tsx +248 -0
- package/src/ui-app/index2/components/Header/QuickFilter.tsx +312 -0
- package/src/ui-app/index2/components/Navbar/Items/AcceptStatusItem.tsx +42 -0
- package/src/ui-app/index2/components/Navbar/Items/BaseItemWrapper.tsx +94 -0
- package/src/ui-app/index2/components/Navbar/Items/BrowserItem.tsx +42 -0
- package/src/ui-app/index2/components/Navbar/Items/PlatformItem.tsx +42 -0
- package/src/ui-app/index2/components/Navbar/Items/RemoveItemModalAsk.tsx +71 -0
- package/src/ui-app/index2/components/Navbar/Items/RemoveItemPopover.tsx +58 -0
- package/src/ui-app/index2/components/Navbar/Items/RemoveSuiteModalAsk.tsx +61 -0
- package/src/ui-app/index2/components/Navbar/Items/RunItem.tsx +149 -0
- package/src/ui-app/index2/components/Navbar/Items/StatusItem.tsx +42 -0
- package/src/ui-app/index2/components/Navbar/Items/SuiteItem.tsx +109 -0
- package/src/ui-app/index2/components/Navbar/Items/index.tsx +6 -0
- package/src/ui-app/index2/components/Navbar/NavbarFilter.tsx +93 -0
- package/src/ui-app/index2/components/Navbar/NavbarGroupBySelect.tsx +83 -0
- package/src/ui-app/index2/components/Navbar/NavbarIndex.tsx +247 -0
- package/src/ui-app/index2/components/Navbar/NavbarItems.tsx +38 -0
- package/src/ui-app/index2/components/Navbar/NavbarSort.tsx +105 -0
- package/src/ui-app/index2/components/Navbar/Skeletons/RunsDummySkeleton.tsx +27 -0
- package/src/ui-app/index2/components/Navbar/Skeletons/SimpleDummySkeleton.tsx +23 -0
- package/src/ui-app/index2/components/Navbar/Skeletons/SkeletonWrapper.tsx +45 -0
- package/src/ui-app/index2/components/Navbar/Skeletons/SuitesDummySkeleton.tsx +27 -0
- package/src/ui-app/index2/components/Tests/Table/AcceptTestModalAsk.tsx +68 -0
- package/src/ui-app/index2/components/Tests/Table/AcceptTestsButton.tsx +44 -0
- package/src/ui-app/index2/components/Tests/Table/Cells/Branch.tsx +35 -0
- package/src/ui-app/index2/components/Tests/Table/Cells/BrowserName.tsx +33 -0
- package/src/ui-app/index2/components/Tests/Table/Cells/BrowserVersion.tsx +31 -0
- package/src/ui-app/index2/components/Tests/Table/Cells/CellWrapper.tsx +49 -0
- package/src/ui-app/index2/components/Tests/Table/Cells/Os.tsx +32 -0
- package/src/ui-app/index2/components/Tests/Table/Cells/StartDate.tsx +34 -0
- package/src/ui-app/index2/components/Tests/Table/Cells/Status.tsx +50 -0
- package/src/ui-app/index2/components/Tests/Table/Cells/ViewPort.tsx +46 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/AcceptButton.tsx +142 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/Check.tsx +281 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/CheckDetails/Canvas/Canvas.tsx +36 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/CheckDetails/Canvas/helpers.ts +72 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/CheckDetails/Canvas/mainView.ts +495 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/CheckDetails/Canvas/sideToSideView.ts +398 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/CheckDetails/Canvas/simpleView.ts +21 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/CheckDetails/CheckDetails.tsx +237 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/CheckDetails/Header.tsx +221 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/CheckDetails/RelatedChecks/RelatedCheckItem.tsx +167 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/CheckDetails/RelatedChecks/RelatedCheckSort.tsx +81 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/CheckDetails/RelatedChecks/RelatedChecks.tsx +197 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/CheckDetails/RelatedChecks/RelatedChecksItems.tsx +31 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/CheckDetails/RelatedChecks/RelatedChecksSkeleton.tsx +37 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/CheckDetails/Toolbar/HighlightButton.tsx +56 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/CheckDetails/Toolbar/RegionsToolbar.tsx +150 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/CheckDetails/Toolbar/ScreenshotDetails.tsx +137 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/CheckDetails/Toolbar/Toolbar.tsx +101 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/CheckDetails/Toolbar/ViewSegmentedControl.tsx +159 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/CheckDetails/Toolbar/ZoomToolbar.tsx +326 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/CheckDetails/Toolbar/highlightDiff.ts +167 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/CheckDetails/hooks/useRelatedChecks.tsx +43 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/CheckModal.tsx +119 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/Checks.tsx +91 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/ChecksSkeleton.tsx +21 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/PreviewCheckTooltipLabel.tsx +121 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/RemoveButton.tsx +63 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/ViewPortLabel.tsx +94 -0
- package/src/ui-app/index2/components/Tests/Table/Checks/checkSizes.ts +27 -0
- package/src/ui-app/index2/components/Tests/Table/Filter.tsx +179 -0
- package/src/ui-app/index2/components/Tests/Table/Heads.tsx +54 -0
- package/src/ui-app/index2/components/Tests/Table/InfinityScrollSkeleton.tsx +71 -0
- package/src/ui-app/index2/components/Tests/Table/PagesCountAffix.tsx +61 -0
- package/src/ui-app/index2/components/Tests/Table/RefreshActionIcon.tsx +65 -0
- package/src/ui-app/index2/components/Tests/Table/RemoveTestModalAsk.tsx +66 -0
- package/src/ui-app/index2/components/Tests/Table/RemoveTestsButton.tsx +43 -0
- package/src/ui-app/index2/components/Tests/Table/Row.tsx +128 -0
- package/src/ui-app/index2/components/Tests/Table/Rows.tsx +87 -0
- package/src/ui-app/index2/components/Tests/Table/Settings.tsx +121 -0
- package/src/ui-app/index2/components/Tests/Table/TestsTable.tsx +140 -0
- package/src/ui-app/index2/components/Tests/Table/UnfoldActionIcon.tsx +39 -0
- package/src/ui-app/index2/components/Tests/Table/tableColumns.ts +80 -0
- package/src/ui-app/index2/components/Tests/Table/testsCreateStyle.tsx +35 -0
- package/src/ui-app/index2/components/Tests/Tests.tsx +157 -0
- package/src/ui-app/index2/hooks/useIndexSubpageEffect.tsx +14 -0
- package/src/ui-app/index2/hooks/useNavbarActiveItems.tsx +66 -0
- package/src/ui-app/index2/hooks/useParams.tsx +25 -0
- package/src/ui-app/index2/index.html +17 -0
- package/src/ui-app/index2/main.tsx +33 -0
- package/src/ui-app/package-lock.json +6150 -0
- package/src/ui-app/package.json +58 -0
- package/src/ui-app/shared/components/ActionPopoverIcon.tsx +116 -0
- package/src/ui-app/shared/components/Check/AcceptedStatusIcon.tsx +51 -0
- package/src/ui-app/shared/components/Check/BrowserIcon.tsx +50 -0
- package/src/ui-app/shared/components/Check/OsIcon.tsx +73 -0
- package/src/ui-app/shared/components/Check/Status.tsx +37 -0
- package/src/ui-app/shared/components/Check/StatusIcon.tsx +66 -0
- package/src/ui-app/shared/components/Email.tsx +83 -0
- package/src/ui-app/shared/components/Header/ApiKeyModalAsk.tsx +31 -0
- package/src/ui-app/shared/components/Header/ApiKeyModalResult.tsx +89 -0
- package/src/ui-app/shared/components/Header/HeaderLogo.tsx +82 -0
- package/src/ui-app/shared/components/Header/UserInfoModal.tsx +92 -0
- package/src/ui-app/shared/components/Header/UserMenu.tsx +151 -0
- package/src/ui-app/shared/components/Password.tsx +95 -0
- package/src/ui-app/shared/components/RelativeDrawer.tsx +43 -0
- package/src/ui-app/shared/components/SafeSelect.tsx +95 -0
- package/src/ui-app/shared/components/Tests/StatusesRing.tsx +66 -0
- package/src/ui-app/shared/components/ToggleThemeButton.tsx +33 -0
- package/src/ui-app/shared/components/Users/LabelUser.tsx +60 -0
- package/src/ui-app/shared/components/errors/ErrorFallback.tsx +66 -0
- package/src/ui-app/shared/components/filter/AcceptedFilter.tsx +20 -0
- package/src/ui-app/shared/components/filter/BrowserNameFilter.tsx +20 -0
- package/src/ui-app/shared/components/filter/CommonDistinctFilter.tsx +104 -0
- package/src/ui-app/shared/components/filter/DateFilter.tsx +54 -0
- package/src/ui-app/shared/components/filter/FilterWrapper.tsx +80 -0
- package/src/ui-app/shared/components/filter/IdFilter.tsx +60 -0
- package/src/ui-app/shared/components/filter/LogLevelFilter.tsx +77 -0
- package/src/ui-app/shared/components/filter/LogicalGroup.tsx +179 -0
- package/src/ui-app/shared/components/filter/OsFilter.tsx +20 -0
- package/src/ui-app/shared/components/filter/StatusFilter.tsx +20 -0
- package/src/ui-app/shared/components/filter/StringFilter.tsx +55 -0
- package/src/ui-app/shared/components/filter/index.ts +19 -0
- package/src/ui-app/shared/components/heaserLinks.tsx +4 -0
- package/src/ui-app/shared/hooks/index.ts +3 -0
- package/src/ui-app/shared/hooks/useColorSheme.ts +22 -0
- package/src/ui-app/shared/hooks/useDistinctLogQuery.tsx +33 -0
- package/src/ui-app/shared/hooks/useDistinctQuery.tsx +37 -0
- package/src/ui-app/shared/hooks/useInfinityScroll.tsx +163 -0
- package/src/ui-app/shared/hooks/useInfinityScrollRelatedChecks.tsx +60 -0
- package/src/ui-app/shared/hooks/useNavProgressFetchEffect.tsx +17 -0
- package/src/ui-app/shared/hooks/useSubpageEffect.tsx +28 -0
- package/src/ui-app/shared/hooks/user.hooks.ts +49 -0
- package/src/ui-app/shared/interfaces/ILog.tsx +13 -0
- package/src/ui-app/shared/interfaces/IUser.tsx +13 -0
- package/src/ui-app/shared/interfaces/logQueries.tsx +31 -0
- package/src/ui-app/shared/navigation/interfaces.tsx +7 -0
- package/src/ui-app/shared/navigation/navigationData.tsx +191 -0
- package/src/ui-app/shared/services/checks.service.ts +39 -0
- package/src/ui-app/shared/services/generic.service.ts +115 -0
- package/src/ui-app/shared/services/index.ts +6 -0
- package/src/ui-app/shared/services/runs.service.ts +20 -0
- package/src/ui-app/shared/services/suites.service.ts +20 -0
- package/src/ui-app/shared/services/tests.service.ts +39 -0
- package/src/ui-app/shared/services/users.service.ts +29 -0
- package/src/ui-app/shared/utils/Logger.ts +12 -0
- package/src/ui-app/shared/utils/SearchParams.ts +17 -0
- package/src/ui-app/shared/utils/filters.tsx +14 -0
- package/src/ui-app/shared/utils/index.ts +5 -0
- package/src/ui-app/shared/utils/utils.tsx +70 -0
- package/src/ui-app/stub.html +12 -0
- package/src/ui-app/stub.tsx +58 -0
- package/src/ui-app/stubDemoColors.tsx +47 -0
- package/src/ui-app/stubDemoNav.tsx +41 -0
- package/src/ui-app/tsconfig.json +21 -0
- package/src/ui-app/tsconfig.node.json +12 -0
- package/static/A.png +0 -0
- package/static/B.png +0 -0
- package/static/affected.html +39 -0
- package/static/affected_2.html +40 -0
- package/static/data/custom_devices.json +14 -0
- package/static/grids/desktop-higher.html +72 -0
- package/static/grids/desktop-wider.html +72 -0
- package/static/grids/desktop.html +61 -0
- package/static/grids/fit-in-view.html +62 -0
- package/static/js/canvasjs.min.js.bak +957 -0
- package/static/js/chart.js.bak +92 -0
- package/static/js/jquery-3.3.1.slim.js.bak +8269 -0
- package/static/js/jquery-3.3.1.slim.min.js.bak +2 -0
- package/static/js/moment.min.js.bak +2 -0
- package/static/low_diff_0.png +0 -0
- package/static/low_diff_1.png +0 -0
- package/static/vShift.png +0 -0
- package/static/vShift_bottom.png +0 -0
- package/static/vShift_top.png +0 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Group, Text, Tooltip } from '@mantine/core';
|
|
3
|
+
import { tableColumns } from '../tableColumns';
|
|
4
|
+
import { BrowserIcon } from '../../../../../shared/components/Check/BrowserIcon';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
type: string
|
|
8
|
+
test: any
|
|
9
|
+
itemValue: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function BrowserName({ type, test, itemValue }: Props) {
|
|
13
|
+
return (
|
|
14
|
+
<td
|
|
15
|
+
key={type}
|
|
16
|
+
data-test={`table-row-${tableColumns[type].label}`}
|
|
17
|
+
style={{ ...tableColumns[type].cellStyle }}
|
|
18
|
+
>
|
|
19
|
+
<Tooltip label={test[type]} multiline withinPortal>
|
|
20
|
+
<Group spacing={6} align="center" noWrap>
|
|
21
|
+
<BrowserIcon size={24} browser={itemValue} />
|
|
22
|
+
<Text
|
|
23
|
+
lineClamp={1}
|
|
24
|
+
sx={{ wordBreak: 'break-all' }}
|
|
25
|
+
>
|
|
26
|
+
{itemValue}
|
|
27
|
+
</Text>
|
|
28
|
+
</Group>
|
|
29
|
+
</Tooltip>
|
|
30
|
+
</td>
|
|
31
|
+
|
|
32
|
+
);
|
|
33
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Group, Text, Tooltip } from '@mantine/core';
|
|
3
|
+
import { tableColumns } from '../tableColumns';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
type: string
|
|
7
|
+
test: any
|
|
8
|
+
itemValue: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function BrowserVersion({ type, test, itemValue }: Props) {
|
|
12
|
+
return (
|
|
13
|
+
<td
|
|
14
|
+
key={type}
|
|
15
|
+
data-test={`table-row-${tableColumns[type].label}`}
|
|
16
|
+
style={{ ...tableColumns[type].cellStyle }}
|
|
17
|
+
>
|
|
18
|
+
<Tooltip label={test[type]} multiline withinPortal>
|
|
19
|
+
<Group spacing={6} align="center" noWrap>
|
|
20
|
+
<Text
|
|
21
|
+
lineClamp={1}
|
|
22
|
+
sx={{ wordBreak: 'break-all' }}
|
|
23
|
+
>
|
|
24
|
+
{itemValue}
|
|
25
|
+
</Text>
|
|
26
|
+
</Group>
|
|
27
|
+
</Tooltip>
|
|
28
|
+
</td>
|
|
29
|
+
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Text, Tooltip } from '@mantine/core';
|
|
3
|
+
import { Status } from './Status';
|
|
4
|
+
import { StartDate } from './StartDate';
|
|
5
|
+
import { Os } from './Os';
|
|
6
|
+
import { BrowserName } from './BrowserName';
|
|
7
|
+
import { BrowserVersion } from './BrowserVersion';
|
|
8
|
+
import { Branch } from './Branch';
|
|
9
|
+
import { Viewport } from './ViewPort';
|
|
10
|
+
import { tableColumns } from '../tableColumns';
|
|
11
|
+
|
|
12
|
+
interface Props {
|
|
13
|
+
type: string
|
|
14
|
+
test: any
|
|
15
|
+
itemValue: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function CellWrapper({ type, test, itemValue }: Props) {
|
|
19
|
+
const cellsMap: { [key: string]: any } = {
|
|
20
|
+
status: (<Status type={type} key={type} test={test} />),
|
|
21
|
+
startDate: (<StartDate type={type} key={type} test={test} itemValue={itemValue} />),
|
|
22
|
+
os: (<Os type={type} key={type} test={test} itemValue={itemValue} />),
|
|
23
|
+
browserName: (<BrowserName type={type} key={type} test={test} itemValue={itemValue} />),
|
|
24
|
+
browserVersion: (<BrowserVersion type={type} key={type} test={test} itemValue={itemValue} />),
|
|
25
|
+
branch: (<Branch type={type} key={type} test={test} itemValue={itemValue} />),
|
|
26
|
+
viewport: (<Viewport type={type} key={type} test={test} />),
|
|
27
|
+
};
|
|
28
|
+
return cellsMap[type] || (
|
|
29
|
+
<td
|
|
30
|
+
key={type}
|
|
31
|
+
data-test={`table-row-${tableColumns[type].label}`}
|
|
32
|
+
style={{ ...tableColumns[type].cellStyle }}
|
|
33
|
+
>
|
|
34
|
+
<Tooltip label={test[type]} multiline withinPortal>
|
|
35
|
+
<Text
|
|
36
|
+
lineClamp={1}
|
|
37
|
+
sx={{ wordBreak: 'break-all' }}
|
|
38
|
+
{
|
|
39
|
+
...{
|
|
40
|
+
[`data-table-test-${type.toLowerCase()}`]: itemValue,
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
>
|
|
44
|
+
{itemValue}
|
|
45
|
+
</Text>
|
|
46
|
+
</Tooltip>
|
|
47
|
+
</td>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Group, Text, Tooltip } from '@mantine/core';
|
|
3
|
+
import { tableColumns } from '../tableColumns';
|
|
4
|
+
import { OsIcon } from '../../../../../shared/components/Check/OsIcon';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
type: string
|
|
8
|
+
test: any
|
|
9
|
+
itemValue: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function Os({ type, test, itemValue }: Props) {
|
|
13
|
+
return (
|
|
14
|
+
<td
|
|
15
|
+
key={type}
|
|
16
|
+
data-test={`table-row-${tableColumns[type].label}`}
|
|
17
|
+
style={{ ...tableColumns[type].cellStyle }}
|
|
18
|
+
>
|
|
19
|
+
<Tooltip label={test[type]} multiline withinPortal>
|
|
20
|
+
<Group spacing={6} align="center" noWrap>
|
|
21
|
+
<OsIcon size={18} os={itemValue} />
|
|
22
|
+
<Text
|
|
23
|
+
lineClamp={1}
|
|
24
|
+
sx={{ wordBreak: 'break-all' }}
|
|
25
|
+
>
|
|
26
|
+
{itemValue}
|
|
27
|
+
</Text>
|
|
28
|
+
</Group>
|
|
29
|
+
</Tooltip>
|
|
30
|
+
</td>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Text, Tooltip } from '@mantine/core';
|
|
3
|
+
import * as dateFns from 'date-fns';
|
|
4
|
+
import { tableColumns } from '../tableColumns';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
type: string
|
|
8
|
+
test: any
|
|
9
|
+
itemValue: string
|
|
10
|
+
}
|
|
11
|
+
export function StartDate({ type, test, itemValue }: Props) {
|
|
12
|
+
return (
|
|
13
|
+
<td
|
|
14
|
+
key={type}
|
|
15
|
+
title={test.level}
|
|
16
|
+
data-test={`table-row-${tableColumns[type].label}`}
|
|
17
|
+
style={{
|
|
18
|
+
...tableColumns[type].cellStyle,
|
|
19
|
+
paddingLeft: '2px',
|
|
20
|
+
}}
|
|
21
|
+
>
|
|
22
|
+
<Tooltip label={itemValue} withinPortal>
|
|
23
|
+
<Text
|
|
24
|
+
lineClamp={1}
|
|
25
|
+
sx={{ wordBreak: 'break-all' }}
|
|
26
|
+
>
|
|
27
|
+
{
|
|
28
|
+
dateFns.format(dateFns.parseISO(itemValue), 'yyyy-MM-dd HH:mm:ss')
|
|
29
|
+
}
|
|
30
|
+
</Text>
|
|
31
|
+
</Tooltip>
|
|
32
|
+
</td>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Group, Text, Tooltip } from '@mantine/core';
|
|
3
|
+
import { useMemo } from 'react';
|
|
4
|
+
import { tableColumns } from '../tableColumns';
|
|
5
|
+
import { StatusesRing } from '../../../../../shared/components/Tests/StatusesRing';
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
type: string
|
|
9
|
+
test: any
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function Status({ type, test }: Props) {
|
|
13
|
+
const checkStatuses: string[] = useMemo(
|
|
14
|
+
() => {
|
|
15
|
+
if (test.checks && test.checks.length > 0) {
|
|
16
|
+
return test.checks.map((check: any) => check.status[0]);
|
|
17
|
+
}
|
|
18
|
+
return [];
|
|
19
|
+
},
|
|
20
|
+
[JSON.stringify(test)],
|
|
21
|
+
);
|
|
22
|
+
return (
|
|
23
|
+
<td
|
|
24
|
+
key={type}
|
|
25
|
+
title={test.level}
|
|
26
|
+
data-test={`table-row-${tableColumns[type].label}`}
|
|
27
|
+
style={{
|
|
28
|
+
...tableColumns[type].cellStyle,
|
|
29
|
+
paddingLeft: '2px',
|
|
30
|
+
}}
|
|
31
|
+
>
|
|
32
|
+
<Group position="left" spacing={0} noWrap>
|
|
33
|
+
<StatusesRing
|
|
34
|
+
statuses={checkStatuses.length > 0 ? checkStatuses : [test.status]}
|
|
35
|
+
name={test.name}
|
|
36
|
+
key={type}
|
|
37
|
+
ml={-4}
|
|
38
|
+
/>
|
|
39
|
+
<Tooltip label={test[type]} multiline withinPortal>
|
|
40
|
+
<Text
|
|
41
|
+
lineClamp={1}
|
|
42
|
+
sx={{ wordBreak: 'break-all' }}
|
|
43
|
+
>
|
|
44
|
+
{test.status}
|
|
45
|
+
</Text>
|
|
46
|
+
</Tooltip>
|
|
47
|
+
</Group>
|
|
48
|
+
</td>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Badge, Text, Tooltip } from '@mantine/core';
|
|
3
|
+
import { tableColumns } from '../tableColumns';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
type: string
|
|
7
|
+
test: any
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function Viewport({ type, test }: Props) {
|
|
11
|
+
const uniqueCheckViewports = [...new Set(test.checks.map((x: any) => x.viewport))];
|
|
12
|
+
|
|
13
|
+
// eslint-disable-next-line no-nested-ternary
|
|
14
|
+
const resultViewport = uniqueCheckViewports.length > 0
|
|
15
|
+
? (uniqueCheckViewports.length === 1 ? uniqueCheckViewports[0] : '≠')
|
|
16
|
+
: test.viewport;
|
|
17
|
+
return (
|
|
18
|
+
<td
|
|
19
|
+
key={type}
|
|
20
|
+
data-test={`table-row-${tableColumns[type].label}`}
|
|
21
|
+
style={{ ...tableColumns[type].cellStyle }}
|
|
22
|
+
>
|
|
23
|
+
<Tooltip
|
|
24
|
+
withinPortal
|
|
25
|
+
label={
|
|
26
|
+
(uniqueCheckViewports.length !== 1)
|
|
27
|
+
? 'There are checks with different viewports'
|
|
28
|
+
: resultViewport
|
|
29
|
+
}
|
|
30
|
+
multiline
|
|
31
|
+
>
|
|
32
|
+
<Badge
|
|
33
|
+
size="md"
|
|
34
|
+
color="blue"
|
|
35
|
+
>
|
|
36
|
+
<Text
|
|
37
|
+
lineClamp={1}
|
|
38
|
+
sx={{ wordBreak: 'break-all' }}
|
|
39
|
+
>
|
|
40
|
+
{resultViewport}
|
|
41
|
+
</Text>
|
|
42
|
+
</Badge>
|
|
43
|
+
</Tooltip>
|
|
44
|
+
</td>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/* eslint-disable no-underscore-dangle,react/jsx-one-expression-per-line */
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Badge, Tooltip, useMantineTheme, Text, Stack } from '@mantine/core';
|
|
4
|
+
import { BsHandThumbsUp, BsHandThumbsUpFill } from 'react-icons/all';
|
|
5
|
+
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
6
|
+
import ActionPopoverIcon from '../../../../../shared/components/ActionPopoverIcon';
|
|
7
|
+
import { ChecksService } from '../../../../../shared/services';
|
|
8
|
+
import { errorMsg, successMsg } from '../../../../../shared/utils/utils';
|
|
9
|
+
import { log } from '../../../../../shared/utils/Logger';
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
check: any
|
|
13
|
+
initCheck?: any
|
|
14
|
+
testUpdateQuery: any
|
|
15
|
+
size?: number
|
|
16
|
+
checksQuery: any
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function AcceptButton({ check, testUpdateQuery, checksQuery, initCheck, size = 19 }: Props) {
|
|
20
|
+
const queryClient = useQueryClient();
|
|
21
|
+
const theme = useMantineTheme();
|
|
22
|
+
const isAccepted = (check.markedAs === 'accepted');// || mutationAcceptCheck.isSuccess;
|
|
23
|
+
const isCurrentlyAccepted = ((check.baselineId?._id === check.actualSnapshotId?._id) && isAccepted);
|
|
24
|
+
// eslint-disable-next-line no-nested-ternary
|
|
25
|
+
const likeIconColor = isAccepted
|
|
26
|
+
? theme.colorScheme === 'dark'
|
|
27
|
+
? 'green.8'
|
|
28
|
+
: 'green.6'
|
|
29
|
+
: 'gray';
|
|
30
|
+
|
|
31
|
+
const mutationAcceptCheck = useMutation(
|
|
32
|
+
{
|
|
33
|
+
mutationFn: (data: { check: any, newBaselineId: string }) => ChecksService.acceptCheck(data),
|
|
34
|
+
// eslint-disable-next-line no-unused-vars
|
|
35
|
+
onSuccess: async (result: any) => {
|
|
36
|
+
successMsg({ message: 'Check has been successfully accepted' });
|
|
37
|
+
await queryClient.invalidateQueries({ queryKey: ['preview_checks', check.test._id] });
|
|
38
|
+
await queryClient.invalidateQueries({ queryKey: ['check_for_modal', check._id] });
|
|
39
|
+
await queryClient.refetchQueries(
|
|
40
|
+
{ queryKey: ['related_checks_infinity_pages', initCheck?._id || check._id] },
|
|
41
|
+
);
|
|
42
|
+
checksQuery.refetch();
|
|
43
|
+
if (testUpdateQuery) testUpdateQuery.refetch();
|
|
44
|
+
},
|
|
45
|
+
onError: (e: any) => {
|
|
46
|
+
errorMsg({ error: 'Cannot accept the check' });
|
|
47
|
+
log.error(e);
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
const notAcceptedIcon = check?.failReasons?.includes('not_accepted')
|
|
53
|
+
? (
|
|
54
|
+
<Badge
|
|
55
|
+
component="div"
|
|
56
|
+
title="The check is not accepted"
|
|
57
|
+
pl={4}
|
|
58
|
+
pr={4}
|
|
59
|
+
pt={6}
|
|
60
|
+
pb={6}
|
|
61
|
+
// weight={900}
|
|
62
|
+
color="yellow"
|
|
63
|
+
variant="filled"
|
|
64
|
+
radius="xl"
|
|
65
|
+
data-test="not-accepted-error-icon"
|
|
66
|
+
sx={{
|
|
67
|
+
fontSize: '12px',
|
|
68
|
+
position: 'absolute',
|
|
69
|
+
bottom: 11,
|
|
70
|
+
left: 12,
|
|
71
|
+
lineHeight: '16px',
|
|
72
|
+
fontWeight: 600,
|
|
73
|
+
fontFamily: '"Roboto","Arial",sans-serif',
|
|
74
|
+
border: '2px',
|
|
75
|
+
borderStyle: 'solid',
|
|
76
|
+
borderColor: theme.colorScheme === 'dark' ? theme.colors.dark[6] : 'white',
|
|
77
|
+
}}
|
|
78
|
+
>
|
|
79
|
+
!
|
|
80
|
+
</Badge>
|
|
81
|
+
)
|
|
82
|
+
: '';
|
|
83
|
+
const handleAcceptCheckClick = () => {
|
|
84
|
+
if (isCurrentlyAccepted) return;
|
|
85
|
+
mutationAcceptCheck.mutate(
|
|
86
|
+
{
|
|
87
|
+
check,
|
|
88
|
+
newBaselineId: check.actualSnapshotId._id,
|
|
89
|
+
} as any,
|
|
90
|
+
);
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
return (
|
|
94
|
+
<Tooltip
|
|
95
|
+
withinPortal
|
|
96
|
+
label={
|
|
97
|
+
check.markedByUsername
|
|
98
|
+
? (
|
|
99
|
+
<Stack spacing="xs" p={5}>
|
|
100
|
+
<Text data-test="accept-button-tooltip-username">
|
|
101
|
+
Accepted by: {check.markedByUsername}
|
|
102
|
+
</Text>
|
|
103
|
+
<Text data-test="accept-button-tooltip-date">
|
|
104
|
+
Accepted Date: {check.markedDate}
|
|
105
|
+
</Text>
|
|
106
|
+
</Stack>
|
|
107
|
+
)
|
|
108
|
+
: (
|
|
109
|
+
<Text>The check is not accepted</Text>
|
|
110
|
+
)
|
|
111
|
+
}
|
|
112
|
+
>
|
|
113
|
+
<div>
|
|
114
|
+
<ActionPopoverIcon
|
|
115
|
+
iconColor={likeIconColor}
|
|
116
|
+
buttonColor="green"
|
|
117
|
+
sx={{
|
|
118
|
+
cursor: isCurrentlyAccepted ? 'default' : 'pointer',
|
|
119
|
+
'&:hover': { backgroundColor: isCurrentlyAccepted ? 'rgba(255, 255, 255, 0);' : '' },
|
|
120
|
+
}}
|
|
121
|
+
testAttr="check-accept-icon"
|
|
122
|
+
testAttrName={check.name}
|
|
123
|
+
variant="subtle"
|
|
124
|
+
paused={isCurrentlyAccepted}
|
|
125
|
+
icon={
|
|
126
|
+
(isCurrentlyAccepted && isAccepted)
|
|
127
|
+
? (
|
|
128
|
+
|
|
129
|
+
<BsHandThumbsUpFill size={size} data-test-icon-type="fill" />
|
|
130
|
+
)
|
|
131
|
+
: (<><BsHandThumbsUp size={size} data-test-icon-type="outline" />{notAcceptedIcon}</>)
|
|
132
|
+
}
|
|
133
|
+
action={handleAcceptCheckClick}
|
|
134
|
+
// title="Accept the check actual screenshot"
|
|
135
|
+
loading={mutationAcceptCheck.isLoading}
|
|
136
|
+
confirmLabel="Accept"
|
|
137
|
+
size={size}
|
|
138
|
+
/>
|
|
139
|
+
</div>
|
|
140
|
+
</Tooltip>
|
|
141
|
+
);
|
|
142
|
+
}
|