@purchasely/cordova-plugin-purchasely 6.0.0 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Package.swift +77 -0
- package/package.json +11 -2
- package/plugin.xml +4 -4
- package/src/ios/CDVPurchasely.m +22 -4
- package/www/Purchasely.js +1 -1
- package/__tests__/Purchasely.test.js +0 -1826
- package/example/IOS_8_1_1_TEST_MATRIX.md +0 -25
- package/example/android.sh +0 -10
- package/example/config.xml +0 -27
- package/example/e2e/README.md +0 -44
- package/example/e2e/helpers/driver.js +0 -187
- package/example/e2e/package.json +0 -19
- package/example/e2e/specs/bridge.e2e.js +0 -154
- package/example/e2e/specs/dismiss.e2e.js +0 -57
- package/example/e2e/tools/ci_run_e2e.sh +0 -63
- package/example/e2e/tools/ci_run_e2e_ios.sh +0 -56
- package/example/e2e/wdio.android.conf.js +0 -24
- package/example/e2e/wdio.ios.conf.js +0 -44
- package/example/e2e/wdio.shared.conf.js +0 -28
- package/example/ios.sh +0 -17
- package/example/package-lock.json +0 -859
- package/example/package.json +0 -37
- package/example/www/css/index.css +0 -110
- package/example/www/img/logo.png +0 -0
- package/example/www/index.html +0 -78
- package/example/www/js/index.js +0 -453
- package/purchasely.iml +0 -11
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
const { config } = require('./wdio.shared.conf');
|
|
3
|
-
|
|
4
|
-
// Path to the debug apk built by `cordova build android`.
|
|
5
|
-
const APK = process.env.PURCHASELY_E2E_APK ||
|
|
6
|
-
path.resolve(__dirname, '../platforms/android/app/build/outputs/apk/debug/app-debug.apk');
|
|
7
|
-
|
|
8
|
-
exports.config = Object.assign({}, config, {
|
|
9
|
-
capabilities: [{
|
|
10
|
-
platformName: 'Android',
|
|
11
|
-
'appium:automationName': 'UiAutomator2',
|
|
12
|
-
'appium:app': APK,
|
|
13
|
-
'appium:appPackage': 'com.purchasely.demo',
|
|
14
|
-
// Pin the target device when several are attached (env override); CI has a
|
|
15
|
-
// single emulator so this is normally undefined.
|
|
16
|
-
'appium:udid': process.env.PURCHASELY_E2E_UDID || undefined,
|
|
17
|
-
'appium:newCommandTimeout': 240,
|
|
18
|
-
'appium:autoGrantPermissions': true,
|
|
19
|
-
// The Cordova WebView is debuggable in the debug build, so Appium can attach
|
|
20
|
-
// chromedriver and expose the WEBVIEW context.
|
|
21
|
-
'appium:ensureWebviewsHavePages': true,
|
|
22
|
-
'appium:nativeWebScreenshot': true,
|
|
23
|
-
}],
|
|
24
|
-
});
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
const fs = require('fs');
|
|
3
|
-
const os = require('os');
|
|
4
|
-
const { config } = require('./wdio.shared.conf');
|
|
5
|
-
|
|
6
|
-
// Path to the .app built by `cordova build ios --emulator` (simulator build).
|
|
7
|
-
// cordova-ios 8.x emits it under build/Debug-iphonesimulator; older cordova-ios
|
|
8
|
-
// used build/emulator. Prefer whichever exists so the suite survives toolchain bumps.
|
|
9
|
-
const APP_CANDIDATES = [
|
|
10
|
-
'../platforms/ios/build/Debug-iphonesimulator/HelloCordova.app',
|
|
11
|
-
'../platforms/ios/build/emulator/HelloCordova.app',
|
|
12
|
-
].map((p) => path.resolve(__dirname, p));
|
|
13
|
-
const APP = process.env.PURCHASELY_E2E_APP ||
|
|
14
|
-
APP_CANDIDATES.find((p) => fs.existsSync(p)) ||
|
|
15
|
-
APP_CANDIDATES[0];
|
|
16
|
-
|
|
17
|
-
exports.config = Object.assign({}, config, {
|
|
18
|
-
capabilities: [{
|
|
19
|
-
platformName: 'iOS',
|
|
20
|
-
'appium:automationName': 'XCUITest',
|
|
21
|
-
'appium:app': APP,
|
|
22
|
-
'appium:bundleId': 'com.purchasely.demo',
|
|
23
|
-
'appium:deviceName': process.env.PURCHASELY_E2E_SIM || 'iPhone 16',
|
|
24
|
-
// Pin an already-booted simulator when provided (CI boots one and exports its udid).
|
|
25
|
-
'appium:udid': process.env.PURCHASELY_E2E_UDID || undefined,
|
|
26
|
-
'appium:platformVersion': process.env.PURCHASELY_E2E_IOS_VERSION || undefined,
|
|
27
|
-
'appium:newCommandTimeout': 240,
|
|
28
|
-
'appium:autoAcceptAlerts': true,
|
|
29
|
-
// WebDriverAgent's FIRST build on a cold CI runner can take several minutes; even 240s
|
|
30
|
-
// wasn't enough ("Unable to start WebDriverAgent ... after 240000ms"), so the first spec
|
|
31
|
-
// burned all its retries before WDA finished building. Give one attempt a long window to
|
|
32
|
-
// build WDA, then reuse it (useNewWDA:false) — later specs start in a few seconds.
|
|
33
|
-
'appium:wdaLaunchTimeout': 600000,
|
|
34
|
-
'appium:wdaConnectionTimeout': 600000,
|
|
35
|
-
'appium:wdaStartupRetries': 1,
|
|
36
|
-
'appium:wdaStartupRetryInterval': 20000,
|
|
37
|
-
'appium:useNewWDA': false,
|
|
38
|
-
// Build WebDriverAgent into a FIXED DerivedData dir so it is compiled once and reused
|
|
39
|
-
// across spec retries. Without it appium uses a fresh temp dir per session, so WDA is
|
|
40
|
-
// rebuilt from scratch every attempt and the hard-gate bridge spec times out before the
|
|
41
|
-
// (slow, cold) build ever finishes.
|
|
42
|
-
'appium:derivedDataPath': path.join(os.tmpdir(), 'ply-wda-derived'),
|
|
43
|
-
}],
|
|
44
|
-
});
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// Shared WebdriverIO config for the Purchasely Cordova E2E suite.
|
|
2
|
-
// Platform-specific configs (wdio.android.conf.js / wdio.ios.conf.js) extend this
|
|
3
|
-
// and set `capabilities`.
|
|
4
|
-
//
|
|
5
|
-
// The example app boots the Purchasely SDK on `deviceready` (see www/js/index.js).
|
|
6
|
-
// Tests switch to the WEBVIEW context and call `window.Purchasely.*` directly, and
|
|
7
|
-
// switch to NATIVE_APP to inject OS-level touches for the interceptor / dismiss suites.
|
|
8
|
-
exports.config = {
|
|
9
|
-
runner: 'local',
|
|
10
|
-
specs: ['./specs/**/*.e2e.js'],
|
|
11
|
-
maxInstances: 1,
|
|
12
|
-
logLevel: 'info',
|
|
13
|
-
bail: 0,
|
|
14
|
-
waitforTimeout: 20000,
|
|
15
|
-
connectionRetryTimeout: 120000,
|
|
16
|
-
connectionRetryCount: 2,
|
|
17
|
-
framework: 'mocha',
|
|
18
|
-
reporters: ['spec'],
|
|
19
|
-
mochaOpts: {
|
|
20
|
-
ui: 'bdd',
|
|
21
|
-
timeout: 120000,
|
|
22
|
-
},
|
|
23
|
-
// Appium is started as a service by the CI runner scripts (tools/ci_run_e2e*.sh),
|
|
24
|
-
// so we point WDIO at the already-running server rather than the @wdio/appium-service.
|
|
25
|
-
hostname: '127.0.0.1',
|
|
26
|
-
port: 4723,
|
|
27
|
-
path: '/',
|
|
28
|
-
};
|
package/example/ios.sh
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
npm ci
|
|
4
|
-
cordova plugin remove @purchasely/cordova-plugin-purchasely --nosave
|
|
5
|
-
cordova platform remove ios --nosave
|
|
6
|
-
cordova platform add ios@8.1.1 --nosave
|
|
7
|
-
cordova plugin add ../ --link --nosave
|
|
8
|
-
|
|
9
|
-
if [[ $1 = true ]]
|
|
10
|
-
then
|
|
11
|
-
echo "Remove podfile"
|
|
12
|
-
rm platforms/ios/Podfile.lock
|
|
13
|
-
echo "Pod repo update"
|
|
14
|
-
pod repo update
|
|
15
|
-
echo "Installing Purchasely SDK"
|
|
16
|
-
pod install --project-directory=platforms/ios
|
|
17
|
-
fi
|