npm install
npm run serve
npm run build
npm run lint
Open your service now personal developer instance....
- Search for 'Retrieved Update Set', click 'Import Update Set from XML' and upload
\vue-container-servicenow.xml
from the codebase. - Update and then commit the updateset. The updateset will be committed with 'Vue App' as the name.
- Build the app in IDE by running
npm serve build.
- Search for 'vue' in ServiceNow. The following items will appear... Vue Container UI Page REST API
- Click UI Page and transfer the contents from
atat-web-ui\dist\index.html
to the HTML section. - Add this code to the client script section.
window.onload = function() { Array.prototype.forEach.call(window.parent.document.querySelectorAll("link[rel=stylesheet]"), function(link) { var newLink = document.createElement("link"); newLink.rel = link.rel; newLink.href = link.href; document.head.appendChild(newLink); }) }
- Click Update.
- in the left hand nav bar, right click
Vue Container
, thenRest API
and open the Rest API page in a new tab. - Click
JS
link in the bottom resources table. - Click Attachment icon in the upper right hand corner.
- Remove any existing attachments in the modal popup.
- Browse to the
atat-web-ui\dist\js
and upload both .js files as attachments. - Return to the UI page and click the Endpoint link (in the upper hand corner).
- A new tab opens displaying the SPA.
npm run serve
Open another IDE terminal window and run
npx cypress open
Create a .env
file in the project's root directory and use the following Environment Variables:
Environment Variable Name | Description |
---|---|
'localTestUrl' | http://localhost:8080/testing.html |
'isTestingLocally' | true |