Commit Graph

16 Commits

Author SHA1 Message Date
Lucio Giannotta 35adae3fa4 Add Storybook documentation and remove deprecated knobs (https://github.com/woocommerce/woocommerce-blocks/pull/5407)
* Remove Storybook knobs

They are now fully replaced by controls

* Update Storybook to 6.4.9
* Add Storybook documentation and VSCode snippets
* Add VSCode snippets
* Convert stories from checkout packages and include them in Storybook
2021-12-21 18:08:57 +01:00
Alex Florisca 6624d898e8 ignore eslint-plugin-woocommerce build files (https://github.com/woocommerce/woocommerce-blocks/pull/5340) 2021-12-16 10:35:25 +00:00
Luigi Teschio 1aca1eaa7c Add recommended extensions for VSCode woocommerce/woocommerce-blocks#5233 (https://github.com/woocommerce/woocommerce-blocks/pull/5237)
* Add recommended extension for vs code woocommerce/woocommerce-blocks#5233

Add recommended extension for vs code

* replace PHP extensions

* add editor config extension

* update gitignore
2021-12-01 09:50:28 +01:00
Thomas Roberts 255a74b328 Add screenshots on E2E test failures (https://github.com/woocommerce/woocommerce-blocks/pull/4898)
* Add test environment to catch errors

* Add jest-circus and jest-html-reporters

This is so we can log the screenshots and errors that happen during E2E tests.

* Use the jest reporters and jest-circus to run the E2E tests

* Force cart test to break

Revert this!

* Upload jest report artifact when tests fail

* Run artifact upload on failure

* Upload entire report directory to artifact

* Revert "Force cart test to break"

This reverts commit c57f2c5ab1d7b60d8824d854c1cb9a8281a71c4b.

* Update .gitignore and jest.config

* Force cart test to break

* Force cart test to break

* Remove <rootDir> from jest-html-reporter path

This was causing the artefact not to upload.

* Revert "Force cart test to break"

Co-authored-by: Niels Lange <info@nielslange.de>
2021-10-08 11:58:44 +01:00
Mike Jolley 9a00279b6a Storybook to gh-pages deployment (https://github.com/woocommerce/woocommerce-blocks/pull/4370)
* Add gh-pages deployment

* Update package lock
2021-06-21 10:58:57 +01:00
Darren Ethier 056a446832 change eslint workflow to use different method and action (https://github.com/woocommerce/woocommerce-blocks/pull/3693)
Our existing worfklow was giving a cryptic error that I couldn’t troubleshoot so decided to just switch to a different method
2021-01-17 14:06:24 -05:00
Darren Ethier 1026ff8fd4 Switch to use `wp-env` as the development/test environment (https://github.com/woocommerce/woocommerce-blocks/pull/2730)
* Switch to use wp-env

* fix travis config

* fix spacing?

* doh need to install packages before starting environment!

* more fixes for errors in travis environment

* hmm still have node-git issues

* nope must use dash

* maybe it’s a caching issue (we’re caching node_modules?)

* remove configs

* add wp-env override json to gitignore

* remove obsolete scripts

* fix config in travis

* restore default env (for phpunit)

* for e2e manually set WORDPRESS_BASE_URL

* doh fix variable for wp version

* run phpunit via docker and fix WordPress version used for tests

* find out what’s going on with this thing

* don’t escape?

* doh phpunit needs dev installed from composer!

* fix versions

* looks liek we have to make sure wp db is up to date?!?

- also moves pre-configuration stuff all into one file for easier maintenance.

* see if I can get insight into what the siteurl is in the wp environment on travis

* try env setup (known that will break phpunit but possible it might fix e2e?)

* output plugin list to see what is active in travis

* try flushing rules

* do a hard fulsh

* fix argument syntax

* move things around and add pre-configuration as files so all wp commands run at once

* revert back to running each container command separately

Not sure, but this might affect permissions issues?

* maybe re-ordering before the file sync will help?

also try some configuration changes

* another attempt at travis config

In this attempt:
- map .htaccess to the server on the environment start
- try changing permissions of wp-content and wp-content/plugins as a part of the e2e test bootup

* use default wp version for gute build

* refactor to run all wp commands in one go

* don’t return promise from setup function

- this might fix the sporadic fails related to the fixtures being setup (and potential race conditions there).

* make sure we activate gutenberg plugin (previously we were just installing)

The syntax of the command was incorrect.

* try alternative syntax for installing and activating plugin
2020-06-17 16:28:11 -04:00
Mike Jolley 60d05aed19 Product search block e2e test (https://github.com/woocommerce/woocommerce-blocks/pull/1712)
* add docker files

* get tests to work

* remove irrelevant files

* add woocommerce as a dep

* remove eslintignore for tests

* undo travis chages till another PR

* remove local utils and call them directly from woocommerce

* remove travis db

* Block snapshot

* Test than the block can be inserted and interacted with

* Add snapshop

* Update snapshot

* rebase on master

* add a build script for just doing npm build on e2e tests

* just run build for e2e test job

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
2020-02-11 12:23:23 -05:00
Seghir Nadir 8e3ac17585 Introduce feature flags (https://github.com/woocommerce/woocommerce-blocks/pull/1631)
* introduce feature flags

* move config to webpack-helper

* add flag to deploy command

* remove package default

* add cross-env

* add gating to frontendConfig and coreConfig

* exclude entries from being built on stable mode

* add feature gating to PHP

* add flag to start command

* add flags to travis

* add endpoints

* add better defaults for php

* move code to Bootstrap.php

* no need to spread single object

* ignore blocks.ini

* type check feature flag

* remove blocks.ini

* sanitize flag

* remove flag from npm start

* format condition

* keep spaces for package-lock.json

* check for env before going to block ini

* add env vars to travis

* whitelist env var
2020-01-31 21:04:37 +01:00
Rua Haszard 7f44458418 Basic storybook implementation (https://github.com/woocommerce/woocommerce-blocks/pull/1636)
* install & configure storybook (via magic npx script)

* fix indentation in storybook generated files

* eslint ignore generated storybook files (for now at least)

* unhide storybook folder, consistent with Gutenberg project

* demo story for one of our components (with no css/styles)

* hack in scss webpack config & add story for button:
- fixes scss imports breaking storybook build
- note scss / styling doesn't work yet
+ organise our component stories into folder

* git ignore storybook-static build folder

* pin dependencies for storybook

* piggy-back off main webpack config for storybook module.rules (for scss)

* use gutenberg (wp-components) styles in storybook

* use system font for storybook, consistent with wp-admin/gberg and reasonable default for components in front end

* add --ci flag to prevent storybook opening new browser tab…
- see also https://github.com/storybookjs/storybook/issues/6201

* rename default stories to Default (following Gutenberg pattern)

* add story for ErrorPlaceholder

* failing ProductPreview story (committing to PR as an example for discussion)

* storybook for components/icons

* fix aliased dependencies in components for storybook:
append our webpack aliases to storybook webpack config

* basic story for PriceSlider (looks right but interaction broken)

* fix PriceSlider user interaction:
- PriceSlider expects client to handle onChange and pass in new min/max

* add comment about priceslider max/min (todoish)

* remove default stories from storybook scaffolding

* organise stories by module (aka folder in codebase)

* package-lock update after rebase

* remove unnecessary ignores (default stories are gone)

* delete experimental/risky/broken stories:
- icons components are changing in woocommerce/woocommerce-blocks#1644
- we need to refactor/do more work to get ProductPreview working (settings globals)

* remove unnecessary import

* clarify PriceSlider component intended usage comment in story

* remove redundant wrapper divs from stories

* add common storybook addons (used by Gutenberg storybook)

* rebuild package.lock after rebase

* remove unnecessary wrapper div

* package fixes after rebase

* add configuration for storybook source loader

* add decorators for a11y and knobs plugins

* remove unnecessary react import & import useState from WP

Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
2020-01-31 09:59:14 +13:00
Albert Juhé Lluveras f97b5ce800 Add `package-plugin` script (https://github.com/woocommerce/woocommerce-blocks/pull/689)
* Add build-plugin-zip script

* Avoid removing files not being tracked by git

* rsync

* Exclude zip file from builds
2019-07-09 12:37:25 +01:00
Kelly Dwan 22f3582c43 Build: Add translation conversion script (https://github.com/woocommerce/woocommerce-blocks/pull/486)
* Add script to transform language .po files to the expected JSON format for each built JS file

* Merge in updated language packs

* Ignore languages file in bin
2019-03-13 09:59:12 -04:00
Kelly Dwan c41ceff9fc i18n: Remove the babel makepot & pot-to-php scripts (https://github.com/woocommerce/woocommerce-blocks/pull/385)
* Remove the babel makepot & pot-to-php scripts

These aren’t needed because WP.org will now pull from JS files for glotpress translations.

* Remove pot file from gitignore
2019-01-31 15:59:13 -05:00
Kelly Dwan 723c8eedab Update textdomain to plugin slug (https://github.com/woocommerce/woocommerce-blocks/pull/199)
* Update textdomain in JS files

* Update textdomain in PHP files

* Add babel plugin to create pot & php files from JS

* Update textdomain in plugin header

* Update translations after rebase
2018-12-04 09:51:21 -05:00
Kelly Dwan 140f4e5ed6 Update build process (https://github.com/woocommerce/woocommerce-blocks/pull/122)
* Add api-fetch dependency

* Remove compiled files from the repo

* Update build process, remove grunt

* Import CSS into block, as we now extract CSS via webpack to build

* Update enqueue scripts to reflect new build locations

* Detect if build files don’t exist, and instruct users to build project

* Update readme with build instructions

* Clarify where to run npm commands in info notice

* Only enqueue our JS files if we know they exist

* Clarify version compatibility between WC and WP 5.0
2018-11-13 14:12:32 -05:00
claudiulodro 6533d2f166 Set up and move things over for a feature plugin 2018-02-13 11:03:53 -08:00