diff --git a/.editorconfig b/.editorconfig
deleted file mode 100644
index 4e80cee17b1..00000000000
--- a/.editorconfig
+++ /dev/null
@@ -1,42 +0,0 @@
-[*]
-charset=utf-8
-end_of_line=lf
-insert_final_newline=false
-indent_style=space
-indent_size=4
-
-[{.babelrc,.stylelintrc,jest.config,.eslintrc,*.sample,*.json,*.jsb3,*.jsb2,*.bowerrc,*.js}]
-indent_style=tab
-indent_size=4
-
-[*.feature]
-indent_style=space
-indent_size=2
-
-[{jshint.json,*.jshintrc}]
-indent_style=tab
-indent_size=2
-
-[{*.jscs.json,*.jscsrc}]
-indent_style=tab
-indent_size=2
-
-[*.js.map]
-indent_style=tab
-indent_size=2
-
-[{*.ddl,*.sql}]
-indent_style=space
-indent_size=2
-
-[*.less]
-indent_style=tab
-indent_size=2
-
-[*.scss]
-indent_style=tab
-indent_size=2
-
-[{*.yaml,*.yml}]
-indent_style=space
-indent_size=2
diff --git a/.eslintignore b/.eslintignore
deleted file mode 100644
index 3be2c555150..00000000000
--- a/.eslintignore
+++ /dev/null
@@ -1,19 +0,0 @@
-assets/dist
-node_modules
-acceptance_tests
-admin_pages
-caffeinated
-/bin/
-/core/
-docs
-languages
-modules
-payment_methods
-public
-shortcodes
-tests
-ui
-widgets
-wp-assets
-coverage
-assets/vendor
\ No newline at end of file
diff --git a/.eslintrc.js b/.eslintrc.js
deleted file mode 100644
index 49aee08f2fd..00000000000
--- a/.eslintrc.js
+++ /dev/null
@@ -1,29 +0,0 @@
-module.exports = {
- root: true,
- extends: [
- './eslint/config.js',
- ],
- overrides: [
- {
- files: [ 'test/e2e/**/*.js' ],
- globals: {
- page: true,
- browser: true,
- wp:true,
- eejsdata:true,
- },
- env: {
- browser:true,
- }
- },
- {
- files: [ '*.js' ],
- rules: {
- "react/react-in-jsx-scope": "off",
- },
- globals: {
- eejsdata:true
- }
- }
- ],
-};
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
deleted file mode 100644
index b90482216f6..00000000000
--- a/.github/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
-## Issue Overview
-
-
-
-
-## Bug report or feature request?
-
-* [ ] Bug
-* [ ] Feature
-* [ ] Neither
-
-
-## Environment Data:
-
-Version of EE:
-
-Version of WordPress:
-
-PHP Version:
-
-Browser used:
-
-
-## Steps to Reproduce (for bugs)
-
-
-
-
-## Expected Behaviour
-
-
-
-
-## Current Behaviour
-
-
-
-
-## Related Information:
-
diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md
deleted file mode 100644
index c5184890e38..00000000000
--- a/.github/ISSUE_TEMPLATE/Bug_report.md
+++ /dev/null
@@ -1,46 +0,0 @@
----
-name: Bug report
-about: Create a report to help us improve
-
----
-
-
-
-**Describe the bug**
-
-
-**To Reproduce**
-
-
-**Expected behavior**
-
-
-**Screenshots**
-
-
-**Environment:**
- - Version of Event Espresso:
- - Version of WordPress:
- - Browser
- - PHP Version
-
-**Additional context**
-
diff --git a/.github/ISSUE_TEMPLATE/Feature_request.md b/.github/ISSUE_TEMPLATE/Feature_request.md
deleted file mode 100644
index 945ef8201d1..00000000000
--- a/.github/ISSUE_TEMPLATE/Feature_request.md
+++ /dev/null
@@ -1,28 +0,0 @@
----
-name: Feature request
-about: Suggest an idea for this project
-
----
-
-
-
-**Is your feature request related to a problem? Please describe.**
-
-
-**Describe the solution you'd like**
-
-
-**Describe alternatives you've considered**
-
-
-**Additional context**
-
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 201e0e5f1ef..00000000000
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-## Problem this Pull Request solves
-
-
-## How has this been tested
-
-
-
-
-## Checklist
-
-* [ ] I have read the documentation relating to systems affected by this pull request, see https://github.com/eventespresso/event-espresso-core/tree/master/docs
-* [ ] User input is adequately validated and sanitized
-* [ ] all publicly displayed strings are internationalized (usually using `esc_html__()`, see https://codex.wordpress.org/I18n_for_WordPress_Developers)
-* [ ] My code is tested.
-* [ ] My code follows the Event Espresso code style.
-* [ ] My code has proper inline documentation.
-* [ ] My code accounts for when the site is in Maintenance Mode (MM2 especially disallows usage of models)
diff --git a/.github/codecov.yml b/.github/codecov.yml
deleted file mode 100644
index 83afcb7af6e..00000000000
--- a/.github/codecov.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-coverage:
- status:
- project:
- default:
- target: auto
- threshold: 0.5%
- patch: no
-
-comment: off
\ No newline at end of file
diff --git a/.github/config.yml b/.github/config.yml
deleted file mode 100644
index e54e75aa079..00000000000
--- a/.github/config.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-# Configuration for request-info - https://github.com/behaviorbot/request-info
-
-# *Required* Comment to reply with
-requestInfoReplyComment: >
- We need more info before we can work on this issue/pr. Can you elaborate please?
-
-# *OPTIONAL* default titles to check against for lack of descriptiveness
-# MUST BE ALL LOWERCASE
-requestInfoDefaultTitles:
- - update readme.md
- - updates
- - help
-
-# *OPTIONAL* Label to be added to Issues and Pull Requests with insufficient information given
-requestInfoLabelToAdd: status:needs-more-info
\ No newline at end of file
diff --git a/.github/label-sync.yml b/.github/label-sync.yml
deleted file mode 100644
index 0e449092fef..00000000000
--- a/.github/label-sync.yml
+++ /dev/null
@@ -1,318 +0,0 @@
-# github label sync configuration file for EE repos
-# install `https://github.com/Xiphe/github-sync-labels-milestones`
-- repositories:
- - eventespresso/event-espresso-core
- - eventespresso/ee4-events-calendar
- - eventespresso/eea-authnet-accept
- - eventespresso/eea-stripe-gateway
- - eventespresso/eea-wait-lists
- - eventespresso/eea-barcode-scanner
- - eventespresso/eea-attendee-mover
- - eventespresso/eea-wpuser-integration
- - eventespresso/eea-mailchimp
- - eventespresso/eea-gutenberg
- - eventespresso/eea-people-addon
- - eventespresso/ee4-infusionsoft
- - eventespresso/ee4-promotions
- - eventespresso/eea-ticketing
- - eventespresso/eea-beaver-builder
- - eventespresso/eea-flexible-payment-method
- - eventespresso/ee4-mer
- - eventespresso/eea-affiliatewp
- - eventespresso/eea-payment-methods-pro
- - eventespresso/eea-automated-upcoming-event-notifications
- - eventespresso/eea-buddypress
- - eventespresso/eea-events-blog
- - eventespresso/eea-chase-orbital
- - eventespresso/eea-vanco-pm
- - eventespresso/eea-authnet-sim
- - eventespresso/eventsmart.com-website
- - eventespresso/eea-ipay88-gateway
- - eventespresso/eea-calendar-table-template
- - eventespresso/eea-category-accordian-template
- - eventespresso/eea-events-grid-view-template
- - eventespresso/eea-aim-echeck
- - eventespresso/eea-braintree-gateway
- - eventespresso/eea-evertec
- - eventespresso/eea-ideal-mollie-gateway
- - eventespresso/eea-migs-payment-method
- - eventespresso/eea-payflow-pro-gateway
- - eventespresso/eea-recurring-events-manager
- - eventespresso/eea-events-table-template
- - eventespresso/eea-social-buttons
- - eventespresso/eea-paygov-payment-method
- - eventespresso/eea-multisite
- - eventespresso/connect-oauth-middleman
- - eventespresso/eventespresso.com-website
- - eventespresso/eea-transfirst-gateway
- - eventespresso/eea-sage-pay-gateway
- - eventespresso/eea-quickbooks-gateway
- - eventespresso/eea-omise-payment-method
- - eventespresso/eea-firstdata-payeezy
- - eventespresso/eea-cybersource-gateway
- - eventespresso/eea-chase-orbital
- - eventespresso/eea-event-app-customization
- - eventespresso/grunt-wp-plugin-buildmachine
- - eventespresso/eea-paypal-smart-buttons
- - eventespresso/event-espresso-private
- - eventespresso/eea-attendee-importer
- milestones: []
- labels:
- # status labels
- - name: "status:needs-documentation"
- color: 3297c3
- - name: "status:backlog"
- color: 5c7145
- - name: "status:on-hold"
- color: 4f4a33
- - name: "status:waiting-refresh"
- color: 2460a7
- - name: "status:in-progress"
- color: 93b343
- - name: "status:next"
- color: 5c7145
- - name: "status:needs-testing"
- color: eb4f21
- - name: "status:merge"
- color: 66b3aa
- - name: "status:review"
- color: f7d500
- - name: "status:feedback-needed"
- color: a16ec6
- - name: "status:needs-more-info"
- color: e47e33
- - name: "status:add-sales-page"
- color: 9ddde4
- - name: "status: duplicate?"
- color: e5ff00
- previousNames:
- - status:duplicate
- - duplicate
- - name: "status:stale"
- color: a08e58
- - name: "status:unit-tests-required"
- color: 9ddde4
- - name: "status:triage"
- color: f06291
- previousNames:
- - "triage"
- - name: "status:please-fix"
- color: c52e75
- - name: "status:potential-duplicate"
- color: c2d800
- previousNames:
- - "potential-duplicate"
- # category labels
- - name: "category:security"
- color: abc2c1
- - name: "category:assets"
- color: abc2c1
- previousNames:
- - assets
- - name: "category:payment-methods"
- color: abc2c1
- previousNames:
- - "category:payment-methods-&-gateways"
- - name: "category:admin-pages"
- color: abc2c1
- previousNames:
- - "category:admin-pages-&-functionality"
- - name: "category:spco-&-registration"
- color: abc2c1
- - name: "category:core-plugin"
- color: abc2c1
- - name: "category:frontend-ui-&-ux"
- color: abc2c1
- - name: "category:admin-page-ui-&-ux"
- color: abc2c1
- - name: "category:messaging-&-messengers"
- color: abc2c1
- - name: "category:i18n"
- color: abc2c1
- previousNames:
- - i18n
- - name: "category:templates-shortcodes-and-widgets"
- color: abc2c1
- - name: "category:models-and-data-infrastructure"
- color: abc2c1
- - name: "category:general"
- color: abc2c1
- - name: "category:activation-installation-and-migration"
- color: abc2c1
- - name: "category:wp-multi-site"
- color: abc2c1
- - name: "category:3rd-party-integrations"
- color: abc2c1
- - name: "category:decision-analytics"
- color: abc2c1
- - name: "category:pue-uxip-and-licensing"
- color: abc2c1
- - name: "category:unit-tests"
- color: abc2c1
- - name: "category:forms-systems"
- color: abc2c1
- - name: "category:reports-exporting-importing"
- color: abc2c1
- - name: "category:user-management"
- color: abc2c1
- - name: "category:accessibility"
- color: abc2c1
- - name: "category:command-bus"
- color: abc2c1
- previousNames:
- - "category:command-bus-and-command-handlers"
- - name: "category:gutenberg"
- color: abc2c1
- previousNames:
- - gutenberg
- - name: "category:has-codebase-ticket"
- color: abc2c1
- previousNames:
- - has codebase ticket
- - name: "category:community-contribution"
- color: abc2c1
- previousNames:
- - community-contribution
- # priority labels
- - name: "priority:critical ๐ฅ"
- color: b60205
- previousNames:
- - "priority:critical"
- - name: "priority:high"
- color: f7d500
- - name: "priority:normal"
- color: 93b343
- - name: "priority:low"
- color: 9ddde4
- # type labels
- - name: "type:support ๐"
- color: efefef
- previousNames:
- - "type:support"
- - name: "type:bug ๐"
- color: efefef
- previousNames:
- - bug
- - "type:bug"
- - "type:bug ๐"
- - name: "type:build-process ๐จ"
- color: efefef
- previousNames:
- - build-process
- - "type:build-process"
- - name: "type:code-quality ๐พ"
- color: efefef
- - name: "type:edge-case โ "
- color: efefef
- - name: "type:enhancement ๐"
- color: efefef
- previousNames:
- - enhancement
- - "type:enhancement"
- - name: "type:task ๐งน"
- color: efefef
- previousNames:
- - "type:task โ
"
- - "type:task"
- - name: "type:feature-request ๐"
- color: efefef
- previousNames:
- - feature request
- - "type:feature-request"
- - name: "type:documentation ๐"
- color: efefef
- previousNames:
- - documentation
- - "type:documentation"
- - name: "type:design ๐"
- color: efefef
- previousNames:
- - "type:design"
- - name: "type:user-proofing ๐ก"
- color: efefef
- previousNames:
- - "type:user-proofing"
- - name: "type:theme/plugin-conflict ๐ฅ"
- color: efefef
- previousNames:
- - "type:theme/plugin-conflict"
- - name: "type:question โ"
- color: efefef
- previousNames:
- - question
- - "type:question"
- - name: "type:invalid ๐ฆ"
- color: efefef
- previousNames:
- - invalid
- - "type:invalid"
- - "type-invalid ๐ฆ"
- - name: "type:impacts-eventsmart ๐ซ"
- color: 00f2ff
- previousNames:
- - "type:impacts-eventsmart"
- - name: "requires:WP5.0+ ๐งฉ"
- color: 2a1f78
- ## depends-on-labels
- - name: "requires:WP5.0 ๐งฉ"
- color: 2a1f78
- previousNames:
- - requires:WP5.0+ ๐งฉ
- - name: "requires:WP5.2 ๐งฉ"
- color: 2a1f78
- - name: "EZ"
- color: 91ff50
- options:
- ignoreMilestones:
- - eventespresso/event-espresso-core
- - eventespresso/ee4-events-calendar
- - eventespresso/eea-authnet-accept
- - eventespresso/eea-stripe-gateway
- - eventespresso/eea-wait-lists
- - eventespresso/eea-barcode-scanner
- - eventespresso/eea-attendee-mover
- - eventespresso/eea-wpuser-integration
- - eventespresso/eea-mailchimp
- - eventespresso/eea-gutenberg
- - eventespresso/eea-people-addon
- - eventespresso/ee4-infusionsoft
- - eventespresso/ee4-promotions
- - eventespresso/eea-ticketing
- - eventespresso/eea-beaver-builder
- - eventespresso/eea-flexible-payment-method
- - eventespresso/ee4-mer
- - eventespresso/eea-affiliatewp
- - eventespresso/eea-payment-methods-pro
- - eventespresso/eea-automated-upcoming-event-notifications
- - eventespresso/eea-buddypress
- - eventespresso/eea-events-blog
- - eventespresso/eea-chase-orbital
- - eventespresso/eea-vanco-pm
- - eventespresso/eea-authnet-sim
- - eventespresso/eventsmart.com-website
- - eventespresso/eea-ipay88-gateway
- - eventespresso/eea-calendar-table-template
- - eventespresso/eea-category-accordian-template
- - eventespresso/eea-events-grid-view-template
- - eventespresso/eea-aim-echeck
- - eventespresso/eea-braintree-gateway
- - eventespresso/eea-evertec
- - eventespresso/eea-ideal-mollie-gateway
- - eventespresso/eea-migs-payment-method
- - eventespresso/eea-payflow-pro-gateway
- - eventespresso/eea-recurring-events-manager
- - eventespresso/eea-events-table-template
- - eventespresso/eea-social-buttons
- - eventespresso/eea-paygov-payment-method
- - eventespresso/eea-multisite
- - eventespresso/connect-oauth-middleman
- - eventespresso/eventespresso.com-website
- - eventespresso/eea-transfirst-gateway
- - eventespresso/eea-sage-pay-gateway
- - eventespresso/eea-quickbooks-gateway
- - eventespresso/eea-omise-payment-method
- - eventespresso/eea-firstdata-payeezy
- - eventespresso/eea-cybersource-gateway
- - eventespresso/eea-chase-orbital
- - eventespresso/eea-event-app-customization
- - eventespresso/grunt-wp-plugin-buildmachine
\ No newline at end of file
diff --git a/.github/potential-duplicates.yml b/.github/potential-duplicates.yml
deleted file mode 100644
index 8c219e7b406..00000000000
--- a/.github/potential-duplicates.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-# Label name and color to set, when potential duplicates are detected
-issueLabel: "status:potential-duplicate"
-labelColor: efd954
-
-# If similarity is higher than this threshold, issue will be marked as duplicate
-threshold: 0.8
-
-# Comment to post when potential duplicates are detected
-referenceComment: >
- Potential duplicates:
- {{#issues}}
- - [#{{ number }}] {{ title }} ({{ accuracy }}%)
- {{/issues}}
diff --git a/.github/stale.yml b/.github/stale.yml
deleted file mode 100644
index 1776a1430d6..00000000000
--- a/.github/stale.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-# Number of days of inactivity before an issue becomes stale
-daysUntilStale: 120
-# Number of days of inactivity before a stale issue is closed
-daysUntilClose: 14
-# Issues with these labels will never be considered stale
-exemptLabels:
- - category:security
- - status:on-hold
-
-# Label to use when marking an issue as stale
-staleLabel: status:stale
-# Comment to post when marking an issue as stale. Set to `false` to disable
-markComment: >
- This issue has been automatically marked as stale because it has not had
- recent activity. It will be closed if no further activity occurs. Thank you
- for your contributions.
-# Comment to post when closing a stale issue. Set to `false` to disable
-closeComment: >
- This issue has been automatically closed because it has been stale for a
- significant period of time without any activity.
\ No newline at end of file
diff --git a/.github/support.yml b/.github/support.yml
deleted file mode 100644
index a2f91613495..00000000000
--- a/.github/support.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-# Configuration for support-requests - https://github.com/dessant/support-requests
-
-# Label used to mark issues as support requests
-supportLabel: category:support
-# Comment to post on issues marked as support requests. Add a link
-# to a support page, or set to `false` to disable
-supportComment: >
- We use the issue tracker exclusively for bug reports and feature requests.
- However, this issue appears to be a support request. Please use our
- [support forums](https://eventespresso/support/forums) to get help with the project.
-# Whether to close issues marked as support requests
-close: true
-# Whether to lock issues marked as support requests
-lock: false
\ No newline at end of file
diff --git a/.github/triage.yml b/.github/triage.yml
deleted file mode 100644
index 0d13af855b5..00000000000
--- a/.github/triage.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-label: "status:triage"
-assignee: tn3rb
-enabled: true
\ No newline at end of file
diff --git a/.nvmrc b/.nvmrc
deleted file mode 100644
index 1a2f5bd2045..00000000000
--- a/.nvmrc
+++ /dev/null
@@ -1 +0,0 @@
-lts/*
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index b64e1004d98..00000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,144 +0,0 @@
-dist: xenial
-
-os: linux
-
-language: php
-
-services:
- - mysql
-
-cache:
- apt: true
- directories:
- - $HOME/.composer/cache
- - $HOME/.npm
-
-env:
- global:
- - WP_VERSION=latest WP_MULTISITE=0
-
-before_install:
- - npm install npm@^6.13 -g
- - |
- if [[ "$SKIP_XDEBUG_REMOVE" != "true" ]]; then
- cp $HOME/.phpenv/versions/$(phpenv global)/etc/conf.d/xdebug.ini /tmp
- phpenv config-rm xdebug.ini
- echo "xdebug removed";
- fi
-before_script:
- - bash tests/bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
- - export PATH="$HOME/.composer/vendor/bin:$PATH"
- - |
- # Install the specified version of PHPUnit depending on the PHP version:
- if [[ -n "$TRAVIS_PHP_VERSION" ]]; then
- case "$TRAVIS_PHP_VERSION" in
- 7.3|7.4|nightly)
- # when wp tests support phpunit 7 we'll update this.
- echo "Using PHPUnit 6"
- composer global require "phpunit/phpunit=6.5.*"
- ;;
- 7.2|7.1|7.0)
- echo "Using PHPUnit 6"
- composer global require "phpunit/phpunit=6.5.*"
- ;;
- 5.6)
- echo "Using PHPUnit 5.7.22"
- composer global require "phpunit/phpunit=5.7.22"
- ;;
- *)
- echo "No PHPUnit version handling for PHP version $TRAVIS_PHP_VERSION"
- exit 1
- ;;
- esac
- fi
- - mysql --version
- - phpunit --version
- - phpenv versions
- - npm --version
- - node --version
-
-script: npm run test-php
-
-jobs:
- fast_finish: true
- allow_failures:
- - php: nightly
- - php: 7.4
- env:
- - PHP_LINT=1
- - PHP_LINT_WITH_WARNINGS=yes
- include:
- - stage: test
- language: node_js
- node_js: 11.0.0
- env:
- - JS_LINT=1
- before_script:
- - npm --version
- - node --version
- script:
- - npm run ci:lint || exit 1
- - language: node_js
- node_js: 11.0.0
- env:
- - JAVASCRIPT_TESTS=1
- before_script:
- - npm --version
- - node --version
- script:
- - npm run ci:test || exit 1
- - language: node_js
- node_js: 11.0.0
- env:
- - BUILD_TEST=1
- before_script:
- - npm --version
- - node --version
- script:
- - npm run ci:build || exit 1
- - php: 7.3
- if: NOT commit_message =~ js_only AND NOT commit_message =~ dependabot AND NOT sender =~ dependabot
- env:
- - PHP_LINT=1
- - PHP_LINT_WITH_WARNINGS=no
- script:
- - composer install || exit 1
- - composer config-eventespressocs || exit 1
- - npm run lint-php:skip-warnings || exit 1
- - php: 7.4
- if: NOT commit_message =~ js_only AND NOT commit_message =~ dependabot AND NOT sender =~ dependabot
- - php: 7.3
- if: NOT commit_message =~ js_only AND NOT commit_message =~ dependabot AND NOT sender =~ dependabot
- - php: 7.2
- if: NOT commit_message =~ js_only AND NOT commit_message =~ dependabot AND NOT sender =~ dependabot
- - php: 7.1
- if: NOT commit_message =~ js_only AND NOT commit_message =~ dependabot AND NOT sender =~ dependabot
- - php: 7.0
- if: NOT commit_message =~ js_only AND NOT commit_message =~ dependabot AND NOT sender =~ dependabot
- - php: 5.6
- if: NOT commit_message =~ js_only AND NOT commit_message =~ dependabot AND NOT sender =~ dependabot
- # multisite
- - php: 7.2
- env: WP_MULTISITE=1
- if: NOT commit_message =~ js_only AND NOT commit_message =~ dependabot AND NOT sender =~ dependabot
- - php: nightly
- if: NOT commit_message =~ js_only AND NOT commit_message =~ dependabot AND NOT sender =~ dependabot
- - language: node_js
- node_js: 11.0.0
- env:
- - LICENSE_CHECK=1
- before_script:
- - npm --version
- - node --version
- script:
- - npm run lc || exit 1
-
-notifications:
- slack:
- rooms:
- secure: e2xmbwOoagh/rZIqUnx15HcTv5hZGxykvg8Tj0ENGi/bLcXgrEYxs2hpW+nzGggmSl22Eh+6wLRo62L0dEIIo1n+yknqDdAbVG7lmnX7Tc45JNgxWtSmAPzC3wAp0e9w1hy8HILPjYLxl0G7eXUvo3mKVRCCyD/Cyz5dDicE8tQ=
- on_success: change
- on_failure: always
- template:
- - "Build <%{build_url}|#%{build_number}> (<%{compare_url}|%{commit}>) of %{repository}@%{branch} by %{author} %{result} in %{duration}"
- - "%{commit_message}"
diff --git a/acceptance_tests/Helpers/BaseCoreAdmin.php b/acceptance_tests/Helpers/BaseCoreAdmin.php
deleted file mode 100644
index 65680a468e7..00000000000
--- a/acceptance_tests/Helpers/BaseCoreAdmin.php
+++ /dev/null
@@ -1,84 +0,0 @@
-actor()->amOnAdminPage(CoreAdmin::adminUrl($page, $action, $additional_params));
- }
-
-
- /**
- * Helper method for returning an instance of the Actor. Intended to help with IDE fill out of methods.
- * @return \EventEspressoAcceptanceTester;
- */
- protected function actor()
- {
- /** @var \EventEspressoAcceptanceTester $this */
- return $this;
- }
-
-
- /**
- * Use this to set the per page option for a list table page.
- * Assumes you are on a page that has this field exposed.
- *
- * @param int|string $per_page_value
- * @throws \Codeception\Exception\TestRuntimeException
- */
- public function setPerPageOptionForScreen($per_page_value)
- {
- $this->actor()->click(CoreAdmin::WP_SCREEN_SETTINGS_LINK_SELECTOR);
- $this->actor()->fillField(CoreAdmin::WP_SCREEN_SETTINGS_PER_PAGE_FIELD_SELECTOR, $per_page_value);
- $this->actor()->click(CoreAdmin::WP_SCREEN_OPTIONS_APPLY_SETTINGS_BUTTON_SELECTOR);
- $this->actor()->wait(8);
- }
-
-
-
- /**
- * Use this to append a given value to a wpEditor instance.
- * How it works is it first switched the instance to the text (or html) view so that the textarea is exposed and
- * the value is added to the text area.
- *
- * @param $field_reference
- * @param $value
- * @throws \Codeception\Exception\ElementNotFound
- */
- public function appendToWPEditorField($field_reference, $value)
- {
- $this->actor()->click(CoreAdmin::wpEditorTextTabSelector($field_reference));
- $this->actor()->appendField(CoreAdmin::wpEditorTextAreaSelector($field_reference), $value);
- }
-
-
- /**
- * Use to select and submit the given bulk action.
- * @param string $bulk_action_option
- */
- public function submitBulkActionOnListTable($bulk_action_option)
- {
- $this->actor()->selectOption(
- CoreAdmin::SELECTOR_LIST_TABLE_BULK_ACTION_FIELD,
- $bulk_action_option
- );
- $this->actor()->click(CoreAdmin::SELECTOR_LIST_TABLE_BULK_ACTTION_APPLY);
- }
-}
diff --git a/acceptance_tests/Helpers/Checkout.php b/acceptance_tests/Helpers/Checkout.php
deleted file mode 100644
index 052511459b2..00000000000
--- a/acceptance_tests/Helpers/Checkout.php
+++ /dev/null
@@ -1,87 +0,0 @@
-actor()->fillField(CheckoutPage::firstNameFieldSelectorForAttendeeNumber($attendee_number, $admin), $value);
- }
-
- /**
- * @param $value
- * @param int $attendee_number
- * @param bool $admin Used to indicate whether we're filling out the field from the context of the admin or not.
- */
- public function fillOutLastNameFieldForAttendee($value, $attendee_number = 1, $admin = false)
- {
- $this->actor()->fillField(CheckoutPage::lastNameFieldSelectorForAttendeeNumber($attendee_number, $admin), $value);
- }
-
- /**
- * @param $value
- * @param int $attendee_number
- * @param bool $admin Used to indicate whether we're filling out the field from the context of the admin or not.
- */
- public function fillOutEmailFieldForAttendee($value, $attendee_number = 1, $admin = false)
- {
- $this->actor()->fillField(CheckoutPage::emailFieldSelectorForAttendeeNumber($attendee_number, $admin), $value);
- }
-
-
- /**
- * Clicks the next registration step button.
- */
- public function goToNextRegistrationStep()
- {
- $this->actor()->click(CheckoutPage::NEXT_STEP_BUTTON_SELECTOR);
- }
-
-
- /**
- * Selects the payment option for the given payment method slug.
- *
- * @param string $payment_method_slug
- * @param bool $verify_selected If true, this will wait for the "Important Information" info box after the
- * payment option select box is complete. Otherwise its up to calling code to
- * wait for whatever is needed after selecting the payment method.
- */
- public function selectPaymentOptionFor($payment_method_slug = 'invoice', $verify_selected = true)
- {
- $this->waitForElementVisible(CheckoutPage::SELECTOR_PAYMENT_OPTIONS_CONTAINER);
- $this->wait(5);
- $this->actor()->selectOption(
- CheckoutPage::PAYMENT_METHOD_STEP_FORM,
- $payment_method_slug
- );
- if ($verify_selected) {
- $this->actor()->waitForText('Important information regarding your payment');
- }
- }
-
-
- /**
- * Submits the payment options step form.
- * Assumes the actor is in the context of the payment options SPCO step.
- */
- public function submitPaymentOptionsRegistrationStepForm()
- {
- $this->actor()->submitForm(CheckoutPage::PAYMENT_METHOD_STEP_FORM, array());
- }
-
-}
\ No newline at end of file
diff --git a/acceptance_tests/Helpers/CountrySettingsAdmin.php b/acceptance_tests/Helpers/CountrySettingsAdmin.php
deleted file mode 100644
index 1403a01cc1d..00000000000
--- a/acceptance_tests/Helpers/CountrySettingsAdmin.php
+++ /dev/null
@@ -1,64 +0,0 @@
-actor()->amOnAdminPage(CountrySettings::url($additional_params));
- }
-
-
- /**
- * Instructs the actor to select the given decimal places radio option.
- * Assumes the actor is already on the country settings page.
- * @param string $decimal_places
- * @param string $country_code
- */
- public function setCurrencyDecimalPlacesTo($decimal_places = '2', $country_code = 'US')
- {
- $this->actor()->click(CountrySettings::currencyDecimalPlacesRadioField($decimal_places, $country_code));
- }
-
-
- /**
- * Instructs the actor to select the given decimal mark radio option.
- * Assumes the actor is already on the country settings page.
- * @param string $decimal_mark
- */
- public function setCurrencyDecimalMarkTo($decimal_mark = '.')
- {
- $this->actor()->click(CountrySettings::currencyDecimalMarkRadioField($decimal_mark));
- }
-
-
- /**
- * Instructs the actor to select the given thousands separator radio option.
- * Assumes the actor is already on the country settings page.
- * @param string $thousands_seperator
- */
- public function setCurrencyThousandsSeparatorTo($thousands_seperator = ',')
- {
- $this->actor()->click(CountrySettings::currencyThousandsSeparatorField($thousands_seperator));
- }
-
-
- /**
- * Clicks the country settings submit button.
- * Assumes the actor is on the country settings admin page.
- */
- public function saveCountrySettings()
- {
- $this->actor()->click(CountrySettings::COUNTRY_SETTINGS_SAVE_BUTTON);
- //no indicator on the page when stuff has been updated so just give a bit of time for it to finish.
- $this->actor()->wait(10);
- }
-}
\ No newline at end of file
diff --git a/acceptance_tests/Helpers/EventsAdmin.php b/acceptance_tests/Helpers/EventsAdmin.php
deleted file mode 100644
index e1e7cb1f012..00000000000
--- a/acceptance_tests/Helpers/EventsAdmin.php
+++ /dev/null
@@ -1,146 +0,0 @@
-actor()->amOnAdminPage(EventsPage::defaultEventsListTableUrl($additional_params));
- }
-
-
- /**
- * Triggers the publishing of the Event.
- */
- public function publishEvent()
- {
- $this->actor()->scrollTo(EventsPage::EVENT_EDITOR_TITLE_FIELD_SELECTOR);
- $this->actor()->wait(3);
- $this->actor()->click(EventsPage::EVENT_EDITOR_PUBLISH_BUTTON_SELECTOR);
- $this->actor()->waitForText('Event published.', 30);
- }
-
-
- /**
- * Triggers saving the Event.
- */
- public function saveEvent()
- {
- $this->actor()->scrollTo(EventsPage::EVENT_EDITOR_TITLE_FIELD_SELECTOR);
- $this->actor()->wait(2);
- $this->actor()->click(EventsPage::EVENT_EDITOR_SAVE_BUTTON_SELECTOR);
- }
-
-
- /**
- * Navigates the actor to the event list table page and will attempt to edit the event for the given title.
- * First this will search using the given title and then attempt to edit from the results of the search.
- *
- * Assumes actor is already logged in.
- * @param $event_title
- */
- public function amEditingTheEventWithTitle($event_title)
- {
- $this->amOnDefaultEventsListTablePage();
- $this->actor()->fillField(EventsPage::EVENT_LIST_TABLE_SEARCH_INPUT_SELECTOR, $event_title);
- $this->actor()->click(CoreAdmin::LIST_TABLE_SEARCH_SUBMIT_SELECTOR);
- $this->actor()->waitForText($event_title, 15);
- $this->actor()->click(EventsPage::eventListTableEventTitleEditLinkSelectorForTitle($event_title));
- }
-
-
- /**
- * Navigates the user to the single event page (frontend view) for the given event title via clicking the "View"
- * link for the event in the event list table.
- * Assumes the actor is already logged in and on the Event list table page.
- *
- * @param string $event_title
- */
- public function amOnEventPageAfterClickingViewLinkInListTableForEvent($event_title)
- {
- $this->actor()->moveMouseOver(EventsPage::eventListTableEventTitleEditLinkSelectorForTitle($event_title));
- $this->actor()->click(EventsPage::eventListTableEventTitleViewLinkSelectorForTitle($event_title));
- }
-
-
- /**
- * Used to retrieve the event id for the event via the list table and for the given event.
- * @param string $event_title
- */
- public function observeEventIdInListTableForEvent($event_title)
- {
- return $this->actor()->observeValueFromInputAt(EventsPage::eventListTableEventIdSelectorForTitle($event_title));
- }
-
-
- /**
- * This performs the click action on the gear icon that triggers the advanced settings view state.
- * Assumes the actor is already logged in and editing an event.
- *
- * @param int $row_number What ticket row to toggle open/close.
- */
- public function toggleAdvancedSettingsViewForTicketRow($row_number = 1)
- {
- $this->actor()->click(EventsPage::eventEditorTicketAdvancedDetailsSelector($row_number));
- }
-
-
- /**
- * Toggles the TKT_is_taxable checkbox for the ticket in the given row.
- * Assumes the actor is already logged in and editing an event and that the advanced settings view state for that
- * ticket is "open".
- *
- * @param int $row_number What ticket row to toggle the checkbox for.
- */
- public function toggleTicketIsTaxableForTicketRow($row_number = 1)
- {
- $this->actor()->click(EventsPage::eventEditorTicketTaxableCheckboxSelector($row_number));
- }
-
-
- /**
- * Use to change the default registration status for the event.
- * Assumes the view is already on the event editor.
- * @param $registration_status
- */
- public function changeDefaultRegistrationStatusTo($registration_status)
- {
- $this->actor()->selectOption(
- EventsPage::EVENT_EDITOR_DEFAULT_REGISTRATION_STATUS_FIELD_SELECTOR,
- $registration_status
- );
- }
-
-
- /**
- * Use this from the context of the event editor to select the given custom template for a given message type and
- * messenger.
- *
- * @param string $message_type_label The visible label for the message type (eg Registration Approved)
- * @param string $messenger_slug The slug for the messenger (eg 'email')
- * @param string $custom_template_label The visible label in the select input for the custom template you want
- * selected.
- */
- public function selectCustomTemplateFor($message_type_label, $messenger_slug, $custom_template_label)
- {
- $this->actor()->click(EventsPage::eventEditorNotificationsMetaBoxMessengerTabSelector($messenger_slug));
- $this->actor()->selectOption(
- EventsPage::eventEditorNotificationsMetaBoxSelectSelectorForMessageType($message_type_label),
- $custom_template_label
- );
- }
-}
\ No newline at end of file
diff --git a/acceptance_tests/Helpers/MessagesAdmin.php b/acceptance_tests/Helpers/MessagesAdmin.php
deleted file mode 100644
index 593d460852b..00000000000
--- a/acceptance_tests/Helpers/MessagesAdmin.php
+++ /dev/null
@@ -1,303 +0,0 @@
-actor()->amOnAdminPage(MessagesPage::messageActivityListTableUrl($additional_params));
- }
-
- /**
- * @param string $additional_params Any additional request parameters for the generated url should be included as
- * a string.
- */
- public function amOnDefaultMessageTemplateListTablePage($additional_params = '')
- {
- $this->actor()->amOnAdminPage(MessagesPage::defaultMessageTemplateListTableUrl($additional_params));
- }
-
-
- /**
- * @param string $additional_params Any additional request parameters for the generated url should be included as
- * a string.
- */
- public function amOnCustomMessageTemplateListTablePage($additional_params = '')
- {
- $this->actor()->amOnAdminPage(MessagesPage::customMessageTemplateListTableUrl($additional_params));
- }
-
-
- /**
- * Directs to message settings page
- */
- public function amOnMessageSettingsPage()
- {
- $this->actor()->amOnAdminPage(MessagesPage::messageSettingsUrl());
- }
-
-
- public function activateMessageTypeForMessenger($message_type_slug, $messenger_slug = 'email')
- {
- $this->actor()->dragAndDrop(
- MessagesPage::draggableSettingsBoxSelectorForMessageTypeAndMessenger($message_type_slug, $messenger_slug),
- MessagesPage::MESSAGES_SETTINGS_ACTIVE_MESSAGE_TYPES_CONTAINER_SELECTOR
- );
- }
-
-
- /**
- * Assumes you are already on the list table page that has the ui for editing the template.
- * @param string $message_type_slug
- * @param string $context [optional] if you want to click directly to the given context in the editor
- */
- public function clickToEditMessageTemplateByMessageType($message_type_slug, $context = '')
- {
- $this->actor()->click(MessagesPage::editMessageTemplateClassByMessageType($message_type_slug, $context));
- }
-
-
- /**
- * Use this action to verify that the count for the given text in the specified field is as expected. For example
- * filling the condition of, "There should only be 1 instance of `someaddress@email.com` in all the 'to' column.
- *
- * @param int $expected_occurence_count
- * @param string $text_to_check_for
- * @param string $field
- * @param string $message_type_label
- * @param string $message_status
- * @param string $messenger
- * @param string $context
- */
- public function verifyMatchingCountofTextInMessageActivityListTableFor(
- $expected_occurence_count,
- $text_to_check_for,
- $field,
- $message_type_label,
- $message_status = MessagesPage::MESSAGE_STATUS_SENT,
- $messenger = 'Email',
- $context = 'Event Admin'
- ) {
- $elements = $this->actor()->grabMultiple(MessagesPage::messagesActivityListTableCellSelectorFor(
- $field,
- $message_type_label,
- $message_status,
- $messenger,
- $context,
- $text_to_check_for,
- 0
- ));
- $actual_count = count($elements);
- $this->actor()->assertEquals(
- $expected_occurence_count,
- $actual_count,
- sprintf(
- 'Expected %s of the %s text for the %s field but there were actually %s counted.',
- $expected_occurence_count,
- $text_to_check_for,
- $field,
- $actual_count
- )
- );
- }
-
-
- /**
- * This will create a custom message template for the given messenger and message type from the context of the
- * default (global) message template list table.
- * Also takes care of verifying the template was created.
- * @param string $message_type_label
- * @param string $messenger_label
- */
- public function createCustomMessageTemplateFromDefaultFor($message_type_label, $messenger_label)
- {
- $this->amOnDefaultMessageTemplateListTablePage();
- $this->actor()->click(
- MessagesPage::createCustomButtonForMessageTypeAndMessenger(
- $message_type_label,
- $messenger_label
- )
- );
- $this->actor()->seeInField('#title', 'New Custom Template');
- }
-
-
- /**
- * This switches the context of the current messages template to the given reference.
- * @param string $context_reference This should be the visible label for the option.
- */
- public function switchContextTo($context_reference)
- {
- $this->actor()->selectOption(MessagesPage::MESSAGES_CONTEXT_SWITCHER_SELECTOR, $context_reference);
- $this->actor()->click(MessagesPage::MESSAGES_CONTEXT_SWITCHER_BUTTON_SELECTOR);
- $this->actor()->waitForText($context_reference, 10, 'h1');
- }
-
-
- /**
- * Toggles Context so its turned off or on (depending on where it started) and verifies the expected state after
- * toggling.
- *
- * @param string $context_string What context is being switched (used for the expected state text)
- * @param bool $expected_state_is_active Used to indicate whether the expected state is active (true) or inactive
- * (false)
- */
- public function toggleContextState($context_string, $expected_state_is_active = true)
- {
- $this->actor()->scrollTo(MessagesPage::MESSAGES_CONTEXT_SWITCHER_SELECTOR);
- $this->actor()->click(MessagesPage::MESSAGES_CONTEXT_ACTIVE_STATE_TOGGLE);
- if ($expected_state_is_active) {
- $this->actor()->waitForText("The template for $context_string is currently active.");
- } else {
- $this->actor()->waitForText("The template for $context_string is currently inactive");
- }
- }
-
-
- /**
- * Triggers saving the message template.
- * @param bool $and_close Use to indicate to click the Save and Close button.
- */
- public function saveMessageTemplate($and_close = false)
- {
- $this->actor()->scrollTo(MessagesPage::MESSAGES_CONTEXT_SWITCHER_SELECTOR);
- if ($and_close) {
- $this->actor()->click('Save and Close');
- } else {
- $this->actor()->click('Save');
- }
- $this->actor()->waitForText('successfully updated');
- }
-
-
- /**
- * This takes care of clicking the View Message icon for the given parameters.
- * Assumes you are already viewing the messages activity list table.
- * @param $message_type_label
- * @param $message_status
- * @param string $messenger
- * @param string $context
- * @param int $number_in_set
- */
- public function viewMessageInMessagesListTableFor(
- $message_type_label,
- $message_status = MessagesPage::MESSAGE_STATUS_SENT,
- $messenger = 'Email',
- $context = 'Event Admin',
- $number_in_set = 1
- ) {
- $this->actor()->click(MessagesPage::messagesActivityListTableViewButtonSelectorFor(
- $message_type_label,
- $message_status,
- $messenger,
- $context,
- $number_in_set
- ));
- }
-
-
- /**
- * Takes care of deleting a message matching the given parameters via the message activity list table.
- * Assumes you are already viewing the messages activity list table.
- * @param $message_type_label
- * @param $message_status
- * @param string $messenger
- * @param string $context
- * @param int $number_in_set
- */
- public function deleteMessageInMessagesListTableFor(
- $message_type_label,
- $message_status = MessagesPage::MESSAGE_STATUS_SENT,
- $messenger = 'Email',
- $context = 'Event Admin',
- $number_in_set = 1
- ) {
- $delete_action_selector = MessagesPage::messagesActivityListTableDeleteActionSelectorFor(
- $message_type_label,
- $message_status,
- $messenger,
- $context,
- $number_in_set
- );
- $cell_selector = MessagesPage::messagesActivityListTableCellSelectorFor(
- 'to',
- $message_type_label,
- $message_status,
- $messenger,
- $context,
- '',
- $number_in_set
- );
- $this->actor()->scrollTo($cell_selector, 0, -30);
- $this->actor()->moveMouseOver(
- $cell_selector,
- 5,
- 5
- );
- $this->actor()->waitForElementVisible(
- $delete_action_selector
- );
- $this->actor()->click(
- $delete_action_selector
- );
- $this->actor()->waitForText('successfully deleted', 20);
- }
-
-
- /**
- * Assuming you have already triggered the view modal for a single message from the context of the message activity
- * list table, this will take care of validating the given text is in that window.
- * @param string $text_to_view
- */
- public function seeTextInViewMessageModal($text_to_view, $should_not_see = false)
- {
- $this->actor()->wait(2);
- $this->actor()->waitForElementVisible('.ee-admin-dialog-container-inner-content');
- $this->actor()->switchToIframe('message-view-window');
- $should_not_see ? $this->actor()->dontSee($text_to_view) : $this->actor()->see($text_to_view);
- $this->actor()->switchToIframe();
- }
-
-
- /**
- * This returns the value for the link at the given selector in the message modal.
- * @param string $selector (any selector string accepted by WebDriver)
- */
- public function observeLinkAtSelectorInMessageModal($selector)
- {
- $this->actor()->wait(2);
- $this->actor()->waitForElementVisible('.ee-admin-dialog-container-inner-content');
- $this->actor()->switchToIframe('message-view-window');
- $link = $this->actor()->observeLinkUrlAt($selector);
- $this->actor()->switchToIframe();
- return $link;
- }
-
-
- /**
- * Assuming you have already triggered the view modal for a single message from the context of the message activity
- * list table, this will take care of validating the given text is NOT that window.
- * @param string $text_to_view
- */
- public function dontSeeTextInViewMessageModal($text_to_view)
- {
- $this->seeTextInViewMessageModal($text_to_view, true);
- }
-
-
- public function dismissMessageModal()
- {
- $this->actor()->executeJs('window.dialogHelper.closeModal()');
- }
-}
diff --git a/acceptance_tests/Helpers/RegistrationsAdmin.php b/acceptance_tests/Helpers/RegistrationsAdmin.php
deleted file mode 100644
index 8e0d05502fb..00000000000
--- a/acceptance_tests/Helpers/RegistrationsAdmin.php
+++ /dev/null
@@ -1,153 +0,0 @@
-actor()->checkOption(
- RegistrationsAdminPage::listTableCheckBoxSelectorForRegistrationId($registration_id)
- );
- }
- }
-
-
- /**
- * Navigates the actor to the default registration list table page.
- * @param string $additional_params
- */
- public function amOnDefaultRegistrationsListTableAdminPage($additional_params = '')
- {
- $this->actor()->amOnAdminPage(
- RegistrationsAdminPage::registrationsDefaultAdminListTableUrl($additional_params)
- );
- //wait for page to fully load
- $this->actor()->wait(5);
- }
-
-
- /**
- * Will enter the provided value in the registration list table search field and execute a search for that value.
- * @param string $search_text
- */
- public function searchForRegistrationOnRegistrationListTableWithText($search_text)
- {
- $this->amOnDefaultRegistrationsListTableAdminPage();
- $this->actor()->fillField(RegistrationsAdminPage::SEARCH_INPUT_SELECTOR_LIST_TABLE_REGISTRATION, $search_text);
- $this->actor()->click(CoreAdmin::LIST_TABLE_SEARCH_SUBMIT_SELECTOR);
- $this->actor()->waitForText('Displaying search results for');
- }
-
-
-
- /**
- * This will filter the registration list table to view registrations for the given event id.
- * Assumption is made that you are logged into the admin but you do not need to be on the registration list table
- * page.
- *
- * @param int $event_id The id of the event viewing registrations for.
- */
- public function amViewingRegistrationsForEvent($event_id)
- {
- $this->actor()->amOnDefaultEventsListTablePage();
- $this->actor()->click(EventsAdmin::listTableActionLinkRegistrationsForEvent($event_id));
- $this->actor()->waitForText('Viewing registrations for the event');
- }
-
-
- /**
- * This helper will initiate registering for the given event via the backend.
- * @param int $event_id The event to initiate registration for.
- */
- public function amOnAdminRegistrationPageForEvent($event_id)
- {
- $this->actor()->amViewingRegistrationsForEvent($event_id);
- $this->actor()->click(RegistrationsAdminPage::BUTTON_ADD_NEW_REGISTRATION);
- $this->actor()->waitForText('Adding Registration For');
- }
-
-
-
- /**
- * This clicks the View Details Link for Registration with the given Id
- * @param $registration_id
- */
- public function clickViewDetailsLinkForRegistrationWithId($registration_id)
- {
- $this->actor()->click(RegistrationsAdminPage::viewDetailsLinkSelectorForRegistrationId($registration_id));
- }
-
-
- /**
- * /**
- * This assumes you are on the admin details page for a registration in EE. It selects the given status in the
- * dropdown for changing registration status.
- *
- * @param string $status_label_or_value Either the label for the dropdown option or the value for the option.
- * @param $status_label_or_value
- */
- public function selectRegistrationStatusOnRegistrationDetailsPageFor($status_label_or_value)
- {
- $this->actor()->selectOption(
- RegistrationsAdminPage::DROPDOWN_REGISTRATION_STATUS,
- $status_label_or_value
- );
- }
-
-
- /**
- * This selects (or deselects) the "Send Related Messages" checkbox on the Registration Details page.
- * @param bool $send_related_messages
- */
- public function selectSendRelatedMessagesOptionOnRegistrationDetailsPage($send_related_messages = true)
- {
- $send_related_messages
- ? $this->actor()->selectOption(
- RegistrationsAdminPage::DROPDOWN_SEND_RELATED_MESSAGES,
- 'Yes'
- )
- : $this->actor()->selecOption(
- RegistrationsAdminPage::DROPDOWN_SEND_RELATED_MESSAGES,
- 'No'
- );
- }
-
-
-
- /**
- * This assumes you are on the admin details page for a registration in EE. It selects the given status in the
- * dropdown for changing registration status and submits the change.
- *
- * @param string $status_label_or_value Either the label for the dropdown option or the value for the option.
- * @param bool $send_related_messages Whether or not to send related messages after changing the bulk action.
- */
- public function changeRegistrationStatusOnRegistrationDetailsPageTo(
- $status_label_or_value,
- $send_related_messages = true
- ) {
- $this->actor()->selectRegistrationStatusOnRegistrationDetailsPageFor($status_label_or_value);
- $this->actor()->selectSendRelatedMessagesOptionOnRegistrationDetailsPage($send_related_messages);
- $this->actor()->click(RegistrationsAdminPage::BUTTON_UPDATE_REGISTRATION_STATUS);
- $this->actor()->waitForText('Registration status has been set to');
- }
-
-}
\ No newline at end of file
diff --git a/acceptance_tests/Helpers/TicketSelector.php b/acceptance_tests/Helpers/TicketSelector.php
deleted file mode 100644
index ebc7373d018..00000000000
--- a/acceptance_tests/Helpers/TicketSelector.php
+++ /dev/null
@@ -1,34 +0,0 @@
-actor()->selectOption(TicketSelectorElements::ticketOptionByEventIdSelector($event_id), $quantity);
- }
-
-
- /**
- * Used to submit the ticket selection for the given event id (so this can be used on an event archive page).
- * @param int|string $event_id
- */
- public function submitTicketSelectionsForEventId($event_id)
- {
- $this->actor()->click(TicketSelectorElements::ticketSelectionSubmitSelectorByEventId($event_id));
- }
-}
\ No newline at end of file
diff --git a/acceptance_tests/Page/Checkout.php b/acceptance_tests/Page/Checkout.php
deleted file mode 100644
index faae8d9eabf..00000000000
--- a/acceptance_tests/Page/Checkout.php
+++ /dev/null
@@ -1,83 +0,0 @@
- "//input[@id='title']"];
-
- /**
- * Selector for the publish submit button in the event editor.
- * @var string
- */
- const EVENT_EDITOR_PUBLISH_BUTTON_SELECTOR = ['xpath'=>"//div[@id='major-publishing-actions']//input[@id='publish']"];
-
-
- /**
- * Selector for the save button in the event editor
- */
- const EVENT_EDITOR_SAVE_BUTTON_SELECTOR = ['xpath' => "//div[@id='minor-publishing-actions']//input[@id='save-post']"];
-
-
- /**
- * @var string
- */
- const EVENT_EDITOR_DEFAULT_REGISTRATION_STATUS_FIELD_SELECTOR = '#EVT_default_registration_status';
-
- /**
- * Selector for the view link after publishing an event.
- * @var string
- */
- const EVENT_EDITOR_VIEW_LINK_AFTER_PUBLISH_SELECTOR = "//span[@id='sample-permalink']/a";
-
-
- /**
- * Selector for the ID of the event in the event editor
- * @var string
- */
- const EVENT_EDITOR_EVT_ID_SELECTOR = "//input[@id='post_ID']";
-
-
- /**
- * Selector for the search input on the event list table page.
- * @var string
- */
- const EVENT_LIST_TABLE_SEARCH_INPUT_SELECTOR = '#toplevel_page_espresso_events-search-input';
-
-
-
-
- /**
- * @param string $additional_params
- * @return string
- */
- public static function defaultEventsListTableUrl($additional_params = '')
- {
- return self::adminUrl('espresso_events', 'default', $additional_params);
- }
-
-
- /**
- * The selector for the DTTname field for the given row in the event editor.
- * @param int $row_number
- * @return string
- */
- public static function eventEditorDatetimeNameFieldSelector($row_number = 1)
- {
- return self::eventEditorDatetimeFieldSelectorForField('DTT_name', $row_number);
- }
-
-
- /**
- * The selector for the DTT_EVT_start field for the given row in the event editor.d
- * @param int $row_number
- * @return string
- */
- public static function eventEditorDatetimeStartDateFieldSelector($row_number = 1)
- {
- return self::eventEditorDatetimeFieldSelectorForField('DTT_EVT_start', $row_number);
- }
-
-
- /**
- * Wrapper for getting the selector for a given field and given row of a datetime in the event editor.
- *
- * @param string $field_name
- * @param int $row_number
- * @return string
- */
- public static function eventEditorDatetimeFieldSelectorForField($field_name, $row_number = 1)
- {
- return "//input[@id='event-datetime-$field_name-$row_number']";
- }
-
-
- /**
- * The selector for the TKT_name field for the given display row in the event editor.
- * @param int $row_number
- * @return string
- */
- public static function eventEditorTicketNameFieldSelector($row_number = 1)
- {
- return self::eventEditorTicketFieldSelectorForFieldInDisplayRow('TKT_name', $row_number);
- }
-
-
- /**
- * Selector for the TKT_base_price field for the given display row in the event editor.
- * @param int $row_number
- * @return string
- */
- public static function eventEditorTicketPriceFieldSelector($row_number = 1)
- {
- return self::eventEditorTicketFieldSelectorForFieldInDisplayRow('TKT_base_price', $row_number);
- }
-
-
- /**
- * Selector for the TKT_qty field for the given display row in the event editor.
- * @param int $row_number
- * @return string
- */
- public static function eventEditorTicketQuantityFieldSelector($row_number = 1)
- {
- return self::eventEditorTicketFieldSelectorForFieldInDisplayRow('TKT_qty', $row_number);
- }
-
-
- /**
- * Selector for the advanced details toggle for the ticket for the given display row in the event editor.
- * @param int $row_number
- * @return string
- */
- public static function eventEditorTicketAdvancedDetailsSelector($row_number = 1)
- {
- return "//tr[@id='display-ticketrow-$row_number']//span[contains(@class, 'gear-icon')]";
- }
-
-
- /**
- * Selector for the subtotal amount for the given display row of the ticket in the event editor.
- * @param int $row_number
- * @return string
- */
- public static function eventEditorTicketAdvancedDetailsSubtotalSelector($row_number = 1)
- {
- return "//span[@id='price-total-amount-$row_number']";
- }
-
-
- /**
- * Selector for the Total element for the given display row of the ticket in the event editor.
- * @param int $row_number
- * @return string
- */
- public static function eventEditorTicketAdvancedDetailsTotalSelector($row_number = 1)
- {
- return "//span[@id='price-total-amount-$row_number']";
- }
-
-
- /**
- * Selector for the taxable selector for the ticket for the given display row in the event editor.
- * @param int $row_number
- * @return string
- */
- public static function eventEditorTicketTaxableCheckboxSelector($row_number = 1)
- {
- return "//input[@id='edit-ticket-TKT_taxable-$row_number']";
- }
-
-
- /**
- * This returns the xpath locater for the Tax amount display container within the advanced settings view for the
- * given ticket (row) and the given tax id (PRC_ID).
- *
- * @param int $tax_id The PRC_ID for the tax you want the locater for. Note, this defaults to the default tax
- * setup on a fresh install.
- * @param int $row_number What row representing the ticket you want the locator for.
- * @return string
- */
- public static function eventEditorTicketTaxAmountDisplayForTaxIdAndTicketRowSelector($tax_id = 2, $row_number = 1)
- {
- return "//span[@id='TKT-tax-amount-display-$tax_id-$row_number']";
- }
-
-
- /**
- * Wrapper for getting the selector for a given field and given display row of a ticket in the event editor.
- * @param $field_name
- * @param int $row_number
- * @return string
- */
- public static function eventEditorTicketFieldSelectorForFieldInDisplayRow($field_name, $row_number = 1)
- {
- return "//tr[@id='display-ticketrow-$row_number']//input[contains(@class, 'edit-ticket-$field_name')]";
- }
-
-
- /**
- * Returns the selector for the event title edit link in the events list table for the given Event Title.
- * @param string $event_title
- * @return string
- */
- public static function eventListTableEventTitleEditLinkSelectorForTitle($event_title)
- {
- return "//td[contains(@class, 'column-name')]/strong/a[text()='$event_title']";
- }
-
-
- /**
- * Locator for for the ID column in the event list table for a given event title.
- * @param string $event_title
- * @return string
- */
- public static function eventListTableEventIdSelectorForTitle($event_title)
- {
- return "//td[contains(@class, 'column-name')]/strong/a[text()='$event_title']"
- . "//ancestor::tr/th[contains(@class, 'check-column')]/input";
- }
-
-
- /**
- * Locator for the view link in the row of an event list table for the given event title.
- * @param string $event_title
- * @return string
- */
- public static function eventListTableEventTitleViewLinkSelectorForTitle($event_title)
- {
- return "//td[contains(@class, 'column-name')]/strong/a[text()='$event_title']"
- . "//ancestor::td//span[@class='view']/a";
- }
-
-
- /**
- * Locator for the messenger tab in the Notifications metabox in the event editor.
- * @param string $messenger_slug The slug for the messenger (it's reference slug).
- * @return string
- */
- public static function eventEditorNotificationsMetaBoxMessengerTabSelector($messenger_slug)
- {
- return "//div[@id='espresso_events_Messages_Hooks_Extend_messages_metabox_metabox']"
- . "//a[@rel='ee-tab-$messenger_slug']";
- }
-
-
- /**
- * Locator for the select input within the notifications metabox.
- * Note, this assumes the tab content for the related messenger is already visible.
- * @param string $message_type_label The message type label (visible string in the table) you want the selector for.
- * @return string
- */
- public static function eventEditorNotificationsMetaBoxSelectSelectorForMessageType($message_type_label)
- {
- return "//div[@id='espresso_events_Messages_Hooks_Extend_messages_metabox_metabox']"
- . "//table[@class='messages-custom-template-switcher']"
- . "//tr/td[contains(.,'Registration Approved')]"
- . "//ancestor::tr//select[contains(@class,'message-template-selector')]";
- }
-
-
- /**
- * Returns the selector for the action link to the registrations list table view filtered by the given event_id.
- * Assumes one is in the context of the Events List Table
- * @param int $event_id
- * @return string
- */
- public static function listTableActionLinkRegistrationsForEvent($event_id)
- {
- return "//tbody[@id='the-list']/tr/td[contains(@class, 'column-id') and contains(.,$event_id)]"
- . "//ancestor::tr/td//a[div[contains(@class, 'dashicons-groups')]]";
- }
-}
diff --git a/acceptance_tests/Page/MessagesAdmin.php b/acceptance_tests/Page/MessagesAdmin.php
deleted file mode 100644
index 171e5f7af2b..00000000000
--- a/acceptance_tests/Page/MessagesAdmin.php
+++ /dev/null
@@ -1,305 +0,0 @@
- 0 ? Locator::elementAt($selector, $number_in_set) : $selector;
- }
-
-
- /**
- * Selector for the Create Custom button found in the message template list table.
- * @param string $message_type_label
- * @param string $messenger_label
- * @return string
- */
- public static function createCustomButtonForMessageTypeAndMessenger($message_type_label, $messenger_label)
- {
- $selector = "//tr/td[contains(@class, 'message_type') and text()='$message_type_label']"
- . "//ancestor::tr/td[contains(@class, 'messenger') and contains(., '$messenger_label')]"
- . "//ancestor::tr/td/a[@class='button button-small']";
- return $selector;
- }
-
-
- /**
- * Note, this could potentially match multiple buttons in the view so the selector is intentionally restricted to
- * the FIRST match (which will be the latest message sent if the table is default sorted).
- *
- * @param string $message_type_label The visible message type label for the row you want to match
- * @param string $message_status The status of the message for the row you want to match.
- * @param string $messenger The visible messenger label for the row you want to match.
- * @param string $context The visible context label for the row you want to match.
- * @param int $number_in_set It's possible that the given parameters could match multiple items in the
- * view. This allows you to indicate which item from the set to match.
- * @return string
- * @throws \InvalidArgumentException
- */
- public static function messagesActivityListTableViewButtonSelectorFor(
- $message_type_label,
- $message_status = self::MESSAGE_STATUS_SENT,
- $messenger = 'Email',
- $context = 'Event Admin',
- $number_in_set = 1
- ) {
- $selector = self::messagesActivityListTableCellSelectorFor(
- 'action',
- $message_type_label,
- $message_status,
- $messenger,
- $context,
- '',
- $number_in_set
- );
- $selector .= "/a/span[contains(@class, 'ee-message-action-link-view')"
- . " and not(contains(@class, 'ee-message-action-link-view_transaction'))]";
- return $selector;
- }
-
-
- /**
- * Locator for the delete action link for a message item in the message activity list table.
- * Note: The link is not visible by default, so the column would need hovered over for the link to appear.
- *
- * @param $message_type_label
- * @param string $message_status
- * @param string $messenger
- * @param string $context
- * @param int $number_in_set
- * @return string
- * @throws \InvalidArgumentException
- */
- public static function messagesActivityListTableDeleteActionSelectorFor(
- $message_type_label,
- $message_status = self::MESSAGE_STATUS_SENT,
- $messenger = 'Email',
- $context = 'Event Admin',
- $number_in_set = 1
- ) {
- $selector = self::messagesActivityListTableCellSelectorFor(
- 'to',
- $message_type_label,
- $message_status,
- $messenger,
- $context,
- '',
- $number_in_set
- );
- $selector .= "/div/span[@class='delete']/a";
- return $selector;
- }
-
-
-
- /**
- * Returns the input selector for a given field in the message template editor.
- * Assumes one is already viewing the Message Template Editor.
- * @param string $field
- * @return string
- */
- public static function messageInputFieldSelectorFor($field)
- {
- return "//div[@id='post-body']//input[@id='$field-content']";
- }
-
-
- /**
- * Wrapper for self::messageInputFieldSelectorFor('to') that takes care of getting the input for the To field.
- */
- public static function messageTemplateToFieldSelector()
- {
- return self::messageInputFieldSelectorFor('to');
- }
-}
\ No newline at end of file
diff --git a/acceptance_tests/Page/RegistrationsAdmin.php b/acceptance_tests/Page/RegistrationsAdmin.php
deleted file mode 100644
index 1bb281ae812..00000000000
--- a/acceptance_tests/Page/RegistrationsAdmin.php
+++ /dev/null
@@ -1,58 +0,0 @@
-loginAsAdmin(20);
-$I->amOnMessageSettingsPage();
-$I->selectOption(MessagesAdmin::GLOBAL_MESSAGES_SETTINGS_ON_REQUEST_SELECTION_SELECTOR, '1');
-$I->click(MessagesAdmin::GLOBAL_MESSAGES_SETTINGS_SUBMIT_SELECTOR);
diff --git a/acceptance_tests/tests/b-TestRegistrationSummaryCept.php b/acceptance_tests/tests/b-TestRegistrationSummaryCept.php
deleted file mode 100644
index 290f0160071..00000000000
--- a/acceptance_tests/tests/b-TestRegistrationSummaryCept.php
+++ /dev/null
@@ -1,158 +0,0 @@
-wantTo('Test that the Registration Summary Message type works as expected.');
-
-//need the MER plugin active for this test (we'll deactivate it after).
-$I->ensurePluginActive(
- 'event-espresso-mer-multi-event-registration',
- 'activated'
-);
-
-//k now we need to make sure the registration multi-status message type is active because it isn't by default
-$I->loginAsAdmin();
-$I->amOnMessageSettingsPage();
-$I->activateMessageTypeForMessenger('registration_summary');
-
-
-//k now we need to create a couple events to use for testing.
-$I->amOnDefaultEventsListTablePage();
-$I->click(EventsAdmin::ADD_NEW_EVENT_BUTTON_SELECTOR);
-$I->fillField(EventsAdmin::EVENT_EDITOR_TITLE_FIELD_SELECTOR, 'Event RSM A');
-$I->publishEvent();
-$event_a_link = $I->observeLinkUrlAt(EventsAdmin::EVENT_EDITOR_VIEW_LINK_AFTER_PUBLISH_SELECTOR);
-$event_a_id = $I->observeValueFromInputAt(EventsAdmin::EVENT_EDITOR_EVT_ID_SELECTOR);
-
-//do another event except we'll set the default reg status to not approved.
-$I->amOnDefaultEventsListTablePage();
-$I->click(EventsAdmin::ADD_NEW_EVENT_BUTTON_SELECTOR);
-$I->fillField(EventsAdmin::EVENT_EDITOR_TITLE_FIELD_SELECTOR, 'Event RSM B');
-$I->changeDefaultRegistrationStatusTo(RegistrationsAdmin::REGISTRATION_STATUS_NOT_APPROVED);
-$I->publishEvent();
-$event_b_link = $I->observeLinkUrlAt(EventsAdmin::EVENT_EDITOR_VIEW_LINK_AFTER_PUBLISH_SELECTOR);
-$event_b_id = $I->observeValueFromInputAt(EventsAdmin::EVENT_EDITOR_EVT_ID_SELECTOR);
-
-$I->amOnDefaultEventsListTablePage();
-$I->click(EventsAdmin::ADD_NEW_EVENT_BUTTON_SELECTOR);
-$I->fillField(EventsAdmin::EVENT_EDITOR_TITLE_FIELD_SELECTOR, 'Event RSM C');
-$I->publishEvent();
-$event_c_link = $I->observeLinkUrlAt(EventsAdmin::EVENT_EDITOR_VIEW_LINK_AFTER_PUBLISH_SELECTOR);
-$event_c_id = $I->observeValueFromInputAt(EventsAdmin::EVENT_EDITOR_EVT_ID_SELECTOR);
-
-//k now that our events are setup lets do some registrations
-$I->logOut();
-$I->amOnUrl($event_a_link);
-$I->see('Event RSM A');
-$I->selectOption(TicketSelector::ticketOptionByEventIdSelector($event_a_id), '1');
-$I->click(TicketSelector::ticketSelectionSubmitSelectorByEventId($event_a_id));
-$I->waitForText('successfully added');
-$I->click('.cart-results-go-back-button');
-$I->amOnUrl($event_b_link);
-$I->see('Event RSM B');
-$I->selectOption(TicketSelector::ticketOptionByEventIdSelector($event_b_id), '1');
-$I->click(TicketSelector::ticketSelectionSubmitSelectorByEventId($event_b_id));
-$I->waitForText('successfully added');
-$I->click('.cart-results-register-button');
-$I->waitForText('Personal Information');
-$I->fillOutFirstNameFieldForAttendee('RSM Tester');
-$I->fillOutLastNameFieldForAttendee('Guy');
-$I->fillOutEmailFieldForAttendee('rsm_tester@example.org');
-$I->goToNextRegistrationStep();
-$I->waitForText('Congratulations', 15);
-
-//now let's go to the messages list table and make sure the registration message summary is there.
-$I->loginAsAdmin();
-$I->amOnMessagesActivityListTablePage();
-$I->see(
- 'rsm_tester@example.org',
- MessagesAdmin::messagesActivityListTableCellSelectorFor(
- 'to',
- 'Registration Multi-status Summary',
- MessagesAdmin::MESSAGE_STATUS_SENT,
- '',
- 'Primary Registrant'
- )
-);
-$I->see(
- 'admin@example.com',
- MessagesAdmin::messagesActivityListTableCellSelectorFor(
- 'to',
- 'Registration Multi-status Summary',
- MessagesAdmin::MESSAGE_STATUS_SENT
- )
-);
-//verify count
-$I->verifyMatchingCountofTextInMessageActivityListTableFor(
- 1,
- 'rsm_tester@example.org',
- 'to',
- 'Registration Multi-status Summary',
- MessagesAdmin::MESSAGE_STATUS_SENT,
- 'Email',
- 'Primary Registrant'
-);
-$I->verifyMatchingCountofTextInMessageActivityListTableFor(
- 1,
- 'admin@example.com',
- 'to',
- 'Registration Multi-status Summary'
-);
-
-//okay now let's do some registrations for just the first event and verify that registration multi-status summary is NOT
-//generated
-$I->amGoingTo('Register for Event RSM A and C and verify registration multi-status message type is not used for generated message');
-$I->logOut();
-$I->amOnUrl($event_a_link);
-$I->see('Event RSM A');
-$I->selectOption(TicketSelector::ticketOptionByEventIdSelector($event_a_id), '1');
-$I->click(TicketSelector::ticketSelectionSubmitSelectorByEventId($event_a_id));
-$I->waitForText('successfully added');
-$I->click('.cart-results-go-back-button');
-$I->amOnUrl($event_c_link);
-$I->see('Event RSM C');
-$I->selectOption(TicketSelector::ticketOptionByEventIdSelector($event_c_id), '1');
-$I->click(TicketSelector::ticketSelectionSubmitSelectorByEventId($event_c_id));
-$I->waitForText('successfully added');
-$I->click('.cart-results-register-button');
-$I->waitForText('Personal Information');
-$I->fillOutFirstNameFieldForAttendee('RSM Tester B');
-$I->fillOutLastNameFieldForAttendee('Guy');
-$I->fillOutEmailFieldForAttendee('rsm_testerb@example.org');
-$I->goToNextRegistrationStep();
-$I->waitForText('Congratulations', 15);
-
-$I->amGoingTo('Visit Messages Activity List Table and verify there are no Registration Multi-Status Messages for the registrations we just did');
-$I->loginAsAdmin();
-$I->amOnMessagesActivityListTablePage();
-$I->dontSee(
- 'rsm_testerb@example.org',
- MessagesAdmin::messagesActivityListTableCellSelectorFor(
- 'to',
- 'Registration Multi-status Summary',
- MessagesAdmin::MESSAGE_STATUS_SENT,
- '',
- 'Primary Registrant'
- )
-);
-//there should still only be one admin multi-status summary thing.
-$I->verifyMatchingCountofTextInMessageActivityListTableFor(
- 1,
- 'admin@example.com',
- 'to',
- 'Registration Multi-status Summary'
-);
-
-//deactivate MER plugin so its not active for future tests
-$I->ensurePluginDeactivated(
- 'event-espresso-mer-multi-event-registration',
- 'plugins deactivated'
-);
\ No newline at end of file
diff --git a/acceptance_tests/tests/c-TestCustomMessageTemplateCept.php b/acceptance_tests/tests/c-TestCustomMessageTemplateCept.php
deleted file mode 100644
index 53082b95ec3..00000000000
--- a/acceptance_tests/tests/c-TestCustomMessageTemplateCept.php
+++ /dev/null
@@ -1,188 +0,0 @@
-wantTo(
- 'Test that when registrations for multiple events are completed, and those events share the same custom'
- . 'template, that that custom template will be used.'
-);
-
-//need the MER plugin active for this test (we'll deactivate it after).
-$I->ensurePluginActive(
- 'event-espresso-mer-multi-event-registration',
- 'activated'
-);
-
-$I->loginAsAdmin();
-
-$I->amGoingTo('Create two custom registration approved templates');
-$I->amGoingTo('Create first custom registration approved template.');
-$I->createCustomMessageTemplateFromDefaultFor('Registration Approved', 'Email');
-$I->appendToWPEditorField('main', $custom_template_a_label);
-$I->saveMessageTemplate();
-$I->waitForText('successfully updated');
-$I->switchContextTo('Registrant');
-$I->fillField('#title', $custom_template_a_label);
-$I->appendToWPEditorField('main', $custom_template_a_label);
-$I->saveMessageTemplate();
-$I->waitForText('successfully updated');
-
-$I->amGoingTo('Create second custom registration approved template.');
-$I->createCustomMessageTemplateFromDefaultFor('Registration Approved', 'Email');
-$I->fillField('#title', $custom_template_b_label);
-$I->appendToWPEditorField('main', $custom_template_b_label);
-$I->saveMessageTemplate();
-$I->waitForText('successfully updated');
-$I->switchContextTo('Registrant');
-$I->appendToWPEditorField('main', $custom_template_b_label);
-$I->saveMessageTemplate();
-$I->waitForText('successfully updated');
-
-$I->amGoingTo('Create three events for testing with.');
-$I->amOnDefaultEventsListTablePage();
-$I->click(EventsAdmin::ADD_NEW_EVENT_BUTTON_SELECTOR);
-$I->fillField(EventsAdmin::EVENT_EDITOR_TITLE_FIELD_SELECTOR, $event_one_label);
-$I->selectCustomTemplateFor('Registration Approved', 'email', $custom_template_a_label);
-$I->publishEvent();
-$event_one_link = $I->observeLinkUrlAt(EventsAdmin::EVENT_EDITOR_VIEW_LINK_AFTER_PUBLISH_SELECTOR);
-$event_one_id = $I->observeValueFromInputAt(EventsAdmin::EVENT_EDITOR_EVT_ID_SELECTOR);
-
-$I->amOnDefaultEventsListTablePage();
-$I->click(EventsAdmin::ADD_NEW_EVENT_BUTTON_SELECTOR);
-$I->fillField(EventsAdmin::EVENT_EDITOR_TITLE_FIELD_SELECTOR, $event_two_label);
-$I->selectCustomTemplateFor('Registration Approved', 'email', $custom_template_a_label);
-$I->publishEvent();
-$event_two_link = $I->observeLinkUrlAt(EventsAdmin::EVENT_EDITOR_VIEW_LINK_AFTER_PUBLISH_SELECTOR);
-$event_two_id = $I->observeValueFromInputAt(EventsAdmin::EVENT_EDITOR_EVT_ID_SELECTOR);
-
-$I->amOnDefaultEventsListTablePage();
-$I->click(EventsAdmin::ADD_NEW_EVENT_BUTTON_SELECTOR);
-$I->fillField(EventsAdmin::EVENT_EDITOR_TITLE_FIELD_SELECTOR, $event_three_label);
-$I->selectCustomTemplateFor('Registration Approved', 'email', $custom_template_b_label);
-$I->publishEvent();
-$event_three_link = $I->observeLinkUrlAt(EventsAdmin::EVENT_EDITOR_VIEW_LINK_AFTER_PUBLISH_SELECTOR);
-$event_three_id = $I->observeValueFromInputAt(EventsAdmin::EVENT_EDITOR_EVT_ID_SELECTOR);
-
-
-$test_registration_details = array(
- 'fname' => 'CTGuy',
- 'lname' => 'Dude',
- 'email' => 'ctguy_dude@example.org'
-);
-
-$I->amGoingTo('Register for Event One and Event Two and verify Custom Template A was used.');
-$I->logOut();
-$I->amOnUrl($event_one_link);
-$I->selectOption(TicketSelector::ticketOptionByEventIdSelector($event_one_id), 1);
-$I->click(TicketSelector::ticketSelectionSubmitSelectorByEventId($event_one_id));
-$I->waitForText('successfully added');
-$I->click('.cart-results-go-back-button');
-$I->amOnUrl($event_two_link);
-$I->selectOption(TicketSelector::ticketOptionByEventIdSelector($event_two_id), 1);
-$I->click(TicketSelector::ticketSelectionSubmitSelectorByEventId($event_two_id));
-$I->waitForText('successfully added');
-$I->click('.cart-results-register-button');
-$I->waitForText('Personal Information');
-$I->fillOutFirstNameFieldForAttendee($test_registration_details['fname']);
-$I->fillOutLastNameFieldForAttendee($test_registration_details['lname']);
-$I->fillOutEmailFieldForAttendee($test_registration_details['email']);
-$I->goToNextRegistrationStep();
-$I->waitForText('Congratulations', 15);
-
-//go to list table and verify
-$I->loginAsAdmin();
-$I->amOnMessagesActivityListTablePage();
-$I->viewMessageInMessagesListTableFor(
- 'Registration Approved',
- MessagesAdmin::MESSAGE_STATUS_SENT,
- 'Email',
- 'Registrant'
-);
-$I->seeTextInViewMessageModal($custom_template_a_label);
-$I->dismissMessageModal();
-$I->deleteMessageInMessagesListTableFor(
- 'Registration Approved',
- MessagesAdmin::MESSAGE_STATUS_SENT,
- 'Email',
- 'Registrant'
-);
-
-//verify admin context
-$I->viewMessageInMessagesListTableFor(
- 'Registration Approved'
-);
-$I->seeTextInViewMessageModal($custom_template_a_label);
-$I->dismissMessageModal();
-$I->deleteMessageInMessagesListTableFor('Registration Approved');
-
-$I->amGoingTo('Register for Event One and Event Three and verify that global template is used.');
-$I->logOut();
-$I->amOnUrl($event_one_link);
-$I->selectOption(TicketSelector::ticketOptionByEventIdSelector($event_one_id), 1);
-$I->click(TicketSelector::ticketSelectionSubmitSelectorByEventId($event_one_id));
-$I->waitForText('successfully added');
-$I->click('.cart-results-go-back-button');
-$I->amOnUrl($event_three_link);
-$I->selectOption(TicketSelector::ticketOptionByEventIdSelector($event_three_id), 1);
-$I->click(TicketSelector::ticketSelectionSubmitSelectorByEventId($event_three_id));
-$I->waitForText('successfully added');
-$I->click('.cart-results-register-button');
-$I->waitForText('Personal Information');
-$I->fillOutFirstNameFieldForAttendee($test_registration_details['fname']);
-$I->fillOutLastNameFieldForAttendee($test_registration_details['lname']);
-$I->fillOutEmailFieldForAttendee($test_registration_details['email']);
-$I->goToNextRegistrationStep();
-$I->waitForText('Congratulations', 15);
-
-//go to list table and verify
-$I->loginAsAdmin();
-$I->amOnMessagesActivityListTablePage();
-$I->viewMessageInMessagesListTableFor(
- 'Registration Approved',
- MessagesAdmin::MESSAGE_STATUS_SENT,
- 'Email',
- 'Registrant'
-);
-$I->waitForElementVisible(MessagesAdmin::MESSAGES_LIST_TABLE_VIEW_MESSAGE_DIALOG_CONTAINER_SELECTOR);
-$I->dontSeeTextInViewMessageModal($custom_template_a_label);
-$I->dontSeeTextInViewMessageModal($custom_template_b_label);
-$I->dismissMessageModal();
-$I->deleteMessageInMessagesListTableFor(
- 'Registration Approved',
- MessagesAdmin::MESSAGE_STATUS_SENT,
- 'Email',
- 'Registrant'
-);
-
-//verify admin context
-$I->viewMessageInMessagesListTableFor(
- 'Registration Approved'
-);
-$I->waitForElementVisible(MessagesAdmin::MESSAGES_LIST_TABLE_VIEW_MESSAGE_DIALOG_CONTAINER_SELECTOR);
-$I->dontSee($custom_template_a_label);
-$I->dontSee($custom_template_b_label);
-$I->dismissMessageModal();
-$I->deleteMessageInMessagesListTableFor('Registration Approved');
-
-
-
-//deactivate MER plugin so its not active for future tests
-$I->ensurePluginDeactivated(
- 'event-espresso-mer-multi-event-registration',
- 'plugins deactivated'
-);
\ No newline at end of file
diff --git a/acceptance_tests/tests/d-TestEventEditorCept.php b/acceptance_tests/tests/d-TestEventEditorCept.php
deleted file mode 100644
index 702f51907ea..00000000000
--- a/acceptance_tests/tests/d-TestEventEditorCept.php
+++ /dev/null
@@ -1,41 +0,0 @@
-wantTo('Test various features/elements in the event editor.');
-$I->amGoingTo('Test ticket total calculations via js in the ticket editor.');
-$I->loginAsAdmin();
-$I->amOnDefaultEventsListTablePage();
-$I->click(EventsAdmin::ADD_NEW_EVENT_BUTTON_SELECTOR);
-$I->fillField(EventsAdmin::eventEditorTicketPriceFieldSelector(), '32.50');
-$I->toggleAdvancedSettingsViewForTicketRow();
-$I->waitForElementVisible(EventsAdmin::eventEditorTicketAdvancedDetailsSubtotalSelector());
-$I->see('$32.50', EventsAdmin::eventEditorTicketAdvancedDetailsSubtotalSelector());
-$I->toggleTicketIsTaxableForTicketRow();
-$I->see('$4.88', EventsAdmin::eventEditorTicketTaxAmountDisplayForTaxIdAndTicketRowSelector());
-$I->see('$37.38', EventsAdmin::eventEditorTicketAdvancedDetailsTotalSelector());
-$I->saveEvent();
-
-$I->amGoingTo('Test the same ticket total calculations via js in the ticket editor but with this format: 1.000,00');
-$I->amOnCountrySettingsAdminPage();
-$I->setCurrencyDecimalMarkTo(',');
-$I->setCurrencyThousandsSeparatorTo('.');
-$I->saveCountrySettings();
-$I->amOnDefaultEventsListTablePage();
-$I->click(EventsAdmin::ADD_NEW_EVENT_BUTTON_SELECTOR);
-$I->fillField(EventsAdmin::eventEditorTicketPriceFieldSelector(), '32,50');
-$I->toggleAdvancedSettingsViewForTicketRow();
-$I->waitForElementVisible(EventsAdmin::eventEditorTicketAdvancedDetailsSubtotalSelector());
-$I->see('$32,50', EventsAdmin::eventEditorTicketAdvancedDetailsSubtotalSelector());
-$I->toggleTicketIsTaxableForTicketRow();
-$I->see('$4,88', EventsAdmin::eventEditorTicketTaxAmountDisplayForTaxIdAndTicketRowSelector());
-$I->see('$37,38', EventsAdmin::eventEditorTicketAdvancedDetailsTotalSelector());
-
-//restore country settings to original
-$I->saveEvent();
-$I->amOnCountrySettingsAdminPage();
-$I->setCurrencyDecimalMarkTo('.');
-$I->setCurrencyThousandsSeparatorTo(',');
-$I->saveCountrySettings();
\ No newline at end of file
diff --git a/acceptance_tests/tests/e-TestContextActivationToggleCept.php b/acceptance_tests/tests/e-TestContextActivationToggleCept.php
deleted file mode 100644
index 992c6d3808a..00000000000
--- a/acceptance_tests/tests/e-TestContextActivationToggleCept.php
+++ /dev/null
@@ -1,167 +0,0 @@
-wantTo(
- 'Test that the context activation toggle for turning on or off specific contexts for message sending works as'
- . ' expected'
-);
-
-$I->loginAsAdmin();
-
-$I->amGoingTo('Verify the toggle for toggling state on context is visible.');
-$I->amOnDefaultMessageTemplateListTablePage();
-$I->clickToEditMessageTemplateByMessageType('registration', 'admin');
-$I->see('The template for Event Admin Recipient is currently active.');
-$I->switchContextTo('Primary Registrant');
-$I->see('The template for Primary Registrant Recipient is currently active.');
-
-$I->amGoingTo('Make sure the "To" field for Primary Registrant has content');
-$I->fillField(MessagesAdmin::messageTemplateToFieldSelector(), '[PRIMARY_REGISTRANT_EMAIL]');
-$I->saveMessageTemplate();
-//verify To Field has expected content after save.
-$I->seeInField(MessagesAdmin::messageTemplateToFieldSelector(), '[PRIMARY_REGISTRANT_EMAIL]');
-
-$I->amGoingTo('Disable the primary registrant context.');
-$I->toggleContextState('Primary Registrant Recipient', false);
-//save and verify it stuck
-$I->saveMessageTemplate();
-$I->see('The template for Primary Registrant Recipient is currently inactive.');
-
-$I->amGoingTo(
- 'Trigger Registration Approved Messages and verify primary registrant context is excluded from sent messages.'
-);
-$I->amOnDefaultEventsListTablePage();
-$I->click(EventsAdmin::ADD_NEW_EVENT_BUTTON_SELECTOR);
-$I->fillField(EventsAdmin::EVENT_EDITOR_TITLE_FIELD_SELECTOR, $event_label);
-$I->publishEvent();
-$event_link = $I->observeLinkUrlAt(EventsAdmin::EVENT_EDITOR_VIEW_LINK_AFTER_PUBLISH_SELECTOR);
-$event_id = $I->observeValueFromInputAt(EventsAdmin::EVENT_EDITOR_EVT_ID_SELECTOR);
-$test_registration_details = array(
- 'fname' => 'ContextTestGuy',
- 'lname' => 'ContextTestDude',
- 'email' => 'contexttestguy@example.org',
-);
-$I->logOut();
-$I->amOnUrl($event_link);
-$I->selectOption(TicketSelector::ticketOptionByEventIdSelector($event_id), 1);
-$I->click(TicketSelector::ticketSelectionSubmitSelectorByEventId($event_id));
-$I->waitForText('Personal Information');
-$I->fillOutFirstNameFieldForAttendee($test_registration_details['fname']);
-$I->fillOutLastNameFieldForAttendee($test_registration_details['lname']);
-$I->fillOutEmailFieldForAttendee($test_registration_details['email']);
-$I->goToNextRegistrationStep();
-$I->waitForText('Congratulations', 15);
-//go to messages list table and verify
-$I->loginAsAdmin();
-$I->amOnMessagesActivityListTablePage();
-//verify registrant context
-$I->see(
- $test_registration_details['email'],
- MessagesAdmin::messagesActivityListTableCellSelectorFor(
- 'to',
- 'Registration Approved',
- MessagesAdmin::MESSAGE_STATUS_SENT,
- '',
- 'Registrant'
- )
-);
-$I->deleteMessageInMessagesListTableFor(
- 'Registration Approved',
- MessagesAdmin::MESSAGE_STATUS_SENT,
- 'Email',
- 'Registrant'
-);
-//verify admin context
-$I->see(
- 'admin@example.com',
- MessagesAdmin::messagesActivityListTableCellSelectorFor(
- 'to',
- 'Registration Approved',
- MessagesAdmin::MESSAGE_STATUS_SENT
- )
-);
-$I->deleteMessageInMessagesListTableFor(
- 'Registration Approved'
-);
-//verify primary registrant context is NOT present.
-$I->dontSee(
- $test_registration_details['email'],
- MessagesAdmin::messagesActivityListTableCellSelectorFor(
- 'to',
- 'Registration Approved',
- MessagesAdmin::MESSAGE_STATUS_SENT,
- '',
- 'Primary Registrant'
- )
-);
-
-$I->amGoingTo(
- 'Deactivate primary registrant context for Registration Approved Message Templates and restore the "To"'
- . ' field to an empty string to verify the message does not send for that context.'
-);
-$I->amOnDefaultMessageTemplateListTablePage();
-$I->clickToEditMessageTemplateByMessageType('registration', 'primary_attendee');
-$I->toggleContextState('Primary Registrant Recipient', true);
-$I->fillField(MessagesAdmin::messageTemplateToFieldSelector(), '');
-$I->saveMessageTemplate();
-$I->see('The template for Primary Registrant Recipient is currently active.');
-//repeat frontend registration and verify we get the same results with the empty "To" field.
-$I->logOut();
-$I->amOnUrl($event_link);
-$I->selectOption(TicketSelector::ticketOptionByEventIdSelector($event_id), 1);
-$I->click(TicketSelector::ticketSelectionSubmitSelectorByEventId($event_id));
-$I->waitForText('Personal Information');
-$I->fillOutFirstNameFieldForAttendee($test_registration_details['fname']);
-$I->fillOutLastNameFieldForAttendee($test_registration_details['lname']);
-$I->fillOutEmailFieldForAttendee($test_registration_details['email']);
-$I->goToNextRegistrationStep();
-$I->waitForText('Congratulations', 15);
-//go to messages list table and verify
-$I->loginAsAdmin();
-$I->amOnMessagesActivityListTablePage();
-//verify registrant context
-$I->see(
- $test_registration_details['email'],
- MessagesAdmin::messagesActivityListTableCellSelectorFor(
- 'to',
- 'Registration Approved',
- MessagesAdmin::MESSAGE_STATUS_SENT,
- '',
- 'Registrant'
- )
-);
-$I->deleteMessageInMessagesListTableFor(
- 'Registration Approved',
- MessagesAdmin::MESSAGE_STATUS_SENT,
- 'Email',
- 'Registrant'
-);
-//verify admin context
-$I->see(
- 'admin@example.com',
- MessagesAdmin::messagesActivityListTableCellSelectorFor(
- 'to',
- 'Registration Approved',
- MessagesAdmin::MESSAGE_STATUS_SENT
- )
-);
-$I->deleteMessageInMessagesListTableFor(
- 'Registration Approved'
-);
-//verify primary registrant context is NOT present.
-$I->dontSee(
- $test_registration_details['email'],
- MessagesAdmin::messagesActivityListTableCellSelectorFor(
- 'to',
- 'Registration Approved',
- MessagesAdmin::MESSAGE_STATUS_SENT,
- '',
- 'Primary Registrant'
- )
-);
\ No newline at end of file
diff --git a/assets/src/blocks/constants.js b/assets/src/blocks/constants.js
deleted file mode 100644
index 4b54ad8de49..00000000000
--- a/assets/src/blocks/constants.js
+++ /dev/null
@@ -1 +0,0 @@
-export const CSS_CLASS_CORE_BLOCKS = 'ee-core-blocks event-espresso-blocks';
diff --git a/assets/src/blocks/event-attendees/edit.js b/assets/src/blocks/event-attendees/edit.js
deleted file mode 100644
index a65e72509a9..00000000000
--- a/assets/src/blocks/event-attendees/edit.js
+++ /dev/null
@@ -1,550 +0,0 @@
-/**
- * External dependencies
- */
-import { InspectorControls } from '@wordpress/block-editor';
-import { Component, Fragment } from '@wordpress/element';
-import {
- PanelBody,
- Placeholder,
- ToggleControl,
- Spinner,
- RangeControl,
- SelectControl,
-} from '@wordpress/components';
-import { withSelect } from '@wordpress/data';
-import { sprintf, _n, __ } from '@eventespresso/i18n';
-import {
- EditorDatetimeSelect,
- EditorEventSelect,
- EditorStatusSelect,
- EditorTicketSelect,
- QueryLimit,
- EventAttendeeList,
-} from '@eventespresso/components';
-import { NotWithPostTypeCheck } from '@eventespresso/editor-hocs';
-import {
- statusModel,
- attendeeModel,
- QUERY_ORDER_ASC,
- QUERY_ORDER_DESC,
- ALLOWED_ORDER_VALUES,
-} from '@eventespresso/model';
-import PropTypes from 'prop-types';
-import { isEmpty } from 'lodash';
-
-/**
- * Internal dependencies
- */
-import { CSS_CLASS_CORE_BLOCKS } from '../constants';
-
-const defaultQueryData = {
- showExpired: true,
- limit: 50,
-};
-
-const isNewBlock = ( { eventId, datetimeId, ticketId } ) => eventId === 0 &&
- datetimeId === 0 &&
- ticketId === 0;
-
-const DEFAULT_ARRAY = [];
-
-let highestRequestedLimit = 200;
-
-/**
- * EventAttendeesEditor Component
- *
- * This returns the component for the `edit` argument on the `EventAttendees`
- * Block.
- */
-export class EventAttendeesEditor extends Component {
- static propTypes = {
- attendees: PropTypes.array,
- isLoading: PropTypes.bool,
- attributes: PropTypes.shape( {
- eventId: PropTypes.number,
- datetimeId: PropTypes.number,
- ticketId: PropTypes.number,
- status: PropTypes.string,
- showGravatar: PropTypes.bool,
- displayOnArchives: PropTypes.bool,
- limit: PropTypes.number,
- orderBy: PropTypes.oneOf( [
- 'id',
- 'lastNameOnly',
- 'firstNameOnly',
- 'firstThenLastName',
- 'lastThenFirstName',
- ] ),
- order: PropTypes.oneOf( ALLOWED_ORDER_VALUES ),
- avatarSize: PropTypes.number,
- avatarClass: PropTypes.string,
- } ),
- };
-
- static defaultProps = {
- attendees: [],
- isLoading: true,
- attributes: {
- eventId: 0,
- datetimeId: 0,
- ticketId: 0,
- status: statusModel.REGISTRATION_STATUS_ID.APPROVED,
- showGravatar: true,
- displayOnArchives: false,
- limit: 100,
- orderBy: 'lastThenFirstName',
- order: QUERY_ORDER_ASC,
- avatarSize: 24,
- avatarClass: 'contact',
- },
- };
-
- /**
- * @param {Object} props
- */
- constructor( props ) {
- super( props );
- const { eventId, datetimeId } = this.props.attributes;
- this.state = {
- eventQueryData: {
- ...defaultQueryData,
- },
- datetimeQueryData: {
- ...defaultQueryData,
- forEventId: eventId,
- },
- ticketQueryData: {
- ...defaultQueryData,
- forDatetimeId: datetimeId,
- },
- statusQueryData: {
- ...defaultQueryData,
- statusType: statusModel.STATUS_TYPE_REGISTRATION,
- },
- };
- }
-
- /**
- * Set eventId on attributes
- * @param {Object} eventId
- */
- setEventId = ( eventId ) => {
- const value = eventId !== null && eventId.value ?
- parseInt( eventId.value, 10 ) :
- 0;
- this.props.setAttributes(
- {
- eventId: value,
- datetimeId: 0,
- ticketId: 0,
- }
- );
- this.setState( {
- datetimeQueryData: {
- ...this.state.datetimeQueryData,
- forEventId: value,
- },
- } );
- };
-
- /**
- * Set datetimeId on attributes
- * @param {Object} datetimeId
- */
- setDatetimeId = ( datetimeId ) => {
- const value = datetimeId !== null && datetimeId.value ?
- parseInt( datetimeId.value, 10 ) :
- 0;
- this.props.setAttributes(
- {
- datetimeId: value,
- ticketId: 0,
- }
- );
- this.setState( {
- ticketQueryData: {
- ...this.state.ticketQueryData,
- forDatetimeId: value,
- },
- } );
- };
-
- /**
- * Set ticketId on attributes
- * @param {Object} ticketId
- */
- setTicketId = ( ticketId ) => {
- const value = ticketId !== null && ticketId.value ?
- parseInt( ticketId.value, 10 ) :
- 0;
- this.props.setAttributes( { ticketId: value } );
- };
-
- /**
- * Set status on attributes
- * @param {Object} status
- */
- setStatus = ( status ) => {
- const value = status !== null && status.value ?
- status.value :
- statusModel.REGISTRATION_STATUS_ID.APPROVED;
- this.props.setAttributes( { status: value } );
- };
-
- /**
- * Set limit for attendees to be shown in attributes.
- * @param {number} limit
- */
- setLimit = ( limit ) => {
- this.props.setAttributes( {
- limit: parseInt( limit, 10 ),
- } );
- };
-
- /**
- * Set the orderBy attribute
- * @param {string} orderBy
- */
- setOrderBy = ( orderBy ) => {
- this.props.setAttributes( { orderBy } );
- };
-
- /**
- * Set the order attribute
- * @param {string} order
- */
- setOrder = ( order ) => {
- this.props.setAttributes( { order } );
- };
-
- /**
- * Set the size for the gravatar displayed.
- * @param {number} size
- */
- setAvatarSize = ( size ) => {
- this.props.setAttributes( {
- avatarSize: parseInt( size, 10 ),
- } );
- };
-
- /**
- * Sets whether to show gravatar for attendees in attributes.
- * @param {boolean} showGravatar
- */
- toggleShowGravatar = ( showGravatar ) => {
- this.props.setAttributes( { showGravatar } );
- };
-
- /**
- * Sets whether to show block on archive pages in attributes.
- * @param {boolean} displayOnArchives
- */
- toggleDisplayOnArchives = ( displayOnArchives ) => {
- this.props.setAttributes( { displayOnArchives } );
- };
-
- /**
- * Retrieve the Attendees List component for the given attributes
- * @return {Component} What to display for the attendee display.
- */
- getAttendeesDisplay() {
- const { isLoading, attendees } = this.props;
- const {
- showGravatar,
- avatarSize,
- avatarClass,
- } = this.props.attributes;
-
- const avatarOptions = {
- avatarWidth: avatarSize,
- avatarHeight: avatarSize,
- avatarClass,
- };
-
- if ( isLoading ) {
- return (
-
-
-
- );
- }
-
- if ( isNewBlock( this.props.attributes ) &&
- attendees === DEFAULT_ARRAY
- ) {
- return (
-
- { __(
- 'To get started, select what event you want to show attendees from in the block settings.',
- 'event_espresso'
- ) }
-
- );
- }
-
- if ( ! isLoading && isEmpty( attendees ) ) {
- return (
-
- { __(
- 'There are no attendees for selected options.',
- 'event_espresso'
- ) }
-
- );
- }
- return ;
- }
-
- /**
- * This receives the array of attendees and applies the limit to it so that
- * only the set limit of attendees is returned from the beginning of the
- * array.
- * @param {Array} attendees
- * @return {Array} A new array of attendees with the applied limit
- */
- applyLimit( attendees ) {
- if ( attendees.length <= this.props.attributes.limit ) {
- return attendees;
- }
- return attendees.slice( 0, this.props.attributes.limit );
- }
-
- /**
- * Returns inspector controls for the block.
- *
- * @param {Object} attributes
- * @return {Component} The inspector controls component
- */
- getInspectorControls( attributes ) {
- const countAttendees = this.props.attendees.length || 0;
- return (
-
-
-
- { attributes.eventId !== 0 &&
-
- }
- { attributes.datetimeId !== 0 &&
-
- }
-
-
-
-
-
-
-
- { attributes.showGravatar &&
-
- }
-
-
-
-
-
-
-
- );
- }
-
- render() {
- return (
-
- { this.getAttendeesDisplay() }
- { this.getInspectorControls( this.props.attributes ) }
-
- );
- }
-}
-
-export default withSelect( ( select, ownProps ) => {
- const defaultProps = { ...EventAttendeesEditor.defaultProps.attributes };
- const {
- eventId = defaultProps.eventId,
- datetimeId = defaultProps.datetimeId,
- ticketId = defaultProps.ticketId,
- status = defaultProps.status,
- orderBy = defaultProps.orderBy,
- order = defaultProps.order,
- limit = defaultProps.limit,
- } = ownProps.attributes;
-
- // This ensures that we don't query unnecessarily since if the limit is
- // lower than a query we've already done, then we already have cached data
- // for this limit (and cache is still busted by any other query changes)
- highestRequestedLimit = ! limit ||
- isNaN( limit ) ||
- limit <= highestRequestedLimit ?
- highestRequestedLimit :
- limit;
-
- const queryData = {
- forEventId: eventId,
- forDatetimeId: datetimeId,
- forTicketId: ticketId,
- forStatusId: status,
- showGravatar: true,
- defaultWhereConditions: 'full_this_minimum_others',
- order,
- orderBy,
- limit: highestRequestedLimit,
- };
-
- const queryString = attendeeModel.getQueryString( queryData );
- const {
- getAttendees,
- isRequestingAttendees,
- } = select( 'eventespresso/lists' );
- return {
- ...EventAttendeesEditor.defaultProps,
- ...ownProps,
- attributes: {
- ...EventAttendeesEditor.defaultProps.attributes,
- ...ownProps.attributes,
- },
- attendees: isNewBlock( { eventId, datetimeId, ticketId } ) ?
- DEFAULT_ARRAY :
- getAttendees( queryString ),
- isLoading: isRequestingAttendees( queryString ),
- };
-} )( EventAttendeesEditor );
diff --git a/assets/src/blocks/event-attendees/index.js b/assets/src/blocks/event-attendees/index.js
deleted file mode 100644
index c8c08d6fafc..00000000000
--- a/assets/src/blocks/event-attendees/index.js
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * WordPress dependencies
- */
-import { registerBlockType } from '@wordpress/blocks';
-
-/**
- * External dependencies
- */
-import { __ } from '@eventespresso/i18n';
-
-/**
- * Internal dependencies
- */
-import EventAttendeesEditor from './edit';
-import './style.css';
-
-export const name = 'eventespresso/event-attendees';
-
-export const settings = {
-
- title: __( 'Event Attendees', 'event_espresso' ),
-
- description: __(
- 'Displays a list of people that have registered for the specified event',
- 'event_espresso',
- ),
-
- icon: 'groups',
-
- category: 'event-espresso',
-
- keywords: [
- __( 'event', 'event_espresso' ),
- __( 'attendees', 'event_espresso' ),
- __( 'list', 'event_espresso' ),
- ],
-
- attributes: {
- eventId: {
- type: 'number',
- default: 0,
- },
- datetimeId: {
- type: 'number',
- default: 0,
- },
- ticketId: {
- type: 'number',
- default: 0,
- },
- status: {
- type: 'string',
- default: 'RAP',
- },
- limit: {
- type: 'number',
- default: 100,
- },
- order: {
- type: 'string',
- default: 'ASC',
- },
- orderBy: {
- type: 'string',
- default: 'lastThenFirstName',
- },
- showGravatar: {
- type: 'boolean',
- default: false,
- },
- avatarClass: {
- type: 'string',
- default: 'contact',
- },
- avatarSize: {
- type: 'number',
- default: 24,
- },
- displayOnArchives: {
- type: 'boolean',
- default: false,
- },
- },
-
- edit: EventAttendeesEditor,
-
- save() {
- return null;
- },
-};
-
-registerBlockType( name, settings );
diff --git a/assets/src/blocks/event-attendees/style.css b/assets/src/blocks/event-attendees/style.css
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/assets/src/blocks/event-attendees/test/__snapshots__/index.js.snap b/assets/src/blocks/event-attendees/test/__snapshots__/index.js.snap
deleted file mode 100644
index 6de98593cdb..00000000000
--- a/assets/src/blocks/event-attendees/test/__snapshots__/index.js.snap
+++ /dev/null
@@ -1,388 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`EventAttendeesEditor Block block edit matches snapshot for no props 1`] = `
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-`;
-
-exports[`EventAttendeesEditor Block block edit matches snapshot with isLoading false and has attendees 1`] = `
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-`;
-
-exports[`EventAttendeesEditor Block block edit matches snapshot with isLoading false and no attendees 1`] = `
-
-
- There are no attendees for selected options.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-`;
diff --git a/assets/src/blocks/event-attendees/test/index.js b/assets/src/blocks/event-attendees/test/index.js
deleted file mode 100644
index d31ac111136..00000000000
--- a/assets/src/blocks/event-attendees/test/index.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * External dependencies
- */
-import { shallow } from 'enzyme';
-
-/**
- * Internal dependencies
- */
-import { EventAttendeesEditor } from '../edit';
-
-describe( 'EventAttendeesEditor Block', () => {
- test( 'block edit matches snapshot for no props', () => {
- const wrapper = shallow( );
- expect( wrapper ).toMatchSnapshot();
- } );
- test( 'block edit matches snapshot with isLoading false and ' +
- 'no attendees', () => {
- const wrapper = shallow( );
- expect( wrapper ).toMatchSnapshot();
- } );
- test( 'block edit matches snapshot with isLoading false ' +
- 'and has attendees', () => {
- const testProps = {
- isLoading: false,
- attendees: [ { ATT_ID: 10, ATT_fname: 'dude' } ],
- };
- const wrapper = shallow( );
- expect( wrapper ).toMatchSnapshot();
- } );
-} );
diff --git a/assets/src/blocks/index-frontend.js b/assets/src/blocks/index-frontend.js
deleted file mode 100644
index 5c489fde1a0..00000000000
--- a/assets/src/blocks/index-frontend.js
+++ /dev/null
@@ -1,3 +0,0 @@
-// So we get a frontend stylesheet built
-import './event-attendees/style.css';
-import '../components/event-attendees/style.css';
diff --git a/assets/src/blocks/index.js b/assets/src/blocks/index.js
deleted file mode 100644
index a83d0376eb0..00000000000
--- a/assets/src/blocks/index.js
+++ /dev/null
@@ -1 +0,0 @@
-import './event-attendees';
diff --git a/assets/src/components/event-attendees/attendee-list-item.js b/assets/src/components/event-attendees/attendee-list-item.js
deleted file mode 100644
index c4a2b100f32..00000000000
--- a/assets/src/components/event-attendees/attendee-list-item.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * External imports
- */
-import { isModelEntityOfModel } from '@eventespresso/validators';
-import warning from 'warning';
-import { Fragment } from '@wordpress/element';
-
-/**
- * Internal imports
- */
-import { AvatarImage } from '../ui/image';
-
-const AttendeeListItem = ( {
- isLoading,
- attendee,
- showGravatar,
- avatarOptions = {},
-} ) => {
- function getAvatarUrl() {
- const url = attendee.hasCalculatedField( 'userAvatar' ) ?
- attendee.userAvatar :
- '';
- return url === '' && avatarOptions.avatarUrl ?
- avatarOptions.avatarUrl :
- url;
- }
-
- function getAttendeeName() {
- return attendee.fname + ' ' + attendee.lname;
- }
-
- function getAvatar() {
- const url = getAvatarUrl();
- if ( ! isLoading && showGravatar && url === '' ) {
- warning(
- false,
- 'showGravatar is true but there is no avatar url included ' +
- 'with either the attendee entity or the avatarOptions prop'
- );
- }
- return showGravatar ?
- :
- null;
- }
-
- if ( ! isModelEntityOfModel( attendee, 'attendee' ) ) {
- warning(
- false,
- 'The EventAttendee component expects an attendee model entity.'
- );
- return null;
- }
-
- return (
-
- { getAvatar() }{ getAttendeeName() }
-
- );
-};
-export default AttendeeListItem;
diff --git a/assets/src/components/event-attendees/index.js b/assets/src/components/event-attendees/index.js
deleted file mode 100644
index edb5f4d1252..00000000000
--- a/assets/src/components/event-attendees/index.js
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * External dependencies
- */
-import { Component } from '@wordpress/element';
-import PropTypes from 'prop-types';
-import { isEmpty } from 'lodash';
-import classNames from 'classnames';
-
-/**
- * Internal Imports
- */
-import AttendeeListItem from './attendee-list-item';
-import './style.css';
-
-export default class EventAttendeeList extends Component {
- static propTypes = {
- isLoading: PropTypes.bool,
- attendees: PropTypes.array,
- showGravatar: PropTypes.bool,
- containerCssClass: PropTypes.string,
- containerId: PropTypes.string,
- };
-
- static defaultProps = {
- attendees: [],
- showGravatar: false,
- containerCssClass: '',
- containerId: 'event-attendees-list',
- isLoading: false,
- };
-
- getAttendeeList() {
- const { attendees, showGravatar, isLoading } = this.props;
- if ( isEmpty( attendees ) ) {
- return null;
- }
- const listItems = attendees.map(
- ( attendee ) => {
- if ( attendee.id ) {
- return ;
- }
- return null;
- }
- );
- return (
-
- );
- }
-
- render() {
- const { containerCssClass, containerId } = this.props;
- return (
-
- { this.getAttendeeList() }
-
- );
- }
-}
diff --git a/assets/src/components/event-attendees/style.css b/assets/src/components/event-attendees/style.css
deleted file mode 100644
index 8a52d92a1fd..00000000000
--- a/assets/src/components/event-attendees/style.css
+++ /dev/null
@@ -1,17 +0,0 @@
-#ee-block-event-attendees.event-attendees ul {
- list-style-type: none;
-}
-
-#ee-block-event-attendees .contact-image-wrap-div {
- display: inline-block;
-}
-
-/** account for this current problem in WP 5.0 beta: https://core.trac.wordpress.org/ticket/45290 **/
-#ee-block-event-attendees p {
- display: inline-block;
-}
-
-#ee-block-event-attendees .contact-avatar-img {
- margin: .25em 1em .25em 0;
- vertical-align: middle;
-}
diff --git a/assets/src/components/form/index.js b/assets/src/components/form/index.js
deleted file mode 100644
index 9f8ccaddf53..00000000000
--- a/assets/src/components/form/index.js
+++ /dev/null
@@ -1 +0,0 @@
-export * from './model';
diff --git a/assets/src/components/form/model/base/build-options.js b/assets/src/components/form/model/base/build-options.js
deleted file mode 100644
index beecc8b6cda..00000000000
--- a/assets/src/components/form/model/base/build-options.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * External dependencies
- */
-import {
- isEmpty,
- isFunction,
- isUndefined,
- reduce,
- isArray,
- isMap,
-} from 'lodash';
-import warning from 'warning';
-
-/**
- * Receives an array|Object|Map of event entities and returns an array of simple
- * objects that can be passed along to the options array used for a
- * SelectControl component
- *
- * @param { Map|Object|Array } entities
- * @param { Object } optionsEntityMap Object of key value pairs where values
- * are the 'label:value' pairings used to populate the Select input.
- * @param { string } mapSelection Determines which optionEntityMap pairing to
- * use.
- * @return { Array } Returns an array of simple objects formatted for any
- * select control that receives its options in the format of an array of objects
- * with label and value keys.
- */
-const buildOptions = (
- entities,
- optionsEntityMap,
- mapSelection = 'default',
-) => {
- if ( isEmpty( entities ) ) {
- return [];
- }
- entities = isMap( entities ) ? Array.from( entities.values() ) : entities;
- if ( isEmpty( optionsEntityMap ) ) {
- warning(
- false,
- 'A valid optionsEntityMap must be supplied ' +
- 'in order to build options for a ModelSelect component',
- optionsEntityMap,
- );
- return [];
- }
- if ( isUndefined( optionsEntityMap[ mapSelection ] ) ) {
- warning(
- false,
- 'A valid optionsEntityMap[ mapSelection ] must be supplied ' +
- 'in order to build options for a ModelSelect component',
- optionsEntityMap,
- mapSelection,
- );
- return [];
- }
- // if requested mapSelection exists then use that
- let map = optionsEntityMap[ mapSelection ];
-
- // if map is function then simply pass through entities to that function
- if ( isFunction( map ) ) {
- const options = map( entities );
- if ( isArray( options ) ) {
- return options;
- }
- // set map to empty object because the function on it returned something
- // other than an array
- map = {};
- warning(
- false,
- 'The optionsEntityMap for ' + mapSelection + 'was a function but' +
- ' it did not return an array of options. Make sure the function' +
- ' returns an array of simple objects with label and value keys.',
- );
- }
- if ( isEmpty( map ) ) {
- return [];
- }
- const reducerCallback = ( options, entity ) => {
- const label = isFunction( map.label ) ?
- map.label( entity ) :
- entity[ map.label ];
- const value = isFunction( map.value ) ?
- map.value( entity ) :
- entity[ map.value ];
- if ( label && value ) {
- options.push( { label, value } );
- }
- return options;
- };
- return ! isArray( entities ) ?
- entities.reduce( reducerCallback, [] ) :
- reduce( entities, reducerCallback, [] );
-};
-
-export default buildOptions;
diff --git a/assets/src/components/form/model/base/create-model-select.js b/assets/src/components/form/model/base/create-model-select.js
deleted file mode 100644
index c73aea10a3a..00000000000
--- a/assets/src/components/form/model/base/create-model-select.js
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * External imports
- */
-import { Component } from '@wordpress/element';
-
-/**
- * Internal imports
- */
-import ModelSelect from './model-select';
-import { modelSelectName } from './utils';
-import PropTypes from 'prop-types';
-
-const defaultPropTypes = {
- selected: PropTypes.oneOfType( [
- PropTypes.number,
- PropTypes.string,
- ] ),
- onSelect: PropTypes.func,
- label: PropTypes.string,
-};
-
-/**
- * Creates a Model Select component using the given arguments.
- *
- * @param {string} modelName
- * @param {Object} defaultProps
- * @param {Object} propTypes
- * @return {ModelSelectComponent} A model select component.
- */
-const createModelSelect = ( modelName, defaultProps = {}, propTypes = {} ) => {
- class ModelSelectComponent extends Component {
- /**
- * @type {string}
- */
- static modelName = modelName;
-
- /**
- * @type {Object}
- */
- static defaultProps = defaultProps;
-
- /**
- * @type {Object}
- */
- static propTypes = {
- ...defaultPropTypes,
- ...propTypes,
- };
-
- render() {
- const { selected, onSelect } = this.props;
- let { queryData } = this.props;
- const selectOptions = {
- selectConfiguration: {
- defaultValue: selected,
- onChange: onSelect,
- ...this.props.selectConfiguration,
- },
- };
-
- if ( defaultProps.queryData && queryData ) {
- queryData = {
- ...defaultProps.queryData,
- ...queryData,
- };
- }
-
- const props = {
- ...this.props,
- ...selectOptions,
- queryData,
- modelName: this.constructor.modelName,
- };
- return ;
- }
- }
- ModelSelectComponent.displayName = modelSelectName( modelName );
- return ModelSelectComponent;
-};
-
-export default createModelSelect;
diff --git a/assets/src/components/form/model/base/default-select-configuration.js b/assets/src/components/form/model/base/default-select-configuration.js
deleted file mode 100644
index aafbf44e1c4..00000000000
--- a/assets/src/components/form/model/base/default-select-configuration.js
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * External imports
- */
-import PropTypes from 'prop-types';
-import { __ } from '@eventespresso/i18n';
-
-export const REACT_SELECT_TYPES = {
- 'aria-describedby': PropTypes.string,
- 'aria-label': PropTypes.string,
- 'aria-labelledby': PropTypes.string,
- autoFocus: PropTypes.bool,
- backspaceRemovesValue: PropTypes.bool,
- blurInputOnSelect: PropTypes.bool,
- captureMenuScroll: PropTypes.bool,
- className: PropTypes.string,
- classNamePrefix: PropTypes.string,
- closeMenuOnSelect: PropTypes.bool,
- components: PropTypes.object,
- controlShouldRenderValue: PropTypes.bool,
- delimiter: PropTypes.string,
- escapeClearsValue: PropTypes.bool,
- filterOption: PropTypes.func,
- formatGroupLabel: PropTypes.func,
- formatOptionLabel: PropTypes.func,
- getOptionLabel: PropTypes.func,
- getOptionValue: PropTypes.func,
- hideSelectedOptions: PropTypes.bool,
- id: PropTypes.string,
- inputValue: PropTypes.string,
- inputId: PropTypes.string,
- instanceId: PropTypes.oneOfType( [
- PropTypes.number,
- PropTypes.string,
- ] ),
- isClearable: PropTypes.bool,
- isDisabled: PropTypes.bool,
- isLoading: PropTypes.bool,
- isOptionDisabled: PropTypes.func,
- isOptionSelected: PropTypes.func,
- isMulti: PropTypes.bool,
- isSearchable: PropTypes.bool,
- loadingMessage: PropTypes.func,
- minMenuHeight: PropTypes.number,
- maxMenuHeight: PropTypes.number,
- menuIsOpen: PropTypes.bool,
- menuPlacement: PropTypes.oneOf( [
- 'auto',
- 'bottom',
- 'top',
- ] ),
- menuPosition: PropTypes.oneOf( [
- 'absolute',
- 'fixed',
- ] ),
- menuPortalTarget: PropTypes.element,
- menuShouldBlockScroll: PropTypes.bool,
- menuShouldScrollIntoView: PropTypes.bool,
- name: PropTypes.string,
- noOptionsMessage: PropTypes.func,
- onBlur: PropTypes.func,
- onChange: PropTypes.func,
- onFocus: PropTypes.func,
- onInputChange: PropTypes.func,
- onKeyDown: PropTypes.func,
- onMenuOpen: PropTypes.func,
- onMenuClose: PropTypes.func,
- onMenuScrollToTop: PropTypes.func,
- onMenuScrollToBottom: PropTypes.func,
- openMenuOnFocus: PropTypes.bool,
- openMenuOnClick: PropTypes.bool,
- options: PropTypes.array,
- pageSize: PropTypes.number,
- placeholder: PropTypes.string,
- screenReaderStatus: PropTypes.func,
- styles: PropTypes.shape( {
- clearIndicator: PropTypes.func,
- container: PropTypes.func,
- control: PropTypes.func,
- dropdownIndicator: PropTypes.func,
- group: PropTypes.func,
- groupHeading: PropTypes.func,
- indicatorsContainer: PropTypes.func,
- indicatorSeparator: PropTypes.func,
- input: PropTypes.func,
- loadingIndicator: PropTypes.func,
- loadingMessageCSS: PropTypes.func,
- menu: PropTypes.func,
- menuList: PropTypes.func,
- menuPortal: PropTypes.func,
- multiValue: PropTypes.func,
- multiValueLabel: PropTypes.func,
- multiValueRemove: PropTypes.func,
- noOptionsMessageCSS: PropTypes.func,
- option: PropTypes.func,
- placeholder: PropTypes.func,
- singleValue: PropTypes.func,
- valueContainer: PropTypes.func,
- } ),
- tabIndex: PropTypes.string,
- tabSelectsValue: PropTypes.bool,
- value: PropTypes.oneOfType( [
- PropTypes.object,
- PropTypes.array,
- ] ),
-};
-
-export const REACT_SELECT_DEFAULTS = {
- isClearable: true,
- isLoading: true,
- placeholder: __( 'Select...', 'event_espresso' ),
-};
diff --git a/assets/src/components/form/model/base/model-select.js b/assets/src/components/form/model/base/model-select.js
deleted file mode 100644
index eea1045501d..00000000000
--- a/assets/src/components/form/model/base/model-select.js
+++ /dev/null
@@ -1,263 +0,0 @@
-/**
- * External imports
- */
-import Select from 'react-select';
-import { Component, Fragment } from '@wordpress/element';
-import { isEmpty, uniqueId, find, isUndefined, isFunction, isMap } from 'lodash';
-import PropTypes from 'prop-types';
-import isShallowEqual from '@wordpress/is-shallow-equal';
-
-/**
- * WP dependencies
- */
-import { withSelect } from '@wordpress/data';
-
-/**
- * Internal imports
- */
-import buildOptions from './build-options';
-import { MODEL_NAMES } from '../../../../data/model/index';
-import {
- REACT_SELECT_DEFAULTS,
- REACT_SELECT_TYPES,
-} from './default-select-configuration';
-import {
- ALLOWED_ORDER_VALUES,
- QUERY_ORDER_DESC,
-} from '../../../../data/model/base';
-
-/**
- * ModelSelect component.
- * This is a component that will generate a react-select input for a given
- * model and its entities (provided via props).
- *
- * @see https://deploy-preview-2289--react-select.netlify.com/props#prop-types
- * for options that can be passed through via the selectConfiguration prop.
- *
- * @param { Object } selectConfiguration An object containing options for the
- * react-select component.
- * @param { Array } modelEntities Array of model entities
- * @param { string } modelName The name of the Model the entities
- * belong to.
- * @param { function } mapOptionsCallback This function will receive by default
- * the modelEntities and optionsEntityMap,
- * and is expected to return an array of options
- * to be used for the react-select component.
- * @param { Object } optionsEntityMap Object of key value pairs where values are the
- * 'label:value' pairings used by `mapOptionsCallback`
- * @param { string } mapSelection Determines which optionEntityMap pairing to use
- */
-export class ModelSelect extends Component {
- state = {};
-
- static propTypes = {
- selectConfiguration: PropTypes.shape( {
- ...REACT_SELECT_TYPES,
- } ),
- modelEntities: PropTypes.array,
- modelName: PropTypes.oneOf( MODEL_NAMES ).isRequired,
- mapOptionsCallback: PropTypes.func,
- optionsEntityMap: PropTypes.object,
- mapSelection: PropTypes.string,
- queryData: PropTypes.shape( {
- limit: PropTypes.number,
- orderBy: PropTypes.string,
- order: PropTypes.oneOf( ALLOWED_ORDER_VALUES ),
- } ),
- getQueryString: PropTypes.func,
- label: PropTypes.string,
- };
-
- static defaultProps = {
- selectConfiguration: {
- ...REACT_SELECT_DEFAULTS,
- name: uniqueId( 'model-select-' ),
- },
- modelEntities: [],
- mapOptionsCallback: buildOptions,
- mapSelection: 'default',
- queryData: {
- limit: 100,
- order: QUERY_ORDER_DESC,
- },
- label: '',
- getQueryString: () => '',
- };
-
- constructor( props ) {
- super( props );
- this.state = ModelSelect.setStateFromProps( props );
- }
-
- /**
- * Sets the state from provided props
- * @param {Object} props
- * @return {{
- * isClearable,
- * isLoading,
- * placeholder,
- * options: (*|Array),
- * value: *
- * }}
- * Object to replace state.
- */
- static setStateFromProps( props ) {
- const { selectConfiguration } = props;
- const options = ModelSelect.getOptions( props );
- const selectedValue = ModelSelect.getOptionObjectForValue(
- selectConfiguration.defaultValue, options
- );
- const updated = {
- options,
- value: selectedValue,
- };
-
- return {
- ...REACT_SELECT_DEFAULTS,
- ...selectConfiguration,
- ...updated,
- };
- }
-
- /**
- * Sets up options for the select control from the incoming props.
- * @param {Object} props
- * @return {Array