-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: update packages/example deployment script and cleanup package/example #25091
Merged
Merged
Changes from 11 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
213c284
chore: update and cleanup package/example
emilyrohrbough ffc7264
remove
emilyrohrbough a6820c7
run ci
emilyrohrbough 5eacce9
run ci
emilyrohrbough e67220f
fix graphql references
emilyrohrbough 3451741
run ci
emilyrohrbough 7efe65a
fix mocha results count
emilyrohrbough 64a666b
work from diff branch
emilyrohrbough 30e2728
Merge branch 'develop' into update-examples-deployment
emilyrohrbough da8cd6b
keep this.
emilyrohrbough 6aca23c
Met push
emilyrohrbough 32bb974
Merge branch 'develop' into update-examples-deployment
emilyrohrbough b99869f
fix tests.
emilyrohrbough 835d182
merge conficts
emilyrohrbough f31e8a1
Merge branch 'develop' into update-examples-deployment
emilyrohrbough c84c1ff
update yarn lock
emilyrohrbough 787ad8b
Merge branch 'develop' into update-examples-deployment
emilyrohrbough c5b7da5
Apply suggestions from code review
emilyrohrbough 0d319b7
Merge branch 'develop' into update-examples-deployment
emilyrohrbough File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 20 additions & 0 deletions
20
npm/create-cypress-tests/scripts/examples/cypress/support/component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// *********************************************************** | ||
// This example support/component.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') |
20 changes: 20 additions & 0 deletions
20
npm/create-cypress-tests/scripts/examples/cypress/support/e2e.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// *********************************************************** | ||
// This example support/e2e.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') |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,29 @@ | ||
#!/usr/bin/env node | ||
|
||
/* eslint-disable no-console */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did we need this? I don't see any There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see lines 31 & 34 |
||
|
||
const resolvePkg = require('resolve-pkg') | ||
const { join } = require('path') | ||
const fs = require('fs-extra') | ||
const path = require('path') | ||
const glob = require('glob') | ||
const util = require('util') | ||
const childProcess = require('child_process') | ||
|
||
const EXAMPLE_DIR = path.join(__dirname, '..') | ||
const globAsync = util.promisify(glob) | ||
|
||
async function build() { | ||
async function build () { | ||
await Promise.all([ | ||
fs.remove(path.join(EXAMPLE_DIR, 'app')), | ||
fs.remove(path.join(EXAMPLE_DIR, 'cypress')) | ||
fs.remove(path.join(EXAMPLE_DIR, 'cypress')), | ||
]) | ||
|
||
await Promise.all([ | ||
fs.copy(join(resolvePkg('cypress-example-kitchensink'), 'app'), path.join(EXAMPLE_DIR, 'app')), | ||
fs.copy(join(resolvePkg('cypress-example-kitchensink'), 'cypress'), path.join(EXAMPLE_DIR, 'cypress')), | ||
fs.copy(join(resolvePkg('cypress-example-kitchensink'), 'cypress'), path.join(EXAMPLE_DIR, 'cypress', 'e2e')), | ||
]) | ||
|
||
childProcess.execSync('node ./bin/convert.js', { | ||
cwd: EXAMPLE_DIR, | ||
stdio: 'inherit' | ||
stdio: 'inherit', | ||
}) | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
module.exports = { | ||
"projectId": "2pz86o" | ||
'projectId': '2pz86o', | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { default } from './lib/example' | ||
export { default } from './lib/example' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
declare const example: { | ||
getPathToExamples(): Promise<string[]>; | ||
getPathToE2E(): string; | ||
getPathToPlugins(): string; | ||
getPathToTsConfig(): string; | ||
getPathToFixture(): string; | ||
getPathToE2E(): string | ||
} | ||
|
||
export default example; | ||
export default example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,7 @@ | ||
const path = require('path') | ||
const Promise = require('bluebird') | ||
const glob = Promise.promisify(require('glob')) | ||
|
||
const pathToExamples = path.join( | ||
__dirname, | ||
'..', | ||
'cypress', | ||
'e2e', | ||
'**', | ||
'*' | ||
) | ||
|
||
module.exports = { | ||
getPathToExamples () { | ||
return glob(pathToExamples, { nodir: true }) | ||
}, | ||
|
||
getPathToE2E() { | ||
getPathToE2E () { | ||
return path.join(__dirname, '..', 'cypress', 'e2e') | ||
}, | ||
|
||
getPathToExampleFolders () { | ||
return glob(`${pathToExamples}${path.sep}`) | ||
}, | ||
|
||
getPathToPlugins() { | ||
return path.resolve(__dirname, '..', 'cypress', 'plugins', 'index.js') | ||
}, | ||
|
||
getPathToTsConfig() { | ||
return path.resolve(__dirname, '..', 'cypress', 'tsconfig.json') | ||
}, | ||
|
||
getPathToFixture() { | ||
return path.resolve(__dirname, '..', 'cypress', 'fixtures', 'example.json') | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should deprecate this library, it has a total for 44 weekly downloads: https://www.npmjs.com/package/create-cypress-tests?activeTab=versions