Files
0b8ce4f634 fix: Connections need to connect to Types that implement the Node interface (#675)
* - implement Node on different Types

* - update class-customers to return arrays for edges and nodes
- move id resolver from product-attribute interface to the specific types

* - return empty arrays for edges/nodes for coupon connections
- update test to check for falsy vs null

* - remove manual registration of the `Product` Interface
- register the fields to the Product Interface

* - fix code style

* - fix code style

* - no longer pass type registry to Product::register_interface()

* -  use post type registry to register the Product type as an Interface

* WPGraphQL v1.13.x support added.

* WPGraphQL v1.13.x support added.

* fix: filter corrected.

* fix: Needed code restored

* fix: Needed code restored

* parent field no longer overwritten

* chore: WPCS compliance met.

Co-authored-by: Geoff Taylor <geoff@axistaylor.com>
2022-12-07 17:04:39 -05:00

41 lines
867 B
Bash
Executable File

#!/usr/bin/env bash
set -eu
declare work_dir=$(pwd)
if [ 'run' = "$1" ]; then
declare no_exit="--no-exit";
fi
cd $PROJECT_DIR
echo "Running 'codecept $@' in Docker..."
~/.composer/vendor/bin/codecept $@ --env docker --no-redirect $no_exit
if [ 'run' = "$1" ]; then
declare test_output="tests/_output";
if [ -n "$(ls $test_output )" ]; then
echo 'Setting result files permissions'.
chmod 777 -R ${test_output}/*
fi
# Clean coverage.xml and clean up PCOV configurations.
if [ -f "${test_output}/coverage.xml" ]; then
echo 'Cleaning coverage.xml for deployment...'
pattern="$PROJECT_DIR/"
sed -i "s~$pattern~~g" "$test_output"/coverage.xml
fi
# Check results and exit accordingly.
if [ -f "$test_output/failed" ]; then
echo "Uh oh, some went wrong." >> /dev/stderr
exit 1
else
echo "Woohoo! It's working!"
exit 0
fi
fi
cd $work_dir