IOS-1495 test with results IOS-1521+IOS-1495
authorXavier Algarra <xavier@pep-project.org>
Wed, 15 May 2019 15:47:45 +0200
branchIOS-1521+IOS-1495
changeset 8627e3e57e6309e7
parent 8626 a7abd989ba9f
child 8628 39a13d22e284
IOS-1495 test with results
pEpForiOSTests/Models/EmailListViewModelTest.swift
     1.1 --- a/pEpForiOSTests/Models/EmailListViewModelTest.swift	Wed May 15 15:40:49 2019 +0200
     1.2 +++ b/pEpForiOSTests/Models/EmailListViewModelTest.swift	Wed May 15 15:47:45 2019 +0200
     1.3 @@ -196,28 +196,29 @@
     1.4          XCTAssertEqual(emailListVM.rowCount, 10)
     1.5      }
     1.6  
     1.7 -    /*func testSetSearchFilterAddressWith3results() {
     1.8 +    func testSetSearchFilterAddressWith3results() {
     1.9          let textToSearch = "searchTest@mail.com"
    1.10          TestUtil.createMessages(number: 10, engineProccesed: true, inFolder: folder)
    1.11          TestUtil.createMessage(inFolder: folder,
    1.12 -                      from: Identity.create(address: textToSearch),
    1.13 +                      from: Identity(address: textToSearch),
    1.14                        tos: [folder.account.user],
    1.15                        uid: 666).save()
    1.16          TestUtil.createMessage(inFolder: folder,
    1.17 -                      from: Identity.create(address: textToSearch),
    1.18 +                      from: Identity(address: textToSearch),
    1.19                        tos: [folder.account.user],
    1.20                        uid: 667).save()
    1.21          TestUtil.createMessage(inFolder: folder,
    1.22 -                      from: Identity.create(address: textToSearch),
    1.23 +                      from: Identity(address: textToSearch),
    1.24                        tos: [folder.account.user],
    1.25                        uid: 668).save()
    1.26          setupViewModel()
    1.27 +        emailListVM.startMonitoring()
    1.28          XCTAssertEqual(emailListVM.rowCount, 13)
    1.29 -        setSearchFilter(text: "searchTest")
    1.30 +        emailListVM.setSearch(forSearchText: "searchTest")
    1.31          XCTAssertEqual(emailListVM.rowCount, 3)
    1.32      }
    1.33  
    1.34 -    func testSetSearchFilterShortMessageWith1results() {
    1.35 +    /*func testSetSearchFilterShortMessageWith1results() {
    1.36          let textToSearch = "searchTest"
    1.37          TestUtil.createMessages(number: 10, engineProccesed: true, inFolder: folder)
    1.38          TestUtil.createMessage(inFolder: folder,