Compare commits
1 Commits
master
...
try-cypres
Author | SHA1 | Date |
---|---|---|
Trent Larson | d48b2210d5 | 2 years ago |
9 changed files with 1376 additions and 67 deletions
@ -0,0 +1,9 @@ |
|||||
|
import { defineConfig } from "cypress"; |
||||
|
|
||||
|
export default defineConfig({ |
||||
|
e2e: { |
||||
|
setupNodeEvents(on, config) { |
||||
|
// implement node event listeners here
|
||||
|
}, |
||||
|
}, |
||||
|
}); |
@ -0,0 +1,20 @@ |
|||||
|
describe('My First Test', () => { |
||||
|
it('finds the content "type"', () => { |
||||
|
cy.visit('http://localhost:8080') |
||||
|
|
||||
|
cy.contains('Yes').click() |
||||
|
|
||||
|
cy.get('#mnemonic').type('seminar accuse mystery assist delay law thing deal image undo guard initial shallow wrestle list fragile borrow velvet tomorrow awake explain test offer control') |
||||
|
cy.get('#import').click() |
||||
|
|
||||
|
cy.get('Share Your ID') |
||||
|
|
||||
|
/** |
||||
|
cy.visit('http://localhost:8080/new-edit-project') |
||||
|
cy.get('#name').type('Clicker Shooter') |
||||
|
cy.get('#description').type('Joel\'s new test project via Cypress') |
||||
|
cy.contains('Save Project').click() |
||||
|
**/ |
||||
|
|
||||
|
}) |
||||
|
}) |
@ -0,0 +1,5 @@ |
|||||
|
{ |
||||
|
"name": "Using fixtures to represent data", |
||||
|
"email": "hello@cypress.io", |
||||
|
"body": "Fixtures are a great way to mock data for responses to routes" |
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
/// <reference types="cypress" />
|
||||
|
// ***********************************************
|
||||
|
// This example commands.ts shows you how to
|
||||
|
// create various custom commands and overwrite
|
||||
|
// existing commands.
|
||||
|
//
|
||||
|
// For more comprehensive examples of custom
|
||||
|
// commands please read more here:
|
||||
|
// https://on.cypress.io/custom-commands
|
||||
|
// ***********************************************
|
||||
|
//
|
||||
|
//
|
||||
|
// -- This is a parent command --
|
||||
|
// Cypress.Commands.add('login', (email, password) => { ... })
|
||||
|
//
|
||||
|
//
|
||||
|
// -- This is a child command --
|
||||
|
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
|
||||
|
//
|
||||
|
//
|
||||
|
// -- This is a dual command --
|
||||
|
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
|
||||
|
//
|
||||
|
//
|
||||
|
// -- This will overwrite an existing command --
|
||||
|
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
||||
|
//
|
||||
|
// declare global {
|
||||
|
// namespace Cypress {
|
||||
|
// interface Chainable {
|
||||
|
// login(email: string, password: string): Chainable<void>
|
||||
|
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
||||
|
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
||||
|
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
|
||||
|
// }
|
||||
|
// }
|
||||
|
// }
|
@ -0,0 +1,20 @@ |
|||||
|
// ***********************************************************
|
||||
|
// This example support/e2e.ts is processed and
|
||||
|
// loaded automatically before your test files.
|
||||
|
//
|
||||
|
// This is a great place to put global configuration and
|
||||
|
// behavior that modifies Cypress.
|
||||
|
//
|
||||
|
// You can change the location of this file or turn off
|
||||
|
// automatically serving support files with the
|
||||
|
// 'supportFile' configuration option.
|
||||
|
//
|
||||
|
// You can read more here:
|
||||
|
// https://on.cypress.io/configuration
|
||||
|
// ***********************************************************
|
||||
|
|
||||
|
// Import commands.js using ES2015 syntax:
|
||||
|
import './commands' |
||||
|
|
||||
|
// Alternatively you can use CommonJS syntax:
|
||||
|
// require('./commands')
|
File diff suppressed because it is too large
Loading…
Reference in new issue