Skip to content

Commit

Permalink
Add fix for cy tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Napolskyi committed Dec 16, 2024
1 parent f73f1df commit 08f0e27
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 12 deletions.
3 changes: 2 additions & 1 deletion cypress/e2e/assetEmpty/imageAssetEmpty.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ describe(`Test image empty asset, Env: ${CY.cfg}`,
cy.waitSec(1)
cy.get('.sidebar-info__content').invoke('text').then((sidebarText) => {
cy.wrap(sidebarText).should('include', 'Náhľady')
cy.wrap(sidebarText).should('include', 'Náhľad obrázku na mobile, počítači alebo v aplikácii')
cy.wrap(sidebarText).should('include', 'Náhľady sú určené pre hlavný obrázok v článku, ' +
'zoznamy článkov, titulky a rubriky. V tele článku sa zobrazuje formát bez orezania.')
})
cy.get('.w-100 .v-btn').should('be.visible')

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/assets/assetExifAutofill.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe(`Test add audio asset to podcast episode function, Env: ${CY.cfg}`,
.should('have.value', EXPECTED_DESCRIPTION)
cy.getCy('custom-field-keywords').click()
cy.get('.v-overlay__content > .v-list > .v-list-item')
.invoke('text').should('eq', 'Žiadne dostupné dáta')
.invoke('text').should('eq', 'Zadajte minimálne 2 znaky')
cy.get('body').type('{esc}')
cy.getCy('custom-field-authors').click()
})
Expand Down
4 changes: 1 addition & 3 deletions cypress/e2e/assets/audioAsset.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ describe(`Test asset audio function, Env: ${CY.cfg}`,
.first().clear({ force: true }).type(`${ASSET_TITLE}`)
cy.get('[data-cy="custom-field-description"] textarea')
.first().clear({ force: true }).type(`${ASSET_DESCRIPTION}`)
cy.getCy('add-keyword').click()
cy.getCy('keyword-name').type(`Keyword${RAND_NUM}`)
cy.getCy('button-confirm').click()
cy.get('[data-cy="custom-field-keywords"] input').type(`Keyword${RAND_NUM}`)
cy.get('.v-btn').contains(`Keyword${RAND_NUM}`).click()
cy.get('body').click()
cy.getCy('add-author').click()
cy.getCy('author-name').type(`Author${RAND_NUM}`)
Expand Down
4 changes: 1 addition & 3 deletions cypress/e2e/assets/imageAsset.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ describe(`Test asset image function, Env: ${CY.cfg}`,
.first().clear({ force: true }).type(`${ASSET_TITLE}`)
cy.get('[data-cy="custom-field-description"] textarea')
.first().clear({ force: true }).type(`${ASSET_DESCRIPTION}`)
cy.getCy('add-keyword').click()
cy.getCy('keyword-name').type(`Keyword${RAND_NUM}`)
cy.getCy('button-confirm').click()
cy.get('[data-cy="custom-field-keywords"] input').type(`Keyword${RAND_NUM}`)
cy.get('.v-btn').contains(`Keyword${RAND_NUM}`).click()
cy.get('body').click()
cy.getCy('add-author').click()
cy.getCy('author-name').type(`Author${RAND_NUM}`)
Expand Down
4 changes: 1 addition & 3 deletions cypress/e2e/assets/videoAsset.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ describe(`Test asset video function, Env: ${CY.cfg}`,
.first().clear({ force: true }).type(`${ASSET_TITLE}`)
cy.get('[data-cy="custom-field-description"] textarea')
.first().clear({ force: true }).type(`${ASSET_DESCRIPTION}`)
cy.getCy('add-keyword').click()
cy.getCy('keyword-name').type(`Keyword${RAND_NUM}`)
cy.getCy('button-confirm').click()
cy.get('[data-cy="custom-field-keywords"] input').type(`Keyword${RAND_NUM}`)
cy.get('.v-btn').contains(`Keyword${RAND_NUM}`).click()
cy.get('body').click()
cy.getCy('add-author').click()
cy.getCy('author-name').type(`Author${RAND_NUM}`)
Expand Down
2 changes: 1 addition & 1 deletion cypress/utils/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const USER_EMAIL = `test.mail+${RAND_NUM}@adam.com`
export const USER_FIRST_NAME = `First${RAND_NUM}`
export const USER_LAST_NAME = `Last${RAND_NUM}`
export const USER_PASSWORD = `pwd${RAND_NUM}`
export const USER_LICENCE = ['CMS licence']
export const USER_LICENCE = ['Novyny', 'Sme Family']
export const EXTERNAL_SYS = ['cms', 'blog', 'tools']
export const KEYWORDS = ['TestKeyword1', 'TestKeyword2']
export const AUTHORS = ['TestAuthor1', 'TestAuthor2', 'TestAuthor3']
Expand Down

0 comments on commit 08f0e27

Please sign in to comment.