* add e2e test for instantiating All Reviews block:
- adapted code from @senadir in-progress PR
https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/2756
* remove pptr-testing-library - not needed for this test
* Don't skip tests for the review block on < 5.3
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* 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
* Expand travis matrix to cover diffrent WP versions
* skip tests on older wp versions
* duplicate tests
* add wp version to phpunit tests
* skip all products in 5.2
* fix tests
* tweak command to account for e2e-util version
* tag snapshots
* Revert "tag snapshots"
This reverts commit b55ba2e522c5a248590039a3bb224f81da2653c5.
* use hook instead of HOC
* add todo to code
* fix borked conflict
* remove dubplicate single product test
* revert assets/js/blocks/product-search/edit.js to master
* add util folder and add util to generate pages
* add loader to insert and remove pages
* update tests to use the new page creator
* refactor tests to not create pages
* remove fullscreen check
* update single product test.
The test kept failing for me locally (it wasn’t deleting the block), when I manually tested following the same manual steps would not delete the block.
* add `quiet-pull` flag to docker command to hopefully reduce noice on builds
* adjust page loader to simplfy the loop
* remove extra comment
* add docs
* move promise inside map
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
* change entrypoint setup and install wc-rest-api
* enable pretty links in docker
* create fixtures functions
* create and load global setup and teardown files
* support multiple shipping zones
* use env values
* refactor command
* fix typo in command
* more to import instead of require
* add docs
* refactor test data to its own file and refactor shipping methods
* revert to commonJS require
* rename function name
* rename global variable
* update fixture functions to accept fixture as param
* document fixture data
* pin wc rest api
* update package-lock
* remove forgetten test line
* Add line pricing for cart items in the API (https://github.com/woocommerce/woocommerce-blocks/pull/1979)
* Add line pricing for cart items
* Update checkout linePrice
* Fix tests
* Update schema - add dinero
* Implement dinero in cart totals
* Update preview and remove line totals
* Update package lock
* Update checkout review
* Fix preview and default data shapes
* return first and last name in shipping address
* remove shippingAsBilling option from editor settings
* remove billing data from store
* move to context
* hook billing to hook and sync with shipping
* add email to billingData
* hydrate billing data
* some refactors
* move hydrated billing data to reducer initial state and fix stale dependencies
* fix stale useCallback
* better checks in php types
* get isEditor from context
* update typedefs
* skip state update if nothing changed
* fix rebase
* update snapshots
* rebase package
* wrap setEmail in useCallback
* remove ValidationContextProvider
* fix docs
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* Add checkout skeleton as loading state and remove placeholder text from save method
* Hide skeleton when not loading
* add loading class
* Update snap
* Add back icon
* Add cart URL constant
* Add button components
* Implement button components into checkout
* Update checkout styles to match mockup incl updates to margins and padding
* Add options to control return to cart link
* Use checkout context
* Update snapshot
* Update context
* href
* Color/arrow styling
* Implement select instead of open URL field
* Add notice and updated settings control
* Show notice conditonally
* Store permalinks to avoid extra API requests, and get pages via API
* Update snapshots
* Fix double layout conflict
* Switch back to ID and add permalink via block setting
* snaps
* Fix snapshot; add default shape for pages
* Feedback
* Better undefined handling
* Update assets/js/blocks/cart-checkout/checkout/block.js
Co-Authored-By: Darren Ethier <darren@roughsmootheng.in>
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
* Fix background overlap of feedback box
* TS notices
* Add company name toggle
* Implement new attributes and toggles in editor
* Handle field config in address component
* Remove other hoc rule from tsconfig
* map -> forEach
* Remove return from forEach
* Export and extend field config
* Fix optional text for all field types
* unit text
* Update snapshot
* fix broken e2e test - update snapshot for checkout block:
- new `use-shipping-as-billing` data attr
* add package.json script for updating e2e test snapshots
* basic e2e tests for cart block:
- can add block, confirm editor markup matches snapshot
- can only insert one cart block
* add basic tests for checkout block:
- can add & matches snapshot
- can only add one block
* confirm single-cart test works, by allowing multiple cart blocks :)
* Revert "confirm single-cart test works, by allowing multiple cart blocks :)"
This reverts commit aae10046f37bc53bf11d8d2e1deb626d53654f71.
* 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>
* add docker files
* get tests to work
* remove irrelevant files
* change userAgent to chrome
* add woocommerce as a dep
* add jest to eslint
* remove eslintignore for tests
* undo travis chages till another PR
* remove local utils and call them directly from woocommerce
* update deps
* add setup files to run tests
* export default wp link
* wait for select before selecting
* remove travis db
* ignore e2e tests in unit testing
* add tests
* add docker commands
* always run composer
* Make it possible to import directly from '@woocommerce/e2e-tests/utils'
* remove installing woocommerce via composer.
* add more docker npm scripts
* add custom docker config for wp-cli
* add changes to docker-composer.yml
Includes reading environment variables from `.env`
* revert customizations to .travis.yml
* move main docker file for the wordpress container to bin
* fix travis config
* rename wp install for travis builds back to original name
* use a version of docker-compose that travis supports
* add minor change to try and force travis test run
* fix incorrect command
* copy composer lock from master
* only run phpcs on /src directory
* give time for host to spin up for e2e tests
* increase sleep for waiting on container
* make sure plugin is built before running tests
* sigh fix improper command usage
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>