Skip to content

Commit

Permalink
Update Dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
nealus committed Apr 21, 2023
1 parent 295562e commit 989112f
Show file tree
Hide file tree
Showing 10 changed files with 4,496 additions and 4,521 deletions.
16 changes: 16 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { defineConfig } from "cypress";

export default defineConfig({
component: {
devServer: {
framework: "react",
bundler: "webpack",
},
setupNodeEvents(on, config) {},
viewportWidth: 1024,
viewportHeight: 768,
videoCompression: false,
specPattern: "test/**/*.test.{js,ts,jsx,tsx}",
}

});
9 changes: 0 additions & 9 deletions cypress.json

This file was deleted.

5 changes: 5 additions & 0 deletions cypress/fixtures/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "[email protected]",
"body": "Fixtures are a great way to mock data for responses to routes"
}
37 changes: 37 additions & 0 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/// <reference types="cypress" />
// ***********************************************
// This example commands.ts shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add('login', (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
//
// declare global {
// namespace Cypress {
// interface Chainable {
// login(email: string, password: string): Chainable<void>
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
// }
// }
// }
12 changes: 12 additions & 0 deletions cypress/support/component-index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Components App</title>
</head>
<body>
<div data-cy-root></div>
</body>
</html>
39 changes: 39 additions & 0 deletions cypress/support/component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// ***********************************************************
// This example support/component.ts 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')

import { mount } from 'cypress/react18'

// Augment the Cypress namespace to include type definitions for
// your custom command.
// Alternatively, can be defined in cypress/support/component.d.ts
// with a <reference path="./component" /> at the top of your spec.
declare global {
namespace Cypress {
interface Chainable {
mount: typeof mount
}
}
}

Cypress.Commands.add('mount', mount)

// Example use:
// cy.mount(<MyComponent />)
4 changes: 3 additions & 1 deletion test/tsconfig.json → cypress/tsconfig.json
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
"alwaysStrict": false,
"forceConsistentCasingInFileNames": false,
"noImplicitReturns": false,
"noImplicitAny": false,
"strict": false,
"noUnusedLocals": false,
"jsx": "react",
"skipLibCheck": true
"skipLibCheck": true,
"moduleResolution":"node"
},
"include": ["**/*.ts", "**/*.tsx", "**/*.js"]
}
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"css": "sass style/underline.scss style/underline.css && sass style/gray.scss style/gray.css && sass style/light.scss style/light.css && sass style/light.scss test/style/light.css && sass style/dark.scss style/dark.css",
"cypress": "cypress open-ct",
"cypress-firefox": "cypress open-ct --browser firefox",
"test": "cypress run-ct"
"test": "cypress run --component"
},
"author": "Caplin Systems Ltd",
"repository": "https://github.com/caplin/FlexLayout",
Expand All @@ -43,28 +43,28 @@
"extends": "react-app"
},
"devDependencies": {
"@cypress/react": "^5.12.4",
"@cypress/webpack-dev-server": "^1.8.4",
"@types/node": "^17.0.24",
"@cypress/react": "^7.0.3",
"@cypress/webpack-dev-server": "^3.4.1",
"@types/node": "^18.15.13",
"@types/prismjs": "^1.26.0",
"@types/react": "^18.0.5",
"@types/react-dom": "^18.0.1",
"css-loader": "^6.7.1",
"cypress": "^9.5.4",
"cypress": "^12.10.0",
"html-webpack-plugin": "^5.5.0",
"prettier": "^2.6.2",
"prismjs": "^1.28.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-scripts": "5.0.1",
"sass": "^1.50.0",
"source-map-loader": "^3.0.0",
"source-map-loader": "^4.0.1",
"style-loader": "^3.3.1",
"ts-loader": "~9.2.8",
"typedoc": "^0.22.15",
"typescript": "^4.6.3",
"typedoc": "^0.24.4",
"typescript": "^4.9.5",
"webpack": "^5.72.0",
"webpack-cli": "^4.9.1",
"webpack-cli": "^5.0.1",
"webpack-dev-server": "^4.8.1"
},
"dependencies": {}
Expand Down
4 changes: 2 additions & 2 deletions test/View.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { mount, unmount } from '@cypress/react';
import { mount } from '@cypress/react';
import { CLASSES } from '../src/Types';
import { App, twoTabs, threeTabs, withBorders } from './App';
import { AppEx, layoutEx2, layoutEx1 } from './AppEx';
Expand Down Expand Up @@ -946,7 +946,7 @@ function dragsplitter(from: string, upDown: boolean, distance: number) {
}

beforeEach(() => {
unmount();
// unmount();
});

const findAllTabSets = () => {
Expand Down
Loading

0 comments on commit 989112f

Please sign in to comment.