Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove commented code #10

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions .idea/androidTestResultsUserPreferences.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

82 changes: 56 additions & 26 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,24 @@ apply from: file("$rootDir/ktlint.gradle")

android {
namespace 'com.codestracture'
compileSdk 33
testNamespace "com.codestracture.test"
compileSdk 34

defaultConfig {
applicationId "com.codestracture"
minSdk 23
targetSdk 33
targetSdk 34
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

buildConfigField 'String', 'BASE_URL', "\"https://portal.courtesycarsredhill.co.uk/CCRAPI/api/\""

testApplicationId "com.codestracture.test"
testInstrumentationRunner 'com.codestracture.test.Instrumentation'
testInstrumentationRunnerArguments = [
cucumberUseAndroidJUnitRunner: 'com.codestracture.test.Instrumentation',
clearPackageData: 'true'
]
}

signingConfigs {
Expand All @@ -45,41 +51,42 @@ android {
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = '1.8'
jvmTarget = '17'
}

buildFeatures {
viewBinding = true
dataBinding = true
}

lintOptions {
// set to true to turn off analysis progress reporting by lint
quiet true
// set to true to have all release builds run lint on issues with severity=fatal
// and abort the build (controlled by abortOnError above) if fatal issues are found
checkReleaseBuilds true
// if true, stop the gradle build if errors are found

sourceSets {
androidTest {
assets.srcDirs = ['src/androidTest/assets']
}
}

testOptions {
execution = 'ANDROIDX_TEST_ORCHESTRATOR'
animationsDisabled = true
}

lint {
abortOnError false
// if true, only report errors
ignoreWarnings false
// if true, check all issues, including those that are off by default
checkAllWarnings true
// if true, treat all warnings as errors
warningsAsErrors true
// turn on the given issue id's
enable 'RtlHardcoded','RtlCompat', 'RtlEnabled'
// check *only* the given issue id's
absolutePaths true
checkOnly 'NewApi', 'InlinedApi'
// if true, don't include source code lines in the error output
checkAllWarnings true
checkReleaseBuilds true
enable 'RtlHardcoded', 'RtlCompat', 'RtlEnabled'
ignoreWarnings false
noLines true
// if true, emit full/absolute paths to files with errors (true by default)
absolutePaths true
quiet true
warningsAsErrors true
}
}

Expand Down Expand Up @@ -133,6 +140,29 @@ dependencies {
implementation 'at.aau.itec.android.mediaplayer:mediaplayer:1.3.3'
implementation 'at.aau.itec.android.mediaplayer:mediaplayer-dash:1.3.3'
implementation 'at.aau.itec.android.mediaplayer:mediaplayer-gles:1.3.3'

def withoutMTP = {
exclude group: 'org.mobicents.protocols.ss7.mtp', module: 'mtp-api'
exclude group: 'org.mobicents.protocols.ss7.mtp', module: 'mtp'
exclude group: 'org.mobicents.protocols.ss7.sccp', module: 'sccp-api'
exclude group: 'org.mobicents.protocols.ss7.sccp', module: 'sccp'
}
implementation 'org.mobicents.protocols.ss7.map:map-impl:8.0.112', withoutMTP

androidTestImplementation "com.google.dagger:hilt-android-testing:2.48"
kapt 'com.google.dagger:hilt-android-compiler:2.48'

androidTestImplementation('androidx.test.espresso:espresso-core:3.5.1')
androidTestImplementation('androidx.test:rules:1.4.0')
androidTestImplementation('androidx.test:core:1.4.0')
androidTestImplementation('androidx.test:runner:1.4.0')
androidTestImplementation('androidx.test.ext:junit-ktx:1.1.5')

androidTestImplementation "io.cucumber:cucumber-picocontainer:4.8.1"
androidTestImplementation "io.cucumber:cucumber-android:4.9.0"
androidTestImplementation "io.cucumber:cucumber-android-hilt:4.10.0"

androidTestUtil 'androidx.test:orchestrator:1.4.0'
}

kapt {
Expand Down
38 changes: 38 additions & 0 deletions app/src/androidTest/assets/features/login.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Feature: Login
Perform login on email and password are inputted

@login-feature
Scenario Outline: Input email and password in wrong format
Given I am on splash screen
Given I am on login screen
When I input email <email>
And I input password "<password>"
And I press submit button
Then I should see error on the <view>

Examples:
| email | password | view |
| test | lemoncake | email |
| [email protected] || password |

@login-feature
Scenario Outline: Input email and password in correct format
Given I am on splash screen
Given I am on login screen
When I input email <email>
And I input password "<password>"
And I press submit button
Then I should <see> auth error

Examples:
| email | password | see |
| [email protected] | bananacake | true |
| [email protected] | lemoncake | false |
| [email protected] | lemoncake | true |

@login-feature
Scenario: Tap login button and show login screen
Given I am on splash screen
Given I am on login screen
When I tap sign up button
Then I should see sign up screen
8 changes: 8 additions & 0 deletions app/src/androidTest/assets/features/signup.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Feature: Signup
Perform sign up

@signup-feature
Scenario: Tap login button and show login screen
Given I am on sign up screen
When I tap login button
Then I should see login screen

This file was deleted.

Loading
Loading