Skip to content
Snippets Groups Projects
Commit 84b16a71 authored by brunoravera's avatar brunoravera
Browse files

fix toasts and messages

parent 7b05ad6f
Branches main
No related tags found
No related merge requests found
...@@ -47,6 +47,9 @@ export const Topbar: React.FC = () => { ...@@ -47,6 +47,9 @@ export const Topbar: React.FC = () => {
status: 'success', status: 'success',
title: 'hola', title: 'hola',
duration: 9000, duration: 9000,
containerStyle: {
zIndex: 15000,
},
render: () => ( render: () => (
<Alert status="info"> <Alert status="info">
<AlertTitle>{capitalize(t('new_report_available'))}</AlertTitle> <AlertTitle>{capitalize(t('new_report_available'))}</AlertTitle>
...@@ -139,7 +142,7 @@ export const Topbar: React.FC = () => { ...@@ -139,7 +142,7 @@ export const Topbar: React.FC = () => {
<HStack> <HStack>
{isRunning && ( {isRunning && (
<Box pt="1"> <Box pt="1">
<Tooltip label="Se está generando el reporte"> <Tooltip zIndex="9999" label="Se está generando el reporte">
<Spinner size="sm" /> <Spinner size="sm" />
</Tooltip> </Tooltip>
</Box> </Box>
......
...@@ -91,7 +91,7 @@ i18n.use(initReactI18next).init({ ...@@ -91,7 +91,7 @@ i18n.use(initReactI18next).init({
'run tests for the implementation', 'run tests for the implementation',
run_tests_modal_header_step_1_part_2: 'of the pattern', run_tests_modal_header_step_1_part_2: 'of the pattern',
run_tests_modal_header_step_2_part_1: run_tests_modal_header_step_2_part_1:
'download the file, complete it and upload it', 'download the file, complete it and upload it in .zip format',
save: 'save', save: 'save',
strategy: 'strategy', strategy: 'strategy',
test: 'test', test: 'test',
...@@ -183,7 +183,7 @@ i18n.use(initReactI18next).init({ ...@@ -183,7 +183,7 @@ i18n.use(initReactI18next).init({
'correr tests de la implementación', 'correr tests de la implementación',
run_tests_modal_header_step_1_part_2: 'del patrón', run_tests_modal_header_step_1_part_2: 'del patrón',
run_tests_modal_header_step_2_part_1: run_tests_modal_header_step_2_part_1:
'descargue el archivo, complételo, y súbalo denuevo', 'descargue el archivo, complételo, y súbalo denuevo en formato .zip',
save: 'guardar', save: 'guardar',
strategy: 'estrategia', strategy: 'estrategia',
test: 'prueba', test: 'prueba',
......
...@@ -213,7 +213,6 @@ export const RunTestsButtonModal = ({ ...@@ -213,7 +213,6 @@ export const RunTestsButtonModal = ({
</ModalHeader> </ModalHeader>
<ModalBody> <ModalBody>
<VStack> <VStack>
<Text>{genericJUnitPath}</Text>
<Button onClick={handleOnDownloadJUnit}> <Button onClick={handleOnDownloadJUnit}>
{t('download')} {t('download')}
</Button> </Button>
......
...@@ -16,7 +16,7 @@ import { RunTestsStep1Mutation } from '../query-builder/run-tests-step-1-mutatio ...@@ -16,7 +16,7 @@ import { RunTestsStep1Mutation } from '../query-builder/run-tests-step-1-mutatio
import { RunTestsStep2Mutation } from '../query-builder/run-tests-step-2-mutation' import { RunTestsStep2Mutation } from '../query-builder/run-tests-step-2-mutation'
import { useToast } from '@chakra-ui/react' import { useToast } from '@chakra-ui/react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { capitalize } from "lodash"; import { capitalize } from 'lodash'
export function useRunTestsButton({ export function useRunTestsButton({
patternId, patternId,
...@@ -209,12 +209,8 @@ export function useRunTestsButton({ ...@@ -209,12 +209,8 @@ export function useRunTestsButton({
setStep('Testing') setStep('Testing')
} }
const step2Mutation = RunTestsStep2Mutation.useMutation({ const step2Mutation = RunTestsStep2Mutation.useMutation({})
onSuccess: (report) => {
// @ts-ignore -- TODO
// navigate(routes.report({ id: report.id }))
},
})
const handleOnRunTestsStep2 = async () => { const handleOnRunTestsStep2 = async () => {
await step2Mutation.mutateAsync({ await step2Mutation.mutateAsync({
id: formalizationId, id: formalizationId,
...@@ -228,8 +224,11 @@ export function useRunTestsButton({ ...@@ -228,8 +224,11 @@ export function useRunTestsButton({
toast({ toast({
status: 'success', status: 'success',
position: 'top', position: 'bottom',
title: t('reports_tests_running_alert'), title: t('reports_tests_running_alert'),
containerStyle: {
zIndex: 15000,
},
}) })
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment