From 2728e3725bf380a1c105eb90431adddacfb629d0 Mon Sep 17 00:00:00 2001 From: Akexorcist Date: Mon, 30 Dec 2019 20:49:14 +0700 Subject: [PATCH] Add more clearly ui test --- .../localizationapp/CustomActivityTest.kt | 18 ++++++++++++------ .../localizationapp/SimpleActivityTest.kt | 18 ++++++++++++------ .../localizationapp/StackedActivityTest.kt | 14 ++++++++++++++ 3 files changed, 38 insertions(+), 12 deletions(-) diff --git a/app/src/androidTest/java/com/akexorcist/localizationapp/CustomActivityTest.kt b/app/src/androidTest/java/com/akexorcist/localizationapp/CustomActivityTest.kt index 4ea1cb1..67d2252 100644 --- a/app/src/androidTest/java/com/akexorcist/localizationapp/CustomActivityTest.kt +++ b/app/src/androidTest/java/com/akexorcist/localizationapp/CustomActivityTest.kt @@ -64,7 +64,8 @@ class CustomActivityTest { Thread.sleep(200) - textView.check(matches(withText("打开 YouTube 应用时,您看到的是“精彩视频”页面。“精彩视频”显示您的订阅中近期上传的视频与活动,以及为您推荐的视频。如果您之前观看过音乐视频,那么还能看到一些热门内容以及 YouTube 合辑。您随时可以从导视面板导航回这个 Feed。"))) + val textView101 = onView(withId(R.id.textView)) + textView101.check(matches(withText("打开 YouTube 应用时,您看到的是“精彩视频”页面。“精彩视频”显示您的订阅中近期上传的视频与活动,以及为您推荐的视频。如果您之前观看过音乐视频,那么还能看到一些热门内容以及 YouTube 合辑。您随时可以从导视面板导航回这个 Feed。"))) val appCompatImageButton2 = onView(withId(R.id.btn_italy)) appCompatImageButton2.perform(scrollTo(), click()) @@ -98,7 +99,8 @@ class CustomActivityTest { Thread.sleep(200) - textView3.check(matches(withText("Quando apri l'app YouTube, viene visualizzata la sezione Che cosa guardare. In questa sezione vengono messi in evidenza i caricamenti recenti, le attività provenienti dalle tue iscrizioni e i video consigliati. Vengono anche visualizzati i contenuti popolari e i Mix di YouTube se hai già guardato video musicali in precedenza. Puoi tornare a questo feed in qualsiasi momento dalla Guida."))) + val textView301 = onView(withId(R.id.textView)) + textView301.check(matches(withText("Quando apri l'app YouTube, viene visualizzata la sezione Che cosa guardare. In questa sezione vengono messi in evidenza i caricamenti recenti, le attività provenienti dalle tue iscrizioni e i video consigliati. Vengono anche visualizzati i contenuti popolari e i Mix di YouTube se hai già guardato video musicali in precedenza. Puoi tornare a questo feed in qualsiasi momento dalla Guida."))) val appCompatImageButton3 = onView(withId(R.id.btn_japan)) appCompatImageButton3.perform(scrollTo(), click()) @@ -132,7 +134,8 @@ class CustomActivityTest { Thread.sleep(200) - textView5.check(matches(withText("YouTube アプリを開くと、[あなたへのおすすめ] ページが表示されます。[あなたへのおすすめ] では登録チャンネルの最新アップロードやアクティビティ、おすすめの動画が紹介されます。また、以前にミュージック ビデオを視聴した場合は人気のコンテンツや YouTube ミックスリストも表示されます。ガイドから、いつでもこのフィードに戻ることができます。"))) + val textView501 = onView(withId(R.id.textView)) + textView501.check(matches(withText("YouTube アプリを開くと、[あなたへのおすすめ] ページが表示されます。[あなたへのおすすめ] では登録チャンネルの最新アップロードやアクティビティ、おすすめの動画が紹介されます。また、以前にミュージック ビデオを視聴した場合は人気のコンテンツや YouTube ミックスリストも表示されます。ガイドから、いつでもこのフィードに戻ることができます。"))) val appCompatImageButton4 = onView(withId(R.id.btn_korea)) appCompatImageButton4.perform(scrollTo(), click()) @@ -164,7 +167,8 @@ class CustomActivityTest { val appCompatButton5 = onView(withId(R.id.btn_custom_activity)) appCompatButton5.perform(scrollTo(), click()) - textView7.check(matches(withText("YouTube 앱을 열면 볼만한 동영상 페이지가 표시됩니다. 볼만한 동영상에는 구독 채널의 최근 업로드 동영상과 활동 및 맞춤 동영상이 강조표시됩니다. 이전에 뮤직 비디오를 본 적이 있다면 인기 콘텐츠와 YouTube 믹스도 표시됩니다. 언제든 가이드에서 이 피드로 되돌아갈 수 있습니다."))) + val textView701 = onView(withId(R.id.textView)) + textView701.check(matches(withText("YouTube 앱을 열면 볼만한 동영상 페이지가 표시됩니다. 볼만한 동영상에는 구독 채널의 최근 업로드 동영상과 활동 및 맞춤 동영상이 강조표시됩니다. 이전에 뮤직 비디오를 본 적이 있다면 인기 콘텐츠와 YouTube 믹스도 표시됩니다. 언제든 가이드에서 이 피드로 되돌아갈 수 있습니다."))) val appCompatImageButton5 = onView(withId(R.id.btn_portugal)) appCompatImageButton5.perform(scrollTo(), click()) @@ -198,7 +202,8 @@ class CustomActivityTest { Thread.sleep(200) - textView9.check(matches(withText("Ao abrir a aplicação YouTube, é-lhe apresentada a página O que ver. A página O que ver destaca os carregamentos e as atividades mais recentes das suas subscrições e os vídeos recomendados para si. Verá ainda os conteúdos mais populares e também Mixes do YouTube, caso tenha acedido a vídeos de música anteriormente. Pode regressar a este feed em qualquer momento através do Guia."))) + val textView901 = onView(withId(R.id.textView)) + textView901.check(matches(withText("Ao abrir a aplicação YouTube, é-lhe apresentada a página O que ver. A página O que ver destaca os carregamentos e as atividades mais recentes das suas subscrições e os vídeos recomendados para si. Verá ainda os conteúdos mais populares e também Mixes do YouTube, caso tenha acedido a vídeos de música anteriormente. Pode regressar a este feed em qualquer momento através do Guia."))) val appCompatImageButton6 = onView(withId(R.id.btn_thai)) appCompatImageButton6.perform(scrollTo(), click()) @@ -232,7 +237,8 @@ class CustomActivityTest { Thread.sleep(200) - textView11.check(matches(withText("เมื่อคุณเปิดแอป YouTube คุณจะเข้ามาที่ ดูอะไรดี โดยส่วน ดูอะไรดี จะไฮไลต์การอัปโหลดและกิจกรรมล่าสุดจากช่องที่คุณติดตาม และวิดีโอที่แนะนำสำหรับคุณ นอกจากนี้ คุณยังจะเห็นเนื้อหาที่ได้รับความนิยมและ YouTube มิกซ์หากได้ดูมิวสิกวิดีโอไปก่อนหน้านี้ คุณสามารถกลับมาที่ฟีดนี้ได้ตลอดเวลาจากเมนู คำแนะนำ"))) + val textView1101 = onView(withId(R.id.textView)) + textView1101.check(matches(withText("เมื่อคุณเปิดแอป YouTube คุณจะเข้ามาที่ ดูอะไรดี โดยส่วน ดูอะไรดี จะไฮไลต์การอัปโหลดและกิจกรรมล่าสุดจากช่องที่คุณติดตาม และวิดีโอที่แนะนำสำหรับคุณ นอกจากนี้ คุณยังจะเห็นเนื้อหาที่ได้รับความนิยมและ YouTube มิกซ์หากได้ดูมิวสิกวิดีโอไปก่อนหน้านี้ คุณสามารถกลับมาที่ฟีดนี้ได้ตลอดเวลาจากเมนู คำแนะนำ"))) val appCompatImageButton7 = onView(withId(R.id.btn_america)) appCompatImageButton7.perform(scrollTo(), click()) diff --git a/app/src/androidTest/java/com/akexorcist/localizationapp/SimpleActivityTest.kt b/app/src/androidTest/java/com/akexorcist/localizationapp/SimpleActivityTest.kt index 8ea6ae7..e0e271a 100644 --- a/app/src/androidTest/java/com/akexorcist/localizationapp/SimpleActivityTest.kt +++ b/app/src/androidTest/java/com/akexorcist/localizationapp/SimpleActivityTest.kt @@ -64,7 +64,8 @@ class SimpleActivityTest { Thread.sleep(200) - textView.check(matches(withText("打开 YouTube 应用时,您看到的是“精彩视频”页面。“精彩视频”显示您的订阅中近期上传的视频与活动,以及为您推荐的视频。如果您之前观看过音乐视频,那么还能看到一些热门内容以及 YouTube 合辑。您随时可以从导视面板导航回这个 Feed。"))) + val textView101 = onView(withId(R.id.textView)) + textView101.check(matches(withText("打开 YouTube 应用时,您看到的是“精彩视频”页面。“精彩视频”显示您的订阅中近期上传的视频与活动,以及为您推荐的视频。如果您之前观看过音乐视频,那么还能看到一些热门内容以及 YouTube 合辑。您随时可以从导视面板导航回这个 Feed。"))) val appCompatImageButton2 = onView(withId(R.id.btn_italy)) appCompatImageButton2.perform(scrollTo(), click()) @@ -98,7 +99,8 @@ class SimpleActivityTest { Thread.sleep(200) - textView3.check(matches(withText("Quando apri l'app YouTube, viene visualizzata la sezione Che cosa guardare. In questa sezione vengono messi in evidenza i caricamenti recenti, le attività provenienti dalle tue iscrizioni e i video consigliati. Vengono anche visualizzati i contenuti popolari e i Mix di YouTube se hai già guardato video musicali in precedenza. Puoi tornare a questo feed in qualsiasi momento dalla Guida."))) + val textView301 = onView(withId(R.id.textView)) + textView301.check(matches(withText("Quando apri l'app YouTube, viene visualizzata la sezione Che cosa guardare. In questa sezione vengono messi in evidenza i caricamenti recenti, le attività provenienti dalle tue iscrizioni e i video consigliati. Vengono anche visualizzati i contenuti popolari e i Mix di YouTube se hai già guardato video musicali in precedenza. Puoi tornare a questo feed in qualsiasi momento dalla Guida."))) val appCompatImageButton3 = onView(withId(R.id.btn_japan)) appCompatImageButton3.perform(scrollTo(), click()) @@ -132,7 +134,8 @@ class SimpleActivityTest { Thread.sleep(200) - textView5.check(matches(withText("YouTube アプリを開くと、[あなたへのおすすめ] ページが表示されます。[あなたへのおすすめ] では登録チャンネルの最新アップロードやアクティビティ、おすすめの動画が紹介されます。また、以前にミュージック ビデオを視聴した場合は人気のコンテンツや YouTube ミックスリストも表示されます。ガイドから、いつでもこのフィードに戻ることができます。"))) + val textView501 = onView(withId(R.id.textView)) + textView501.check(matches(withText("YouTube アプリを開くと、[あなたへのおすすめ] ページが表示されます。[あなたへのおすすめ] では登録チャンネルの最新アップロードやアクティビティ、おすすめの動画が紹介されます。また、以前にミュージック ビデオを視聴した場合は人気のコンテンツや YouTube ミックスリストも表示されます。ガイドから、いつでもこのフィードに戻ることができます。"))) val appCompatImageButton4 = onView(withId(R.id.btn_korea)) appCompatImageButton4.perform(scrollTo(), click()) @@ -164,7 +167,8 @@ class SimpleActivityTest { val appCompatButton5 = onView(withId(R.id.btn_simple_activity)) appCompatButton5.perform(scrollTo(), click()) - textView7.check(matches(withText("YouTube 앱을 열면 볼만한 동영상 페이지가 표시됩니다. 볼만한 동영상에는 구독 채널의 최근 업로드 동영상과 활동 및 맞춤 동영상이 강조표시됩니다. 이전에 뮤직 비디오를 본 적이 있다면 인기 콘텐츠와 YouTube 믹스도 표시됩니다. 언제든 가이드에서 이 피드로 되돌아갈 수 있습니다."))) + val textView701 = onView(withId(R.id.textView)) + textView701.check(matches(withText("YouTube 앱을 열면 볼만한 동영상 페이지가 표시됩니다. 볼만한 동영상에는 구독 채널의 최근 업로드 동영상과 활동 및 맞춤 동영상이 강조표시됩니다. 이전에 뮤직 비디오를 본 적이 있다면 인기 콘텐츠와 YouTube 믹스도 표시됩니다. 언제든 가이드에서 이 피드로 되돌아갈 수 있습니다."))) val appCompatImageButton5 = onView(withId(R.id.btn_portugal)) appCompatImageButton5.perform(scrollTo(), click()) @@ -198,7 +202,8 @@ class SimpleActivityTest { Thread.sleep(200) - textView9.check(matches(withText("Ao abrir a aplicação YouTube, é-lhe apresentada a página O que ver. A página O que ver destaca os carregamentos e as atividades mais recentes das suas subscrições e os vídeos recomendados para si. Verá ainda os conteúdos mais populares e também Mixes do YouTube, caso tenha acedido a vídeos de música anteriormente. Pode regressar a este feed em qualquer momento através do Guia."))) + val textView901 = onView(withId(R.id.textView)) + textView901.check(matches(withText("Ao abrir a aplicação YouTube, é-lhe apresentada a página O que ver. A página O que ver destaca os carregamentos e as atividades mais recentes das suas subscrições e os vídeos recomendados para si. Verá ainda os conteúdos mais populares e também Mixes do YouTube, caso tenha acedido a vídeos de música anteriormente. Pode regressar a este feed em qualquer momento através do Guia."))) val appCompatImageButton6 = onView(withId(R.id.btn_thai)) appCompatImageButton6.perform(scrollTo(), click()) @@ -232,7 +237,8 @@ class SimpleActivityTest { Thread.sleep(200) - textView11.check(matches(withText("เมื่อคุณเปิดแอป YouTube คุณจะเข้ามาที่ ดูอะไรดี โดยส่วน ดูอะไรดี จะไฮไลต์การอัปโหลดและกิจกรรมล่าสุดจากช่องที่คุณติดตาม และวิดีโอที่แนะนำสำหรับคุณ นอกจากนี้ คุณยังจะเห็นเนื้อหาที่ได้รับความนิยมและ YouTube มิกซ์หากได้ดูมิวสิกวิดีโอไปก่อนหน้านี้ คุณสามารถกลับมาที่ฟีดนี้ได้ตลอดเวลาจากเมนู คำแนะนำ"))) + val textView1101 = onView(withId(R.id.textView)) + textView1101.check(matches(withText("เมื่อคุณเปิดแอป YouTube คุณจะเข้ามาที่ ดูอะไรดี โดยส่วน ดูอะไรดี จะไฮไลต์การอัปโหลดและกิจกรรมล่าสุดจากช่องที่คุณติดตาม และวิดีโอที่แนะนำสำหรับคุณ นอกจากนี้ คุณยังจะเห็นเนื้อหาที่ได้รับความนิยมและ YouTube มิกซ์หากได้ดูมิวสิกวิดีโอไปก่อนหน้านี้ คุณสามารถกลับมาที่ฟีดนี้ได้ตลอดเวลาจากเมนู คำแนะนำ"))) val appCompatImageButton7 = onView(withId(R.id.btn_america)) appCompatImageButton7.perform(scrollTo(), click()) diff --git a/app/src/androidTest/java/com/akexorcist/localizationapp/StackedActivityTest.kt b/app/src/androidTest/java/com/akexorcist/localizationapp/StackedActivityTest.kt index c1c57ef..fd2b457 100644 --- a/app/src/androidTest/java/com/akexorcist/localizationapp/StackedActivityTest.kt +++ b/app/src/androidTest/java/com/akexorcist/localizationapp/StackedActivityTest.kt @@ -35,6 +35,8 @@ class StackedActivityTest { val appCompatButton2 = onView(withId(R.id.btn_change_language)) appCompatButton2.perform(click()) + Thread.sleep(200) + val appCompatImageButton = onView(withId(R.id.btn_china)) appCompatImageButton.perform(click()) @@ -60,6 +62,8 @@ class StackedActivityTest { val appCompatButton3 = onView(withId(R.id.btn_change_language)) appCompatButton3.perform(click()) + Thread.sleep(200) + val appCompatImageButton2 = onView(withId(R.id.btn_italy)) appCompatImageButton2.perform(click()) @@ -85,6 +89,8 @@ class StackedActivityTest { val appCompatButton4 = onView(withId(R.id.btn_change_language)) appCompatButton4.perform(click()) + Thread.sleep(200) + val appCompatImageButton3 = onView(withId(R.id.btn_japan)) appCompatImageButton3.perform(click()) @@ -110,6 +116,8 @@ class StackedActivityTest { val appCompatButton5 = onView(withId(R.id.btn_change_language)) appCompatButton5.perform(click()) + Thread.sleep(200) + val appCompatImageButton4 = onView(withId(R.id.btn_korea)) appCompatImageButton4.perform(click()) @@ -135,6 +143,8 @@ class StackedActivityTest { val appCompatButton6 = onView(withId(R.id.btn_change_language)) appCompatButton6.perform(click()) + Thread.sleep(200) + val appCompatImageButton5 = onView(withId(R.id.btn_portugal)) appCompatImageButton5.perform(click()) @@ -160,6 +170,8 @@ class StackedActivityTest { val appCompatButton7 = onView(withId(R.id.btn_change_language)) appCompatButton7.perform(click()) + Thread.sleep(200) + val appCompatImageButton6 = onView(withId(R.id.btn_thai)) appCompatImageButton6.perform(click()) @@ -185,6 +197,8 @@ class StackedActivityTest { val appCompatButton8 = onView(withId(R.id.btn_change_language)) appCompatButton8.perform(click()) + Thread.sleep(200) + val appCompatImageButton7 = onView(withId(R.id.btn_america)) appCompatImageButton7.perform(click())