Skip to content

Commit

Permalink
Move library package to com.adevinta (#423)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sloy authored Jun 8, 2021
1 parent 43285c4 commit 2a6a34f
Show file tree
Hide file tree
Showing 200 changed files with 619 additions and 616 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* SchibstedSpain/barista-maintainers
* AdevintaSpain/barista-maintainers
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Barista makes developing UI test faster, easier and more predictable. Built on t

Import Barista as a testing dependency:
```gradle
androidTestImplementation('com.schibsted.spain:barista:3.9.0') {
androidTestImplementation('com.adevinta.android:barista:3.9.0') {
exclude group: 'org.jetbrains.kotlin' // Only if you already use Kotlin in your project
}
```
Expand Down Expand Up @@ -472,7 +472,7 @@ The rule assumes some sane defaults:
- Clear files

### Writing tests in Kotlin?
[Check this link](https://github.com/SchibstedSpain/Barista/issues/219) to know how to use `@Rule` in Kotlin.
[Check this link](https://github.com/AdevintaSpain/Barista/issues/219) to know how to use `@Rule` in Kotlin.

# Magic that Barista does for you

Expand All @@ -483,7 +483,7 @@ In order to speed up testing, Barista keeps in mind some considerations.

# Contributing

We welcome contributions! If you found a bug or have a feature request, feel free to [open an issue](https://github.com/SchibstedSpain/Barista/issues/new) to discuss it. Remember that bugs reported with a reproducible test are more likely to be investigated and fixed. You can also submit a Pull Request.
We welcome contributions! If you found a bug or have a feature request, feel free to [open an issue](https://github.com/AdevintaSpain/Barista/issues/new) to discuss it. Remember that bugs reported with a reproducible test are more likely to be investigated and fixed. You can also submit a Pull Request.

## Formatting
We use our company's IntelliJ code style for the project, which is very similar to the official Kotlin Android code style. When submitting code please make sure you use the proper format. You can install the code style into Android Studio by running the script in `./config/androidstudio/install-codestyle.sh`. Then restart Android Studio and pick the "BaristaAndroid" schema in preferences.
Expand Down
9 changes: 6 additions & 3 deletions config/androidstudio/install-codestyle.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
#!/bin/bash
# Based on Square's codestyle installer (https://github.com/square/java-code-styles/blob/master/install.sh)

echo "Installing Schibsted IntelliJ configs..."
echo "Installing Barista IntelliJ configs..."

CONFIGS="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

for i in $HOME/Library/Preferences/IntelliJIdea* \
$HOME/Library/Preferences/IdeaIC* \
$HOME/Library/Preferences/AndroidStudio* \
$HOME/Library/Application\ Support/JetBrains/IntelliJIdea* \
$HOME/.IntelliJIdea*/config \
$HOME/.IdeaIC*/config \
$HOME/.AndroidStudio*/config
$HOME/.AndroidStudio*/config \
$HOME/Library/Application\ Support/Google/AndroidStudio* \
$HOME/Library/Application\ Support/JetBrains/IdeaIC*
do
if [[ -d $i ]]; then
# create codestyle folders
Expand All @@ -22,4 +25,4 @@ done

echo "Done."
echo ""
echo "Restart IntelliJ and/or AndroidStudio, go to Preferences, Editor, Code Style, and select 'SchibstedAndroid-InfoJobs' as scheme."
echo "Restart IntelliJ and/or AndroidStudio, go to Preferences, Editor, Code Style, and select 'BaristaAndroid' as scheme."
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.schibsted.spain.barista.internal.util
package com.adevinta.android.barista.internal.util

import android.content.Context
import android.graphics.BitmapFactory
import androidx.test.core.app.ApplicationProvider
import com.schibsted.spain.barista.test.R
import com.adevinta.android.barista.test.R
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Test
Expand Down
2 changes: 1 addition & 1 deletion library/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:tools="http://schemas.android.com/tools"
package="com.schibsted.spain.barista"
package="com.adevinta.android.barista"
>

<uses-sdk tools:overrideLibrary="android.support.test.uiautomator.v18"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package com.schibsted.spain.barista.assertion
package com.adevinta.android.barista.assertion

import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.NoActivityResumedException
import androidx.test.espresso.action.ViewActions
import androidx.test.espresso.matcher.ViewMatchers
import androidx.test.espresso.matcher.ViewMatchers.isRoot
import android.view.View
import com.schibsted.spain.barista.internal.assertAnyView
import com.schibsted.spain.barista.internal.failurehandler.RethrowingFailureHandler
import com.schibsted.spain.barista.internal.matcher.BooleanMatcher
import com.schibsted.spain.barista.internal.util.resourceMatcher
import com.adevinta.android.barista.internal.assertAnyView
import com.adevinta.android.barista.internal.failurehandler.RethrowingFailureHandler
import com.adevinta.android.barista.internal.matcher.BooleanMatcher
import com.adevinta.android.barista.internal.util.resourceMatcher
import org.hamcrest.Matcher
import org.junit.Assert.fail

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.schibsted.spain.barista.assertion
package com.adevinta.android.barista.assertion

import android.view.View
import androidx.annotation.IdRes
import androidx.annotation.StringRes
import androidx.test.espresso.matcher.ViewMatchers
import androidx.test.platform.app.InstrumentationRegistry
import com.google.android.material.textfield.TextInputLayout
import com.schibsted.spain.barista.internal.assertAny
import com.adevinta.android.barista.internal.assertAny
import org.hamcrest.Description
import org.hamcrest.Matcher
import org.hamcrest.TypeSafeMatcher
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.schibsted.spain.barista.assertion
package com.adevinta.android.barista.assertion

import androidx.annotation.DrawableRes
import androidx.annotation.IdRes
import com.schibsted.spain.barista.internal.assertAny
import com.schibsted.spain.barista.internal.matcher.BackgroundMatcher.Companion.withAnyBackground
import com.schibsted.spain.barista.internal.matcher.BackgroundMatcher.Companion.withBackground
import com.schibsted.spain.barista.internal.matcher.BackgroundMatcher.Companion.withoutBackground
import com.schibsted.spain.barista.internal.util.resourceMatcher
import com.adevinta.android.barista.internal.assertAny
import com.adevinta.android.barista.internal.matcher.BackgroundMatcher.Companion.withAnyBackground
import com.adevinta.android.barista.internal.matcher.BackgroundMatcher.Companion.withBackground
import com.adevinta.android.barista.internal.matcher.BackgroundMatcher.Companion.withoutBackground
import com.adevinta.android.barista.internal.util.resourceMatcher

object BaristaBackgroundAssertions {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.schibsted.spain.barista.assertion
package com.adevinta.android.barista.assertion

import androidx.test.espresso.matcher.ViewMatchers.isChecked
import androidx.test.espresso.matcher.ViewMatchers.withText
import com.schibsted.spain.barista.internal.assertAny
import com.schibsted.spain.barista.internal.util.resourceMatcher
import com.adevinta.android.barista.internal.assertAny
import com.adevinta.android.barista.internal.util.resourceMatcher
import org.hamcrest.Matchers.not

object BaristaCheckedAssertions {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.schibsted.spain.barista.assertion
package com.adevinta.android.barista.assertion

import android.view.View
import androidx.annotation.IdRes
import com.google.android.material.chip.ChipGroup
import com.schibsted.spain.barista.assertion.BaristaAssertions.assertAny
import com.adevinta.android.barista.assertion.BaristaAssertions.assertAny

object BaristaChipAssertions {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
package com.schibsted.spain.barista.assertion

import androidx.test.espresso.matcher.ViewMatchers.isClickable
import androidx.test.espresso.matcher.ViewMatchers.withText
import com.schibsted.spain.barista.internal.assertAny
import com.schibsted.spain.barista.internal.util.resourceMatcher
import org.hamcrest.Matchers.not

object BaristaClickableAssertions {

@JvmStatic
fun assertClickable(resId: Int) {
resId.resourceMatcher().assertAny(isClickable())
}

@JvmStatic
fun assertClickable(text: String) {
withText(text).assertAny(isClickable())
}

@JvmStatic
fun assertNotClickable(resId: Int) {
resId.resourceMatcher().assertAny(not(isClickable()))
}

@JvmStatic
fun assertNotClickable(text: String) {
withText(text).assertAny(not(isClickable()))
}
package com.adevinta.android.barista.assertion

import androidx.test.espresso.matcher.ViewMatchers.isClickable
import androidx.test.espresso.matcher.ViewMatchers.withText
import com.adevinta.android.barista.internal.assertAny
import com.adevinta.android.barista.internal.util.resourceMatcher
import org.hamcrest.Matchers.not

object BaristaClickableAssertions {

@JvmStatic
fun assertClickable(resId: Int) {
resId.resourceMatcher().assertAny(isClickable())
}

@JvmStatic
fun assertClickable(text: String) {
withText(text).assertAny(isClickable())
}

@JvmStatic
fun assertNotClickable(resId: Int) {
resId.resourceMatcher().assertAny(not(isClickable()))
}

@JvmStatic
fun assertNotClickable(text: String) {
withText(text).assertAny(not(isClickable()))
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.schibsted.spain.barista.assertion
package com.adevinta.android.barista.assertion

import android.view.View
import androidx.annotation.IdRes
import androidx.annotation.StringRes
import androidx.test.espresso.matcher.ViewMatchers
import androidx.test.platform.app.InstrumentationRegistry
import com.schibsted.spain.barista.internal.assertAny
import com.adevinta.android.barista.internal.assertAny
import org.hamcrest.Description
import org.hamcrest.Matcher
import org.hamcrest.TypeSafeMatcher
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.schibsted.spain.barista.assertion
package com.adevinta.android.barista.assertion

import androidx.annotation.IdRes
import androidx.test.espresso.Espresso.onView
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.schibsted.spain.barista.assertion
package com.adevinta.android.barista.assertion

import androidx.test.espresso.matcher.ViewMatchers.isEnabled
import androidx.test.espresso.matcher.ViewMatchers.withText
import com.schibsted.spain.barista.internal.assertAny
import com.schibsted.spain.barista.internal.util.resourceMatcher
import com.adevinta.android.barista.internal.assertAny
import com.adevinta.android.barista.internal.util.resourceMatcher
import org.hamcrest.Matchers.not

object BaristaEnabledAssertions {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.schibsted.spain.barista.assertion
package com.adevinta.android.barista.assertion

import android.content.Context
import android.view.View
Expand All @@ -8,7 +8,7 @@ import androidx.annotation.StringRes
import androidx.test.core.app.ApplicationProvider
import androidx.test.espresso.matcher.ViewMatchers
import com.google.android.material.textfield.TextInputLayout
import com.schibsted.spain.barista.internal.assertAny
import com.adevinta.android.barista.internal.assertAny
import org.hamcrest.Description
import org.hamcrest.Matcher
import org.hamcrest.TypeSafeMatcher
Expand All @@ -19,7 +19,7 @@ object BaristaErrorAssertions {
message = "Use assertErrorDisplayed(id, text)",
replaceWith = ReplaceWith(
"assertErrorDisplayed(viewId, text)",
"com.schibsted.spain.barista.assertion.BaristaErrorAssertions.assertErrorDisplayed"
"com.adevinta.android.barista.assertion.BaristaErrorAssertions.assertErrorDisplayed"
)
)
@JvmStatic
Expand All @@ -31,7 +31,7 @@ object BaristaErrorAssertions {
message = "Use assertErrorDisplayed(id, text)",
replaceWith = ReplaceWith(
"assertErrorDisplayed(viewId, text)",
"com.schibsted.spain.barista.assertion.BaristaErrorAssertions.assertErrorDisplayed"
"com.adevinta.android.barista.assertion.BaristaErrorAssertions.assertErrorDisplayed"
)
)
@JvmStatic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.schibsted.spain.barista.assertion
package com.adevinta.android.barista.assertion

import androidx.annotation.IdRes
import androidx.test.espresso.matcher.ViewMatchers.hasFocus
import androidx.test.espresso.matcher.ViewMatchers.withText
import com.schibsted.spain.barista.internal.assertAny
import com.schibsted.spain.barista.internal.util.resourceMatcher
import com.adevinta.android.barista.internal.assertAny
import com.adevinta.android.barista.internal.util.resourceMatcher
import org.hamcrest.Matchers.not

object BaristaFocusedAssertions {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.schibsted.spain.barista.assertion
package com.adevinta.android.barista.assertion

import android.content.Context
import androidx.annotation.IdRes
Expand All @@ -10,7 +10,7 @@ import android.view.View
import android.widget.EditText
import android.widget.FrameLayout
import androidx.test.core.app.ApplicationProvider
import com.schibsted.spain.barista.internal.assertAny
import com.adevinta.android.barista.internal.assertAny
import org.hamcrest.Description
import org.hamcrest.Matcher
import org.hamcrest.TypeSafeMatcher
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.schibsted.spain.barista.assertion
package com.adevinta.android.barista.assertion

import androidx.annotation.DrawableRes
import androidx.annotation.IdRes
import androidx.test.espresso.matcher.ViewMatchers.withId
import com.schibsted.spain.barista.internal.assertAny
import com.schibsted.spain.barista.internal.matcher.DrawableMatcher.Companion.withAnyDrawable
import com.schibsted.spain.barista.internal.matcher.DrawableMatcher.Companion.withDrawable
import com.schibsted.spain.barista.internal.matcher.DrawableMatcher.Companion.withoutDrawable
import com.adevinta.android.barista.internal.assertAny
import com.adevinta.android.barista.internal.matcher.DrawableMatcher.Companion.withAnyDrawable
import com.adevinta.android.barista.internal.matcher.DrawableMatcher.Companion.withDrawable
import com.adevinta.android.barista.internal.matcher.DrawableMatcher.Companion.withoutDrawable

object BaristaImageViewAssertions {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.schibsted.spain.barista.assertion
package com.adevinta.android.barista.assertion

import androidx.annotation.IdRes
import androidx.annotation.StringRes
Expand All @@ -11,15 +11,15 @@ import androidx.recyclerview.widget.RecyclerView
import android.view.View
import android.widget.ListView
import androidx.annotation.DrawableRes
import com.schibsted.spain.barista.interaction.BaristaListInteractions.findListViewMatcher
import com.schibsted.spain.barista.interaction.BaristaListInteractions.findRecyclerMatcher
import com.schibsted.spain.barista.interaction.BaristaListInteractions.scrollListToPosition
import com.schibsted.spain.barista.internal.failurehandler.SpyFailureHandler
import com.schibsted.spain.barista.internal.matcher.ListViewNotEmptyAssertion
import com.schibsted.spain.barista.internal.matcher.ListViewItemCountAssertion
import com.schibsted.spain.barista.internal.matcher.RecyclerViewNotEmptyAssertion
import com.schibsted.spain.barista.internal.matcher.RecyclerViewItemCountAssertion
import com.schibsted.spain.barista.internal.matcher.DrawableMatcher
import com.adevinta.android.barista.interaction.BaristaListInteractions.findListViewMatcher
import com.adevinta.android.barista.interaction.BaristaListInteractions.findRecyclerMatcher
import com.adevinta.android.barista.interaction.BaristaListInteractions.scrollListToPosition
import com.adevinta.android.barista.internal.failurehandler.SpyFailureHandler
import com.adevinta.android.barista.internal.matcher.ListViewNotEmptyAssertion
import com.adevinta.android.barista.internal.matcher.ListViewItemCountAssertion
import com.adevinta.android.barista.internal.matcher.RecyclerViewNotEmptyAssertion
import com.adevinta.android.barista.internal.matcher.RecyclerViewItemCountAssertion
import com.adevinta.android.barista.internal.matcher.DrawableMatcher
import org.hamcrest.CoreMatchers
import org.hamcrest.Description
import org.hamcrest.Matcher
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.schibsted.spain.barista.assertion
package com.adevinta.android.barista.assertion

import androidx.annotation.IdRes
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.assertion.ViewAssertions.matches
import com.schibsted.spain.barista.internal.matcher.DisplayedMatchers.displayedWithId
import com.schibsted.spain.barista.internal.matcher.ProgressBarMatchers.withMaxProgress
import com.schibsted.spain.barista.internal.matcher.ProgressBarMatchers.withMinProgress
import com.schibsted.spain.barista.internal.matcher.ProgressBarMatchers.withProgress
import com.adevinta.android.barista.internal.matcher.DisplayedMatchers.displayedWithId
import com.adevinta.android.barista.internal.matcher.ProgressBarMatchers.withMaxProgress
import com.adevinta.android.barista.internal.matcher.ProgressBarMatchers.withMinProgress
import com.adevinta.android.barista.internal.matcher.ProgressBarMatchers.withProgress

object BaristaProgressBarAssertions {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.schibsted.spain.barista.assertion
package com.adevinta.android.barista.assertion

import androidx.annotation.IdRes
import androidx.test.espresso.Espresso.onView
import com.schibsted.spain.barista.internal.matcher.DisplayedMatchers.displayedWithId
import com.schibsted.spain.barista.internal.matcher.RecyclerViewItemCountAssertion
import com.adevinta.android.barista.internal.matcher.DisplayedMatchers.displayedWithId
import com.adevinta.android.barista.internal.matcher.RecyclerViewItemCountAssertion

object BaristaRecyclerViewAssertions {

Expand Down
Loading

0 comments on commit 2a6a34f

Please sign in to comment.