mirror of https://github.com/logseq/logseq
test: cypress scaffolding
parent
21dac9bac2
commit
f0af0f05dd
|
@ -33,4 +33,5 @@ resources/electron.js
|
|||
.lsp/
|
||||
/libs/dist/
|
||||
charlie/
|
||||
.vscode
|
||||
.vscode
|
||||
/.preprocessor-cljs
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
{}
|
|
@ -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,10 @@
|
|||
(ns app.window
|
||||
(:require-macros [latte.core :refer [describe beforeEach it]]))
|
||||
|
||||
(def cy js/cy)
|
||||
|
||||
(describe "Window"
|
||||
(beforeEach []
|
||||
(.visit cy "https://example.cypress.io/commands/window"))
|
||||
(it "cy.window() - get the global window object" []
|
||||
(.should (.window cy) "have.property" "top")))
|
|
@ -0,0 +1,7 @@
|
|||
const makeCljsPreprocessor = require('cypress-clojurescript-preprocessor');
|
||||
/**
|
||||
* @type {Cypress.PluginConfig}
|
||||
*/
|
||||
module.exports = (on, config) => {
|
||||
on('file:preprocessor', makeCljsPreprocessor(config));
|
||||
};
|
|
@ -0,0 +1,25 @@
|
|||
// ***********************************************
|
||||
// This example commands.js 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) => { ... })
|
|
@ -0,0 +1,20 @@
|
|||
// ***********************************************************
|
||||
// This example support/index.js 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')
|
|
@ -9,6 +9,7 @@
|
|||
"@types/gulp": "^4.0.7",
|
||||
"cross-env": "^7.0.3",
|
||||
"cssnano": "^4.1.10",
|
||||
"cypress": "^7.5.0",
|
||||
"del": "^6.0.0",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-clean-css": "^4.3.0",
|
||||
|
@ -35,6 +36,7 @@
|
|||
"dev-electron-app": "gulp electron",
|
||||
"release-electron": "run-s gulp:build && gulp electronMaker",
|
||||
"debug-electron": "cd static/ && yarn electron:debug",
|
||||
"e2e-test": "./node_modules/.bin/cypress open",
|
||||
"clean": "gulp clean",
|
||||
"test": "run-s cljs:test cljs:run-test",
|
||||
"report": "run-s cljs:report",
|
||||
|
@ -65,6 +67,7 @@
|
|||
"chokidar": "^3.5.1",
|
||||
"chrono-node": "^2.2.4",
|
||||
"codemirror": "^5.58.1",
|
||||
"cypress-clojurescript-preprocessor": "^0.1.4",
|
||||
"diff": "5.0.0",
|
||||
"diff-match-patch": "^1.0.5",
|
||||
"electron": "^13.0.0",
|
||||
|
|
Loading…
Reference in New Issue