-
Notifications
You must be signed in to change notification settings - Fork 85
E2e tests now run against local dev server #155
Conversation
test-e2e/ajs.test.ts
Outdated
@@ -2,13 +2,12 @@ Feature('AJS Bundle'); | |||
|
|||
const assert = require('assert'); | |||
const testSite = 'https://www.library-test-site.com'; | |||
const testWriteKey = 'TEWEu8XrcMVejk8GOulbEx7rHGyuuijV'; | |||
const testWriteKey = 'WJq9vAlUO5l2255jMg7eEthbkDtq1svu'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a different test project that uses default configurations. The other one has some integration(s) turned on using dummy settings.
maybe we shouldn't add the original |
…oads ajs from test-e2e/static/analytics.js
…nloads analytics.js automatically
bd47995
to
113dc81
Compare
Codecov Report
@@ Coverage Diff @@
## master #155 +/- ##
=========================================
Coverage ? 96.36%
=========================================
Files ? 3
Lines ? 55
Branches ? 0
=========================================
Hits ? 53
Misses ? 2
Partials ? 0
Continue to review full report at Codecov.
|
@@ -0,0 +1,33 @@ | |||
// These config are used by tests and devServer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this file be .ts
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to tackle this in a future PR because codeceptjs requires this config, and it is running as Javascript.
Description
This PR updates test-e2e such that it loads analytics.js and test website from a local test server
loadAJS
helper takes an option{local: bool}
. When set totrue
, the test navigates to and fills inlocalhost:8000
on the test website settings to load AJS from the test server. In the future we could make this configurable between using local vs the live test siteThis PR also refactored configuration into
config.js
(see comments).The local test server expects
analytics.js
to be found intest-e2e/static
, if it is not available, then it downloads it from the configured CDN under the specified test write key. This allows quick development iterations in the future where one make changes to analytics.js, move it to the static directory, and re-run the e2e tests.Testing
Testing not required because this does not change analytics.js-core. Only test-e2e is updated.
Running
make test-e2e
Release
New version is not required because this does not change the analytics.js library.