-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Fix/issue 22747 #28134
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
Fix/issue 22747 #28134
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nodeLinker: node-modules |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -556,7 +556,7 @@ describe('Launchpad: Setup Project', () => { | |
}) | ||
}) | ||
|
||
describe('Command for package managers', () => { | ||
describe.only('Command for package managers', () => { | ||
it('makes the right command for yarn', () => { | ||
scaffoldAndOpenProject('pristine-yarn') | ||
|
||
|
@@ -584,7 +584,7 @@ describe('Launchpad: Setup Project', () => { | |
// TODO: Had to revert due to regression: https://github.com/cypress-io/cypress/pull/26452 | ||
// Would be great to fully support Plug n Play eventually, but right now it causes issues relating | ||
// to not correctly detecting dependencies when installing the binary. | ||
it.skip('works with Yarn 3 Plug n Play', () => { | ||
it.only('works with Yarn 3 Plug n Play', () => { | ||
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. I have tried reworking this test to feature an angular repo that should be spun up via cypress. I have run into some other pnp-related issues, that could be mitigated, but i'm stuck at an esm import error deep in the
|
||
scaffoldAndOpenProject('yarn-v3.1.1-pnp') | ||
|
||
cy.visitLaunchpad() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
.yarn | ||
.pnp.js | ||
.pnp.js | ||
.pnp.cjs | ||
.pnp.loader.mjs |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
yarnPath: "./yarn-3.1.1.cjs" | ||
|
||
# TODO: This should be removed at some point | ||
|
||
|
||
nodeLinker: "pnp" |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { defineConfig } from 'cypress' | ||
|
||
export default defineConfig({ | ||
component: { | ||
experimentalSingleTabRunMode: true, | ||
devServer: { | ||
framework: 'angular', | ||
bundler: 'webpack', | ||
webpackConfig: { | ||
resolve: { | ||
alias: { | ||
'@angular/common/http': require.resolve('@angular/common/http'), | ||
'@angular/common/testing': require.resolve('@angular/common/testing'), | ||
'@angular/common': require.resolve('@angular/common'), | ||
'@angular/core/testing': require.resolve('@angular/core/testing'), | ||
'@angular/core': require.resolve('@angular/core'), | ||
'@angular/platform-browser/testing': require.resolve('@angular/platform-browser/testing'), | ||
'@angular/platform-browser': require.resolve('@angular/platform-browser'), | ||
'@angular/platform-browser-dynamic/testing': require.resolve('@angular/platform-browser-dynamic/testing'), | ||
'@angular/platform-browser-dynamic': require.resolve('@angular/platform-browser-dynamic'), | ||
'zone.js/testing': require.resolve('zone.js/dist/zone-testing'), | ||
'zone.js': require.resolve('zone.js'), | ||
}, | ||
}, | ||
}, | ||
}, | ||
specPattern: 'src/**/*.cy.ts', | ||
}, | ||
}) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,42 @@ | ||
{ | ||
"name": "yarn-v3.1.1-pnp", | ||
"version": "1.0.0", | ||
"scripts": { | ||
"ng": "ng", | ||
"start": "ng serve", | ||
"build": "ng build", | ||
"watch": "ng build --watch --configuration development", | ||
"test": "ng test" | ||
}, | ||
"dependencies": { | ||
"lodash": "^4.17.21" | ||
"@angular-devkit/build-angular": "^16.2.7", | ||
"@angular-devkit/core": "^16.2.7", | ||
"@angular/animations": "^16.1.0", | ||
"@angular/common": "^16.1.0", | ||
"@angular/compiler": "^16.1.0", | ||
"@angular/core": "^16.1.0", | ||
"@angular/forms": "^16.1.0", | ||
"@angular/platform-browser": "^16.1.0", | ||
"@angular/platform-browser-dynamic": "^16.1.0", | ||
"@angular/router": "^16.1.0", | ||
"rxjs": "^7.8.0", | ||
"tslib": "^2.3.0", | ||
"zone.js": "^0.13.0" | ||
}, | ||
"devDependencies": { | ||
"typescript": "^4.2.4" | ||
"@angular/cli": "^16.1.0", | ||
"@angular/compiler-cli": "^16.1.0", | ||
"@types/jasmine": "^4.3.0", | ||
"cypress": "^13.3.2", | ||
"jasmine-core": "^4.5.0", | ||
"karma": "^6.4.0", | ||
"karma-chrome-launcher": "^3.1.0", | ||
"karma-coverage": "^2.2.0", | ||
"karma-jasmine": "^5.1.0", | ||
"karma-jasmine-html-reporter": "^2.0.0", | ||
"typescript": "^4.9.4" | ||
}, | ||
"license": "MIT", | ||
"projectFixtureDirectory": "angular", | ||
"_cyRunScripts": true, | ||
"_cyYarnV311": true | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "./out-tsc/app", | ||
"types": [] | ||
}, | ||
"files": [ | ||
"src/main.ts", | ||
"src/polyfills.ts" | ||
], | ||
"include": [ | ||
"src/**/*.d.ts" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "./out-tsc/cy", | ||
"allowSyntheticDefaultImports": true, | ||
"types": [ | ||
"cypress" | ||
] | ||
}, | ||
"include": ["src/**/*.cy.ts", "cypress/support/component.ts", "src/polyfills.ts"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,31 @@ | ||
/* To learn more about this file see: https://angular.io/config/tsconfig. */ | ||
{ | ||
"compileOnSave": false, | ||
"compilerOptions": { | ||
"target": "es5", | ||
"lib": ["es5", "dom"], | ||
"allowJs": true, | ||
"moduleResolution": "node" | ||
"baseUrl": "./", | ||
"outDir": "./dist/out-tsc", | ||
"forceConsistentCasingInFileNames": true, | ||
"strict": true, | ||
"noImplicitReturns": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"sourceMap": true, | ||
"declaration": false, | ||
"downlevelIteration": true, | ||
"experimentalDecorators": true, | ||
"moduleResolution": "node", | ||
"importHelpers": true, | ||
"target": "es2017", | ||
"module": "ESNext", | ||
"lib": [ | ||
"es2018", | ||
"dom" | ||
] | ||
}, | ||
"include": ["**/*.ts"] | ||
"angularCompilerOptions": { | ||
"enableI18nLegacyMessageIdFormat": false, | ||
"strictInjectionParameters": true, | ||
"strictInputAccessModifiers": true, | ||
"strictTemplates": true | ||
}, | ||
"include": ["./cypress.config.ts"] | ||
} |
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.
This line alone fixes #22747, but only if webpack-dev-server is not used (e.g. global mode
yarn cypress:open --project xxx
and testing an external angular project run via ng serve)