mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-22 16:37:31 +09:00
Dactyloidae iOS initial commit
This commit is contained in:
parent
daa6179d22
commit
7154a0497e
2123 changed files with 197052 additions and 0 deletions
44
mobile/ios/XCUITests/HistoryTests.swift
Normal file
44
mobile/ios/XCUITests/HistoryTests.swift
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/* 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
|
||||
|
||||
let webpage = ["url": "www.mozilla.org", "label": "Internet for people, not profit — Mozilla", "value": "mozilla.org"]
|
||||
|
||||
class HistoryTests: BaseTestCase {
|
||||
var navigator: Navigator!
|
||||
var app: XCUIApplication!
|
||||
|
||||
override func setUp() {
|
||||
super.setUp()
|
||||
app = XCUIApplication()
|
||||
navigator = createScreenGraph(app).navigator(self)
|
||||
}
|
||||
|
||||
func testEmptyHistoryListFirstTime() {
|
||||
// Go to History List from Top Sites and check it is empty
|
||||
navigator.goto(HomePanel_History)
|
||||
waitforExistence(app.tables.cells["HistoryPanel.recentlyClosedCell"])
|
||||
XCTAssertTrue(app.tables.cells["HistoryPanel.recentlyClosedCell"].exists)
|
||||
XCTAssertTrue(app.tables.cells["HistoryPanel.syncedDevicesCell"].exists)
|
||||
XCTAssertFalse(app.tables.otherElements.staticTexts["Today"].exists)
|
||||
}
|
||||
|
||||
func testOpenHistoryFromBrowserContextMenuOptions() {
|
||||
navigator.openURL(urlString: webpage["url"]!)
|
||||
navigator.browserPerformAction(.openHistoryOption)
|
||||
|
||||
// Go to History List from Browser context menu and there should be one entry
|
||||
waitforExistence(app.tables.cells["HistoryPanel.recentlyClosedCell"])
|
||||
XCTAssertTrue(app.tables.otherElements.staticTexts["Today"].exists)
|
||||
XCTAssertTrue(app.tables.cells.staticTexts[webpage["label"]!].exists)
|
||||
}
|
||||
|
||||
func testOpenSyncDevices() {
|
||||
navigator.goto(HomePanel_History)
|
||||
app.tables.cells["HistoryPanel.syncedDevicesCell"].tap()
|
||||
waitforExistence(app.tables.cells.staticTexts["Firefox Sync"])
|
||||
XCTAssertTrue(app.tables/*@START_MENU_TOKEN@*/.buttons["Sign in"]/*[[".cells.buttons[\"Sign in\"]",".buttons[\"Sign in\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/.exists)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue