Positive Test Cases and Positive Testing

Although the Flatlist obstacle was hard to define and took a long time to get solved. I’ve gained a greater understanding of testing and its flaws as a result. Therefore, I can follow the test progress and attempt to create the optimal assertion more quickly than previously.

This week, I started with testing the more page components. I tested the primary UI elements and the manual scanning functionality. I can state that my unit tests are imperfect and disorganized, but I am working to improve them each time, which affects my upcoming tests.

After that, I moved to test other views. They share comparable components, thus I did not encounter as many difficulties as before. Mr. Peter often urges me to write a good description, and I have since understood that the structure of my tests has to be improved and more understandable. Consequently, I separated my tests into several ‘describe’ sections. For instance, the ‘Header’ section only contains unit tests for the header components.

While you interact with some page, you can easily tell that something is going wrong with the manual scanning input field. Accordingly, I managed also to fix that and create a keyboard toggle that works as a controller to prevent the virtual keyboard from automatically appearing.

Overall, I learned more and gained new experience with unit testing. By running tests, I consistently encounter new errors that require new solutions and provide me with fresh knowledge. Next week, I will do negative tests on previously tested components. Fixing the extra rendering times problem for other views is another task as well.

User action validation on Pick Module

After the color indicator for pick module had been completed, for this week, I’ve implement the features that will alert user when they did not save their pick.

In order to implement the feature, I’ve used the data grid SelectionChanged event. This event will be fire when the selected item in the data grid had been changed. Therefore, I’ve retrieve the RemovedItems from the SelectionChangedEventArgs and compared its pickQuantity with database. If the pickQuantity is same with the database, it allow user to proceed with another row, reset to previous row if it is not same with database and prompt error dialog.

However, I’ve faced problem when the selected item is reset to previous item, but the focus is pointed on another row. Therefore, the PreviewLostKeyboardFocus event is used to solve the problem. It fired when the user attempt to leave the textbox focus. When the event is fired, it will work the same as the SelectionChanged event which compare the value of pickQuantity with database to verify whether user had modify the value. If the pickQuantity had been modified, it will reset the focus back to the previous textbox by using OldFocus.Focus();

Color Indicator for Pick Module

For this week, I’ve coded out the basic functionalities of the pick module which is the pick and pick all functions. While the pick function refer to when the user had enter the amount to pick, a pick data will be generate which contains the line item ID that picked, picked quantity and the user ID that perform the pick.

Before the pick is saved into database, it need to update with the stock quantity database table which increment the amount of stock and decrement in the stock quantity. For the pick all function it perform the same with the pick function with just the pick quantity is set to the line item quantity on button clicked.

After that, I’ve add in with the color indicator function which alert the user on the sales order list on which order is completely picked while which haven’t. Different line items will be indicated with their respective unique colors.

The color indicator is been called in the LoadingRow event which fired when the datagridview is generated and inserting the row into it. It read the current row cell which is the sales order first, and retrieve all the line items inside the sales order. The color indicator determine the color to set by comparing all the pick quantity with the line item quantity, when the pick quantity is equal to line item quantity, the variable picked++.

Lastly, if the picked amount is equal with the line item list count, it means all the line item inside this sales order is picked, with correct colour indicator.

Brainstorming on new task

For the previous week, I had completed with the User module and merged with the master project. I’ve been assigned with new task which is develop the sales order picking module. I’ve been briefed on the module such as its functionalities, requirements, input data and output data that the module should produce.

After that, I’ve started to brainstorming toward the module. I’ve figured and listed down the business flow of the sales order picking module. First of all, user will need to select the sales order that they wish to pick. On the same time, the selected sales order details / attribute will also be shown in the same view. The line items that contained in the selected sales order. Therefore, user will able to proceed with their picking process by entering the amount to pick.

Lastly, I’ve designed the UI of the module and amend it based on the requirements and make it to be more user friendly. I’ve also started to design the Pick service which will contains all the service needed and will be used in the view model in the future.