9356945d93
- Create helpers directory structure - Add api-helpers.ts with authentication and API mocking functions - Add ui-helpers.ts with common UI interaction utilities - Add data-helpers.ts with test data generators - Create base.spec.ts as reusable test template - Update support/index.ts to import and expose helper modules globally
23 lines
508 B
TypeScript
23 lines
508 B
TypeScript
import './commands'
|
|
import { apiHelpers } from './helpers/api-helpers'
|
|
import { uiHelpers } from './helpers/ui-helpers'
|
|
import { dataHelpers } from './helpers/data-helpers'
|
|
|
|
// Make helpers available globally
|
|
declare global {
|
|
namespace Cypress {
|
|
interface Chainable {
|
|
apiHelpers: typeof apiHelpers
|
|
uiHelpers: typeof uiHelpers
|
|
dataHelpers: typeof dataHelpers
|
|
}
|
|
}
|
|
}
|
|
|
|
afterEach(() => {
|
|
// Clean up after each test
|
|
cy.window().then(win => {
|
|
win.localStorage.clear()
|
|
})
|
|
})
|