Skip to content
Snippets Groups Projects
Commit abe8ed60 authored by Oliver Wiese's avatar Oliver Wiese
Browse files

fix wrong port test

parent 372759b0
No related branches found
No related tags found
2 merge requests!59Onboarding screens swift ui merge dev,!58Onboarding screens swift ui merge dev
......@@ -68,6 +68,7 @@ class AuthenticationModel: NSObject {
func checkIMAPConfig(mailAccount: MailAccount, _ callback: AuthenticationCallback) {
imapConfigurationSuccessful = false
let mailSession: MailSession = setupIMAPSession(mailAccount: mailAccount, callback: callback)
print(mailSession.server.port)
currentIMAP = mailSession
if extendedValidation && mailSession.startTestingServerConfig(){
imapConfigurationSuccessful = true
......
......@@ -138,7 +138,9 @@ struct AccountSetupView: View {
}
var advancedSectionSwitch: some View{
Button(action: {self.isDetailed.toggle()}) {
Button(action: {self.isDetailed.toggle()
self.viewModel.isDetailedAuthentication = self.isDetailed
}) {
HStack{
if(!self.isDetailed){
Text(NSLocalizedString("Advanced options", comment: ""))
......
// MARK: - Mocks generated from file: enzevalos_iphone/AuthenticationModel.swift at 2020-03-20 15:35:06 +0000
// MARK: - Mocks generated from file: enzevalos_iphone/AuthenticationModel.swift at 2020-03-20 18:02:50 +0000
//
// AuthenticationModel.swift
......@@ -654,7 +654,7 @@ import Foundation
}
// MARK: - Mocks generated from file: enzevalos_iphone/AuthenticationViewModel.swift at 2020-03-20 15:35:06 +0000
// MARK: - Mocks generated from file: enzevalos_iphone/AuthenticationViewModel.swift at 2020-03-20 18:02:50 +0000
//
// AuthenticationViewModel.swift
......
......@@ -330,16 +330,10 @@ class SwiftUIOnboardingUITests: XCTestCase {
scrollViewsQuery.otherElements.containing(.staticText, identifier:"Welcome").element.swipeUp()
elementsQuery.buttons["Next"].tap()
var exists = elementsQuery.staticTexts["Couldn't connect to server.\n Please check your IMAP server configuration."].waitForExistence(timeout: timeoutShort)
let exists = elementsQuery.staticTexts["Couldn't connect to server.\n Please check your IMAP server configuration."].waitForExistence(timeout: timeoutShort)
if exists {
XCTFail("No error but wrong port for user: \(user.adr)")
}
input(text: user.portIMAP, view: imapPortField)
exists = elementsQuery/*@START_MENU_TOKEN@*/.buttons["OnboardActionButtonAccessibilityIdentifier"]/*[[".buttons[\"Got it!\"]",".buttons[\"OnboardActionButtonAccessibilityIdentifier\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/.waitForExistence(timeout: timeoutShort)
if !exists {
XCTFail("Could not login with user: \(user.adr)")
}
}
private static func loadAccounts() -> [String:(adr: String, pw: String, hostIMAP: String, portIMAP: String, conTypeIMAP: String, hostSMTP: String, portSMTP: String, conTypeSMTP: String)] {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment