Skip to content

Commit

Permalink
Refactor MTE-1776 [v120] CopiedLinksTests and SettingsTests with Test…
Browse files Browse the repository at this point in the history
…Rail
  • Loading branch information
dragosb01 committed Oct 19, 2023
1 parent 6897520 commit 286e39c
Show file tree
Hide file tree
Showing 11 changed files with 90 additions and 51 deletions.
16 changes: 8 additions & 8 deletions Client.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
2C2A91291FA2410D002E36BD /* HistoryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C2A91281FA2410D002E36BD /* HistoryTests.swift */; };
2C31A7A91E8BFB2200DAC646 /* ReadingListTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C31A7A81E8BFB2200DAC646 /* ReadingListTests.swift */; };
2C31A8471E8D447F00DAC646 /* HomePageSettingsUITest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C31A8461E8D447F00DAC646 /* HomePageSettingsUITest.swift */; };
2C3406C81E719F00000FD889 /* SettingsTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C3406C71E719F00000FD889 /* SettingsTest.swift */; };
2C3406C81E719F00000FD889 /* SettingsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C3406C71E719F00000FD889 /* SettingsTests.swift */; };
2C473BD0209778900008C853 /* DownloadsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C473BCF209778900008C853 /* DownloadsTests.swift */; };
2C49854E206173C800893DAE /* photon-colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C49854D206173C800893DAE /* photon-colors.swift */; };
2C4A07DC20246EAD0083E320 /* DragAndDropTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C4A07DB20246EAD0083E320 /* DragAndDropTests.swift */; };
Expand Down Expand Up @@ -275,7 +275,6 @@
3BF4B8E91D38497A00493393 /* BaseTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BF4B8E81D38497A00493393 /* BaseTestCase.swift */; };
3BF56D271CDBBE1F00AC4D75 /* SimpleToast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BF56D261CDBBE1F00AC4D75 /* SimpleToast.swift */; };
3BFE4B501D34673D00DDF53F /* ThirdPartySearchTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BFE4B4F1D34673D00DDF53F /* ThirdPartySearchTest.swift */; };
3D71C89E1F5703A1008D8646 /* CopiedLinksTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D71C89D1F5703A1008D8646 /* CopiedLinksTests.swift */; };
3D9CA9841EF456A8002434DD /* NightModeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D9CA9831EF456A8002434DD /* NightModeTests.swift */; };
3D9CA9A81EF84D04002434DD /* NoImageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D9CA9A71EF84D04002434DD /* NoImageTests.swift */; };
3D9CAA1C1EFCD655002434DD /* ClipBoardTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D9CAA1B1EFCD655002434DD /* ClipBoardTests.swift */; };
Expand Down Expand Up @@ -859,6 +858,7 @@
B10997432A97251D00CC8860 /* UrlBarTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B10997422A97251D00CC8860 /* UrlBarTests.swift */; };
B12DDFED2A8DE825008CE9CF /* ToolbarMenuTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B12DDFEC2A8DE825008CE9CF /* ToolbarMenuTests.swift */; };
B15058812AA0A878008B7382 /* OpeningScreenTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B15058802AA0A878008B7382 /* OpeningScreenTests.swift */; };
B169F7E12AE14D8B00F6AF29 /* DefaultBrowserTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B169F7E02AE14D8B00F6AF29 /* DefaultBrowserTests.swift */; };
B640467E29B9B58200C5C7B6 /* TabLocationViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B640467D29B9B58200C5C7B6 /* TabLocationViewTests.swift */; };
BCFF93EE2AAA9F6E005B5B71 /* RustFirefoxSuggest.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCFF93ED2AAA9C47005B5B71 /* RustFirefoxSuggest.swift */; };
BCFF93F02AABA55A005B5B71 /* BackgroundFirefoxSuggestIngestUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCFF93EF2AAB97A8005B5B71 /* BackgroundFirefoxSuggestIngestUtility.swift */; };
Expand Down Expand Up @@ -2315,7 +2315,7 @@
2C31A7A81E8BFB2200DAC646 /* ReadingListTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadingListTests.swift; sourceTree = "<group>"; };
2C31A8461E8D447F00DAC646 /* HomePageSettingsUITest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomePageSettingsUITest.swift; sourceTree = "<group>"; };
2C33410CB7E921A125379D7C /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = "<group>"; };
2C3406C71E719F00000FD889 /* SettingsTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsTest.swift; sourceTree = "<group>"; };
2C3406C71E719F00000FD889 /* SettingsTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsTests.swift; sourceTree = "<group>"; };
2C473BCF209778900008C853 /* DownloadsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DownloadsTests.swift; sourceTree = "<group>"; };
2C49854D206173C800893DAE /* photon-colors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "photon-colors.swift"; sourceTree = "<group>"; };
2C4A07DB20246EAD0083E320 /* DragAndDropTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DragAndDropTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2534,7 +2534,6 @@
3D1B427CBBF9661428718235 /* ast */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ast; path = ast.lproj/AuthenticationManager.strings; sourceTree = "<group>"; };
3D254A72992C6FE06123E4F1 /* is */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = is; path = is.lproj/Search.strings; sourceTree = "<group>"; };
3D3A4AE2A54D99CE5F25E57E /* sat-Olck */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "sat-Olck"; path = "sat-Olck.lproj/ClearPrivateData.strings"; sourceTree = "<group>"; };
3D71C89D1F5703A1008D8646 /* CopiedLinksTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CopiedLinksTests.swift; sourceTree = "<group>"; };
3D744D81B8C64FA197FBFC3C /* or */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = or; path = or.lproj/ClearHistoryConfirm.strings; sourceTree = "<group>"; };
3D844CB6B34780D0E010713A /* ia */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ia; path = "ia.lproj/Default Browser.strings"; sourceTree = "<group>"; };
3D9CA9831EF456A8002434DD /* NightModeTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NightModeTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -5551,6 +5550,7 @@
B10997422A97251D00CC8860 /* UrlBarTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UrlBarTests.swift; sourceTree = "<group>"; };
B12DDFEC2A8DE825008CE9CF /* ToolbarMenuTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToolbarMenuTests.swift; sourceTree = "<group>"; };
B15058802AA0A878008B7382 /* OpeningScreenTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpeningScreenTests.swift; sourceTree = "<group>"; };
B169F7E02AE14D8B00F6AF29 /* DefaultBrowserTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultBrowserTests.swift; sourceTree = "<group>"; };
B1864C62B7F68815AA1FE0C2 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/HistoryPanel.strings; sourceTree = "<group>"; };
B18D4F2291BA5459431EDCA9 /* es-MX */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-MX"; path = "es-MX.lproj/Shared.strings"; sourceTree = "<group>"; };
B19648D5B3667FE0CB25D069 /* my */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = my; path = my.lproj/Menu.strings; sourceTree = "<group>"; };
Expand Down Expand Up @@ -7815,7 +7815,6 @@
0B305E1A1E3A98A900BE0767 /* BookmarksTests.swift */,
2CF9D9A920067FA10083DF2A /* BrowsingPDFTests.swift */,
3D9CAA1B1EFCD655002434DD /* ClipBoardTests.swift */,
3D71C89D1F5703A1008D8646 /* CopiedLinksTests.swift */,
EB3A38912032673D004C6E67 /* DatabaseFixtureTest.swift */,
2CC1B3EF1E9B861400814EEC /* DomainAutocompleteTest.swift */,
2C473BCF209778900008C853 /* DownloadsTests.swift */,
Expand All @@ -7842,7 +7841,7 @@
39012F271F8ED262002E3D31 /* ScreenGraphTest.swift */,
2CEA6F781E93E3A600D4100E /* SearchSettingsUITest.swift */,
2CA16FDD1E5F089100332277 /* SearchTest.swift */,
2C3406C71E719F00000FD889 /* SettingsTest.swift */,
2C3406C71E719F00000FD889 /* SettingsTests.swift */,
0BC9C9C31F26F54D000E8AB5 /* SiteLoadTest.swift */,
2CEDADA120207EC400223A89 /* SyncFAUITests.swift */,
3BFE4B4F1D34673D00DDF53F /* ThirdPartySearchTest.swift */,
Expand All @@ -7859,6 +7858,7 @@
B12DDFEC2A8DE825008CE9CF /* ToolbarMenuTests.swift */,
B10997422A97251D00CC8860 /* UrlBarTests.swift */,
B15058802AA0A878008B7382 /* OpeningScreenTests.swift */,
B169F7E02AE14D8B00F6AF29 /* DefaultBrowserTests.swift */,
);
path = XCUITests;
sourceTree = "<group>";
Expand Down Expand Up @@ -12278,14 +12278,14 @@
2C4A07DC20246EAD0083E320 /* DragAndDropTests.swift in Sources */,
2C2A5EF41E68469500F02659 /* PrivateBrowsingTest.swift in Sources */,
D4C35391283500A600F7DC7D /* PerformanceTests.swift in Sources */,
3D71C89E1F5703A1008D8646 /* CopiedLinksTests.swift in Sources */,
2CF449A51E7BFE2C00FD7595 /* NavigationTest.swift in Sources */,
2C2A91291FA2410D002E36BD /* HistoryTests.swift in Sources */,
782B0A362AB41DFC0049EE1A /* FakespotTests.swift in Sources */,
580B0C4221748CFE00448DF8 /* DataManagementTests.swift in Sources */,
3BF4B8E91D38497A00493393 /* BaseTestCase.swift in Sources */,
3D9CAA1C1EFCD655002434DD /* ClipBoardTests.swift in Sources */,
2CB1A65A1FDEA8B60084E96D /* NewTabSettings.swift in Sources */,
B169F7E12AE14D8B00F6AF29 /* DefaultBrowserTests.swift in Sources */,
0B3D670E1E09B90B00C1EFC7 /* AuthenticationTest.swift in Sources */,
D4C4BDCE2253725E00986F04 /* LibraryTests.swift in Sources */,
2C28F96C201B2D4C00ABA8A5 /* MailAppSettingsTests.swift in Sources */,
Expand All @@ -12310,7 +12310,7 @@
2C8C07771E7800EA00DC1237 /* FindInPageTests.swift in Sources */,
2CB56E3F1E926BFB00AF7586 /* ToolbarTest.swift in Sources */,
B10997432A97251D00CC8860 /* UrlBarTests.swift in Sources */,
2C3406C81E719F00000FD889 /* SettingsTest.swift in Sources */,
2C3406C81E719F00000FD889 /* SettingsTests.swift in Sources */,
2CF21D0920A4A163000D08B7 /* PocketTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
4 changes: 2 additions & 2 deletions Tests/ExperimentIntegrationTests.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
"BookmarksTests",
"BrowsingPDFTests",
"ClipBoardTests",
"CopiedLinksTests",
"DataManagementTests",
"DatabaseFixtureTest",
"DefaultBrowserTests",
"DesktopModeTestsIpad",
"DesktopModeTestsIphone",
"DisplaySettingTests",
Expand Down Expand Up @@ -59,7 +59,7 @@
"ScreenGraphTest",
"SearchSettingsUITests",
"SearchTests",
"SettingsTest",
"SettingsTests",
"SiteLoadTest",
"SyncUITests",
"TabCounterTests",
Expand Down
1 change: 1 addition & 0 deletions Tests/FullFunctionalTestPlan.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"DatabaseFixtureTest\/testPerBookmarks1000startUp()",
"DatabaseFixtureTest\/testPerfHistory4000openMenu()",
"DatabaseFixtureTest\/testPerfHistory4000startUp()",
"DefaultBrowserTests",
"DesktopModeTestsIpad",
"DesktopModeTestsIphone\/testChangeModeInSameTab()",
"DesktopModeTestsIphone\/testLongPressReload()",
Expand Down
4 changes: 2 additions & 2 deletions Tests/PerformanceTestPlan.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
"BookmarksTests",
"BrowsingPDFTests",
"ClipBoardTests",
"CopiedLinksTests",
"DataManagementTests",
"DatabaseFixtureTest",
"DatabaseFixtureTest\/testPerfBookmarks1000openMenu()",
"DatabaseFixtureTest\/testPerfBookmarks1000startUp()",
"DatabaseFixtureTest\/testPerfHistory4000openMenu()",
"DatabaseFixtureTest\/testPerfHistory4000startUp()",
"DefaultBrowserTests",
"DesktopModeTestsIpad",
"DesktopModeTestsIphone",
"DisplaySettingTests",
Expand Down Expand Up @@ -65,7 +65,7 @@
"ScreenGraphTest",
"SearchSettingsUITests",
"SearchTests",
"SettingsTest",
"SettingsTests",
"SiteLoadTest",
"SyncUITests",
"TabCounterTests",
Expand Down
4 changes: 2 additions & 2 deletions Tests/SmokeXCUITests.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@
"BookmarksTests\/testRecentlyBookmarked()",
"BrowsingPDFTests",
"ClipBoardTests\/testClipboard()",
"CopiedLinksTests",
"CronTabsPerformanceTest",
"DataManagementTests\/testWebSiteDataOptions()",
"DatabaseFixtureTest",
"DefaultBrowserTests",
"DesktopModeTestsIphone\/testClearPrivateData()",
"DesktopModeTestsIphone\/testPrivateModeOffAlsoRemovesFromNormalMode()",
"DesktopModeTestsIphone\/testPrivateModeOnHasNoAffectOnNormalMode()",
Expand Down Expand Up @@ -161,7 +161,7 @@
"SearchTests\/testPromptPresence()",
"SearchTests\/testSearchIconOnAboutHome()",
"SearchTests\/testSearchWithFirefoxOption()",
"SettingsTest",
"SettingsTests",
"SiteLoadTest",
"SyncUITests",
"SyncUITests\/testCreateAnAccountLink()",
Expand Down
4 changes: 2 additions & 2 deletions Tests/Smoketest2.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
"BrowsingPDFTests\/testLongPressOnPDFLinkToAddToReadingList()",
"BrowsingPDFTests\/testOpenPDFViewer()",
"ClipBoardTests",
"CopiedLinksTests",
"CronTabsPerformanceTest",
"DataManagementTests",
"DatabaseFixtureTest",
"DefaultBrowserTests",
"DesktopModeTestsIpad",
"DesktopModeTestsIphone",
"DisplaySettingTests",
Expand Down Expand Up @@ -78,7 +78,7 @@
"SearchTests\/testPromptPresence()",
"SearchTests\/testSearchIconOnAboutHome()",
"SearchTests\/testSearchWithFirefoxOption()",
"SettingsTest",
"SettingsTests",
"SiteLoadTest",
"SyncUITests",
"TabCounterTests",
Expand Down
4 changes: 2 additions & 2 deletions Tests/Smoketest3.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"BookmarksTests",
"BrowsingPDFTests",
"ClipBoardTests",
"CopiedLinksTests",
"DataManagementTests",
"DatabaseFixtureTest",
"DefaultBrowserTests",
"DesktopModeTestsIpad",
"DesktopModeTestsIphone",
"DisplaySettingTests",
Expand Down Expand Up @@ -100,7 +100,7 @@
"ScreenGraphTest",
"SearchSettingsUITests",
"SearchTests",
"SettingsTest",
"SettingsTests",
"SiteLoadTest",
"SyncUITests",
"TabCounterTests",
Expand Down
4 changes: 2 additions & 2 deletions Tests/Smoketest4.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"BookmarksTests",
"BrowsingPDFTests",
"ClipBoardTests",
"CopiedLinksTests",
"DataManagementTests",
"DatabaseFixtureTest",
"DefaultBrowserTests",
"DesktopModeTestsIpad",
"DesktopModeTestsIphone",
"DisplaySettingTests",
Expand Down Expand Up @@ -104,7 +104,7 @@
"SearchTests\/testPromptPresence()",
"SearchTests\/testSearchIconOnAboutHome()",
"SearchTests\/testSearchWithFirefoxOption()",
"SettingsTest",
"SettingsTests",
"SiteLoadTest",
"SyncUITests",
"TabCounterTests",
Expand Down
4 changes: 2 additions & 2 deletions Tests/SyncIntegrationTestPlan.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
"BookmarksTests",
"BrowsingPDFTests",
"ClipBoardTests",
"CopiedLinksTests",
"CronTabsPerformanceTest",
"DataManagementTests",
"DatabaseFixtureTest",
"DefaultBrowserTests",
"DesktopModeTestsIpad",
"DesktopModeTestsIphone",
"DisplaySettingTests",
Expand Down Expand Up @@ -85,7 +85,7 @@
"ScreenGraphTest",
"SearchSettingsUITests",
"SearchTests",
"SettingsTest",
"SettingsTests",
"SiteLoadTest",
"SyncUITests",
"TabCounterTests",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,12 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/

import XCTest
import Foundation

class SettingsTest: BaseTestCase {
func testHelpOpensSUMOInTab() {
navigator.nowAt(NewTabScreen)
navigator.goto(SettingsScreen)
let settingsTableView = app.tables[AccessibilityIdentifiers.Settings.tableViewController]

while settingsTableView.staticTexts["Help"].exists == false {
settingsTableView.swipeUp()
}
let helpMenu = settingsTableView.cells["Help"]
XCTAssertTrue(helpMenu.isEnabled)
helpMenu.tap()

waitUntilPageLoad()
mozWaitForValueContains(app.textFields["url"], value: "support.mozilla.org")
mozWaitForElementToExist(app.webViews.staticTexts["Firefox for iOS Support"])

let numTabs = app.buttons["Show Tabs"].value
XCTAssertEqual("2", numTabs as? String, "Sume should be open in a different tab")
}

func testOpenSiriOption() {
waitForTabsButton()
navigator.nowAt(NewTabScreen)
navigator.performAction(Action.OpenSiriFromSettings)
mozWaitForElementToExist(app.cells["SiriSettings"], timeout: 5)
}
class DefaultBrowserTests: BaseTestCase {
// https://testrail.stage.mozaws.net/index.php?/cases/view/2306804
/* Disable test since the option to set Firefox is not available in this build after issue #8513 landed, issue #8627
func testDefaultBrowser() {
func testSetFirefoxDefaultBrowserFromHomeScreenBanner() {
// A default browser card should be available on the home screen
mozWaitForElementToExist(app.staticTexts["Set links from websites, emails, and Messages to open automatically in Firefox."], timeout: 5)
mozWaitForElementToExist(app.buttons["Learn More"], timeout: 5)
Expand Down
63 changes: 63 additions & 0 deletions Tests/XCUITests/SettingsTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/

import XCTest

class SettingsTests: BaseTestCase {
// https://testrail.stage.mozaws.net/index.php?/cases/view/2334757
func testHelpOpensSUMOInTab() {
navigator.nowAt(NewTabScreen)
navigator.goto(SettingsScreen)
let settingsTableView = app.tables[AccessibilityIdentifiers.Settings.tableViewController]

while settingsTableView.staticTexts["Help"].exists == false {
settingsTableView.swipeUp()
}
let helpMenu = settingsTableView.cells["Help"]
XCTAssertTrue(helpMenu.isEnabled)
helpMenu.tap()

waitUntilPageLoad()
mozWaitForValueContains(app.textFields["url"], value: "support.mozilla.org")
mozWaitForElementToExist(app.webViews.staticTexts["Firefox for iOS Support"])

let numTabs = app.buttons["Show Tabs"].value
XCTAssertEqual("2", numTabs as? String, "Sume should be open in a different tab")
}

// https://testrail.stage.mozaws.net/index.php?/cases/view/2334760
func testOpenSiriOption() {
waitForTabsButton()
navigator.nowAt(NewTabScreen)
navigator.performAction(Action.OpenSiriFromSettings)
mozWaitForElementToExist(app.cells["SiriSettings"], timeout: 5)
}

// https://testrail.stage.mozaws.net/index.php?/cases/view/2334756
func testCopiedLinks() {
navigator.nowAt(NewTabScreen)
navigator.goto(SettingsScreen)

// Check Offer to open copied links, when opening firefox is off
let value = app.tables.cells.switches["Offer to Open Copied Links, When Opening Firefox"].value
XCTAssertEqual(value as? String, "0")

// Switch on, Offer to open copied links, when opening firefox
app.tables.cells.switches["Offer to Open Copied Links, When Opening Firefox"].tap()

// Check Offer to open copied links, when opening firefox is on
let value2 = app.tables.cells.switches["Offer to Open Copied Links, When Opening Firefox"].value
XCTAssertEqual(value2 as? String, "1")

app.navigationBars["Settings"].buttons["Done"].tap()

app.buttons[AccessibilityIdentifiers.Toolbar.settingsMenuButton].tap()
let settingsmenuitemCell = app.tables.otherElements["Settings"]
settingsmenuitemCell.tap()

// Check Offer to open copied links, when opening firefox is on
let value3 = app.tables.cells.switches["Offer to Open Copied Links, When Opening Firefox"].value
XCTAssertEqual(value3 as? String, "1")
}
}

0 comments on commit 286e39c

Please sign in to comment.