Skip to content

Commit

Permalink
Update cypress-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stutlerxgod committed Oct 2, 2023
1 parent 2c755de commit cdac3f7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 } },
Expand Down Expand Up @@ -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')
Expand Down
14 changes: 8 additions & 6 deletions cypress/e2e/settings/user.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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}`)
Expand Down
3 changes: 2 additions & 1 deletion cypress/utils/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down

0 comments on commit cdac3f7

Please sign in to comment.