Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: Add tests in Jest to frontend components #7324

Open
wants to merge 23 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
3183c05
test: configure Jest
pauloiankoski Mar 22, 2024
899e29d
test: update existing test
pauloiankoski Mar 22, 2024
2f8aa53
tests: add tests for components shared between Event Tickets block an…
pauloiankoski Mar 22, 2024
6c711e9
fix: warnings caught on tests
pauloiankoski Mar 22, 2024
1d62b5e
test: add tests for HOC component
pauloiankoski Mar 22, 2024
04dafbe
test: update test names
pauloiankoski Mar 22, 2024
89f2559
chore: update github workflow to include js tests
pauloiankoski Mar 23, 2024
93b1683
chore: rename jobs
pauloiankoski Mar 23, 2024
4f87077
chore: add more options to npm scripts
pauloiankoski Mar 23, 2024
bbb806e
chore: move coverage folder out of the root dir
pauloiankoski Mar 23, 2024
10cc7b2
refactor: remove conditional in favor of a no-op func as default
pauloiankoski Mar 23, 2024
87431e9
test: improve tests coverage
pauloiankoski Mar 23, 2024
d512f91
chore: fix typo
pauloiankoski Mar 23, 2024
51a3b56
Fix: Quantity input overflow in Ticket Types with long descriptions (…
pauloiankoski Mar 25, 2024
9b4fb8c
Refactor: Add placeholder to event description field (#7306)
pauloiankoski Mar 25, 2024
20b5483
Feature: add badges to field template (#7312)
pauloiankoski Mar 27, 2024
5bee796
Refactor: truncate event description on events list table (#7308)
pauloiankoski Mar 27, 2024
899ffe0
Refactor: Improve Event Tickets API validations (#7321)
pauloiankoski Apr 8, 2024
eb2b331
Refactor: Store ticket type price in the generated ticket (#7315)
pauloiankoski Apr 22, 2024
3fd299b
Refactor: Replace ticket price input with a currency input (#7346)
pauloiankoski Apr 23, 2024
5c9d557
Merge branch 'develop' into epic/event-tickets-follow-up-GIVE-371
May 17, 2024
138471a
chore: fix merge conflict
May 17, 2024
431ed4c
chore: install jest-environment-jsdom
May 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
.editorconfig
.babelrc


/tests
/node_modules
/packages/form-builder/node_modules
/assets/src
Expand Down Expand Up @@ -76,10 +74,11 @@ webpack.mix.js
docker-compose.yml
wp-textdomain.js
.wp-env.json
*.test.js

# GH Action files
DOCKER_ENV
docker_tag
output.log
docker-compose.yml
wp-textdomain.js
wp-textdomain.js
21 changes: 19 additions & 2 deletions .github/workflows/wordpress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ on:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "test"
test:
php_tests:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
strategy:
Expand Down Expand Up @@ -105,3 +104,21 @@ jobs:
run: php -d memory_limit=-1 vendor/bin/phpunit
env:
DB_PORT: ${{ env.mysql_port }}

js_tests:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: 'package-lock.json'

- name: Install npm dependencies
run: |
npm install -g npm@8
npm install

- name: Run Tests
run: npm test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Unit tests
/tmp
/tests/bin/tmp
/tests/resources/coverage

# Bin files
/bin/*
Expand Down
17 changes: 16 additions & 1 deletion assets/src/css/admin/settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1070,10 +1070,25 @@ a.give-delete {
display: none;
}

.give-subsubsub .givewp-feature-flag-notification-counter {
translate: 0 -0.125rem;
vertical-align: middle;
}

.give-admin-beta-features-message {
background-color: #fff;
padding: 0.5rem;
padding: 1rem;
border: 1px solid #F29718;
margin-bottom: 1.5rem;

.givewp-beta-icon {
margin-right: 0.25rem;
}

p {
line-height: 1.6;
margin: 0;
}
}

.give-admin-beta-features-feedback-link {
Expand Down
Loading
Loading