Skip to content

Commit 2aa53be

Browse files
authored
Merge pull request #942 from Kit/tests-fix-intercom-detection
Tests: Fix Intercom Detection
2 parents 795cb04 + 1c56bb7 commit 2aa53be

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/coding-standards.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,5 @@ jobs:
146146
# Run PHPStan for static analysis.
147147
- name: Run PHPStan Static Analysis
148148
working-directory: ${{ env.PLUGIN_DIR }}
149+
if: ${{ matrix.php-versions == '8.0' || matrix.php-versions == '8.1' || matrix.php-versions == '8.2' || matrix.php-versions == '8.3' || matrix.php-versions == '8.4' }}
149150
run: php vendor/bin/phpstan analyse --memory-limit=1250M

tests/EndToEnd/general/plugin-screens/PluginIntercomCest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,11 @@ public function testIntercomDisplaysOnSetupWizardScreens(EndToEndTester $I)
118118
*/
119119
private function _seeIntercomScript(EndToEndTester $I)
120120
{
121-
$I->waitForElementVisible('.intercom-lightweight-app-launcher-icon');
122-
$I->click('.intercom-lightweight-app-launcher-icon');
123-
$I->waitForElementVisible('iframe[data-intercom-frame="true"]');
121+
$I->seeInSource("const KIT_INTERCOM_APP_ID = 'e4n3xtxz';");
122+
$I->seeInSource('window.intercomSettings = {');
123+
$I->seeInSource("api_base: 'https://api-iam.intercom.io',");
124+
$I->seeInSource('app_id: KIT_INTERCOM_APP_ID');
125+
$I->seeInSource('(function(){var w=window;var ic=w.Intercom;');
124126
}
125127

126128
/**

0 commit comments

Comments
 (0)