Skip to content

Commit

Permalink
add 10.1 to test matrix and fix failures
Browse files Browse the repository at this point in the history
  • Loading branch information
jitendrapurohit committed Dec 17, 2023
1 parent 16dfe86 commit 2c664f6
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 20 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
- drupal: '9.5.*'
civicrm: '5.66.*'
php: '7.4'
- drupal: '10.0.*'
- drupal: '10.2.*'
civicrm: '5.69.x-dev'
php: '8.1'
- drupal: '10.0.*'
- drupal: '10.2.*'
civicrm: 'dev-master'
php: '8.1'
name: Drupal ${{ matrix.drupal }} | CiviCRM ${{ matrix.civicrm }}
Expand Down Expand Up @@ -100,12 +100,12 @@ jobs:
cd ~/drupal
COMPOSER_MEMORY_LIMIT=-1 composer require civicrm/civicrm-asset-plugin:'~1.1' civicrm/civicrm-{core,packages,drupal-8}:${{ matrix.civicrm }} -W
- name: Ensure Webform ^6.2
if: ${{ matrix.drupal == '10.0.*' }}
if: ${{ matrix.drupal == '10.2.*' }}
run: |
cd ~/drupal
COMPOSER_MEMORY_LIMIT=-1 composer require 'drupal/webform:^6.2@beta'
- name: Ensure Webform ^6.0
if: ${{ matrix.drupal != '10.0.*' }}
if: ${{ matrix.drupal != '10.2.*' }}
run: |
cd ~/drupal
#COMPOSER_MEMORY_LIMIT=-1 composer require cweagans/composer-patches
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:
chmod +w web/sites/default
/home/runner/civicrm-cv/cv core:install --cms-base-url=http://civi.localhost
- name: Download Civi extensions from git
if: ${{ matrix.drupal == '10.0.*' }}
if: ${{ matrix.drupal == '10.2.*' }}
run: |
mkdir -p ~/drupal/web/sites/default/files/civicrm/ext
cd ~/drupal/web/sites/default/files/civicrm/ext
Expand All @@ -164,7 +164,7 @@ jobs:
git clone https://lab.civicrm.org/extensions/stripe.git
git clone https://github.com/iATSPayments/com.iatspayments.civicrm.git
- name: Download Civi extensions normal
if: ${{ matrix.drupal != '10.0.*' }}
if: ${{ matrix.drupal != '10.2.*' }}
run: |
mkdir -p ~/drupal/web/sites/default/files/civicrm/ext
cd ~/drupal/web/sites/default/files/civicrm/ext
Expand Down
1 change: 0 additions & 1 deletion tests/src/FunctionalJavascript/ActivitySubmissionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ private function addActivityFields($num = 1, $select_activity = FALSE) {
$this->enableCivicrmOnWebform();

$this->getSession()->getPage()->selectFieldOption('number_of_contacts', $num);
$this->assertSession()->assertWaitOnAjaxRequest();
$this->htmlOutput();

$this->getSession()->getPage()->clickLink('Activities');
Expand Down
3 changes: 3 additions & 0 deletions tests/src/FunctionalJavascript/AttachmentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ final class AttachmentTest extends WebformCivicrmTestBase {
'file',
];

private $_cg = [];
private $_cf = [];

protected function setUp(): void {
parent::setUp();
$this->cleanupFiles();
Expand Down
3 changes: 0 additions & 3 deletions tests/src/FunctionalJavascript/ContactRelationshipTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public function testRelationshipRemoval() {
$this->enableCivicrmOnWebform();

$this->getSession()->getPage()->selectFieldOption('number_of_contacts', 2);
$this->assertSession()->assertWaitOnAjaxRequest();
$this->htmlOutput();

$this->getSession()->getPage()->clickLink('2. Contact 2');
Expand Down Expand Up @@ -171,7 +170,6 @@ public function testSubmitWebform() {
$this->enableCivicrmOnWebform();

$this->getSession()->getPage()->selectFieldOption('number_of_contacts', 2);
$this->assertSession()->assertWaitOnAjaxRequest();
$this->htmlOutput();

// Configuring Contact 1 - Student
Expand Down Expand Up @@ -335,7 +333,6 @@ function testSubTypeRelationship() {
$this->htmlOutput();
foreach ([1, 2, 3] as $c) {
$this->getSession()->getPage()->clickLink("Contact {$c}");
$this->assertSession()->assertWaitOnAjaxRequest();
$this->getSession()->getPage()->selectFieldOption("{$c}_contact_type", 'Organization');
$this->assertSession()->assertWaitOnAjaxRequest();

Expand Down
2 changes: 0 additions & 2 deletions tests/src/FunctionalJavascript/ContactSubmissionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ public function testDraftSubmission() {
$this->htmlOutput();
$this->getSession()->getPage()->selectFieldOption("draft", 'authenticated');
$this->getSession()->getPage()->pressButton('Save');
$this->assertSession()->assertWaitOnAjaxRequest();

$this->drupalGet($this->webform->toUrl('canonical'));
$this->assertPageNoErrorMessages();
Expand Down Expand Up @@ -479,7 +478,6 @@ public function testSubmitWebform($contact_type, array $contact_values) {
foreach ($field_value as $key => $value) {
$selector = "civicrm_1_contact_1_{$entity_type}_{$key}";
$this->addFieldValue($selector, $value);
$this->assertSession()->assertWaitOnAjaxRequest();
}
}
else {
Expand Down
4 changes: 3 additions & 1 deletion tests/src/FunctionalJavascript/ContributionPayLaterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Civi\Api4\Contribution;
use Drupal\Core\Url;
use Drupal\webform\Entity\Webform;

/**
* Tests submitting a Webform with CiviCRM: Contribution with Pay later
Expand All @@ -13,6 +12,9 @@
*/
final class ContributionPayLaterTest extends WebformCivicrmTestBase {

private $_customGroup = [];
private $_customFields = [];

public function testReceiptParams() {
$this->drupalLogin($this->rootUser);
$this->redirectEmailsToDB();
Expand Down
3 changes: 2 additions & 1 deletion tests/src/FunctionalJavascript/EventTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Drupal\Tests\webform_civicrm\FunctionalJavascript;

use Drupal\Core\Url;
use Drupal\FunctionalJavascriptTests\DrupalSelenium2Driver;

/**
* Tests submitting a Webform with CiviCRM: Contact with Event.
Expand All @@ -12,6 +11,8 @@
*/
final class EventTest extends WebformCivicrmTestBase {

private $_customFields = [];

protected function setUp(): void {
parent::setUp();
$this->ft = $this->utils->wf_civicrm_api('FinancialType', 'get', [
Expand Down
8 changes: 3 additions & 5 deletions tests/src/FunctionalJavascript/GroupsTagsSubmissionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
*/
final class GroupsTagsSubmissionTest extends WebformCivicrmTestBase {

private $groups = [];
private $tags = [];

/**
* {@inheritdoc}
*/
Expand Down Expand Up @@ -185,11 +188,6 @@ public function testSubmitWebform() {
$this->assertSession()->pageTextContains('New submission added to CiviCRM Webform Test.');

$contactID = $this->utils->wf_civicrm_api('Contact', 'get', $params)['id'];
$contactVal = $this->utils->wf_civicrm_api('Contact', 'get', [
'sequential' => 1,
'return' => ["tag", "group"],
'contact_id' => $contactID,
]);
$contact = $this->utils->wf_civicrm_api('Contact', 'get', [
'sequential' => 1,
'return' => ["tag", "group"],
Expand Down
1 change: 0 additions & 1 deletion tests/src/FunctionalJavascript/WebformCivicrmTestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,6 @@ public function enableCivicrmOnWebform() {
$this->htmlOutput();
$this->getSession()->getPage()->checkField('nid');
$this->getSession()->getPage()->selectFieldOption('1_contact_type', 'individual');
$this->assertSession()->assertWaitOnAjaxRequest();
}

/**
Expand Down

0 comments on commit 2c664f6

Please sign in to comment.