Skip to content

Commit

Permalink
Merge branch '10.0-release' into navbar-design-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ZachJW34 authored Jan 27, 2022
2 parents 0c0df80 + cec46df commit dcbdd95
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 86 deletions.
14 changes: 0 additions & 14 deletions packages/app/cypress/e2e/files.cy.ts

This file was deleted.

21 changes: 21 additions & 0 deletions packages/app/cypress/e2e/index.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,27 @@ describe('App: Index', () => {
})
})
})

context('pristine app', () => {
beforeEach(() => {
cy.scaffoldProject('pristine-with-e2e-testing')
cy.openProject('pristine-with-e2e-testing')
cy.startAppServer('e2e')
cy.visitApp()
})

context('scaffold example files', () => {
it('should create example files on an empty project', () => {
cy.contains('[data-cy="card"]', defaultMessages.createSpec.e2e.importFromScaffold.header).click()
// TODO: Check that the popup stays open
cy.withCtx(async (ctx) => {
const stats = await ctx.actions.file.checkIfFileExists('cypress/e2e/1-getting-started/todo.cy.js')

expect(stats?.isFile()).to.be.true
})
})
})
})
})

describe('Testing Type: Component', {
Expand Down
17 changes: 0 additions & 17 deletions packages/data-context/src/actions/ProjectActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ import type { InitializeProjectOptions, FoundBrowser, FoundSpec, LaunchOpts, Ope
import execa from 'execa'
import path from 'path'
import assert from 'assert'
import Debug from 'debug'

const debug = Debug('cypress:data-context:project-actions')

import type { ProjectShape } from '../data/coreDataShape'

Expand Down Expand Up @@ -384,25 +381,11 @@ export class ProjectActions {
return path.join(projectRoot, 'cypress', 'e2e')
}

async maybeCreateE2EDir () {
const stats = await this.ctx.fs.stat(this.defaultE2EPath)

if (stats.isDirectory()) {
return
}

debug(`Creating ${this.defaultE2EPath}`)

return this.ctx.fs.mkdirp(this.defaultE2EPath)
}

async scaffoldIntegration (): Promise<NexusGenObjects['ScaffoldedFile'][]> {
const projectRoot = this.ctx.currentProject

assert(projectRoot, `Cannot create spec without currentProject.`)

await this.maybeCreateE2EDir()

const results = await codeGenerator(
{ templateDir: templates['scaffoldIntegration'], target: this.defaultE2EPath },
{},
Expand Down
25 changes: 0 additions & 25 deletions system-tests/projects/no-specs/src/stories/Button.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import React from 'react';
import PropTypes from 'prop-types';
import './button.css';

/**
* Primary UI component for user interaction
Expand All @@ -19,29 +17,6 @@ export default Button = ({ primary, backgroundColor, size, label, ...props }) =>
);
};

Button.propTypes = {
/**
* Is this the principal call to action on the page?
*/
primary: PropTypes.bool,
/**
* What background color to use
*/
backgroundColor: PropTypes.string,
/**
* How large should the button be?
*/
size: PropTypes.oneOf(['small', 'medium', 'large']),
/**
* Button contents
*/
label: PropTypes.string.isRequired,
/**
* Optional click handler
*/
onClick: PropTypes.func,
};

Button.defaultProps = {
backgroundColor: null,
primary: false,
Expand Down
30 changes: 0 additions & 30 deletions system-tests/projects/no-specs/src/stories/button.css

This file was deleted.

0 comments on commit dcbdd95

Please sign in to comment.