Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repackaging with module syntax #9

Merged
merged 21 commits into from
Aug 27, 2022
Merged

Repackaging with module syntax #9

merged 21 commits into from
Aug 27, 2022

Conversation

avoidwork
Copy link
Owner

@avoidwork avoidwork commented Aug 27, 2022

  • Rewriting as an ES module
  • window decoration changed from router() to domRouter.router()
  • Updating build to use rollup
  • Updating README.md
  • Adding a changelog
  • Re-implementing functional testing with nightwatch.js
/Users/jason/.nvm/versions/node/v18.6.0/bin/npm run build

> dom-router@5.0.0 build
> npm run lint && rm -rf dist/* && npm run rollup && npm run ui


> dom-router@5.0.0 lint
> eslint *.js src/*.js tests/specs/basic/router.js


> dom-router@5.0.0 rollup
> rollup --config


./src/router.js → dist/dom-router.cjs.js, dist/dom-router.esm.js, dist/dom-router.esm.min.js, dist/dom-router.js, dist/dom-router.min.js, tests/specs/basic/www/dom-router.js...
created dist/dom-router.cjs.js, dist/dom-router.esm.js, dist/dom-router.esm.min.js, dist/dom-router.js, dist/dom-router.min.js, tests/specs/basic/www/dom-router.js in 286ms

> dom-router@5.0.0 ui
> npm run nightwatch-dirs && npm run nightwatch


> dom-router@5.0.0 nightwatch-dirs
> mkdir -p tests/page-objects && mkdir -p tests/custom-commands && mkdir -p tests/custom-assertions && mkdir -p tests/specs/basic


> dom-router@5.0.0 nightwatch
> npm run nightwatch-chrome && npm run nightwatch-firefox


> dom-router@5.0.0 nightwatch-chrome
> nightwatch tests/specs/basic/router.js --env chrome


[Tabbed UI Tests] Test Suite
────────────────────────────────────────────────────────
ℹ Connected to ChromeDriver on port 9515 (756ms).
  Using: chrome (104.0.5112.101) on MAC OS X.


  Running Default starting state - returns #main:
───────────────────────────────────────────────────────────────────────────────────────────────────
  ✔ Element <body> was visible after 19 milliseconds.
  ✔ Testing if element <#main> is visible (14ms)
  ✔ Testing if element <#settings> is not visible (12ms)
  ✔ Expected current url to end with: "#main" (3ms)

OK. 4 assertions passed. (53ms)

  Running Click tabbed navigation - returns #settings/billing:
───────────────────────────────────────────────────────────────────────────────────────────────────
  ✔ Element <body> was visible after 8 milliseconds.
  ✔ Testing if element <#settings> is visible (539ms)
  ✔ Testing if element <#billing> is visible (21ms)
  ✔ Testing if element <#password> is not visible (17ms)
  ✔ Testing if element <#main> is not visible (12ms)
  ✔ Expected current url to end with: "#settings/billing" (2ms)

OK. 6 assertions passed. (634ms)

> dom-router@5.0.0 nightwatch-firefox
> nightwatch tests/specs/basic/router.js --env firefox


[Tabbed UI Tests] Test Suite
────────────────────────────────────────────────────────
ℹ Connected to GeckoDriver on port 4444 (2194ms).
  Using: firefox (104.0) on MAC.


  Running Default starting state - returns #main:
───────────────────────────────────────────────────────────────────────────────────────────────────
  ✔ Element <body> was visible after 27 milliseconds.
  ✔ Testing if element <#main> is visible (17ms)
  ✔ Testing if element <#settings> is not visible (11ms)
  ✔ Expected current url to end with: "#main" (3ms)

OK. 4 assertions passed. (64ms)

  Running Click tabbed navigation - returns #settings/billing:
───────────────────────────────────────────────────────────────────────────────────────────────────
  ✔ Element <body> was visible after 15 milliseconds.
  ✔ Testing if element <#settings> is visible (542ms)
  ✔ Testing if element <#billing> is visible (19ms)
  ✔ Testing if element <#password> is not visible (16ms)
  ✔ Testing if element <#main> is not visible (12ms)
  ✔ Expected current url to end with: "#settings/billing" (2ms)

OK. 6 assertions passed. (646ms)

Process finished with exit code 0

@avoidwork avoidwork self-assigned this Aug 27, 2022
@avoidwork avoidwork merged commit e189447 into master Aug 27, 2022
@avoidwork avoidwork deleted the repackage branch August 27, 2022 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant