From ea37ded4b3403eab609486b9dfe02075e17d31e6 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Thu, 20 Aug 2020 15:07:59 -0400 Subject: [PATCH] =?UTF-8?q?test:=20=F0=9F=92=8D=20remove=20visit=20tests?= =?UTF-8?q?=20for=20defered=20acceptance=20suites?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/core/tests/acceptance/auth-methods-test.js | 47 +++--------- ui/core/tests/acceptance/host-sets-test.js | 71 +++---------------- 2 files changed, 18 insertions(+), 100 deletions(-) diff --git a/ui/core/tests/acceptance/auth-methods-test.js b/ui/core/tests/acceptance/auth-methods-test.js index f91e2cf75..d7f025c63 100644 --- a/ui/core/tests/acceptance/auth-methods-test.js +++ b/ui/core/tests/acceptance/auth-methods-test.js @@ -1,55 +1,26 @@ import { module, test } from 'qunit'; -import { visit, currentURL } from '@ember/test-helpers'; +//import { visit, currentURL } from '@ember/test-helpers'; import { setupApplicationTest } from 'ember-qunit'; import setupMirage from 'ember-cli-mirage/test-support/setup-mirage'; -import a11yAudit from 'ember-a11y-testing/test-support/audit'; -import { - authenticateSession, - // These are left here intentionally for future reference. - //currentSession, - //invalidateSession, -} from 'ember-simple-auth/test-support'; +//import a11yAudit from 'ember-a11y-testing/test-support/audit'; +// import { +// authenticateSession, +// // These are left here intentionally for future reference. +// //currentSession, +// //invalidateSession, +// } from 'ember-simple-auth/test-support'; module('Acceptance | auth methods', function (hooks) { setupApplicationTest(hooks); setupMirage(hooks); - const instances = { - scopes: { - global: null, - org: null - }, - authMethod: null - }; - const urls = { - orgScope: null, - authMethods: null - }; - hooks.beforeEach(function () { // Setup Mirage mock resources for this test - instances.scopes.global = this.server.create('scope', { id: 'global' }); - instances.scopes.org = this.server.create('scope', { type: 'org', - scope: { id: instances.scopes.global.id, type: instances.scopes.global.type } - }); - instances.authMethod = this.server.create('auth-method', { - scope: { - id: instances.scopes.org.id, - type: instances.scopes.org.type - } - }); - // Generate route URLs for resources - urls.orgScope = `/scopes/${instances.scopes.org.id}`; - urls.authMethods = `${urls.orgScope}/auth-methods`; }); test('visiting auth methods', async function (assert) { - assert.expect(1); - authenticateSession(); - await visit(urls.authMethods); - await a11yAudit(); - assert.equal(currentURL(), urls.authMethods); + assert.expect(0); }); test('can navigate to an auth method form', async function (assert) { diff --git a/ui/core/tests/acceptance/host-sets-test.js b/ui/core/tests/acceptance/host-sets-test.js index d01bb6796..1ff96a530 100644 --- a/ui/core/tests/acceptance/host-sets-test.js +++ b/ui/core/tests/acceptance/host-sets-test.js @@ -1,79 +1,26 @@ import { module, test } from 'qunit'; -import { visit, currentURL } from '@ember/test-helpers'; +//import { visit, currentURL } from '@ember/test-helpers'; import { setupApplicationTest } from 'ember-qunit'; import setupMirage from 'ember-cli-mirage/test-support/setup-mirage'; -import a11yAudit from 'ember-a11y-testing/test-support/audit'; -import { - authenticateSession, - // These are left here intentionally for future reference. - //currentSession, - //invalidateSession, -} from 'ember-simple-auth/test-support'; +//import a11yAudit from 'ember-a11y-testing/test-support/audit'; +// import { +// authenticateSession, +// // These are left here intentionally for future reference. +// //currentSession, +// //invalidateSession, +// } from 'ember-simple-auth/test-support'; module('Acceptance | host sets', function (hooks) { setupApplicationTest(hooks); setupMirage(hooks); - const instances = { - scopes: { - global: null, - org: null, - project: null, - hostCatalog: null - }, - hostSet: null - }; - const urls = { - orgScope: null, - projects: null, - project: null, - hostCatalogs: null, - hostCatalog: null, - hostSets: null - }; - hooks.beforeEach(function () { // Setup Mirage mock resources for this test - instances.scopes.global = this.server.create('scope', { id: 'global' }); - instances.scopes.org = this.server.create('scope', { type: 'org', - scope: { id: instances.scopes.global.id, type: instances.scopes.global.type } - }); - instances.scopes.project = this.server.create('scope', { type: 'project', - scope: { id: instances.scopes.org.id, type: instances.scopes.org.type } - }); - instances.scopes.hostCatalog = this.server.create('host-catalog', { - scope: { - id: instances.scopes.project.id, - type: instances.scopes.project.type - } - }); - - instances.hostSet = this.server.create('host-set', { - scope: { - id: instances.scopes.project.id, - type: instances.scopes.project.type - }, - hostCatalog: { - id: instances.scopes.hostCatalog.id, - type: instances.scopes.hostCatalog.type - } - }); - // Generate route URLs for resources - urls.orgScope = `/scopes/${instances.scopes.org.id}`; - urls.projects = `${urls.orgScope}/projects`; - urls.project = `${urls.projects}/${instances.scopes.hostCatalog.scope.id}`; - urls.hostCatalogs = `${urls.project}/host-catalogs`; - urls.hostCatalog = `${urls.hostCatalogs}/${instances.scopes.hostCatalog.id}`; - urls.hostSets = `${urls.hostCatalog}/host-sets`; }); test('visiting host sets', async function (assert) { - assert.expect(1); - authenticateSession(); - await visit(urls.hostSets); - await a11yAudit(); - assert.equal(currentURL(), urls.hostSets); + assert.expect(0); }); test('can navigate to a host set form', async function (assert) {