Giter Site home page Giter Site logo

mwinteringham / restful-booker-platform Goto Github PK

View Code? Open in Web Editor NEW
117.0 117.0 148.0 83.79 MB

A SaaS platform used for various test automation training

Home Page: http://www.automationintesting.com

License: GNU General Public License v3.0

JavaScript 30.07% HTML 0.28% Java 66.56% Shell 0.86% Batchfile 1.14% Dockerfile 0.46% SCSS 0.63%
automation automation-api automation-in-testing automation-ui training

restful-booker-platform's People

Contributors

ardesco avatar dcoomber avatar dependabot[bot] avatar friendlytester avatar jvsanten avatar mwinteringham avatar ollyjshaw avatar testingchef avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

restful-booker-platform's Issues

IP range for CORS is too restrictive

Multiple issues raised show that IP range for CORS is too restrictive and those not running off of Localhost have run into issues running the app.

10. Hotel front page

As a guest of the B&B
I want to be able to view details on the B&B
So I can learn about the rooms offered and more about the B&B

Features:

  • Remove search features
  • Setup service that stores generic details of site
  • Extend room manager to have details on room and store image
  • Create front page that shows generic details of site and each of the rooms
  • Fix tests broken by navigation restructure

3. Provide authentication to access content

As a B&B owner
I want to have to provide a username and password
So that I can prevent unauthorised access to my bookings

Features:

  • User has to provide a username and password to login
  • Incorrect logins return an error
  • Correct logins provide a token that is used to authorise future requests

cannot run the app

Hi,

I've bee trying to use your platform for API Testing (exercise testing with Postman) and there are moments when this is not working.

When I do docker-compose build or docker compose up, I get this error

image

Can you help me with this? I'm a test apprentice at the test lab 2007 - eurostar and I'd like to prepare some API tests n your environment.

thank you

8. Room availability reports

As a B&B owner
I want the ability to see available dates for a room
So I can quickly select see which dates are available for booking

Features:

  • Attempting to book a room during a date that is already booked will return an error
  • A calendar will show what rooms are booked on specific dates

Improve end-to-end tests

End-to-end tests are needed to ensure paths are all correct between services and UI.

  • Update README to reflect how to switch between local and production runs
  • Work out how to trigger e2e locally as part of the test flow (requires app up and running)
  • Integrate e2e into CircleCI and with SauceLabs

Initialisation fails when Timezone not set to UK timezones

Running the shell script will fail if the system's timezone is set to be outside the UK (eg, if you're from Ecuador)

The script will finish after erroring out, informing that the server's been successfully raised, but the app will be unavailable

Type - bed relation

Type can only contain the room options Single, Twin, Family, Suite. There must be a correlation between Type and number of beds.

screenshot_1

Move SQL seeding out of code

Currently, Hotel and Booking data is created in the code, which is a bit ugly. We should move the SQL out into a SQL file.

Update of booking data leads to deletion of name and price entry

Steps to reproduce:

  • enter a booking (name, price etc.), press create button
  • update this booking, e.g. extend the booking by one day

Actual result:
With the update, first name and family name are deleted. Price is set to 0.

Expected result:
The values should not be updated since the user did not change them.

11. Expand reporting features

As a B&B owner
I want to be able to see reports in the room pages
And I want to be able to see all rooms grouped by dates in the report page
So I can get visibility of both the occupation of an individual room and all rooms

Features:

  • Reports page retired in favour of an all bookings heatmap on the rooms page
  • All bookings heatmap allows you to hover over a date and see which specific rooms have been booked
  • Individual rooms show a heatmap for that specific room

Make timezone checks less sensitive to local timezones

Environment:

OS: Mac OSX Mojave
JVM: Java 8
Node: 8.14.0
JVM_HOME: Set

I tried running the tests two different ways.
1.) Via run_locally.sh
2.) Via mvn clean test

Expected Results:
Tests Pass and I can deploy the application

Actual Results:

This is the log when running with -X flag.

[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR]   BuildReportTest.testGettingBookingsSearchResults:49 »  Failed Approval
  Appro...
[INFO]
[ERROR] Tests run: 3, Failures: 0, Errors: 1, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for restful-booker-platform 1.0-SNAPSHOT:
[INFO]
[INFO] restful-booker-platform-auth ....................... SUCCESS [01:39 min]
[INFO] restful-booker-platform-booking .................... SUCCESS [ 34.396 s]
[INFO] restful-booker-platform-room ....................... SUCCESS [01:03 min]
[INFO] restful-booker-platform-search ..................... SUCCESS [  0.842 s]
[INFO] restful-booker-platform-report ..................... FAILURE [  4.139 s]
[INFO] restful-booker-platform-ui ......................... SKIPPED
[INFO] restful-booker-platform ............................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  03:22 min
[INFO] Finished at: 2018-12-13T15:42:37-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.0:test (default-test) on project restful-booker-platform-report: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/silne30/Desktop/selenium-article/restful-booker-platform/report/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.0:test (default-test) on project restful-booker-platform-report: There are test failures.

Please refer to /Users/silne30/Desktop/selenium-article/restful-booker-platform/report/target/surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.

Please refer to /Users/silne30/Desktop/selenium-article/restful-booker-platform/report/target/surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
    at org.apache.maven.plugin.surefire.SurefireHelper.throwException (SurefireHelper.java:240)
    at org.apache.maven.plugin.surefire.SurefireHelper.reportExecution (SurefireHelper.java:112)
    at org.apache.maven.plugin.surefire.SurefirePlugin.handleSummary (SurefirePlugin.java:364)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked (AbstractSurefireMojo.java:1052)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute (AbstractSurefireMojo.java:868)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command

Setup production environment with continuous deployment

AiT want to offer a place where students can practise test automation techniques. So we're going to create a continuously deployable environment of RBP for students to practise against.

  • Setup CircleCI to run tests, build images and then deploy image
  • Create Docker images and storage location
  • Timer to reset DBs
  • Welcome messages to get started with RBP

Abstract booking validator into it's own class

At the moment validation for bookings live both in the controller and the DB classes. We could do with making this cleaner and having a class that can be responsible for validation and simply spew out validation errors for the controller to handle.

No handling for bookings in a deleted room

When you have an booking in a deleted room, when located via search the app fails to load. A GET to room/[room_id] returns a 500. An error of TypeError: Cannot read property 'toString' of undefined is thrown.

To reproduce:

  1. Login as the admin user
  2. Either create a room and a booking, then delete the room you created. Alternatively delete room 101 if the default database is currently being used.
  3. Using the search feature, search for the name used in the booking which will be visible and then click.

Result:
The above errors are thrown and the app fails to render.

Expected Result:
Either deleting a room should destroy all bookings, or bookings without rooms should error when accessed.

Research analytics in RBP

We want to be able to track users when they interact with the application using monitoring techniques

Room Type Dropdown

Turn the room type into a dropdown, provides more WebDriver examples, and potentially more JS interaction idea.

Empty building report page

After I deleted all rooms and clicked on Report, building report page is stuck.I expect some notification or just Building report title to disappear.

screenshot_11

5. Basic profit reports

As a B&B owner
I want to see how much each room is making
So I can quickly determine which is the most profitable room

Features:

  • All rooms are shown on a graph on X-axis
  • Y-axis will show the total of all the booking prices added to together

First name and Last name accept numbers as valid names

Currently if I provide a single number char for either of first name and last name, the system accepts as valid name.

It should validate at least that the name should not start with numbers and should be at least more than 1 character.

4. Search for bookings

As a B&B owner
I want to be able to search for bookings
So that I can easily retrieve specific bookings

Features:

  • User can search for booking based on Firstname or Lastname

Check in and checkout dates are not validated

When I provide checkout date which is before checkin date, it will accept me happily.

But I expected the system to validate the the checkout date always should be greater than or equal to the check in date.

Break dependency between Room and Booking

At the moment when a specific Room is requested Room calls Booking to get specific Bookings related to the Room. Room then returns a response with Room details and related Bookings.

We should decouple this and have the UI be responsible for making GETs to Room and then Bookings. It will clean up the models for both APIs and make report cleaner.

9. User bookings

As a guest of the B&B
I want to be able to book a specific room on specific dates
So I can book online without having to contact the B&B directly

Features:

  • Guest can search for room availabilities based on date
  • If a room is available they can select the room and submit details to confirm booking

2. Manage multiple rooms

As a B&B owner
I want to be able to manage multiple rooms and their bookings
So that I can track bookings across multiple rooms

Features include:

  • Create room that contains:
    • Room number
    • Room type (Single, Twin, Family, Suite)
    • Number of beds
    • Room details
    • Whether the room is accessible to people with special needs
  • Edit room details
  • Delete rooms
  • Assign bookings to a specific room

1. Store bookings

As a B&B owner
I want to be able to store bookings for a single room
So I can track bookings for the room

Features include:

  • Create bookings that contain:
    • First name
    • Last name
    • Price of booking
    • Deposit paid
    • Checkin date
    • Checkout date
  • Edit bookings
  • Delete bookings
  • Show bookings in list form

I could not login to the site

I could not login to the site, what use name and password should I use?
I used admin & password, admin without password. Neither worked.

Fix run_locally.cmd to cleanly support visual checks

At the moment it's proving difficult to get the batch script to recognise if an API key for Applitools has been set and allow the visual checks to be run if the key exists. It's resulted in run_locally.cmd failing because it doesn't check the env var properly and triggers the visual checks with no API key set.

Batch scripting sucks...

Can duplicate room numbers

There is no uniqueness check on room numbers, and as a result rooms can be created with the same room number.

To Reproduce:

  1. Login as the admin
  2. Add a room with all valid options and a number of [SOMENUMBER]
  3. Add another room with all valid options and a number of [SOMENUMBER]

Result:
Room created

Expected Result:
Should error and enforce room# uniqueness

User can't login with enter

When I type username "admin" and password "password" I can log in only with "Login" button on front page. I want to be logged in with "Enter" key on the keyboard.

screenshot_1

6. User management

As a B&B owner
I want to be able to manage user access
So that I can allow different levels of access to multiple users

Features:

  • DB is configured with an Admin user
  • Guests are asked to create an account to make a booking
  • Admin can see the accounts created on the platform and can delete them

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.