Fix tests
damn refactorization
This commit is contained in:
parent
17ad623d63
commit
1a70b9c242
6 changed files with 25 additions and 25 deletions
|
@ -7,9 +7,9 @@ class GradeSummary {
|
|||
@Selector("td", index = 0)
|
||||
lateinit var name: String
|
||||
|
||||
@Selector("td:nth-last-of-name(2):not(:contains(-))")
|
||||
@Selector("td:nth-last-of-type(2):not(:contains(-))")
|
||||
var predicted: String = ""
|
||||
|
||||
@Selector("td:nth-last-of-name(1):not(:contains(-))")
|
||||
@Selector("td:nth-last-of-type(1):not(:contains(-))")
|
||||
var final: String = ""
|
||||
}
|
||||
|
|
|
@ -10,6 +10,6 @@ class GradesResponse {
|
|||
@Selector("#okresyKlasyfikacyjneDropDownList option[selected]")
|
||||
var semesterNumber: Int = 0
|
||||
|
||||
@Selector(".ocenySzczegoly-table tbody tr:has(td:nth-of-name(2):not(:contains(Brak ocen)))")
|
||||
@Selector(".ocenySzczegoly-table tbody tr:has(td:nth-of-type(2):not(:contains(Brak ocen)))")
|
||||
var grades: List<Grade> = emptyList()
|
||||
}
|
||||
|
|
|
@ -6,10 +6,10 @@ import java.util.*
|
|||
|
||||
class NotesResponse {
|
||||
|
||||
@Selector(".mainContainer div:first-of-name article")
|
||||
@Selector(".mainContainer div:first-of-type article")
|
||||
var notes: List<Note> = listOf()
|
||||
|
||||
@Format("dd.MM.yyyy")
|
||||
@Selector(".mainContainer div:first-of-name h2:not(:contains(Brak))")
|
||||
@Selector(".mainContainer div:first-of-type h2:not(:contains(Brak))")
|
||||
var dates: List<Date> = listOf()
|
||||
}
|
||||
|
|
|
@ -6,55 +6,55 @@ import java.util.*
|
|||
|
||||
class Student {
|
||||
|
||||
@Selector("article:nth-of-name(1) .wartosc", index = 0)
|
||||
@Selector("article:nth-of-type(1) .wartosc", index = 0)
|
||||
lateinit var fullName: String
|
||||
|
||||
@Selector("article:nth-of-name(1) .wartosc", index = 0, regex = "^([^\\s]*)")
|
||||
@Selector("article:nth-of-type(1) .wartosc", index = 0, regex = "^([^\\s]*)")
|
||||
lateinit var firstName: String
|
||||
|
||||
@Selector("article:nth-of-name(1) .wartosc", index = 0, regex = "\\s([^\\s]*)\\s", defValue = "")
|
||||
@Selector("article:nth-of-type(1) .wartosc", index = 0, regex = "\\s([^\\s]*)\\s", defValue = "")
|
||||
lateinit var secondName: String
|
||||
|
||||
@Selector("article:nth-of-name(1) .wartosc", index = 0, regex = "[^,]+ (.+)")
|
||||
@Selector("article:nth-of-type(1) .wartosc", index = 0, regex = "[^,]+ (.+)")
|
||||
lateinit var surname: String
|
||||
|
||||
@Format("dd.MM.yyyy")
|
||||
@Selector("article:nth-of-name(1) .wartosc", index = 1, regex = "^(.+?),")
|
||||
@Selector("article:nth-of-type(1) .wartosc", index = 1, regex = "^(.+?),")
|
||||
lateinit var birthDate: Date
|
||||
|
||||
@Selector("article:nth-of-name(1) .wartosc", index = 1, regex = "[^,]+, (.+)")
|
||||
@Selector("article:nth-of-type(1) .wartosc", index = 1, regex = "[^,]+, (.+)")
|
||||
lateinit var birthPlace: String
|
||||
|
||||
@Selector("article:nth-of-name(1) .wartosc", index = 2)
|
||||
@Selector("article:nth-of-type(1) .wartosc", index = 2)
|
||||
lateinit var pesel: String
|
||||
|
||||
@Selector("article:nth-of-name(1) .wartosc", index = 3)
|
||||
@Selector("article:nth-of-type(1) .wartosc", index = 3)
|
||||
lateinit var gender: String
|
||||
|
||||
@Selector("article:nth-of-name(1) .wartosc", index = 4)
|
||||
@Selector("article:nth-of-type(1) .wartosc", index = 4)
|
||||
lateinit var polishCitizenship: String
|
||||
|
||||
@Selector("article:nth-of-name(1) .wartosc", index = 5)
|
||||
@Selector("article:nth-of-type(1) .wartosc", index = 5)
|
||||
lateinit var familyName: String
|
||||
|
||||
@Selector("article:nth-of-name(1) .wartosc", index = 6)
|
||||
@Selector("article:nth-of-type(1) .wartosc", index = 6)
|
||||
lateinit var parentsNames: String
|
||||
|
||||
@Selector("article:nth-of-name(2) .wartosc", index = 0)
|
||||
@Selector("article:nth-of-type(2) .wartosc", index = 0)
|
||||
lateinit var address: String
|
||||
|
||||
@Selector("article:nth-of-name(2) .wartosc", index = 1)
|
||||
@Selector("article:nth-of-type(2) .wartosc", index = 1)
|
||||
lateinit var registeredAddress: String
|
||||
|
||||
@Selector("article:nth-of-name(2) .wartosc", index = 2)
|
||||
@Selector("article:nth-of-type(2) .wartosc", index = 2)
|
||||
lateinit var correspondenceAddress: String
|
||||
|
||||
@Selector("article:nth-of-name(3) .wartosc", index = 0)
|
||||
@Selector("article:nth-of-type(3) .wartosc", index = 0)
|
||||
lateinit var phoneNumber: String
|
||||
|
||||
@Selector("article:nth-of-name(3) .wartosc", index = 1)
|
||||
@Selector("article:nth-of-type(3) .wartosc", index = 1)
|
||||
lateinit var cellPhoneNumber: String
|
||||
|
||||
@Selector("article:nth-of-name(3) .wartosc", index = 2)
|
||||
@Selector("article:nth-of-type(3) .wartosc", index = 2)
|
||||
lateinit var email: String
|
||||
}
|
||||
|
|
|
@ -7,6 +7,6 @@ class StudentInfo {
|
|||
@Selector(".mainContainer")
|
||||
lateinit var student: Student
|
||||
|
||||
@Selector(".mainContainer > article:nth-of-name(n+4)")
|
||||
@Selector(".mainContainer > article:nth-of-type(n+4)")
|
||||
var family: List<FamilyMember> = emptyList()
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ import java.util.*
|
|||
|
||||
class TimetableResponse {
|
||||
|
||||
@Selector(".presentData thead th:not(:nth-of-name(1)):not(:nth-of-name(2))", regex = "\\s(.*)")
|
||||
@Selector(".presentData thead th:not(:nth-of-type(1)):not(:nth-of-type(2))", regex = "\\s(.*)")
|
||||
@Format("dd.MM.yyyy")
|
||||
var days: List<Date> = emptyList()
|
||||
|
||||
|
@ -25,7 +25,7 @@ class TimetableResponse {
|
|||
@Selector("td", index = 1, regex = "(\\S*\$)")
|
||||
lateinit var endTime: String
|
||||
|
||||
@Selector("td:not(:nth-of-name(1)):not(:nth-of-name(2))")
|
||||
@Selector("td:not(:nth-of-type(1)):not(:nth-of-type(2))")
|
||||
var lessons: List<TimetableCell> = emptyList()
|
||||
|
||||
class TimetableCell {
|
||||
|
|
Loading…
Reference in a new issue