-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
travis e2e tests: organic install, inapp, deeplink
travis e2e tests: organic install, inapp, deeplink
- Loading branch information
Showing
6 changed files
with
133 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,53 @@ | ||
describe('React-Native AppsFlyer Plugin', () => { | ||
jestExpect = require('expect'); | ||
const deepLinkData = '{"status":"success","type":"onAppOpenAttribution","data":{"c":"firstCampign","campaign":"firstCampign","af_dp":"rnoaoaautomation://","link":"https://rnautomated.onelink.me/lraA/mySMScampign","deep_link_value":"OAOA","media_source":"SMS","af_sub1":"lala","pid":"SMS"}}'; | ||
describe('Organic install', () => { | ||
beforeAll(async () => { | ||
await device.launchApp(); | ||
}); | ||
|
||
beforeEach(async () => { | ||
// await device.reloadReactNative(); | ||
// await device.launchApp(); | ||
}); | ||
|
||
afterAll(async () => { | ||
afterEach(async () => { | ||
// await device.terminateApp(); | ||
}); | ||
|
||
it('initSdk should return Success', async () => { | ||
await expect(element(by.id('successInitButton'))).toBeVisible(); | ||
await element(by.id('successInitButton')).tap(); | ||
await expect(element(by.id('successInitResult'))).toHaveText('Success'); | ||
afterAll(async () => { | ||
await device.terminateApp(); | ||
await device.uninstallApp(); | ||
}); | ||
|
||
it('initSdk should return \'No \'devKey\' found or its empty\'', async () => { | ||
await expect(element(by.id('noDevKeyButton'))).toBeVisible(); | ||
await element(by.id('noDevKeyButton')).tap(); | ||
await expect(element(by.id('noDevKeyInitResult'))).toHaveText('No \'devKey\' found or its empty'); | ||
await expect(element(by.id('testResult'))).toHaveText('No \'devKey\' found or its empty'); | ||
}); | ||
|
||
it('initSdk should return Success organic GCD', async () => { | ||
await expect(element(by.id('successOrganicGCDButton'))).toBeVisible(); | ||
await element(by.id('successOrganicGCDButton')).tap(); | ||
const gcdAttr = await element(by.id('testResult')).getAttributes(); | ||
jestExpect(gcdAttr.text).toContain('\"status\":\"success\"'); | ||
jestExpect(gcdAttr.text).toContain('\"type\":\"onInstallConversionDataLoaded\"'); | ||
jestExpect(gcdAttr.text).toContain('\"data\"'); | ||
jestExpect(gcdAttr.text).toContain('\"is_first_launch\":true'); | ||
jestExpect(gcdAttr.text).toContain('\"af_status\":\"Organic\"'); | ||
}); | ||
|
||
it('logEvent should return Success', async () => { | ||
await expect(element(by.id('logEventSuccessButton'))).toBeVisible(); | ||
await element(by.id('logEventSuccessButton')).tap(); | ||
await waitFor(element(by.text('Alert'))).toBeVisible().withTimeout(3000); | ||
await expect(element(by.text('Success'))).toHaveText('Success'); | ||
await element(by.text('OK')).tap(); | ||
}); | ||
|
||
it('App goes to background and opens via deep link', async () => { | ||
await device.sendToHome(); | ||
await device.launchApp({newInstance: false, url: 'https://rnautomated.onelink.me/lraA/mySMScampign'}); | ||
await waitFor(element(by.text('Alert'))).toBeVisible().withTimeout(3000); | ||
await waitFor(element(by.text(`${deepLinkData}`))).toBeVisible().withTimeout(3000); | ||
await expect(element(by.text(`${deepLinkData}`))).toHaveText(deepLinkData); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.developer.associated-domains</key> | ||
<array> | ||
<string>applinks:rnautomated.onelink.me</string> | ||
<string>applinks:rntestamit.onelink.me</string> | ||
</array> | ||
</dict> | ||
</plist> |