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

Recreate Test Suite #145

Open
2 of 4 tasks
lidel opened this issue Sep 14, 2016 · 3 comments
Open
2 of 4 tasks

Recreate Test Suite #145

lidel opened this issue Sep 14, 2016 · 3 comments
Labels
help wanted Seeking public contribution on this issue kind/maintenance Work required to avoid breaking changes or harm to project's status quo status/deferred Conscious decision to pause or backlog
Milestone

Comments

@lidel
Copy link
Member

lidel commented Sep 14, 2016

In legacy SDK we had a comprehensive test suite that was run via jpm test

WebExtensions use web-ext, but it does not provide test runner yet.
There is a related, open issue at mozilla/web-ext#5.

This issue is blocked until WebExtension test runner is implemented upstream, or a custom npm tests command is implemented locally AND we reach 80%+ test coverage

(updated 2017-12-02)

  • npm test runs test suite with browser stub
  • think about Browser detection (we have Firefox/Chrome/Brave specific workarounds in codebase)
  • TODO: go over tests in legacy-sdk branch and add missing unit tests here
  • Research if we are able to run integration tests against real browsers with assertions that check browser UI
    • https://firefox-puppeteer.readthedocs.io:

      Firefox Puppeteer provides a library to manipulate each visual section of Firefox’s browser UI. For example, there are different libraries for the tab bar, the navigation bar, etc.

@lidel lidel added the kind/maintenance Work required to avoid breaking changes or harm to project's status quo label Sep 14, 2016
@lidel lidel added this to the v2.0.0 milestone Sep 14, 2016
@lidel lidel mentioned this issue Sep 14, 2016
9 tasks
@lidel lidel changed the title Create WebExtension Test Suite WX: Recreate Test Suite Sep 15, 2016
@lidel
Copy link
Member Author

lidel commented Oct 28, 2016

Ok, seems that mozilla suggests mocha, karma with unit tests where WebExtensions stubbed by the sinon-chrome package and functional ones handled via geckodriver:

lidel added a commit that referenced this issue Oct 28, 2016
- implements #145
- unit tests: mocha + sinon-chrome
- functional tests: karma + mocha
lidel added a commit that referenced this issue Oct 28, 2016
@lidel lidel added the help wanted Seeking public contribution on this issue label May 9, 2017
@lidel lidel changed the title WX: Recreate Test Suite Recreate Test Suite May 22, 2017
@lidel lidel modified the milestones: v2.0.0, 2018-Q1 Dec 2, 2017
lidel added a commit that referenced this issue Jan 4, 2018
- bumped some versions, eg. ipfs-api
- removed karma deps, no longer used
- removed PoC integration tests, added #165 as sub-item of #145
@cvan
Copy link

cvan commented Mar 7, 2018

This might be worth giving a shot using testcafe. Let me know your thoughts. If there's interest, I'd be glad to help.

@lidel
Copy link
Member Author

lidel commented Aug 7, 2018

We may want to revisit tests in Q4 with:

A command line tool (inspired by tape) can be used to test Firefox web extensions.
It starts Firefox in headless mode using Web Driver and install temporary test web extensions that are assumed to produce TAP output. You can use libdweb experimental test API which is API compatible with tape for writing tests.

https://github.com/gozala/tape-ext

@lidel lidel added the status/deferred Conscious decision to pause or backlog label Sep 22, 2018
@galargh galargh moved this to To do in IPFS-GUI (PL EngRes) Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Seeking public contribution on this issue kind/maintenance Work required to avoid breaking changes or harm to project's status quo status/deferred Conscious decision to pause or backlog
Projects
No open projects
Status: Needs Grooming
Development

No branches or pull requests

2 participants