Skip to content

Commit

Permalink
Merge pull request #357 from DnD-Montreal/318-rating-lookup-cypress-test
Browse files Browse the repository at this point in the history
Create Cypress Tests for Rating Lookup
  • Loading branch information
bcobo341 authored Jan 31, 2022
2 parents 77a2029 + 9d010f2 commit f94019a
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions cypress/integration/Player Rating System/rating_lookup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
describe('Rating Lookup Test Suite', () => {
before(() => {
cy.refreshDatabase()
cy.seed('FastSeeder')
})

it('Rating Lookup', () => {
cy.seederLogin()

cy.intercept('GET', Cypress.Laravel.route('rating.index')).as('rating')
cy.visit(Cypress.Laravel.route('rating.index'))
cy.wait('@rating')

cy.contains('Name')
cy.contains('Creative')
cy.contains('Flexible')
cy.contains('Friendly')
cy.contains('Helpful')
cy.contains('Prepared')

cy.intercept('GET', '**rating*').as('rating_filter')
cy.contains('League Event Ratings Only').click()
cy.wait('@rating_filter')
cy.url().should('include', 'from_event')

cy.get('td>p')
cy.get('#search-filter').type('_')
cy.get('td>p').should('not.exist')
})
})

0 comments on commit f94019a

Please sign in to comment.