FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
frontend/article/test/AnalyticsFeatureTest.scala at master · devhttps/frontend · GitHub
devhttps
/
frontend
Public
forked from
guardian/frontend
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
frontend
/
article
/
test
/
AnalyticsFeatureTest.scala
Copy path
More file actions
More file actions
Latest commit
History
History
History
39 lines (26 loc) · 1.29 KB
Breadcrumbs
frontend
/
article
/
test
/
AnalyticsFeatureTest.scala
Copy path
File metadata and controls
39 lines (26 loc) · 1.29 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package
test
import
org
.
scalatest
.{
DoNotDiscover
,
Matchers
,
GivenWhenThen
,
FeatureSpec
}
import
collection
.
JavaConverters
.
_
import
org
.
fluentlenium
.
core
.
domain
.
FluentWebElement
import
conf
.
Configuration
@
DoNotDiscover
class
AnalyticsFeatureTest
extends
FeatureSpec
with
GivenWhenThen
with
Matchers
with
ConfiguredTestSuite
{
implicit
val
config
=
Configuration
feature(
"
Analytics
"
) {
conf.switches.
Switches
.
EnableDiscussionSwitch
.switchOff()
//
Feature
info(
"
In order understand how people are using the website and provide data for auditing
"
)
info(
"
As a product manager
"
)
info(
"
I want record usage metrics
"
)
//
Scenarios
scenario(
"
Ensure all clicked links are recorded by Analytics
"
) {
Given
(
"
I am on an article entitled 'Olympic opening ceremony will recreate countryside with real animals'
"
)
goTo(
"
/sport/2012/jun/12/london-2012-olympic-opening-ceremony
"
) { browser
=>
Then
(
"
all links on the page should be decorated with the Omniture meta-data attribute
"
)
val
anchorsWithNoDataLink
=
browser.find(
"
a
"
).asScala.filter(hasNoLinkName)
anchorsWithNoDataLink should have length
0
}
}
scenario(
"
Ophan tracks user actions
"
)(pending)
}
private
def
hasNoLinkName
(
e
:
FluentWebElement
)
=
e.attribute(
"
data-link-name
"
)
==
null
}
Back
|
FazBrowse Home
|
New Git URL