tasks-delivery / MuOnline

Common repository for ticket managment
2 stars 2 forks source link

Market component #254

Open ordeh opened 2 years ago

ordeh commented 2 years ago

The user should be able to trade items from the game with other players for the internal currency of the project (WoCoins) through the web application.

The market should be on a separate page, you can get navigate it through the 'Market' link in the user's personal account.

On the page of the Market, there should be a description of the functionality in the form of text.

Here you can safely trade your items in exchange for WoCoins, so before buying a certain item you get a reliable description, so you are insured against fraud.

Also, the following text should be in bold style

If the item is not sold in 1 month, then it is returned to your virtual vault.

The market page is divided into 3 separate areas.

Virtual vault area The first area should display items that the user already has in the virtual vault. The first area is a grid with two columns in which things from the virtual vault are displayed.

The first column the 'Item' displays the names of things. When you hover the mouse cursor over an item, you can see its detailed description (item name, its options, level and number of strength points)

The second column the 'Management' displays the action that can be performed with this item. The action should be 'Sell'

The user can put the item from the virtual vault on the market by clicking the Sell button.

After the specified sell button, a window in which the selected item will be described in detail and in the window there will be a field for indicating the price of the item.

If the user specifies prices equal to 0 or less than zero, the system will display a message with text Item price must be greater than 0.

If after the price it does not contain only numbers, the system will display a message with text Price values can only be numeric. If the price field is not filled, the system will display a message with text You must fill in all the fields.

slotCount = count of trade slots

If the user does not have enough trading slots, the system will display a message with the text You cannot sell more than {slotCount} items. Buy more trade slots.

If the user does not get an error when pressing the button to sell, then the item will be displayed in the area of found items.

Your items in market The second area should display items that the user already has in the market. The second area is a three-column grid that displays only your market items.

The first column the 'Item' displays the names of things. When you hover the mouse cursor over an item, you can see its detailed description (item name, its options, level and number of strength points) The second column the 'Price' displays the prices of things in WoCoins The third column the 'Management' displays the action that can be performed with this item. The action should be 'Take back'

The user can return the item back to the virtual vault by clicking on the "Take back" button on the opposite of the desired item.

Also in the "Your items in market" section you can see how many trading slots you have and purchase additional slots.

You can buy additional slots by clicking on the "Buy 10 slots for 40 WoCoins" After clicking on the "Buy 10 slots for 40 WoCoins" button, the system asks to confirm the purchase action and displays a dialog with text 'Do you really want to buy trade slots?' and two buttons 'Yes' and 'No' If the user clicks no, then the dialog should close. If you click "yes", then the user will refresh the page, write off 40 WoCoins from the account and increase the number of slots by +10 If the user does not have enough WoCoins to purchase, the system will display a message with text You need more WoCoins on server.

Found items

The third area should display items in the market. The third area is a grid with four columns in which things from the market are displayed.

The first column the 'Item' displays the names of things. When you hover the mouse cursor over an item, you can see its detailed description (item name, its options, level and number of strength points) The second column "Seller" shows who is selling the item The third column the 'Price' displays the prices of things in WoCoins The fourth column "Control" displays the actions that can be performed on this item. The action must be "Take back" or "Buy".

The "Take back" action will only be for those things that you set yourself. For items that have been put up by other players, you will see the "Buy" action

The user can return the item back to the virtual vault by clicking on the "Take back" button on the opposite of the desired item.

If the user clicks buy, the system will display a buy window with detailed information about the item and its price.

After clicking on the "Buy" button in the buy window, the system asks to confirm the purchase action and displays a dialog with text 'Do you really want to buy {itemName}?' and two buttons 'Yes' and 'No' If the user clicks no, then the dialog should close.

If you click "yes", then the page will be refreshed and write off WoCoins from the buyer account and item is shown in virtual vault on buyer. Item should be removed from seller and WoCoins should be added.

If the user does not have enough WoCoins to purchase, the system will display a message with text You need more WoCoins on server.

If the number of items on the market is more than 50, then there should be pagination.

andrei9619 commented 2 years ago

@ordeh List of the test cases for that task:

  1. https://app.qase.io/case/WOMU/edit/142
  2. https://app.qase.io/case/WOMU/edit/145
  3. https://app.qase.io/case/WOMU/edit/133
  4. https://app.qase.io/case/WOMU/edit/138
  5. https://app.qase.io/case/WOMU/edit/139
  6. https://app.qase.io/case/WOMU/edit/146

Working on the others

ordeh commented 2 years ago

@andrei9619

Test-case 145: with? image

Remove image

I think that it should be 'take back' image

Test-case 133:

Remove image

I think that you need always close popups, please add steps for this. image

Test-case 137:

Duplicate, it was checked in test-case 142

Test-case 138:

Add check for 'no' button image

Test-case 139:

it is not possible to have items in virtual vault more that limit image

Test-case 146:

We should not use 'correct' in testing, please rework description. For instance, 'it is possible to take back item from market' image

Remove image

andrei9619 commented 2 years ago

@ordeh Fixed

ordeh commented 2 years ago

@andrei9619

Rework all test descriptions where you use the words "all" "correct"

Test-case 139: Change to {name of selected item} image

Test-case 146:

Fix word image

An item cannot have a list of skills. The item can be with or without skill image

Add check that item is not shown in item found grid. Also, I think that you need to add into the precondition that market have not items, this will help to avoid pagination when checking the removal of item from the item found grid. image

Where described 'take back' button? image

andrei9619 commented 2 years ago

@ordeh Fixed