From ddbff1cbf90b5203b4166fe2292db87d30b0a6bd Mon Sep 17 00:00:00 2001 From: Anton Napolskyi Date: Mon, 8 Jul 2024 15:40:09 +0200 Subject: [PATCH] Add fixes --- cypress/e2e/assets/videoAsset.cy.ts | 25 ++++++++++--------- .../e2e/distribution/audioDistribution.cy.ts | 6 ++--- .../e2e/distribution/videoDistribution.cy.ts | 2 +- cypress/e2e/settings/user.cy.ts | 2 +- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/cypress/e2e/assets/videoAsset.cy.ts b/cypress/e2e/assets/videoAsset.cy.ts index d62ea1be..85e409c2 100644 --- a/cypress/e2e/assets/videoAsset.cy.ts +++ b/cypress/e2e/assets/videoAsset.cy.ts @@ -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') @@ -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') @@ -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') @@ -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) - // }) }) diff --git a/cypress/e2e/distribution/audioDistribution.cy.ts b/cypress/e2e/distribution/audioDistribution.cy.ts index 3bb9d3c7..e0024e76 100644 --- a/cypress/e2e/distribution/audioDistribution.cy.ts +++ b/cypress/e2e/distribution/audioDistribution.cy.ts @@ -10,7 +10,7 @@ const assetIDs: Array = [] 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}`, @@ -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) diff --git a/cypress/e2e/distribution/videoDistribution.cy.ts b/cypress/e2e/distribution/videoDistribution.cy.ts index 3ba28f35..327d232e 100644 --- a/cypress/e2e/distribution/videoDistribution.cy.ts +++ b/cypress/e2e/distribution/videoDistribution.cy.ts @@ -9,7 +9,7 @@ import { const assetIDs: Array = [] const DISTRIBUTION_DATA={ CATEGORY: 'Publicistika', - AUTHOR: 'Boris Zemko', + AUTHOR: 'Pavol Demeš', KEYWORD: 'Aupark', } as const diff --git a/cypress/e2e/settings/user.cy.ts b/cypress/e2e/settings/user.cy.ts index b1410328..b8044236 100644 --- a/cypress/e2e/settings/user.cy.ts +++ b/cypress/e2e/settings/user.cy.ts @@ -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()