Skip to content

Commit

Permalink
upgrades storybook with new visual test migration. No longer monorepo…
Browse files Browse the repository at this point in the history
… as I can get rid of cypress and include it all in storybook tests
  • Loading branch information
KaiSpencer committed Jan 2, 2024
1 parent ebe67bb commit 478e8fc
Show file tree
Hide file tree
Showing 178 changed files with 20,257 additions and 66,930 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- uses: pnpm/action-setup@v2
name: Install pnpm
Expand All @@ -26,12 +26,6 @@ jobs:
version: 8
run_install: false

- name: Cypress install
uses: cypress-io/github-action@v6
with:
# Disable running of tests within install job
runTests: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
Expand All @@ -53,4 +47,4 @@ jobs:
run: pnpm lint

- name: Unit Test
run: pnpm test:unit
run: pnpm test
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- uses: pnpm/action-setup@v2
name: Install pnpm
Expand Down
13 changes: 10 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/node_modules
.turbo
.idea
node_modules
*.log
.DS_Store
.idea
npm-debug.log
dist/
.history/
storybook-build
.npmrc
coverage
File renamed without changes.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18
12 changes: 12 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { StorybookConfig } from "@storybook/react-vite";

export default ({
addons: ["@storybook/addon-essentials"],
framework: "@storybook/react-vite",
stories: ["../stories/**/*.story.@(js|tsx|mdx)"],

core: {
builder: "@storybook/builder-vite",
},
docs: { autodocs: true },
} satisfies StorybookConfig);
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions .storybook/test-runner.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { TestRunnerConfig } from "@storybook/test-runner";

const config: TestRunnerConfig = {
async postVisit(page, context) {
// the #storybook-root element wraps the story. In Storybook 6.x, the selector is #root
const elementHandler = await page.$("#storybook-root");
const innerHTML = await elementHandler?.innerHTML();
if (!innerHTML) {
throw new Error("No innerHTML found");
}
expect(innerHTML).toMatchSnapshot();
},
};

export default config;
85 changes: 11 additions & 74 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,84 +1,21 @@
# Changelog
# react-trello-ts

All notable changes to this project will be documented in this file.
## 2.0.16

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### Patch Changes

## [2.2.4] - 2020-03-08
- dd24717: bug/ onCardUpdate should fire - #26

### Fixes
## 2.0.15

* [#354] Getting errors on each drag and drop using react-trello/smooth-dnd
* [#317] Upgrade smooth-dnd to the latest version
### Patch Changes

- c90dd1d: Unused style prop in Lane.tsx

## [2.2.3] - 2019-08-22
## 2.0.14

### Fixes
### Patch Changes

* [#312] Lane metadata not being passed to CustomLaneHeader
- b38da98: Add changesets

## [2.2.2] - 2019-07-30

### Improvements

* LaneHeaderComponent specified two editLaneTitle props, causing a warning to
be shown
* Remove duplicated editLaneTitle propType

### Fixes

* [#306] Delete Icon not there in Custom Card Component

## [2.2.1] - 2019-07-22

### Improvements

* Cursor on lane header respects draggable
* Improve new lane title editor (auto close on click outside)

### Fixes

* [#298] onCardDelete Event doesn't get fired anymore

## [2.2.0] - 2019-07-20

### Added

* Availability to hide Add Card button for specific lane
* Internationalization support (property `t` and `lang`)
* Russian translation
* Dependency Injection mechanisim for all components customization
(property `components`)
* Add `onCardMoveAcrossLanes` handler property, called when a card is moved across lanes
* Add `onDeleteLane` handler property
* Add `laneStyle` property
* Add `editLaneTitle` and `onLaneUpdate` props (availability to inline edit lane
title)

### Improvements

* Removed CSS style hardcoding (except `react-popover`)
* Upgrade dev dependencies and remove unnecessary pkgs
* Suppress debug prints in tests
* Add babel-plugin-module-resolver to root as ./src
* Removed `react-popover`'s CSS classes.


### Fixes

* [#203] fixes Cannot drop a card near the bottom of a lane
* [#205] fix argument names in handleLaneDragEnd
* [#201] Fixed Warning: Failed prop type by replacing `react-popover` with `react-popopo`

### Breaking changes

* Removed props `addLaneTitle` and `addCardTitle`. Use `t('Add another lane')` and `t('Click to add card')` instead of it.
* Removed props `customLaneHeader`, `newCardTemplate`, `newLaneTemplate`, `customCardLayout`. Use `components` property instead of it.

Refer [upgrade instructions](UPGRADE.md) to migrate to new version.

## [0.0.0] - [2.1.4]

Lookin into `git log`
Linting fix to prefer template strings over concat
24 changes: 0 additions & 24 deletions apps/cypress-testing/.gitignore

This file was deleted.

21 changes: 0 additions & 21 deletions apps/cypress-testing/cypress.config.ts

This file was deleted.

128 changes: 0 additions & 128 deletions apps/cypress-testing/cypress/component/CardBehaviour.cy.tsx

This file was deleted.

26 changes: 0 additions & 26 deletions apps/cypress-testing/cypress/component/ComponentName.cy.tsx

This file was deleted.

Loading

0 comments on commit 478e8fc

Please sign in to comment.