From 2d21de00fb94ec76e69ba28925f09acf5a8745f0 Mon Sep 17 00:00:00 2001 From: Abhishek Date: Fri, 2 Jul 2021 15:19:56 -0500 Subject: [PATCH] Add tests for copy functionality. --- .../ClockerUITests/CopyToClipboardTests.swift | 53 +++++++++++++++++++ Clocker/Panel/UI/TimezoneCellView.swift | 1 - 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 Clocker/ClockerUITests/CopyToClipboardTests.swift diff --git a/Clocker/ClockerUITests/CopyToClipboardTests.swift b/Clocker/ClockerUITests/CopyToClipboardTests.swift new file mode 100644 index 0000000..96b5323 --- /dev/null +++ b/Clocker/ClockerUITests/CopyToClipboardTests.swift @@ -0,0 +1,53 @@ +// Copyright © 2015 Abhishek Banthia + +import XCTest + +class CopyToClipboardTests: XCTestCase { + var app: XCUIApplication! + + override func setUp() { + continueAfterFailure = false + app = XCUIApplication() + app.launch() + + if app.tables["FloatingTableView"].exists == false { + app.tapMenubarIcon() + app.buttons["FloatingPin"].click() + } + } + + override func tearDownWithError() throws { + app = nil + } + + func testFullCopy() throws { + let cellCount = app.tables["FloatingTableView"].cells.count + var clipboardValue = String() + for cellIndex in 0..