3
16
Fork
You've already forked lichen
1

Should have some testing to verify functionality before bugfixing or improvements #2

Closed
opened 2024年01月13日 22:51:43 +01:00 by stringbone · 4 comments

There should be some amount of testing to verify that the functionality doesn't change when bugfixes or improvements are made.

  • Test the JS things, not the gforth stuff
  • Use Jasmine for browser testing
  • For testing the accessibility of the webpage, use axe-core
There should be some amount of testing to verify that the functionality doesn't change when bugfixes or improvements are made. * Test the JS things, not the gforth stuff * Use [Jasmine](https://jasmine.github.io/pages/getting_started.html) for browser testing * For testing the accessibility of the webpage, [use axe-core](https://github.com/marcysutton/axe-jasmine-unit/blob/5b1bc5409ddc5c21be940f6b818c16a4f313bb68/README.md)
Author
Owner
Copy link

Break out utilities that are not directly touching the main webpage to better test them. Most pieces should be independent of the DOM.

Break out utilities that are not directly touching the main webpage to better test them. Most pieces should be independent of the DOM.
Author
Owner
Copy link

One interesting thing here is that if I try to use imports and exports to test utilities in isolation, we get errors by filepath. This is because the current way to navigate and edit files is by way of edit.cgi/<filename>. Because we are using a / and not something else (like a query string with percent encoding, with encodeURIComponent), it considers the filepath as the whole path, including the post edit.cgi part. There is not a way to get JS to recognize in a way that affects the import behavior. So the next step might be to modify it from just slashes as filepaths to a URI situation.

One interesting thing here is that if I try to use imports and exports to test utilities in isolation, we get errors by filepath. This is because the current way to navigate and edit files is by way of `edit.cgi/<filename>`. Because we are using a `/` and not something else (like a query string with percent encoding, with [encodeURIComponent](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent)), it considers the filepath as the _whole path_, including the post `edit.cgi` part. There is not a way to get JS to recognize in a way that affects the import behavior. So the next step might be to modify it from just slashes as filepaths to a URI situation.
Author
Owner
Copy link

Ah! I could just remove the trailing filepath in the edit.cgi after it is loaded. WOuld make more sense to signify what file is being edited in some other way anyway, as it should be on the screen while editing and in the browser.

Ah! I could just remove the trailing filepath in the edit.cgi after it is loaded. WOuld make more sense to signify what file is being edited in some other way anyway, as it should be on the screen while editing and in the browser.
Author
Owner
Copy link

I think I've done all I can, considering the limitations. Everything else will need to be manual testing.

I think I've done all I can, considering the limitations. Everything else will need to be manual testing.
Sign in to join this conversation.
No Branch/Tag specified
master
40/summary
mobile
v2.2.1
v2.2.0
v2.1.2
v2.1.1
v2.1.0
v2.0.14
v2.0.13
v2.0.12
v2.0.11
v2.0.10
v2.0.9
v2.0.8
v2.0.7
v2.0.6
v2.0.5
v2.0.4
v2.0.3
v2.0.2
v2.0.1
v2.0
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
stringbone/lichen#2
Reference in a new issue
stringbone/lichen
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?