Creat test in the frontend for responsivnes #893
Labels
No labels
_CRITICAL_
API
app
backEnd
Blocked-waiting-for-further-changes
bug
bug-only-on-server-for-mobile-not-webpage
Bug-Report-After-Merge
cleanup
close
design
duplicate
enhancement
feature request
frontEnd
further-changes-needed
future-problem-not-fixint-this-period
help wanted
invalid
last-week-issue-to-fix
library
low-priority
needs input
needs review
not-implemented.
project documentation
question
research
reviewed
Script
security
SQL
style
Team 1
Team 2
team leaders
test-creation
testing
topLevel
unassigned
Under-review
wontfix
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Andras/BoundlessFlowCampus2K#893
Loading…
Add table
Add a link
Reference in a new issue
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?
Background to the issue
We need to make sure we have tools for testing (and verification and validation) of the webpage's responsive features.
Automated testing (and the necessary tooling) is preferred.
This is possibly a high-level issue and should be divided into sub-issues.
The research has been done in this issue #15 and what needs to be done is:
-you can use npm package that is updatedd lately and high useage basically an stable library. playwrite seems to be fine by checking the github https://github.com/microsoft/playwright
Are you sure this is an X-unit test? The Frontend is entirely in Javascript, X-unit is for C# (backend, logic etc..) but maybe i am missing something.
We've in earlier decisions disregarded end-to-end testing (playwright) of our frontend and declared manual testing as our go to approach for interactive testing. see https://git.webug.se/Andras/BoundlessFlowCampus2K/wiki/Testing-methodology
If this will be changed, don't forget to update our Testing-methodology wiki to align with reality.
According to wiki "The xUnit frameworks are often used for unit testing – testing an isolated unit of code – but can be used for any level of software testing including integration and system. "
X-unit test refers in this context to the framework.
"https://en.wikipedia.org/wiki/XUnit"
and yes we have decided to do automated tests not manual test. We will update the wiki after depending how it goes with the implementation.
I will rename the label to something more appropriate as it is misleading a little
Solution
I installed the playwright package, using npm init playwright@latest.
Then ran the setup (we should add this to the installaation scripts).
In the newly created folder "tests" you can make your own tests in js i made a simple responsive check that gives the results in the screenshot.
After running the local host, open a new terminal and run npx run test:"name".
I have not encountered that you need to change anything in the config file yet except if you like me have it so the localhost opens up on another port. You need to write the exact port in the config.
Added tests to the scripts block in the package file.
Extra
We should create new issues if wwe want other tests or more complex tests.
I will check it on Monday. We need to make sure the package gets installed when using the scripts building.
@e24aleli do you mind creating a pr so that I can test
@a24sakma created a PR now.
Has been merged in #997