Browse Source

Update CopyToClipboardTests.swift

pull/113/head
Abhishek Banthia 3 years ago
parent
commit
40a09f6a77
  1. 12
      Clocker/ClockerUITests/CopyToClipboardTests.swift

12
Clocker/ClockerUITests/CopyToClipboardTests.swift

@ -35,19 +35,21 @@ class CopyToClipboardTests: XCTestCase {
// Test full copy
let cellCount = app.tables["FloatingTableView"].cells.count
var clipboardValue = String()
var clipboardValue: [String] = []
for cellIndex in 0 ..< cellCount {
let cell = app.tables["FloatingTableView"].cells.element(boundBy: cellIndex)
let customLabel = cell.staticTexts["CustomNameLabelForCell"].value ?? "Nil Custom Label"
let time = cell.staticTexts["ActualTime"].value ?? "Nil Value"
clipboardValue.append(contentsOf: "\(customLabel) - \(time)\n")
clipboardValue.append("\(time)")
}
app.buttons["Share"].click()
app/*@START_MENU_TOKEN@*/ .menuItems["Copy All Times"]/*[[".dialogs[\"Clocker Panel\"]",".buttons[\"Share\"]",".menus.menuItems[\"Copy All Times\"]",".menuItems[\"Copy All Times\"]"],[[[-1,3],[-1,2],[-1,1,2],[-1,0,1]],[[-1,3],[-1,2],[-1,1,2]],[[-1,3],[-1,2]]],[0]]@END_MENU_TOKEN@*/ .click()
let clipboard = NSPasteboard.general.string(forType: .string)
XCTAssert(clipboardValue == clipboard)
if let clipboard = NSPasteboard.general.string(forType: .string) {
for item in clipboardValue {
XCTAssertTrue(clipboard.contains(item))
}
}
}
func testModernSlider() {

Loading…
Cancel
Save