Skip to content

Commit

Permalink
Remove data from session after login. Fix #6 (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
juanjmerono authored Mar 27, 2017
1 parent 2174884 commit 0ff0497
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/test/scala/computerdatabase/SakaiSimulation.scala
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ class SakaiSimulation extends Simulation {
.remove(secondName)
.set(finalName, join(session(firstName).as[Vector[String]],session(secondName).as[Vector[String]]).filter(_._1 matches oneFilteredBy).filter(_._2 matches twoFilteredBy))

def clearAjaxData(session: Session, var1: String, var2: String) =
session
.remove(var1)
.remove(var2)

object Gateway {
val gateway = group("Gateway") {
exec(http("Portal")
Expand Down Expand Up @@ -182,6 +187,7 @@ class SakaiSimulation extends Simulation {
.check(checkAttrs("div.fav-title > a","href","siteUrls"))
.check(checkAttrs("div.fav-title > a","title","siteTitles")))
.exec(session => { joinInSessionFiltered(session,"siteTitles","siteUrls","sites",fixedSiteTitle,".*\\/portal\\/site\\/"+fixedSiteId) })
.exec(session => { clearAjaxData(session,"presenceScript","latestData") })
}
}
{ /** Use real credentials */
Expand All @@ -198,6 +204,7 @@ class SakaiSimulation extends Simulation {
.pause(pauseMin,pauseMax)
.exec(session => { joinInSessionFiltered(session,"siteTitles","siteUrls","sites",fixedSiteTitle,".*\\/portal\\/site\\/"+fixedSiteId) })
.exec(checkItsMe("${username}"))
.exec(session => { clearAjaxData(session,"presenceScript","latestData") })
}
}
}
Expand Down

0 comments on commit 0ff0497

Please sign in to comment.