Skip to content

Commit

Permalink
add a single failing spec
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed May 5, 2023
1 parent fb6d845 commit de658de
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 192 deletions.
62 changes: 0 additions & 62 deletions cypress/e2e/cart/add-to-cart.cy.ts

This file was deleted.

37 changes: 0 additions & 37 deletions cypress/e2e/inventory/product-ids.cy.ts

This file was deleted.

69 changes: 0 additions & 69 deletions cypress/e2e/inventory/sorted.cy.js

This file was deleted.

24 changes: 0 additions & 24 deletions cypress/e2e/login/direct-attempt.cy.ts

This file was deleted.

14 changes: 14 additions & 0 deletions cypress/e2e/misc/fail-on-purpose.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { LoginPage } from '@support/pages/login.page'
import { LoginInfo } from '..'

const user: LoginInfo = Cypress.env('users').standard

it('fails on purpose', () => {
LoginPage.login(user.username, user.password)
cy.visit('/inventory.html')
cy.location('pathname').should('equal', '/inventory.html')
// make the test fail on purpose by using a wrong selector
// instead of class "inventory_item" we are querying "inventory-item"
// which fails to find anything
cy.get('.inventory-item').should('have.length.greaterThan', 2)
})

0 comments on commit de658de

Please sign in to comment.