diff --git a/.jshintrc b/.jshintrc index f479939c925..962847d7232 100644 --- a/.jshintrc +++ b/.jshintrc @@ -14,7 +14,6 @@ "moduleForComponent", "Pretender", "sandbox", - "integration", "controllerFor", "test", "ok", diff --git a/test/javascripts/helpers/qunit-helpers.js.es6 b/test/javascripts/helpers/qunit-helpers.js.es6 index 111180cc523..17b82bd1715 100644 --- a/test/javascripts/helpers/qunit-helpers.js.es6 +++ b/test/javascripts/helpers/qunit-helpers.js.es6 @@ -2,8 +2,8 @@ import siteFixtures from 'fixtures/site_fixtures'; -function integration(name, options) { - module("Integration: " + name, { +function acceptance(name, options) { + module("Acceptance: " + name, { setup: function() { Ember.run(Discourse, Discourse.advanceReadiness); @@ -61,4 +61,4 @@ function fixture(selector) { return $("#qunit-fixture"); } -export { integration, controllerFor, asyncTestDiscourse, fixture }; +export { acceptance, controllerFor, asyncTestDiscourse, fixture }; diff --git a/test/javascripts/integration/about-test.js.es6 b/test/javascripts/integration/about-test.js.es6 index 586195ac118..b45675f1aa4 100644 --- a/test/javascripts/integration/about-test.js.es6 +++ b/test/javascripts/integration/about-test.js.es6 @@ -1,4 +1,5 @@ -integration("About"); +import { acceptance } from "helpers/qunit-helpers"; +acceptance("About"); test("viewing", () => { visit("/about"); diff --git a/test/javascripts/integration/badges-test.js.es6 b/test/javascripts/integration/badges-test.js.es6 index 6ff2b3bf8c6..31f8bec3b80 100644 --- a/test/javascripts/integration/badges-test.js.es6 +++ b/test/javascripts/integration/badges-test.js.es6 @@ -1,4 +1,6 @@ -integration("Badges"); +import { acceptance } from "helpers/qunit-helpers"; + +acceptance("Badges"); test("Visit Badge Pages", () => { visit("/badges"); diff --git a/test/javascripts/integration/create-account-user-fields-test.js.es6 b/test/javascripts/integration/create-account-user-fields-test.js.es6 index a3822f62bc7..0b6fec4da4e 100644 --- a/test/javascripts/integration/create-account-user-fields-test.js.es6 +++ b/test/javascripts/integration/create-account-user-fields-test.js.es6 @@ -1,6 +1,6 @@ -import { integration } from "helpers/qunit-helpers"; +import { acceptance } from "helpers/qunit-helpers"; -integration("Create Account - User Fields", { +acceptance("Create Account - User Fields", { site: { user_fields: [{"id":34,"name":"I've read the terms of service","field_type":"confirm","required":true}, {"id":35,"name":"What is your pet's name?","field_type":"text","required":true}, diff --git a/test/javascripts/integration/groups-test.js.es6 b/test/javascripts/integration/groups-test.js.es6 index 2f40696812f..92010b24d80 100644 --- a/test/javascripts/integration/groups-test.js.es6 +++ b/test/javascripts/integration/groups-test.js.es6 @@ -1,4 +1,5 @@ -integration("Groups"); +import { acceptance } from "helpers/qunit-helpers"; +acceptance("Groups"); test("Browsing Groups", () => { visit("/groups/discourse"); diff --git a/test/javascripts/integration/header-anonymous-test.js.es6 b/test/javascripts/integration/header-anonymous-test.js.es6 index 713b807ed71..ae6ca34d7c8 100644 --- a/test/javascripts/integration/header-anonymous-test.js.es6 +++ b/test/javascripts/integration/header-anonymous-test.js.es6 @@ -1,4 +1,5 @@ -integration("Header (Anonymous)"); +import { acceptance } from "helpers/qunit-helpers"; +acceptance("Header (Anonymous)"); test("header", () => { visit("/"); diff --git a/test/javascripts/integration/header-test-staff.js.es6 b/test/javascripts/integration/header-test-staff.js.es6 index bd126c0c3c0..2f4db1aa2f1 100644 --- a/test/javascripts/integration/header-test-staff.js.es6 +++ b/test/javascripts/integration/header-test-staff.js.es6 @@ -1,4 +1,6 @@ -integration("Header (Staff)", { +import { acceptance } from "helpers/qunit-helpers"; + +acceptance("Header (Staff)", { user: { username: 'test', staff: true, site_flagged_posts_count: 1 } diff --git a/test/javascripts/integration/login-required-test.js.es6 b/test/javascripts/integration/login-required-test.js.es6 index 082cc9b2ada..c3904b3911e 100644 --- a/test/javascripts/integration/login-required-test.js.es6 +++ b/test/javascripts/integration/login-required-test.js.es6 @@ -1,4 +1,6 @@ -integration("Login Required", { +import { acceptance } from "helpers/qunit-helpers"; + +acceptance("Login Required", { settings: { login_required: true } diff --git a/test/javascripts/integration/modal-test.js.es6 b/test/javascripts/integration/modal-test.js.es6 index 2c5cc7f53a2..e3f0986f01b 100644 --- a/test/javascripts/integration/modal-test.js.es6 +++ b/test/javascripts/integration/modal-test.js.es6 @@ -1,4 +1,5 @@ -integration("Modal"); +import { acceptance } from "helpers/qunit-helpers"; +acceptance("Modal"); test("modal", () => { visit('/'); diff --git a/test/javascripts/integration/sign-in-test.js.es6 b/test/javascripts/integration/sign-in-test.js.es6 index 0d665b4e6c2..32ee35b0310 100644 --- a/test/javascripts/integration/sign-in-test.js.es6 +++ b/test/javascripts/integration/sign-in-test.js.es6 @@ -1,4 +1,5 @@ -integration("Signing In"); +import { acceptance } from "helpers/qunit-helpers"; +acceptance("Signing In"); test("sign in", () => { visit("/"); diff --git a/test/javascripts/integration/static-test.js.es6 b/test/javascripts/integration/static-test.js.es6 index 8b1b184e9c0..e3ad8afa386 100644 --- a/test/javascripts/integration/static-test.js.es6 +++ b/test/javascripts/integration/static-test.js.es6 @@ -1,4 +1,5 @@ -integration("Static"); +import { acceptance } from "helpers/qunit-helpers"; +acceptance("Static"); test("Static Pages", () => { visit("/faq"); diff --git a/test/javascripts/integration/topic-discovery-test.js.es6 b/test/javascripts/integration/topic-discovery-test.js.es6 index 729680336c6..6ee69623d8a 100644 --- a/test/javascripts/integration/topic-discovery-test.js.es6 +++ b/test/javascripts/integration/topic-discovery-test.js.es6 @@ -1,4 +1,5 @@ -integration("Topic Discovery"); +import { acceptance } from "helpers/qunit-helpers"; +acceptance("Topic Discovery"); test("Visit Discovery Pages", () => { visit("/"); diff --git a/test/javascripts/integration/topic-test.js.es6 b/test/javascripts/integration/topic-test.js.es6 index 5757d4091aa..53bf0c3391b 100644 --- a/test/javascripts/integration/topic-test.js.es6 +++ b/test/javascripts/integration/topic-test.js.es6 @@ -1,4 +1,5 @@ -integration("View Topic"); +import { acceptance } from "helpers/qunit-helpers"; +acceptance("View Topic"); test("Enter a Topic", () => { visit("/t/internationalization-localization/280"); diff --git a/test/javascripts/integration/unknown-test.js.es6 b/test/javascripts/integration/unknown-test.js.es6 index c2b96f81a20..148d8d2eefd 100644 --- a/test/javascripts/integration/unknown-test.js.es6 +++ b/test/javascripts/integration/unknown-test.js.es6 @@ -1,4 +1,5 @@ -integration("Unknown"); +import { acceptance } from "helpers/qunit-helpers"; +acceptance("Unknown"); test("Unknown URL", () => { expect(1); diff --git a/test/javascripts/integration/user-card-test.js.es6 b/test/javascripts/integration/user-card-test.js.es6 index 98a76828ae3..4a4d7288bfd 100644 --- a/test/javascripts/integration/user-card-test.js.es6 +++ b/test/javascripts/integration/user-card-test.js.es6 @@ -1,4 +1,5 @@ -integration("User Card"); +import { acceptance } from "helpers/qunit-helpers"; +acceptance("User Card"); test("card", () => { visit('/'); diff --git a/test/javascripts/integration/user-test.js.es6 b/test/javascripts/integration/user-test.js.es6 index ef8cd9aa30f..9d38301ff1b 100644 --- a/test/javascripts/integration/user-test.js.es6 +++ b/test/javascripts/integration/user-test.js.es6 @@ -1,4 +1,5 @@ -integration("User"); +import { acceptance } from "helpers/qunit-helpers"; +acceptance("User"); function hasStream() { andThen(() => { diff --git a/test/javascripts/integration/users-test.js.es6 b/test/javascripts/integration/users-test.js.es6 index 96f27623d10..8ae9cfb28fe 100644 --- a/test/javascripts/integration/users-test.js.es6 +++ b/test/javascripts/integration/users-test.js.es6 @@ -1,4 +1,5 @@ -integration("User Directory"); +import { acceptance } from "helpers/qunit-helpers"; +acceptance("User Directory"); test("Visit Page", function() { visit("/users");