Skip to content

Commit

Permalink
Add fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Napolskyi committed Jul 8, 2024
1 parent 02aaf1b commit ddbff1c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
25 changes: 13 additions & 12 deletions cypress/e2e/assets/videoAsset.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe(`Test asset video function, Env: ${CY.cfg}`,
it('Prepare Test Data', ()=> {
cy.prepareData('video/sample.mp4', true, assetIDs)
})
xit('Create Metadata', ()=> {
it('Create Metadata', ()=> {
cy.visit(`/asset/${assetIDs}`)
cy.api_waitPageLoad('asset-edit')
cy.get('[data-cy="custom-field-title"] textarea')
Expand Down Expand Up @@ -37,7 +37,7 @@ describe(`Test asset video function, Env: ${CY.cfg}`,
cy.getCy('button-save').should('be.visible').click()
cy.alertMessage(ALERT_UPDATE)
})
xit('Edit Metadata', ()=> {
it('Edit Metadata', ()=> {
cy.visit(`/asset/${assetIDs}`)
cy.api_waitPageLoad('asset-edit')
cy.get('[data-cy="custom-field-title"] textarea')
Expand All @@ -47,7 +47,7 @@ describe(`Test asset video function, Env: ${CY.cfg}`,
cy.getCy('button-save').should('be.visible').click()
cy.alertMessage(ALERT_UPDATE)
})
xit('Clear Metadata', ()=> {
it('Clear Metadata', ()=> {
cy.visit(`/asset/${assetIDs}`)
cy.api_waitPageLoad('asset-edit')
cy.get('[data-cy="custom-field-title"] textarea')
Expand All @@ -70,14 +70,15 @@ describe(`Test asset video function, Env: ${CY.cfg}`,
cy.getCy('button-image-preview').click()
cy.waitSec(2)
cy.get('.px-3').contains('Zrušiť priradenie obrázka').should('be.visible')
// cy.get('button.v-btn:contains("Vybrať obrázok")').click()
// cy.get('.asset-list-tiles > :nth-child(1)', { timeout: 8000 }).click()
// cy.get('button.v-btn:contains("Potvrď")').click()
// cy.alertMessage(ALERT_UPDATE)
// cy.get('.px-3').contains('Zrušiť priradenie obrázka').should('exist').click()
// cy.alertMessage(ALERT_UPDATE)
cy.get('button.v-btn:contains("Vybrať obrázok")').click()
cy.waitSec(2)
cy.get('.asset-list-tiles > :nth-child(1)', { timeout: 8000 }).click()
cy.get('.v-overlay--active .v-btn').contains('Potvrdiť').click()
cy.alertMessage(ALERT_UPDATE)
cy.get('.px-3').contains('Zrušiť priradenie obrázka').should('exist').click()
cy.alertMessage(ALERT_UPDATE)
})
it('Delete Test data', ()=>{
cy.deleteFile(assetIDs)
})
// xit('Delete Test data', ()=>{
// cy.deleteFile(assetIDs)
// })
})
6 changes: 3 additions & 3 deletions cypress/e2e/distribution/audioDistribution.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const assetIDs: Array<string> = []
const DISTRIBUTION_DATA={
PODCAST: 'Dobré ráno',
CATEGORY: 'Podcasty',
AUTHOR: 'Boris Zemko',
AUTHOR: 'Pavol Demeš',
KEYWORD: 'Aupark',
} as const
describe(`Test distribution Audio function, Env: ${CY.cfg}`,
Expand Down Expand Up @@ -66,8 +66,8 @@ describe(`Test distribution Audio function, Env: ${CY.cfg}`,
cy.circleLoad()
cy.get('textarea').eq(0).type(ASSET_TITLE)
cy.get('textarea').eq(2).type(ASSET_DESCRIPTION)
// cy.get('.v-card-text [data-cy="custom-field-authors"]').type(DISTRIBUTION_DATA.AUTHOR)
// cy.get('.v-card-text [data-cy="custom-field-keywords"]').type(DISTRIBUTION_DATA.KEYWORD)
cy.get('.v-card-text [data-cy="custom-field-authors"]').type(DISTRIBUTION_DATA.AUTHOR)
cy.get('.v-card-text [data-cy="custom-field-keywords"]').type(DISTRIBUTION_DATA.KEYWORD)
cy.get('[id^="switch-"]').eq(2).click() // Zalozit clanok -> ON
cy.get('.v-card-actions > .bg-primary').click()
cy.alertMessage(ALERT_CREATE)
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/distribution/videoDistribution.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
const assetIDs: Array<string> = []
const DISTRIBUTION_DATA={
CATEGORY: 'Publicistika',
AUTHOR: 'Boris Zemko',
AUTHOR: 'Pavol Demeš',
KEYWORD: 'Aupark',
} as const

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/settings/user.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe(`Test user function, Env: ${CY.cfg}`,
cy.visitSubpage('user-permissions', '-user', 'Oprávnenia používateľov')
cy.getCyVisibleClick('button-create')
cy.getCy('create-panel').should('be.visible')
cy.getCy('user-id').type(`${Cypress._.random(10000, 99999)}`)
cy.getCy('user-id').type(`${Cypress._.random(400000, 999999)}`)
cy.getCy('user-email').type(USER_EMAIL)
cy.getCyVisibleClick('user-roles')
cy.contains('.v-list-item', USER_ROLE).click()
Expand Down

0 comments on commit ddbff1c

Please sign in to comment.