|
1 |
| -// "use strict"; |
2 |
| -// /* This Source Code Form is subject to the terms of the Mozilla Public |
3 |
| -// * License, v. 2.0. If a copy of the MPL was not distributed with this |
4 |
| -// * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
5 |
| -// const intern = require("intern").default; |
6 |
| -// const { assert } = intern.getPlugin("chai"); |
7 |
| -// const { registerSuite } = intern.getInterface("object"); |
8 |
| -// const FunctionalHelpers = require("./lib/helpers.js"); |
| 1 | +"use strict"; |
| 2 | +/* This Source Code Form is subject to the terms of the Mozilla Public |
| 3 | + * License, v. 2.0. If a copy of the MPL was not distributed with this |
| 4 | + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
| 5 | +const intern = require("intern").default; |
| 6 | +const { assert } = intern.getPlugin("chai"); |
| 7 | +const { registerSuite } = intern.getInterface("object"); |
| 8 | +const FunctionalHelpers = require("./lib/helpers.js"); |
9 | 9 |
|
10 |
| -// var url = function(path) { |
11 |
| -// return intern.config.siteRoot + path; |
12 |
| -// }; |
| 10 | +var url = function(path) { |
| 11 | + return intern.config.siteRoot + path; |
| 12 | +}; |
13 | 13 |
|
14 |
| -// registerSuite("Reporting (auth)", { |
15 |
| -// before() { |
16 |
| -// return FunctionalHelpers.login(this); |
17 |
| -// }, |
| 14 | +registerSuite("Reporting (auth)", { |
| 15 | + before() { |
| 16 | + return FunctionalHelpers.login(this); |
| 17 | + }, |
18 | 18 |
|
19 |
| -// after() { |
20 |
| -// return FunctionalHelpers.logout(this); |
21 |
| -// }, |
| 19 | + after() { |
| 20 | + return FunctionalHelpers.logout(this); |
| 21 | + }, |
22 | 22 |
|
23 |
| -// tests: { |
24 |
| -// "Report button shows name"() { |
25 |
| -// return FunctionalHelpers.openPage( |
26 |
| -// this, |
27 |
| -// url("/issues/new"), |
28 |
| -// ".js-Navbar-link" |
29 |
| -// ) |
30 |
| -// .findByCssSelector("#submitgithub") |
31 |
| -// .getVisibleText() |
32 |
| -// .then(function(text) { |
33 |
| -// assert.include(text, "Report as"); //Report as FooUser (logged in) |
34 |
| -// }) |
35 |
| -// .end(); |
36 |
| -// } |
37 |
| -// } |
38 |
| -// }); |
| 23 | + tests: { |
| 24 | + "Report button shows name"() { |
| 25 | + return FunctionalHelpers.openPage( |
| 26 | + this, |
| 27 | + url("/issues/new"), |
| 28 | + ".js-Navbar-link" |
| 29 | + ) |
| 30 | + .findByCssSelector("#submitgithub") |
| 31 | + .getVisibleText() |
| 32 | + .then(function(text) { |
| 33 | + assert.include(text, "Report as"); //Report as FooUser (logged in) |
| 34 | + }) |
| 35 | + .end(); |
| 36 | + } |
| 37 | + } |
| 38 | +}); |
0 commit comments