Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration: MRAID test cases from mock server to pbs on aws #380

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ class DemoItemProvider private constructor() {
}

private fun formProdDemoList() {
addInAppProdExamples()
addGamProdExamples()
addMoPubProdExamples()
addAdMobProdExamples()
Expand All @@ -93,7 +92,7 @@ class DemoItemProvider private constructor() {
private fun addInAppPbsExamples() {
val ppmBannerTagList = listOf(Tag.ALL, Tag.IN_APP, Tag.BANNER, Tag.REMOTE)
val ppmInterstitialTagList = listOf(Tag.ALL, Tag.IN_APP, Tag.INTERSTITIAL, Tag.REMOTE)
val ppmMraidTagList = listOf(Tag.ALL, Tag.IN_APP, Tag.MRAID, Tag.MOCK)
val ppmMraidTagList = listOf(Tag.ALL, Tag.IN_APP, Tag.MRAID, Tag.REMOTE)
val ppmVideoTagList = listOf(Tag.ALL, Tag.IN_APP, Tag.VIDEO, Tag.REMOTE)

val ppmNativeTagList = listOf(Tag.ALL, Tag.IN_APP, Tag.NATIVE, Tag.MOCK)
Expand Down Expand Up @@ -196,23 +195,23 @@ class DemoItemProvider private constructor() {
getString(R.string.demo_bidding_in_app_mraid_expand),
ppmBannerAction,
ppmMraidTagList,
createBannerBundle(R.string.imp_prebid_id_mraid_expand, null, 320, 50)
createBannerBundle(R.string.imp_prebid_id_mraid_expand, null, 320, 50, R.string.response_prebid_mraid_expand)
)
)
demoList.add(
DemoItem(
getString(R.string.demo_bidding_in_app_mraid_expand_2),
ppmBannerAction,
ppmMraidTagList,
createBannerBundle(R.string.imp_prebid_id_mraid_expand_two_part, null, 320, 50)
createBannerBundle(R.string.imp_prebid_id_mraid_expand_two_part, null, 320, 50,R.string.response_prebid_mraid_expand_two_part)
)
)
demoList.add(
DemoItem(
getString(R.string.demo_bidding_in_app_mraid_resize),
ppmBannerAction,
ppmMraidTagList,
createBannerBundle(R.string.imp_prebid_id_mraid_resize, null, 320, 50)
createBannerBundle(R.string.imp_prebid_id_mraid_resize, null, 320, 50,R.string.response_prebid_mraid_resize)
)
)
demoList.add(
Expand All @@ -224,7 +223,7 @@ class DemoItemProvider private constructor() {
R.string.imp_prebid_id_mraid_resize_with_errors,
null,
300,
100
100,R.string.response_prebid_mraid_resize_with_errors
)
)
)
Expand All @@ -233,7 +232,7 @@ class DemoItemProvider private constructor() {
getString(R.string.demo_bidding_in_app_mraid_fullscreen),
ppmBannerAction,
ppmMraidTagList,
createBannerBundle(R.string.imp_prebid_id_mraid_fullscreen, null, 320, 480)
createBannerBundle(R.string.imp_prebid_id_mraid_fullscreen, null, 320, 480,R.string.response_prebid_mraid_fullscreen)
)
)
demoList.add(
Expand All @@ -245,7 +244,7 @@ class DemoItemProvider private constructor() {
R.string.imp_prebid_id_mraid_video_interstitial,
null,
MIN_WIDTH_PERC,
MIN_HEIGHT_PERC
MIN_HEIGHT_PERC,R.string.response_prebid_mraid_video_interstitial
)
)
)
Expand All @@ -258,7 +257,7 @@ class DemoItemProvider private constructor() {
R.string.imp_prebid_id_mraid_3_viewability_compliance,
null,
320,
480
480,R.string.response_prebid_mraid_3_viewability_compliance
)
)
)
Expand All @@ -271,7 +270,7 @@ class DemoItemProvider private constructor() {
R.string.imp_prebid_id_mraid_3_resize_negative,
null,
320,
480
480,R.string.response_prebid_mraid_3_resize_negative
)
)
)
Expand All @@ -284,7 +283,7 @@ class DemoItemProvider private constructor() {
R.string.imp_prebid_id_mraid_3_load_and_events,
null,
320,
50
50,R.string.response_prebid_mraid_3_load_and_events
)
)
)
Expand All @@ -297,7 +296,7 @@ class DemoItemProvider private constructor() {
R.string.imp_prebid_id_mraid_ox_test_properties,
null,
320,
50
50,R.string.response_prebid_mraid_ox_test_properties
)
)
)
Expand All @@ -306,15 +305,15 @@ class DemoItemProvider private constructor() {
getString(R.string.demo_bidding_in_app_mraid_test_methods),
ppmBannerAction,
ppmMraidTagList,
createBannerBundle(R.string.imp_prebid_id_mraid_ox_test_methods, null, 320, 50)
createBannerBundle(R.string.imp_prebid_id_mraid_ox_test_methods, null, 320, 50,R.string.response_prebid_mraid_ox_test_methods)
)
)
demoList.add(
DemoItem(
getString(R.string.demo_bidding_in_app_mraid_resize_scroll),
R.id.action_header_bidding_to_in_app_banner_scrollable,
ppmMraidTagList,
createBannerBundle(R.string.imp_prebid_id_mraid_resize, null, 320, 50)
createBannerBundle(R.string.imp_prebid_id_mraid_resize, null, 320, 50,R.string.response_prebid_mraid_resize)
)
)
demoList.add(
Expand All @@ -326,7 +325,7 @@ class DemoItemProvider private constructor() {
R.string.imp_prebid_id_mraid_ox_resize_expandable,
null,
320,
50
50,R.string.response_prebid_mraid_ox_resize_expandable
)
)
)
Expand Down Expand Up @@ -552,7 +551,7 @@ class DemoItemProvider private constructor() {
private fun addGamPbsExamples() {
val gamBannerTagList = listOf(Tag.ALL, Tag.GAM, Tag.BANNER, Tag.REMOTE)
val gamInterstitialTagList = listOf(Tag.ALL, Tag.GAM, Tag.INTERSTITIAL, Tag.REMOTE)
val gamMraidTagList = listOf(Tag.ALL, Tag.GAM, Tag.MRAID, Tag.MOCK)
val gamMraidTagList = listOf(Tag.ALL, Tag.GAM, Tag.MRAID, Tag.REMOTE)
val gamVideoTagList = listOf(Tag.ALL, Tag.GAM, Tag.VIDEO, Tag.REMOTE)
val gamNativeTagList = listOf(Tag.ALL, Tag.GAM, Tag.NATIVE, Tag.MOCK)

Expand Down Expand Up @@ -658,7 +657,7 @@ class DemoItemProvider private constructor() {
R.string.imp_prebid_id_mraid_expand,
R.string.adunit_gam_banner_320_50_app_event,
320,
50
50,R.string.response_prebid_mraid_expand
)
)
)
Expand All @@ -671,7 +670,7 @@ class DemoItemProvider private constructor() {
R.string.imp_prebid_id_mraid_resize,
R.string.adunit_gam_banner_320_50_app_event,
320,
50
50,R.string.response_prebid_mraid_resize
)
)
)
Expand All @@ -684,7 +683,7 @@ class DemoItemProvider private constructor() {
R.string.imp_prebid_id_mraid_video_interstitial,
R.string.adunit_gam_interstitial_320_480_app_event,
MIN_WIDTH_PERC,
MIN_HEIGHT_PERC
MIN_HEIGHT_PERC,R.string.response_prebid_mraid_video_interstitial
)
)
)
Expand Down Expand Up @@ -975,7 +974,7 @@ class DemoItemProvider private constructor() {
private fun addMoPubPbsExamples() {
val mopubBannerTagList = listOf(Tag.ALL, Tag.MOPUB, Tag.BANNER, Tag.REMOTE)
val mopubInterstitialTagList = listOf(Tag.ALL, Tag.MOPUB, Tag.INTERSTITIAL, Tag.REMOTE)
val mopubMraidTagList = listOf(Tag.ALL, Tag.MOPUB, Tag.MRAID, Tag.MOCK)
val mopubMraidTagList = listOf(Tag.ALL, Tag.MOPUB, Tag.MRAID, Tag.REMOTE)
val mopubVideoTagList = listOf(Tag.ALL, Tag.MOPUB, Tag.VIDEO, Tag.REMOTE)
val mopubNativeTagList = listOf(Tag.ALL, Tag.MOPUB, Tag.NATIVE, Tag.MOCK)

Expand Down Expand Up @@ -1068,7 +1067,7 @@ class DemoItemProvider private constructor() {
R.string.imp_prebid_id_mraid_expand,
R.string.mopub_banner_bidding_ad_unit_id_adapter,
320,
50
50,R.string.response_prebid_mraid_expand
)
)
)
Expand All @@ -1081,7 +1080,7 @@ class DemoItemProvider private constructor() {
R.string.imp_prebid_id_mraid_resize,
R.string.mopub_banner_bidding_ad_unit_id_adapter,
320,
50
50,R.string.response_prebid_mraid_resize
)
)
)
Expand All @@ -1093,7 +1092,7 @@ class DemoItemProvider private constructor() {
R.string.imp_prebid_id_mraid_video_interstitial,
R.string.mopub_interstitial_bidding_ad_unit_id_ok,
MIN_WIDTH_PERC,
MIN_HEIGHT_PERC
MIN_HEIGHT_PERC,R.string.response_prebid_mraid_video_interstitial
)
)
)
Expand Down Expand Up @@ -1487,45 +1486,10 @@ class DemoItemProvider private constructor() {
)
}

private fun addInAppProdExamples() {

val ppmMraidTagList = listOf(Tag.ALL, Tag.IN_APP, Tag.MRAID, Tag.REMOTE)

demoList.add(
DemoItem(
getString(R.string.demo_bidding_in_app_mraid_resize),
ppmBannerAction,
ppmMraidTagList,
createBannerBundle(R.string.prebid_config_id_mraid_resize, null, 320, 50)
)
)



}

private fun addGamProdExamples() {

val gamMraidTagList = listOf(Tag.ALL, Tag.GAM, Tag.MRAID, Tag.REMOTE)
val gamNativeTagList = listOf(Tag.ALL, Tag.GAM, Tag.NATIVE, Tag.REMOTE)


demoList.add(
DemoItem(
getString(R.string.demo_bidding_gam_mraid_resize),
gamBannerAction,
gamMraidTagList,
createBannerBundle(
R.string.prebid_config_id_mraid_resize,
R.string.adunit_gam_banner_320_50_app_event,
320,
50
)
)
)



val gamNativeBundle = createBannerBundle(
R.string.prebid_config_id_qa_native_styles,
R.string.adunit_gam_native_custom_template,
Expand Down Expand Up @@ -1559,25 +1523,8 @@ class DemoItemProvider private constructor() {

private fun addMoPubProdExamples() {

val mopubMraidTagList = listOf(Tag.ALL, Tag.MOPUB, Tag.MRAID, Tag.REMOTE)
val mopubNativeTagList = listOf(Tag.ALL, Tag.MOPUB, Tag.NATIVE, Tag.REMOTE)


demoList.add(
DemoItem(
getString(R.string.demo_bidding_mopub_mraid_resize),
mopubBannerAction,
mopubMraidTagList,
createBannerBundle(
R.string.prebid_config_id_mraid_resize,
R.string.mopub_banner_bidding_ad_unit_id_adapter,
320,
50
)
)
)


demoList.add(
DemoItem(
getString(R.string.demo_bidding_mopub_native_adapter),
Expand Down
14 changes: 14 additions & 0 deletions Example/PrebidInternalTestApp/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -390,4 +390,18 @@
<!-- Video Rewarded -->
<string name="response_prebid_video_rewarded_end_card_320_480">response-prebid-video-rewarded-320-480-without-end-card</string>
<string name="response_prebid_video_rewarded_320_480">response-prebid-video-rewarded-320-480</string>

<!-- MRAID -->
<string name="response_prebid_mraid_resize">response-prebid-mraid-resize</string>
<string name="response_prebid_mraid_resize_with_errors">response-prebid-mraid-resize-with-errors</string>
<string name="response_prebid_mraid_expand">response-prebid-mraid-expand-1-part</string>
<string name="response_prebid_mraid_expand_two_part">response-prebid-mraid-expand-2-part</string>
<string name="response_prebid_mraid_fullscreen">response-prebid-mraid-fullscreen</string>
<string name="response_prebid_mraid_video_interstitial">response-prebid-mraid-video-interstitial</string>
<string name="response_prebid_mraid_3_viewability_compliance">response-prebid-mraid-viewability-compliance</string>
<string name="response_prebid_mraid_3_resize_negative">response-prebid-mraid-resize-negative-test</string>
<string name="response_prebid_mraid_3_load_and_events">response-prebid-mraid-load-and-events</string>
<string name="response_prebid_mraid_ox_test_properties">response-prebid-mraid-test-properties-3</string>
<string name="response_prebid_mraid_ox_test_methods">response-prebid-mraid-test-methods-3</string>
<string name="response_prebid_mraid_ox_resize_expandable">response-prebid-mraid-resize-expandable</string>
</resources>