diff --git a/cypress/e2e/settings/distributionCategoty.cy.ts b/cypress/e2e/settings/distributionCategory.cy.ts similarity index 96% rename from cypress/e2e/settings/distributionCategoty.cy.ts rename to cypress/e2e/settings/distributionCategory.cy.ts index fc3a9eae..2994ea0d 100644 --- a/cypress/e2e/settings/distributionCategoty.cy.ts +++ b/cypress/e2e/settings/distributionCategory.cy.ts @@ -2,7 +2,7 @@ import { ALERT_CREATE, ALERT_UPDATE, CY, USER_FIRST_NAME } from '../../utils/common' -let CATEGOTY_ID = '' +//let CATEGORY_ID = '' describe( `Test distribution category function, Env: ${CY.cfg}`, { tags: '@distributionCategory', env: { visitBaseUrl: false } }, @@ -33,12 +33,12 @@ describe( cy.getCyVisibleClick('button-close') cy.urlNotContains(text) cy.urlContains('/distribution-category') - CATEGOTY_ID = text + //CATEGORY_ID = text }) }) it('Edit distribution category', () => { cy.visit('distribution-category') - //cy.getCy('filter-string').first().type(`${CATEGOTY_ID}{ENTER}`) //todo ctrl-v(paste) in ID-filed is not working + //cy.getCy('filter-string').first().type(`${CATEGORY_ID}{ENTER}`) //todo ctrl-v(paste) in ID-filed is not working cy.getCy('filter-string').eq(1).type(`${USER_FIRST_NAME}{ENTER}`) //todo until bug is fixed cy.cardLoad() cy.getCyVisibleClick('table-edit') diff --git a/cypress/e2e/settings/user.cy.ts b/cypress/e2e/settings/user.cy.ts index e6e5b79b..66929872 100644 --- a/cypress/e2e/settings/user.cy.ts +++ b/cypress/e2e/settings/user.cy.ts @@ -37,14 +37,14 @@ describe(`Test user function, Env: ${CY.cfg}`, { tags: '@user', env: { visitBase cy.get('i[aria-label="Zatvoriť"]').click() cy.getCy('user-allowed-asset-external-providers').click() cy.contains('.v-list-item-title', `${EXTERNAL_PROVIDER}`).click() - cy.get('[aria-expanded="false"]').invoke('attr', 'aria-expanded', 'true'); // until aria-label, aria-title is added - //cy.get('i[aria-label="Zatvoriť"]').click() + cy.get('[aria-expanded="false"]').invoke('attr', 'aria-expanded', 'true') // until aria-label, + // aria-title is added cy.getCy('user-allowed-distribution-services').click() DISTRIBUTION_SERVICE.forEach((service) => { cy.contains('.v-list-item-title', `${service}`).click() }) - cy.get('[aria-expanded="false"]').invoke('attr', 'aria-expanded', 'true'); // until aria-label, aria-title is added - //cy.get('i[aria-label="Zatvoriť"]').click() + cy.get('[aria-expanded="false"]').invoke('attr', 'aria-expanded', 'true') // until aria-label, + // aria-title is added cy.getCyVisibleClick('button-save') cy.alertMessage(ALERT_UPDATE) cy.getCyVisibleClick('button-close') @@ -60,12 +60,14 @@ describe(`Test user function, Env: ${CY.cfg}`, { tags: '@user', env: { visitBase cy.get('i[aria-label="Zatvoriť"]').click() cy.getCy('user-allowed-asset-external-providers').click() cy.contains('.v-list-item-title', `${EXTERNAL_PROVIDER}`).click() - cy.get('[aria-expanded="false"]').invoke('attr', 'aria-expanded', 'true'); // until aria-label, aria-title is added + cy.get('[aria-expanded="false"]').invoke('attr', 'aria-expanded', 'true') // until aria-label, + // aria-title is added cy.getCy('user-allowed-distribution-services').click() DISTRIBUTION_SERVICE.forEach((service) => { cy.contains('.v-list-item-title', `${service}`).click() }) - cy.get('[aria-expanded="false"]').invoke('attr', 'aria-expanded', 'true'); // until aria-label, aria-title is added + cy.get('[aria-expanded="false"]').invoke('attr', 'aria-expanded', 'true') // until aria-label, + // aria-title is added cy.getCy('user-asset-licences').click() USER_LICENCE.forEach((licence) => { cy.getCy('user-asset-licences').type(`${licence}`) diff --git a/cypress/utils/common.ts b/cypress/utils/common.ts index 3ba5b246..34039bd5 100644 --- a/cypress/utils/common.ts +++ b/cypress/utils/common.ts @@ -12,7 +12,8 @@ export const USER_PASSWORD = `pwd${RAND_NUM}` export const USER_LICENCE = ['CMS licence'] export const EXTERNAL_SYS = ['cms', 'blog', 'tools'] export const EXTERNAL_PROVIDER = 'Unsplash' -export const DISTRIBUTION_SERVICE = ['Youtube CMS', 'Youtube Fičí', 'JwVideo', 'Artemis Video CMS', 'Artemis Podcast CMS'] +export const DISTRIBUTION_SERVICE = ['Youtube CMS', 'Youtube Fičí', 'JwVideo', 'Artemis Video CMS', + 'Artemis Podcast CMS'] export const PERMISSION_GROUP_TITLE = `TestGroup${RAND_NUM}` export const PODCAST_TITLE = `TestPodcast${RAND_NUM}` export const EPISODE_TITLE = `TestEpisode${RAND_NUM}` diff --git a/src/views/coreDam/distributionCategory/components/DistributionCategoryRemoteAutocomplete.vue b/src/views/coreDam/distributionCategory/components/DistributionCategoryRemoteAutocomplete.vue index 18d6725c..aacccff3 100644 --- a/src/views/coreDam/distributionCategory/components/DistributionCategoryRemoteAutocomplete.vue +++ b/src/views/coreDam/distributionCategory/components/DistributionCategoryRemoteAutocomplete.vue @@ -7,7 +7,7 @@ import { onMounted } from 'vue' const props = withDefaults( defineProps<{ - modelValue: string | null | string[] | any + modelValue: string | number | null | string[] | number[] assetType: AssetType label?: string | undefined required?: boolean | undefined @@ -26,7 +26,7 @@ const props = withDefaults( } ) const emit = defineEmits<{ - (e: 'update:modelValue', data: string | null | string[]): void + (e: 'update:modelValue', data: string | number | null | string[] | number[]): void }>() const { fetchItems, fetchItemsByIds } = useDistributionCategorySelectActions()