mdasberg / ng-apimock

Node plugin that provides the ability to use scenario based api mocking: for local development for protractor testing
MIT License
99 stars 26 forks source link

Removed domain and path from cookie set for Angular 2 #6

Closed bvklingeren closed 7 years ago

bvklingeren commented 7 years ago

Domain and path settings and too restrictive for situations where other hosts and/or paths are used, so I removed them. Example of error message:

17:49:26      InvalidCookieDomainError: invalid cookie domain: invalid domain:"localhost"
17:49:26        (Session info: chrome=50.0.2661.86)
17:49:26        (Driver info: chromedriver=2.21.371461 (633e689b520b25f3e264a2ede6b74ccc23cb636a),platform=Linux 3.10.0-327.28.3.el7.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information)
17:49:26      Command duration or timeout: 16 milliseconds
17:49:26      Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 17:00:58'
17:49:26      System info: host: '1913431496b3', ip: '172.18.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-327.28.3.el7.x86_64', java.version: '1.8.0_03-Ubuntu'
17:49:26      Driver info: org.openqa.selenium.chrome.ChromeDriver
17:49:26      Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, chrome={chromedriverVersion=2.21.371461 (633e689b520b25f3e264a2ede6b74ccc23cb636a), userDataDir=/tmp/.com.google.Chrome.PVzgPV}, takesHeapSnapshot=true, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=50.0.2661.86, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
17:49:26      Session ID: 8e3b0f165a2b6bd05fc073e5dd8f3ae4
17:49:26          at WebDriverError (/workspace/node_modules/selenium-webdriver/lib/error.js:26:26)
17:49:26          at InvalidCookieDomainError (/workspace/node_modules/selenium-webdriver/lib/error.js:103:26)
17:49:26          at Object.checkLegacyResponse (/workspace/node_modules/selenium-webdriver/lib/error.js:639:15)
17:49:26          at parseHttpResponse (/workspace/node_modules/selenium-webdriver/http/index.js:538:13)
17:49:26          at /workspace/node_modules/selenium-webdriver/http/index.js:472:11
17:49:26          at ManagedPromise.invokeCallback_ (/workspace/node_modules/selenium-webdriver/lib/promise.js:1379:14)
17:49:26          at TaskQueue.execute_ (/workspace/node_modules/selenium-webdriver/lib/promise.js:2913:14)
17:49:26          at TaskQueue.executeNext_ (/workspace/node_modules/selenium-webdriver/lib/promise.js:2896:21)
17:49:26          at /workspace/node_modules/selenium-webdriver/lib/promise.js:2820:25
17:49:26          at /workspace/node_modules/selenium-webdriver/lib/promise.js:639:7
17:49:26      From: Task: WebDriver.manage().addCookie(ngapimockid=8e4f6a8b-4142-46d7-8fe3-236c39ae4a15;domain=localhost;path=/)
17:49:26          at WebDriver.schedule (/workspace/node_modules/selenium-webdriver/lib/webdriver.js:377:17)
17:49:26          at Options.addCookie (/workspace/node_modules/selenium-webdriver/lib/webdriver.js:1133:25)
17:49:26          at /workspace/.tmp/ng-apimock/protractor.mock.js:27:49
17:49:26          at ManagedPromise.invokeCallback_ (/workspace/node_modules/selenium-webdriver/lib/promise.js:1379:14)
17:49:26          at TaskQueue.execute_ (/workspace/node_modules/selenium-webdriver/lib/promise.js:2913:14)
17:49:26          at TaskQueue.executeNext_ (/workspace/node_modules/selenium-webdriver/lib/promise.js:2896:21)
17:49:26          at /workspace/node_modules/selenium-webdriver/lib/promise.js:2775:27
17:49:26          at /workspace/node_modules/selenium-webdriver/lib/promise.js:639:7
17:49:26          at process._tickCallback (internal/process/next_tick.js:103:7)
bvklingeren commented 7 years ago

Thanks! Any chance on a 1.1.13 release in the coming hours/days/weeks? 😉

Op vr 25 nov. 2016 om 20:46 schreef Mischa Dasberg <notifications@github.com

Merged #6 https://github.com/mdasberg/ng-apimock/pull/6.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mdasberg/ng-apimock/pull/6#event-872392678, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJ1PpqgmI3Xw_lb9NKP_Xf78rtWcj4sks5rBzsNgaJpZM4K8rSb .

mdasberg commented 7 years ago

done :)