Compare commits
2 Commits
main
...
fix-duplic
| Author | SHA1 | Date |
|---|---|---|
|
|
9c13e674d1 | |
|
|
768b29e83c |
|
|
@ -13,7 +13,7 @@
|
|||
class="task-view"
|
||||
>
|
||||
<BaseButton
|
||||
v-if="!isModal || isMobile"
|
||||
v-if="!isModal"
|
||||
class="back-button mbs-2"
|
||||
@click="lastProject ? router.back() : router.push(projectRoute)"
|
||||
>
|
||||
|
|
@ -617,7 +617,7 @@ import {ref, reactive, shallowReactive, computed, watch, nextTick, onMounted} fr
|
|||
import {useRouter, useRoute, type RouteLocation, onBeforeRouteLeave} from 'vue-router'
|
||||
import {storeToRefs} from 'pinia'
|
||||
import {useI18n} from 'vue-i18n'
|
||||
import {unrefElement, useDebounceFn, useElementSize, useIntersectionObserver, useMediaQuery, useMutationObserver} from '@vueuse/core'
|
||||
import {unrefElement, useDebounceFn, useElementSize, useIntersectionObserver, useMutationObserver} from '@vueuse/core'
|
||||
import {klona} from 'klona/lite'
|
||||
|
||||
import TaskService from '@/services/task'
|
||||
|
|
@ -781,7 +781,6 @@ const color = computed(() => {
|
|||
})
|
||||
|
||||
const isModal = computed(() => Boolean(props.backdropView))
|
||||
const isMobile = useMediaQuery('(max-width: 1024px)')
|
||||
|
||||
function attachmentUpload(file: File, onSuccess?: (url: string) => void) {
|
||||
return uploadFile(props.taskId, file, onSuccess)
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ test.describe('Task', () => {
|
|||
await expect(page).toHaveURL(/\/projects\/1\/\d+/)
|
||||
})
|
||||
|
||||
test('provides back navigation to the project in the kanban view on mobile', async ({authenticatedPage: page}) => {
|
||||
test('provides close navigation to the project in the kanban view on mobile', async ({authenticatedPage: page}) => {
|
||||
await page.setViewportSize({width: 375, height: 667}) // iphone-8
|
||||
|
||||
const tasks = await TaskFactory.create(1, {
|
||||
|
|
@ -237,8 +237,9 @@ test.describe('Task', () => {
|
|||
const taskLocator = page.locator('.kanban-view .tasks .task').first()
|
||||
await expect(taskLocator).toBeVisible({timeout: 10000})
|
||||
await taskLocator.click()
|
||||
await expect(page.locator('.task-view .back-button')).toBeVisible()
|
||||
await page.locator('.task-view .back-button').click()
|
||||
// On mobile, the task opens as a modal with a close button instead of a back button
|
||||
await expect(page.locator('.task-view .task-properties .close')).toBeVisible()
|
||||
await page.locator('.task-view .task-properties .close').click()
|
||||
await expect(page).toHaveURL(/\/projects\/\d+\/\d+/)
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue