Files
cypress/packages/example/lib/example.js
Zach Panzarino da3e49bf59 feat: updated scaffolding, new project & user banners, ability to remove scaffolding (#15826)
* update example build scripts

* remove old scaffolding relics

* update

* Fix some issues with scaffolding

* Correctly fix issues with scaffolding

* Replace old onboarding with new banner

* Add ability to remove scaffolded files

* Add banner for new users

* Update tests for new scaffolding

* Compare file sizes before removing

* Add tests for remove file

* Save when user opened cypress rather than boolean

* Update intro link and add tets for banners

* fix small issue

* Update design and copy of onboarding banners

* Update style of new spec file button

* Improve outline button active statE

* Update design of new project a bit more

* Fix specs list tests

* Update banner copy and layout

* Update banner copy and layout

* Switch to docs style alerts

* Fix testing logic

* Update banner styles a bit

* Update banners

* Add confirmation modal for delete specs

* Update tests and fix states

* Upgrade kitchensink dep

* Upgrade kitchen sink version and fix unit tests

* Update integration scaffolding test

* Add further description to warning modal

* Update test for new user and new project case

* Remove check to file tree when removing files

* Update kitchensink version

* Fix edge case where banner could appear when no files have been scaffolded

* Fix tests

* Update styling for 'note' when deleting files

* fix issue with path on windows

* Change remove command

* Fix rm dir

* Fix for windows

* Try to use appveyor to test

* appveyor please

* getting some feedback

* Why doesn't this work

* more info

* I have a feeling this works

* maybe its the other path

* please

* this is the one

* this is it

* this should work

* try reverting that change that might not be needed

* remove appveyor testing scaffolding

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2021-06-22 10:59:47 -05:00

48 lines
891 B
JavaScript

const path = require('path')
const Promise = require('bluebird')
const glob = Promise.promisify(require('glob'))
const pathToExamples = path.join(
__dirname,
'..',
'cypress',
'integration',
'**',
'*'
)
module.exports = {
getPathToExamples () {
return glob(pathToExamples, { nodir: true })
},
getPathToExampleFolders () {
return glob(`${pathToExamples}${path.sep}`)
},
getPathToPlugins() {
return path.resolve(__dirname, '..', 'cypress', 'plugins', 'index.js')
},
getPathToSupportFiles() {
return glob(
path.join(
__dirname,
'..',
'cypress',
'support',
'**',
'*'
)
)
},
getPathToTsConfig() {
return path.resolve(__dirname, '..', 'cypress', 'tsconfig.json')
},
getPathToFixture() {
return path.resolve(__dirname, '..', 'cypress', 'fixtures', 'example.json')
}
}