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

MTSDK-442_fix_android_automation_tests_bugs #302

Open
wants to merge 1 commit into
base: main
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
10 changes: 9 additions & 1 deletion androidComposePrototype/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ buildscript {
oktaProperties.load(oktaPropertiesFile.newReader())
} else {
logger.warn("okta.properties does not exist in the path and will be ignored.")
throw new GradleException("Okta configuration must be specified in ${rootDir.absolutePath}/okta.properties locally.")
}
}
}
Expand Down Expand Up @@ -135,7 +136,14 @@ dependencies {
androidTestImplementation 'androidx.test:rules:1.5.0'
androidTestImplementation('com.fasterxml.jackson.module:jackson-module-kotlin:2.16.1')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
configurations.all {
resolutionStrategy.dependencySubstitution {
substitute(module("org.hamcrest:hamcrest-library:1.3")).using(module("junit:junit:4.13.2"))
substitute(module("org.hamcrest:hamcrest-core:1.3")).using(module("junit:junit:4.13.2"))
}
}
}

repositories {
mavenCentral()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,15 @@ class ComposePrototypeUITest : BaseTests() {
}
}

fun resubmitDeploymentInfo() {
opening {
selectView(testBedViewText)
}
messenger {
verifyPageIsVisible()
}
}

// Send the connect command and wait for connected response
fun connect(connectCommand: String = connectText) {
messenger {
Expand Down Expand Up @@ -697,4 +706,44 @@ class ComposePrototypeUITest : BaseTests() {
sendMsg("Authenticated session message after step-up.")
oktaLogout()
}

@Test
fun testAuthenticatedSessionsSync() {
apiHelper.disconnectAllConversations()
enterDeploymentInfo(testConfig.authDeploymentId)
clearBrowser() // Ensure browser is clear before Okta sign-in
oktaSignInWithPKCE(testConfig.oktaUsername, testConfig.oktaPassword)
authorize()
connect(authenticateConnectText)

// Send message from session 1
sendMsg(helloSession1)
val conversationInfo1 = apiHelper.answerNewConversation()
if (conversationInfo1 == null) {
AssertionError("Unable to answer conversation in session 1.")
} else {
Log.i(TAG, "Session 1: Conversation started successfully.")
}

// Start second authenticated session
oktaLogout()
clearBrowser()
resubmitDeploymentInfo()
oktaSignInWithPKCE(testConfig.oktaUsername, testConfig.oktaPassword)
authorize()
connect(authenticateConnectText)

// Send message from session 2
sendMsg(helloSession2)
val conversationInfo2 = apiHelper.answerNewConversation()
if (conversationInfo2 == null) {
AssertionError("Unable to answer conversation in session 2.")
} else {
Log.i(TAG, "Session 2: Conversation started successfully.")
}
// Close conversations
if (conversationInfo1 != null) apiHelper.sendConnectOrDisconnect(conversationInfo1)
if (conversationInfo2 != null) apiHelper.sendConnectOrDisconnect(conversationInfo2)
oktaLogout()
}
}
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ plugins {
}

// CocoaPods requires the podspec to have a `version`.
val buildVersion = "2.7.2"
val buildVersion = "2.8.0"
val snapshot = System.getenv("SNAPSHOT_BUILD") ?: ""
version = "${buildVersion}${snapshot}"
group = "cloud.genesys"
Expand All @@ -39,4 +39,4 @@ nexusPublishing {
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}
}
}
4 changes: 2 additions & 2 deletions iosApp/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- transport (2.7.2)
- transport (2.8.0)

DEPENDENCIES:
- transport (from `../transport`)
Expand All @@ -9,7 +9,7 @@ EXTERNAL SOURCES:
:path: "../transport"

SPEC CHECKSUMS:
transport: 4c2e9e25c60232690501bbf4ab25534138908fcc
transport: 4f358e1c474c12e01f55510bbbeaad5ad5d31f1b

PODFILE CHECKSUM: 10743e43aeaf72bb49673a0e57360c028906ace5

Expand Down
4 changes: 2 additions & 2 deletions transport/GenesysCloudMessengerTransport.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'GenesysCloudMessengerTransport'
s.version = '2.6.1'
s.version = '2.8.0'
s.summary = 'Genesys Cloud Messenger Transport SDK'

s.description = <<-DESC
Expand Down Expand Up @@ -33,7 +33,7 @@ SOFTWARE.
LICENSE
}
s.author = 'Genesys Cloud Services, Inc.'
s.source = { :http => 'https://github.com/MyPureCloud/genesys-messenger-transport-mobile-sdk/releases/download/v2.6.1/MessengerTransport.xcframework.zip' }
s.source = { :http => 'https://github.com/MyPureCloud/genesys-messenger-transport-mobile-sdk/releases/download/v2.8.0/MessengerTransport.xcframework.zip' }

s.ios.deployment_target = '13.0'

Expand Down
2 changes: 1 addition & 1 deletion transport/transport.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'transport'
spec.version = '2.7.2'
spec.version = '2.8.0'
spec.homepage = 'https://github.com/MyPureCloud/genesys-messenger-transport-mobile-sdk'
spec.source = { :http=> ''}
spec.authors = 'Genesys Cloud Services, Inc.'
Expand Down