Skip to content

Commit

Permalink
cleanup(misc): reenable cypress component tests e2e tests (nrwl#14668)
Browse files Browse the repository at this point in the history
  • Loading branch information
leosvelperez authored Jan 30, 2023
1 parent 1eb38ce commit 954f78c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
3 changes: 1 addition & 2 deletions e2e/angular-extensions/src/cypress-component-tests.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import {
} from '../../utils';
import { names } from '@nrwl/devkit';

// TODO(leo): reenable once https://github.com/cypress-io/cypress/issues/25568 is addressed
xdescribe('Angular Cypress Component Tests', () => {
describe('Angular Cypress Component Tests', () => {
let projectName: string;
const appName = uniq('cy-angular-app');
const usedInAppLibName = uniq('cy-angular-lib');
Expand Down
31 changes: 19 additions & 12 deletions e2e/react/src/cypress-component-tests.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import {
updateProjectConfig,
} from '../../utils';

// TODO(leo): reenable once https://github.com/cypress-io/cypress/issues/25568 is addressed
xdescribe('React Cypress Component Tests', () => {
describe('React Cypress Component Tests', () => {
let projectName;
const appName = uniq('cy-react-app');
const usedInAppLibName = uniq('cy-react-lib');
Expand Down Expand Up @@ -222,16 +221,24 @@ ${content}`;
// are they overriding some option on top of each other causing cypress to not see it's running?
createFile(
`apps/${appName}/webpack.config.js`,
`module.exports = async function (configuration) {
await new Promise((res) => {
setTimeout(() => {
console.log('I am from the custom async Webpack config')
res()
}, 1000)
})
const defaultConfig = require("@nrwl/react/plugins/webpack")
return defaultConfig(configuration);
};`
`
const { composePlugins, withNx } = require('@nrwl/webpack');
const { withReact } = require('@nrwl/react');
module.exports = composePlugins(
withNx(),
withReact(),
async function (configuration) {
await new Promise((res) => {
setTimeout(() => {
console.log('I am from the custom async Webpack config');
res();
}, 1000);
});
return configuration;
}
);
`
);
updateProjectConfig(appName, (config) => {
config.targets[
Expand Down

0 comments on commit 954f78c

Please sign in to comment.