Skip to content

Commit 3bd4d9f

Browse files
committed
Fixes #1856 - Add new tests
1 parent 783d159 commit 3bd4d9f

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

tests/functional/milestones-auth.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,32 @@ registerSuite("Milestones (auth)", {
109109
assert.notInclude("is-active", className);
110110
})
111111
.end();
112+
},
113+
114+
"Missing status error displays": function() {
115+
FunctionalHelpers.openPage(
116+
this,
117+
url("/issues/9"),
118+
".js-Issue",
119+
true /* longerTimeout */
120+
)
121+
.findByCssSelector(".js-Milestone")
122+
.getVisibleText();
123+
// console.log(a.text)
124+
125+
return FunctionalHelpers.openPage(
126+
this,
127+
url("/issues/9"),
128+
".js-Issue",
129+
true /* longerTimeout */
130+
)
131+
.findByCssSelector(".js-Milestone")
132+
.getVisibleText()
133+
.then(function(text) {
134+
// check that the title loaded, it won't be there if the page didn't render.
135+
assert.strictEqual(text, "Fix me: assign a status");
136+
})
137+
.end();
112138
}
113139
}
114140
});

tests/functional/milestones-non-auth.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ registerSuite("Milestones (non-auth)", {
3030
},
3131

3232
"Missing status error displays": function() {
33+
FunctionalHelpers.openPage(
34+
this,
35+
url("/issues/9"),
36+
".js-Issue",
37+
true /* longerTimeout */
38+
)
39+
.findByCssSelector(".js-Milestone")
40+
.getVisibleText();
41+
3342
return FunctionalHelpers.openPage(
3443
this,
3544
url("/issues/9"),
@@ -40,7 +49,7 @@ registerSuite("Milestones (non-auth)", {
4049
.getVisibleText()
4150
.then(function(text) {
4251
// check that the title loaded, it won't be there if the page didn't render.
43-
assert.equal(text, "Error: no status for this issue");
52+
assert.equal(text, "No status assigned yet");
4453
})
4554
.end();
4655
}

0 commit comments

Comments
 (0)