Skip to content

Instantly share code, notes, and snippets.

View gunesmes's full-sized avatar
🎯
Focusing

Mesut Güneş gunesmes

🎯
Focusing
View GitHub Profile
package testrisk.dictionary.tests
import org.junit.Before
import org.junit.Test
import testrisk.dictionary.pages.DictionaryScreen
import testrisk.dictionary.pages.HomeScreen
class DictionaryScreenTests : BaseTest() {
private var dictionaryScreen = DictionaryScreen()
private var homeScreen = HomeScreen()
package testrisk.dictionary.tests
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.rule.ActivityTestRule
import org.junit.Before
import org.junit.Rule
import org.junit.runner.RunWith
import testrisk.dictionary.MainActivity
@RunWith(AndroidJUnit4::class)
package testrisk.dictionary.pages
import androidx.test.espresso.Espresso
import androidx.test.espresso.assertion.ViewAssertions
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.withId
import testrisk.dictionary.R
class DictionaryScreen : BaseScreen() {
private var recyclerViewSozluk = Espresso.onView(withId(R.id.recyclerView))
package testrisk.dictionary.pages
import androidx.annotation.IdRes
import androidx.test.espresso.Espresso
import androidx.test.espresso.ViewInteraction
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
import androidx.test.uiautomator.UiSelector
import testrisk.dictionary.R
final class HomeViewController: UIViewController {
private let networkManager = NetworkManager()
// MARK: Properties
@IBOutlet weak var dictionaryImg: UIImageView!
@IBOutlet var readmeMd: MarkdownView!
private var home: Home? {
didSet {
//
// HomeScreenTests.swift
// TestDictionaryUITests
//
// Created by MESUT GUNES on 1.08.2021.
// Copyright © 2021 MesutGunes. All rights reserved.
//
import Foundation
import XCTest
//
// BaseTest.swift
// TestDictionaryUITests
//
// Created by MESUT GUNES on 1.08.2021.
// Copyright © 2021 MesutGunes. All rights reserved.
//
import Foundation
import XCTest
//
// HomeScreen.swift
// TestDictionaryUITests
//
// Created by MESUT GUNES on 1.08.2021.
// Copyright © 2021 MesutGunes. All rights reserved.
//
import Foundation
import XCTest
@gunesmes
gunesmes / BaseScreen.swift
Last active February 8, 2022 06:04
XCUITest-BaseScreen.swift
//
// BaseScreen.swift
// TestDictionaryUITests
//
// Created by MESUT GUNES on 1.08.2021.
// Copyright © 2021 MesutGunes. All rights reserved.
//
import Foundation
import XCTest
#!/usr/bin/env bash
# Author: Mesut Güneş
set -e
#-1 upload app
upload_app=$(curl -u "$BROWSERSTACK_USER:$BROWSERSTACK_ACCESS_KEY" -X POST "https://api-cloud.browserstack.com/app-automate/espresso/v2/app" -F "file=@$BITRISE_APK_PATH")
app_url=$(echo $upload_app | jq -r .app_url)
envman add --key BROWSERSTACK_APP_URL --value $app_url