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

Create Basic Usage Integration Test #4490

Closed
13 of 23 tasks
lancepioch opened this issue Oct 26, 2022 · 1 comment
Closed
13 of 23 tasks

Create Basic Usage Integration Test #4490

lancepioch opened this issue Oct 26, 2022 · 1 comment
Assignees

Comments

@lancepioch
Copy link
Contributor

lancepioch commented Oct 26, 2022

Main Usage Integration Test

Goals:

The main idea is to make sure that after any changes, that the basic functionality still works. These tests should be as general as possible so that if we change html/js, and even the text wording to an extent, these tests shouldn't fail. We'll be making some big changes to Pterodactyl and this should help prevent too many things from getting broken and merged in, now and in the future. Ideally we'll have more feature and integration tests too, but this should serve us well as a starter.

Challenges:

Websockets: The idea is to use Laravel Dusk to open new browser instances that can emulate websockets well enough to receive and reply demonstrating that any servers are or aren't connected.

Assumptions:

Create initial Admin User with php artisan p:user:make and setup panel using defaults
(eg. mysql for db, redis for cache and session, etc.)

Basic Testing Steps

  • Go to / and see redirect to Log in
  • Login with bad credentials and see failure to login
  • Login with good credentials and see redirect to User Dashboard /
  • See no servers in dashboard yet
  • Click on Admin Dashboard /admin and see no redirect or not denied access
  • Click on Users in navigation then click on Create New
  • Create new non administrator user and see success
  • Try to create duplicate user and see failure
  • Click on Locations in navigation and then click on Create New
  • Create New Location successfully
  • Click on Nodes in navigation and then click on Create New
  • Create New Node successfully
    any random name and description
    pick previously created location
    public visibility
    fqdn should be local ip
    SSL should be turned off as well as no proxy
    Defaults and random numbers for the rest
  • Create 3 new dummy allocations successfully in the same Node
  • Go back to /admin/nodes and see the heartbeat is red/failing
  • Startup another browser/server that has a basic websocket reply
  • See that the heartbeat changes to green/success
  • Click on Servers in navigation and then click on Create New
  • Create 3 New Servers successfully
    Server Name and Description is any random string
    Server Owners should be the admin for two and the non admin for the last one
    Each server should have a different allocation
    Everything else can be left to default
  • Exit Admin Panel and see three servers
  • Click on the middle server and then click on Users in the navigation
  • Click on New User and enter the same email as the non admin user (full permissions)
  • Click on logout and see redirect back to login screen
  • Login as as the non admin user and see two servers
@lancepioch lancepioch self-assigned this Oct 26, 2022
@lancepioch
Copy link
Contributor Author

#4497

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

No branches or pull requests

1 participant