|
|
|
@ -7,7 +7,6 @@ package org.mozilla.fenix.ui
|
|
|
|
|
import okhttp3.mockwebserver.MockWebServer
|
|
|
|
|
import org.junit.After
|
|
|
|
|
import org.junit.Before
|
|
|
|
|
import org.junit.Ignore
|
|
|
|
|
import org.junit.Rule
|
|
|
|
|
import org.junit.Test
|
|
|
|
|
import org.mozilla.fenix.customannotations.SmokeTest
|
|
|
|
@ -62,6 +61,7 @@ class CreditCardAutofillTest {
|
|
|
|
|
mockWebServer.shutdown()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1512792
|
|
|
|
|
@SmokeTest
|
|
|
|
|
@Test
|
|
|
|
|
fun verifyCreditCardAutofillTest() {
|
|
|
|
@ -99,32 +99,10 @@ class CreditCardAutofillTest {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1512798
|
|
|
|
|
@SmokeTest
|
|
|
|
|
@Test
|
|
|
|
|
fun deleteSavedCreditCardUsingToolbarButtonTest() {
|
|
|
|
|
homeScreen {
|
|
|
|
|
}.openThreeDotMenu {
|
|
|
|
|
}.openSettings {
|
|
|
|
|
}.openAutofillSubMenu {
|
|
|
|
|
clickAddCreditCardButton()
|
|
|
|
|
fillAndSaveCreditCard(
|
|
|
|
|
MockCreditCard1.MOCK_CREDIT_CARD_NUMBER,
|
|
|
|
|
MockCreditCard1.MOCK_NAME_ON_CARD,
|
|
|
|
|
MockCreditCard1.MOCK_EXPIRATION_MONTH,
|
|
|
|
|
MockCreditCard1.MOCK_EXPIRATION_YEAR,
|
|
|
|
|
)
|
|
|
|
|
clickManageSavedCreditCardsButton()
|
|
|
|
|
clickSecuredCreditCardsLaterButton()
|
|
|
|
|
clickSavedCreditCard()
|
|
|
|
|
clickDeleteCreditCardToolbarButton()
|
|
|
|
|
clickConfirmDeleteCreditCardButton()
|
|
|
|
|
verifyAddCreditCardsButton()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@SmokeTest
|
|
|
|
|
@Test
|
|
|
|
|
fun cancelDeleteSavedCreditCardUsingToolbarButtonTest() {
|
|
|
|
|
homeScreen {
|
|
|
|
|
}.openThreeDotMenu {
|
|
|
|
|
}.openSettings {
|
|
|
|
@ -142,35 +120,16 @@ class CreditCardAutofillTest {
|
|
|
|
|
clickDeleteCreditCardToolbarButton()
|
|
|
|
|
clickCancelDeleteCreditCardButton()
|
|
|
|
|
verifyEditCreditCardToolbarTitle()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@SmokeTest
|
|
|
|
|
@Test
|
|
|
|
|
fun deleteSavedCreditCardUsingMenuButtonTest() {
|
|
|
|
|
homeScreen {
|
|
|
|
|
}.openThreeDotMenu {
|
|
|
|
|
}.openSettings {
|
|
|
|
|
}.openAutofillSubMenu {
|
|
|
|
|
clickAddCreditCardButton()
|
|
|
|
|
fillAndSaveCreditCard(
|
|
|
|
|
MockCreditCard1.MOCK_CREDIT_CARD_NUMBER,
|
|
|
|
|
MockCreditCard1.MOCK_NAME_ON_CARD,
|
|
|
|
|
MockCreditCard1.MOCK_EXPIRATION_MONTH,
|
|
|
|
|
MockCreditCard1.MOCK_EXPIRATION_YEAR,
|
|
|
|
|
)
|
|
|
|
|
clickManageSavedCreditCardsButton()
|
|
|
|
|
clickSecuredCreditCardsLaterButton()
|
|
|
|
|
clickSavedCreditCard()
|
|
|
|
|
clickDeleteCreditCardMenuButton()
|
|
|
|
|
clickDeleteCreditCardToolbarButton()
|
|
|
|
|
clickConfirmDeleteCreditCardButton()
|
|
|
|
|
verifyAddCreditCardsButton()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2271192
|
|
|
|
|
@SmokeTest
|
|
|
|
|
@Test
|
|
|
|
|
fun cancelDeleteSavedCreditCardUsingMenuButtonTest() {
|
|
|
|
|
fun deleteSavedCreditCardUsingMenuButtonTest() {
|
|
|
|
|
homeScreen {
|
|
|
|
|
}.openThreeDotMenu {
|
|
|
|
|
}.openSettings {
|
|
|
|
@ -188,9 +147,13 @@ class CreditCardAutofillTest {
|
|
|
|
|
clickDeleteCreditCardMenuButton()
|
|
|
|
|
clickCancelDeleteCreditCardButton()
|
|
|
|
|
verifyEditCreditCardToolbarTitle()
|
|
|
|
|
clickDeleteCreditCardMenuButton()
|
|
|
|
|
clickConfirmDeleteCreditCardButton()
|
|
|
|
|
verifyAddCreditCardsButton()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1512788
|
|
|
|
|
@Test
|
|
|
|
|
fun verifyCreditCardsSectionTest() {
|
|
|
|
|
homeScreen {
|
|
|
|
@ -214,6 +177,7 @@ class CreditCardAutofillTest {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1859917
|
|
|
|
|
@Test
|
|
|
|
|
fun verifyManageCreditCardsPromptOptionTest() {
|
|
|
|
|
val creditCardFormPage = TestAssetHelper.getCreditCardFormAsset(mockWebServer)
|
|
|
|
@ -243,6 +207,7 @@ class CreditCardAutofillTest {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1512790
|
|
|
|
|
@Test
|
|
|
|
|
fun verifyCreditCardsAutofillToggleTest() {
|
|
|
|
|
val creditCardFormPage = TestAssetHelper.getCreditCardFormAsset(mockWebServer)
|
|
|
|
@ -283,6 +248,7 @@ class CreditCardAutofillTest {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1512795
|
|
|
|
|
@Test
|
|
|
|
|
fun verifyEditCardsViewTest() {
|
|
|
|
|
homeScreen {
|
|
|
|
@ -318,6 +284,7 @@ class CreditCardAutofillTest {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1512796
|
|
|
|
|
@Test
|
|
|
|
|
fun verifyEditedCardIsSavedTest() {
|
|
|
|
|
val creditCardFormPage = TestAssetHelper.getCreditCardFormAsset(mockWebServer)
|
|
|
|
@ -365,8 +332,9 @@ class CreditCardAutofillTest {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1512797
|
|
|
|
|
@Test
|
|
|
|
|
fun verifyCreditCardCannotBeSavedWithoutCardNumberTest() {
|
|
|
|
|
fun verifyCreditCardCannotBeSavedWithoutCardNumberOrNameTest() {
|
|
|
|
|
homeScreen {
|
|
|
|
|
}.openThreeDotMenu {
|
|
|
|
|
}.openSettings {
|
|
|
|
@ -390,29 +358,7 @@ class CreditCardAutofillTest {
|
|
|
|
|
clickSaveCreditCardToolbarButton()
|
|
|
|
|
verifyEditCreditCardToolbarTitle()
|
|
|
|
|
verifyCreditCardNumberErrorMessage()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun verifyCreditCardCannotBeSavedWithoutNameOnCardTest() {
|
|
|
|
|
homeScreen {
|
|
|
|
|
}.openThreeDotMenu {
|
|
|
|
|
}.openSettings {
|
|
|
|
|
}.openAutofillSubMenu {
|
|
|
|
|
verifyCreditCardsAutofillSection(true, false)
|
|
|
|
|
clickAddCreditCardButton()
|
|
|
|
|
fillAndSaveCreditCard(
|
|
|
|
|
MockCreditCard1.MOCK_CREDIT_CARD_NUMBER,
|
|
|
|
|
MockCreditCard1.MOCK_NAME_ON_CARD,
|
|
|
|
|
MockCreditCard1.MOCK_EXPIRATION_MONTH,
|
|
|
|
|
MockCreditCard1.MOCK_EXPIRATION_YEAR,
|
|
|
|
|
)
|
|
|
|
|
clickManageSavedCreditCardsButton()
|
|
|
|
|
clickSecuredCreditCardsLaterButton()
|
|
|
|
|
verifySavedCreditCardsSection(
|
|
|
|
|
MockCreditCard1.MOCK_LAST_CARD_DIGITS,
|
|
|
|
|
MockCreditCard1.MOCK_EXPIRATION_MONTH_AND_YEAR,
|
|
|
|
|
)
|
|
|
|
|
}.goBackToSavedCreditCards {
|
|
|
|
|
clickSavedCreditCard()
|
|
|
|
|
clearNameOnCreditCard()
|
|
|
|
|
clickSaveCreditCardToolbarButton()
|
|
|
|
@ -421,8 +367,9 @@ class CreditCardAutofillTest {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1512794
|
|
|
|
|
@Test
|
|
|
|
|
fun verifyMultipleCreditCardsCanBeSavedTest() {
|
|
|
|
|
fun verifyMultipleCreditCardsCanBeAddedTest() {
|
|
|
|
|
val creditCardFormPage = TestAssetHelper.getCreditCardFormAsset(mockWebServer)
|
|
|
|
|
|
|
|
|
|
homeScreen {
|
|
|
|
@ -476,8 +423,9 @@ class CreditCardAutofillTest {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2271304
|
|
|
|
|
@Test
|
|
|
|
|
fun verifyDoNotSaveCreditCardFromFormTest() {
|
|
|
|
|
fun verifyDoNotSaveCreditCardFromPromptTest() {
|
|
|
|
|
val creditCardFormPage = TestAssetHelper.getCreditCardFormAsset(mockWebServer)
|
|
|
|
|
|
|
|
|
|
navigationToolbar {
|
|
|
|
@ -496,8 +444,9 @@ class CreditCardAutofillTest {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1779194
|
|
|
|
|
@Test
|
|
|
|
|
fun verifySaveCreditCardFromFormTest() {
|
|
|
|
|
fun verifySaveCreditCardFromPromptTest() {
|
|
|
|
|
val creditCardFormPage = TestAssetHelper.getCreditCardFormAsset(mockWebServer)
|
|
|
|
|
|
|
|
|
|
navigationToolbar {
|
|
|
|
@ -522,6 +471,7 @@ class CreditCardAutofillTest {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2271305
|
|
|
|
|
@Test
|
|
|
|
|
fun verifyCancelCreditCardUpdatePromptTest() {
|
|
|
|
|
val creditCardFormPage = TestAssetHelper.getCreditCardFormAsset(mockWebServer)
|
|
|
|
@ -572,6 +522,7 @@ class CreditCardAutofillTest {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1779195
|
|
|
|
|
@Test
|
|
|
|
|
fun verifyConfirmCreditCardUpdatePromptTest() {
|
|
|
|
|
val creditCardFormPage = TestAssetHelper.getCreditCardFormAsset(mockWebServer)
|
|
|
|
@ -622,9 +573,9 @@ class CreditCardAutofillTest {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Ignore("Failing, see https://bugzilla.mozilla.org/show_bug.cgi?id=1847774")
|
|
|
|
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1512791
|
|
|
|
|
@Test
|
|
|
|
|
fun verifySavedCreditCardsRedirectionToAutofillAfterInterruptionTest() {
|
|
|
|
|
fun verifyCreditCardRedirectionsToAutofillSectionAfterInterruptionTest() {
|
|
|
|
|
homeScreen {
|
|
|
|
|
}.openThreeDotMenu {
|
|
|
|
|
}.openSettings {
|
|
|
|
@ -639,33 +590,15 @@ class CreditCardAutofillTest {
|
|
|
|
|
)
|
|
|
|
|
clickManageSavedCreditCardsButton()
|
|
|
|
|
clickSecuredCreditCardsLaterButton()
|
|
|
|
|
verifySavedCreditCardsSection(
|
|
|
|
|
MockCreditCard1.MOCK_LAST_CARD_DIGITS,
|
|
|
|
|
MockCreditCard1.MOCK_EXPIRATION_MONTH_AND_YEAR,
|
|
|
|
|
)
|
|
|
|
|
clickSavedCreditCard()
|
|
|
|
|
putAppToBackground()
|
|
|
|
|
bringAppToForeground()
|
|
|
|
|
verifyAutofillToolbarTitle()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun verifyEditCreditCardRedirectionToAutofillAfterInterruptionTest() {
|
|
|
|
|
homeScreen {
|
|
|
|
|
}.openThreeDotMenu {
|
|
|
|
|
}.openSettings {
|
|
|
|
|
}.openAutofillSubMenu {
|
|
|
|
|
verifyCreditCardsAutofillSection(true, false)
|
|
|
|
|
clickAddCreditCardButton()
|
|
|
|
|
fillAndSaveCreditCard(
|
|
|
|
|
MockCreditCard1.MOCK_CREDIT_CARD_NUMBER,
|
|
|
|
|
MockCreditCard1.MOCK_NAME_ON_CARD,
|
|
|
|
|
MockCreditCard1.MOCK_EXPIRATION_MONTH,
|
|
|
|
|
MockCreditCard1.MOCK_EXPIRATION_YEAR,
|
|
|
|
|
)
|
|
|
|
|
clickManageSavedCreditCardsButton()
|
|
|
|
|
clickSecuredCreditCardsLaterButton()
|
|
|
|
|
clickSavedCreditCard()
|
|
|
|
|
verifySavedCreditCardsSection(
|
|
|
|
|
MockCreditCard1.MOCK_LAST_CARD_DIGITS,
|
|
|
|
|
MockCreditCard1.MOCK_EXPIRATION_MONTH_AND_YEAR,
|
|
|
|
|
)
|
|
|
|
|
putAppToBackground()
|
|
|
|
|
bringAppToForeground()
|
|
|
|
|
verifyAutofillToolbarTitle()
|
|
|
|
|