| | |
| | | fputs("FAIL: could not find settings window bounds\n", stderr) |
| | | exit(1) |
| | | } |
| | | print("\(Int(round(x + 523))) \(Int(round(y + 50)))") |
| | | print("\(Int(round(x + 625))) \(Int(round(y + 50)))") |
| | | case "export": |
| | | guard let settings = tag.first(where: { (($0[kCGWindowName as String] as? String) ?? "").isEmpty == false }), |
| | | let bounds = settings[kCGWindowBounds as String] as? NSDictionary, |
| | |
| | | let overlayX = dimension(overlayBounds, "X") |
| | | let overlayY = dimension(overlayBounds, "Y") |
| | | print("\(Int(round(overlayX + 120))) \(Int(round(overlayY + 160)))") |
| | | case "fullscreen-target-center": |
| | | guard let target = raw.first(where: { ($0[kCGWindowName as String] as? String) == "TagLauncherFullscreenQATargetFullscreen" }), |
| | | let bounds = target[kCGWindowBounds as String] as? NSDictionary else { |
| | | fputs("FAIL: could not find fullscreen target bounds\n", stderr) |
| | | exit(1) |
| | | } |
| | | let x = dimension(bounds, "X") |
| | | let y = dimension(bounds, "Y") |
| | | let width = dimension(bounds, "Width") |
| | | let height = dimension(bounds, "Height") |
| | | print("\(Int(round(x + width / 2))) \(Int(round(y + height / 2)))") |
| | | default: |
| | | fputs("FAIL: unknown coords mode \(mode)\n", stderr) |
| | | exit(1) |
| | |
| | | return 1 |
| | | } |
| | | |
| | | move_pointer_to_fullscreen_target() { |
| | | local coords |
| | | coords="$(swift "$coords_swift" fullscreen-target-center)" |
| | | read -r x y <<<"$coords" |
| | | move_xy "$x" "$y" |
| | | sleep 0.2 |
| | | } |
| | | |
| | | log "==> Building app" |
| | | bash "$ROOT_DIR/build.sh" >/dev/null |
| | | |
| | |
| | | sleep 2.0 |
| | | assert_single_qa_app_instance |
| | | assert_single_dock_tile |
| | | send_keycode 53 |
| | | kill_all_taglauncher_instances |
| | | sleep 0.4 |
| | | wait_swift_assert no-overlay |
| | | swift_assert no-overlay |
| | | |
| | | log "==> QA split-view fullscreen geometry detection" |
| | | swift_assert split-geometry |
| | |
| | | defaults write "$DEFAULTS_DOMAIN" showDockIcon -bool "$dock_value" |
| | | prepare_isolated_app_instance |
| | | start_fullscreen_qa_target |
| | | move_pointer_to_fullscreen_target |
| | | send_main_hotkey |
| | | wait_swift_assert fullscreen-overlay |
| | | assert_fullscreen_overlay_stable |