Skip to content

Commit

Permalink
feature #177 rework cypress tests
Browse files Browse the repository at this point in the history
  • Loading branch information
korel-san committed Jan 30, 2023
1 parent 2e5b491 commit 25a06c9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions ui/cypress/e2e/main-tests-spec.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('Main Tests', () => {
})

describe('Feature #177 Filter plans and events by labels', () => {
it('search text `a` that is matched by autocomplete, but no option was chosen', () => {
it('search text `a` that is matched by autocomplete and option `appName` was chosen', () => {
cy.visit('/')
cy.get('spline-search-box-with-filter input').click()
cy.wait(1000).get('.mat-autocomplete-panel spline-loader mat-spinner', { timeout: 10000 })
Expand All @@ -58,8 +58,15 @@ describe('Main Tests', () => {
.should('have.value', 'appName:')
cy.get('.mat-autocomplete-panel mat-option')
.should('have.length.greaterThan', 5)
})

it('search text `appName:` that is matched as filterKey, should autocomplete correctly', () => {
cy.visit('/')
cy.get('spline-search-box-with-filter input').click().type('appName:')
cy.wait(1000).get('.mat-autocomplete-panel spline-loader mat-spinner', { timeout: 10000 })
.should('not.exist')
cy.get('.mat-autocomplete-panel mat-option')
.contains('.spline-search-attribute__option-name', 'Other Job C')
.contains('.spline-search-attribute__option-name', 'Excel Job')

cy.get('spline-search-box-with-filter input')
.type('"Excel')
Expand All @@ -78,6 +85,5 @@ describe('Main Tests', () => {
})
it('', () => {})
it('', () => {})
it('', () => {})
})
})

0 comments on commit 25a06c9

Please sign in to comment.