Skip to content

Commit

Permalink
Fix deprecated KM test
Browse files Browse the repository at this point in the history
  • Loading branch information
janslifka committed Jun 4, 2024
1 parent 856120e commit 2c96405
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cypress/e2e/knowledge-models/deprecated.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ describe('Deprecated KM', () => {
}

before(() => {
cy.putDefaultAppConfig()

cy.task('package:delete', { km_id: kmId })
cy.clearServerCache()

Expand All @@ -21,18 +23,21 @@ describe('Deprecated KM', () => {

// set KM deprecated
cy.visitApp(`/knowledge-models/${orgId}:${kmId}:${version}`)
cy.get('.ListingDropdown').should('be.visible')
cy.clickDropdownAction('set-deprecated')

// check it was set
cy.get('.badge.bg-danger').contains('deprecated').should('exist')

// check it is not suggested
cy.visitApp('/projects/create')
cy.getCy('project_create_nav_custom').click()
searchKM(kmId)
cy.get('.TypeHintInput__TypeHints .empty').should('exist')

// restore KM
cy.visitApp(`/knowledge-models/${orgId}:${kmId}:${version}`)
cy.get('.ListingDropdown').should('be.visible')
cy.clickDropdownAction('restore')

// check it is suggested again
Expand Down

0 comments on commit 2c96405

Please sign in to comment.