@@ -10,7 +10,8 @@ describe('E2E Tests', function() {
1010 const rootTestTitle = this . title
1111 let customerID , resellerID , accountRepID
1212 let USERNAME = 'new@user.attask' ,
13- PASSWORD = 'user'
13+ PASSWORD = 'user' ,
14+ SUBDOMAIN = 'attask'
1415
1516 before ( 'Create Test Customer' , function ( ) {
1617 this . aspInstance = new Workfront . Api ( {
@@ -54,7 +55,8 @@ describe('E2E Tests', function() {
5455 onDemandOptions : 'PWDDISAB' , // PASSWORD_COMPLEXITY_DISABLE
5556 securityModelType : 'D' , // Lucid
5657 status : 'A' , // ACTIVE
57- timeZone : 'UTC'
58+ timeZone : 'UTC' ,
59+ domain : SUBDOMAIN
5860 } )
5961 . then ( data => {
6062 customerID = data . ID
@@ -118,7 +120,7 @@ describe('E2E Tests', function() {
118120 describe ( 'Login with username and password' , function ( ) {
119121 beforeEach ( function ( ) {
120122 return this . instance
121- . login ( USERNAME , PASSWORD )
123+ . login ( USERNAME , PASSWORD , SUBDOMAIN )
122124 . then ( data => {
123125 should ( data ) . have . properties ( 'userID' , 'sessionID' )
124126 should . ok ( true , 'user logged in' )
@@ -486,7 +488,7 @@ describe('E2E Tests', function() {
486488
487489 describe ( 'With no auto-login in beforeEach' , function ( ) {
488490 it ( "Gets apiKey for the User, gets user's details, clear the apiKey" , function ( ) {
489- return this . instance . getApiKey ( USERNAME , PASSWORD ) . then ( data => {
491+ return this . instance . getApiKey ( USERNAME , PASSWORD , SUBDOMAIN ) . then ( data => {
490492 should ( data )
491493 . be . String ( )
492494 . length ( 32 )
@@ -506,7 +508,7 @@ describe('E2E Tests', function() {
506508 version : '7.0' ,
507509 alwaysUseGet : true
508510 } )
509- return instance . login ( USERNAME , PASSWORD ) . then ( ( ) =>
511+ return instance . login ( USERNAME , PASSWORD , SUBDOMAIN ) . then ( ( ) =>
510512 instance
511513 . create ( 'PROJ' , {
512514 name : 'API Project' ,
@@ -520,7 +522,7 @@ describe('E2E Tests', function() {
520522 } )
521523
522524 it ( 'Creates a group "Api Group", edits the name to read "Api Group 2", then deletes it -- Chained' , function ( ) {
523- const login = ( ) => this . instance . login ( USERNAME , PASSWORD )
525+ const login = ( ) => this . instance . login ( USERNAME , PASSWORD , SUBDOMAIN )
524526 const createGroup = ( ) => this . instance . create ( 'group' , { name : 'Api Group' } )
525527 const editGroup = data =>
526528 this . instance . edit ( 'group' , data . ID , { name : 'Api Group 2' } , [ 'ID' ] )
@@ -533,7 +535,7 @@ describe('E2E Tests', function() {
533535 } )
534536
535537 it ( 'Logs in and logs out' , function ( ) {
536- return this . instance . login ( USERNAME , PASSWORD ) . then ( data => {
538+ return this . instance . login ( USERNAME , PASSWORD , SUBDOMAIN ) . then ( data => {
537539 should ( data ) . have . properties ( 'userID' , 'sessionID' )
538540 return this . instance . logout ( )
539541 } )
0 commit comments