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

Content script tests #1066

Merged
merged 1 commit into from
Dec 21, 2020
Merged

Content script tests #1066

merged 1 commit into from
Dec 21, 2020

Conversation

varjolintu
Copy link
Member

@varjolintu varjolintu commented Oct 24, 2020

All tests files are copied to the extension before running them. Without this action the content scripts cannot be run. This also prevents including the tests files in the extension bundle. Those files cannot be included in the release.

It can be accessed manually from: extension://<extensionId>/tests/tests.html if the test script file is modified and the delete test folder action is deleted.

Usage: npm run tests

TODO:

  • Tests for general functions (global.js)
  • Tests for input field detection (keepassxc-browser.js)
  • Tests for TOTP fields (totp-field.js)
  • Tests for search fields (keepassxc-browser.js)
  • Tests for password change (keepassxc-browser.js)
  • Run tests in headless mode with Mocha and selenium-webdriver

Screenshot:
Screenshot 2020-10-28 at 23 18 39

@varjolintu varjolintu marked this pull request as draft October 24, 2020 11:05
@varjolintu varjolintu added this to the 1.7.3 milestone Oct 31, 2020
@varjolintu varjolintu modified the milestones: 1.7.3, 1.7.4 Nov 4, 2020
@varjolintu varjolintu force-pushed the feature/content_script_tests branch 2 times, most recently from 002a0ee to c4fa116 Compare November 12, 2020 18:09
@varjolintu varjolintu marked this pull request as ready for review December 20, 2020 15:58
@phoerious
Copy link
Member

Can you integrate this into TeamCity?

@varjolintu
Copy link
Member Author

@phoerious It should be possible. I have zero experience with configuring TeamCity so it can take a while.

Copy link
Member

@droidmonkey droidmonkey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the package-lock.json file so large now?

@varjolintu
Copy link
Member Author

@droidmonkey Lots of dependencies in the packages 💁‍♂️

@phoerious
Copy link
Member

I hope we only need them for running the tests?

@varjolintu
Copy link
Member Author

@phoerious For tests yes. But those need to be downloaded also for the build script. I'm not aware of a method that could only download necessary dependencies per needed script.

@varjolintu varjolintu merged commit 6ec8b55 into develop Dec 21, 2020
@varjolintu varjolintu deleted the feature/content_script_tests branch December 21, 2020 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants