From 24fb909be2a287a6ffbccf0cdac85b8db17da78e Mon Sep 17 00:00:00 2001 From: Clare So Date: Mon, 4 Nov 2024 16:46:21 -0500 Subject: [PATCH 1/5] Use https instead of http url --- .../Tests/SyncIntegrationTests/test_bookmark.js | 2 +- .../Tests/SyncIntegrationTests/test_bookmark_desktop.js | 2 +- .../Tests/SyncIntegrationTests/test_bookmark_login.js | 2 +- .../Tests/SyncIntegrationTests/test_history.js | 2 +- .../Tests/SyncIntegrationTests/test_history_desktop.js | 2 +- .../Tests/SyncIntegrationTests/test_tabs.js | 4 ++-- .../Tests/SyncIntegrationTests/test_tabs_desktop.js | 2 +- .../Tests/XCUITests/IntegrationTests.swift | 6 +++--- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_bookmark.js b/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_bookmark.js index a6a42aa6d0f8..850a2ca94c3d 100644 --- a/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_bookmark.js +++ b/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_bookmark.js @@ -14,7 +14,7 @@ var phases = { "phase1": "profile1" }; // expected bookmark state var bookmarksExpected = { "mobile": [{ - uri: "http://www.example.com/", + uri: "https://www.example.com/", title: "Example Domain"}] }; diff --git a/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_bookmark_desktop.js b/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_bookmark_desktop.js index e083fc25a2ba..08863c9ab523 100644 --- a/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_bookmark_desktop.js +++ b/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_bookmark_desktop.js @@ -14,7 +14,7 @@ var phases = { "phase1": "profile1" }; // expected bookmark state var bookmarksCreated = { "mobile": [{ - uri: "http://www.example.com/", + uri: "https://www.example.com/", title: "Example Domain"}] }; diff --git a/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_bookmark_login.js b/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_bookmark_login.js index 294159cce2b0..1146c1f0a0a2 100644 --- a/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_bookmark_login.js +++ b/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_bookmark_login.js @@ -14,7 +14,7 @@ var phases = { "phase1": "profile1" }; // expected bookmark state var bookmarksCreated = { "mobile": [{ - uri: "http://www.example.com/", + uri: "https://www.example.com/", title: "Example Domain"}] }; diff --git a/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_history.js b/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_history.js index 9735416753ee..26af2475ee97 100644 --- a/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_history.js +++ b/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_history.js @@ -13,7 +13,7 @@ var phases = { "phase1": "profile1" }; // expected history state var historyExpected = [ - { uri: "http://www.example.com/", + { uri: "https://www.example.com/", visits: [ { type: 1 } ] diff --git a/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_history_desktop.js b/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_history_desktop.js index 0ced84b5bf99..c6ef6ddfa66f 100644 --- a/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_history_desktop.js +++ b/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_history_desktop.js @@ -13,7 +13,7 @@ var phases = { "phase1": "profile1" }; // expected history state var historyCreated = [ - { uri: "http://www.example.com/", + { uri: "https://www.example.com/", visits: [ { type: 1 , date: 0 diff --git a/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_tabs.js b/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_tabs.js index deb65d9a4569..5b3fea17cf97 100644 --- a/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_tabs.js +++ b/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_tabs.js @@ -13,8 +13,8 @@ var phases = { "phase1": "profile1" }; // expected tabs state var tabs1 = [ - { uri: "http://example.com/", - profile: "Fennec (administrator) on iOS" + { uri: "https://example.com/", + profile: "Fennec (cso) on iOS" } ]; diff --git a/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_tabs_desktop.js b/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_tabs_desktop.js index e6254d79a773..56534af0c6c3 100644 --- a/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_tabs_desktop.js +++ b/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_tabs_desktop.js @@ -12,7 +12,7 @@ var phases = { "phase1": "profile1", "phase2": "profile1" }; var tabs1 = [ - { uri: "http://example.com/", + { uri: "https://example.com/", profile: "Fennec on iOS" } ]; diff --git a/firefox-ios/firefox-ios-tests/Tests/XCUITests/IntegrationTests.swift b/firefox-ios/firefox-ios-tests/Tests/XCUITests/IntegrationTests.swift index c25233d2be41..538a1aaeb05e 100644 --- a/firefox-ios/firefox-ios-tests/Tests/XCUITests/IntegrationTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/XCUITests/IntegrationTests.swift @@ -8,9 +8,9 @@ import XCTest private let testingURL = "example.com" private let userName = "iosmztest" private let userPassword = "test15mz" -private let historyItemSavedOnDesktop = "http://www.example.com/" +private let historyItemSavedOnDesktop = "https://www.example.com/" private let loginEntry = "https://accounts.google.com" -private let tabOpenInDesktop = "http://example.com/" +private let tabOpenInDesktop = "https://example.com/" class IntegrationTests: BaseTestCase { let testWithDB = ["testFxASyncHistory"] @@ -146,7 +146,7 @@ class IntegrationTests: BaseTestCase { mozWaitForElementToExist(app.cells["DeviceNameSetting"].textFields["DeviceNameSettingTextField"]) XCTAssertEqual( app.cells["DeviceNameSetting"].textFields["DeviceNameSettingTextField"].value! as! String, - "Fennec (administrator) on iOS" + "Fennec (cso) on iOS" ) // Sync again just to make sure to sync after new name is shown From 9f9e90490dd87828baa54af43119f4f31af46b99 Mon Sep 17 00:00:00 2001 From: Clare So Date: Mon, 4 Nov 2024 16:58:27 -0500 Subject: [PATCH 2/5] Use https URL throughout the tests --- .../firefox-ios-tests/Tests/XCUITests/IntegrationTests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox-ios/firefox-ios-tests/Tests/XCUITests/IntegrationTests.swift b/firefox-ios/firefox-ios-tests/Tests/XCUITests/IntegrationTests.swift index 538a1aaeb05e..5f76ae7c0f12 100644 --- a/firefox-ios/firefox-ios-tests/Tests/XCUITests/IntegrationTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/XCUITests/IntegrationTests.swift @@ -5,7 +5,7 @@ import Common import XCTest -private let testingURL = "example.com" +private let testingURL = "https://example.com" private let userName = "iosmztest" private let userPassword = "test15mz" private let historyItemSavedOnDesktop = "https://www.example.com/" From 8456240c24e1079cafe976bd1ce7e2a8df561fa8 Mon Sep 17 00:00:00 2001 From: Clare So Date: Mon, 4 Nov 2024 16:59:53 -0500 Subject: [PATCH 3/5] Revert username --- .../firefox-ios-tests/Tests/SyncIntegrationTests/test_tabs.js | 2 +- .../firefox-ios-tests/Tests/XCUITests/IntegrationTests.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_tabs.js b/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_tabs.js index 5b3fea17cf97..6b33231aed00 100644 --- a/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_tabs.js +++ b/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_tabs.js @@ -14,7 +14,7 @@ var phases = { "phase1": "profile1" }; // expected tabs state var tabs1 = [ { uri: "https://example.com/", - profile: "Fennec (cso) on iOS" + profile: "Fennec (administrator) on iOS" } ]; diff --git a/firefox-ios/firefox-ios-tests/Tests/XCUITests/IntegrationTests.swift b/firefox-ios/firefox-ios-tests/Tests/XCUITests/IntegrationTests.swift index 5f76ae7c0f12..ae02d69151fd 100644 --- a/firefox-ios/firefox-ios-tests/Tests/XCUITests/IntegrationTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/XCUITests/IntegrationTests.swift @@ -146,7 +146,7 @@ class IntegrationTests: BaseTestCase { mozWaitForElementToExist(app.cells["DeviceNameSetting"].textFields["DeviceNameSettingTextField"]) XCTAssertEqual( app.cells["DeviceNameSetting"].textFields["DeviceNameSettingTextField"].value! as! String, - "Fennec (cso) on iOS" + "Fennec (administrator) on iOS" ) // Sync again just to make sure to sync after new name is shown From 190d346949dc635c3898f8b62bc0a20bcc85fe65 Mon Sep 17 00:00:00 2001 From: Clare So Date: Tue, 5 Nov 2024 00:14:30 -0500 Subject: [PATCH 4/5] Put back http because of the database --- .../Tests/SyncIntegrationTests/test_history.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_history.js b/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_history.js index 26af2475ee97..9735416753ee 100644 --- a/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_history.js +++ b/firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests/test_history.js @@ -13,7 +13,7 @@ var phases = { "phase1": "profile1" }; // expected history state var historyExpected = [ - { uri: "https://www.example.com/", + { uri: "http://www.example.com/", visits: [ { type: 1 } ] From fb4cf15ebceac298e01982f007bc2ea4d164438f Mon Sep 17 00:00:00 2001 From: Clare So Date: Tue, 5 Nov 2024 00:24:02 -0500 Subject: [PATCH 5/5] Use https URL in testFxASyncBookmark --- .../firefox-ios-tests/Tests/XCUITests/IntegrationTests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firefox-ios/firefox-ios-tests/Tests/XCUITests/IntegrationTests.swift b/firefox-ios/firefox-ios-tests/Tests/XCUITests/IntegrationTests.swift index ae02d69151fd..3932e233d457 100644 --- a/firefox-ios/firefox-ios-tests/Tests/XCUITests/IntegrationTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/XCUITests/IntegrationTests.swift @@ -111,7 +111,7 @@ class IntegrationTests: BaseTestCase { func testFxASyncBookmark () { // Bookmark is added by the DB // Sign into Mozilla Account - navigator.openURL("example.com") + navigator.openURL(testingURL) mozWaitForElementToExist(app.buttons[AccessibilityIdentifiers.Toolbar.trackingProtection]) navigator.goto(BrowserTabMenu) app.tables.otherElements[StandardImageIdentifiers.Large.bookmark].waitAndTap()