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

Creation of e2e test for favorite tasks #819

Open
wants to merge 30 commits into
base: main
Choose a base branch
from

Conversation

Angatupyry
Copy link
Collaborator

What's new

  • e2e test for favorite task added

Self-checks

  • I have prototyped this new feature (if necessary) on Figma
  • I'm familiar with and follow this Typescript guideline
  • I added unit-tests for new components
  • I tried testing edge cases
  • I tested the behavior of the components that interact with the backend, with an e2e test

Discussion

aaronchongth and others added 22 commits August 31, 2023 12:32
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
* Sent refresh counter app event to be void, introduced interval event

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Fix prepend addition

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Using 5 second periodic query interval

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Refactor alert event to use void subject as well

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

---------

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
* Making form fields required

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Basic checks for each task description to allow submission

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Fix e2e tests, select coe for patrol explicitly

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Splitting interface and refactoring validity check

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Delivery quantity to positive int field, and sku to text field, monitor null or empty value

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Disable submit when clean zone is removed

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

---------

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
* Display an alert when low display res detected

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Raising e2e test resolution

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Adding comment about raising testing resolution

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

---------

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
* Show month and day view

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Turn off auto refresh when viewing schedule

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Format date correctly to match with the frontend format

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Auto refresh to be determined in the interval creation effect

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Changing name to be explicit for panel

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

---------

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: angatupyry <fierrofenix@gmail.com>
Co-authored-by: angatupyry <fierrofenix@gmail.com>
* Create popup component to edit or delete events

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Create popup component to edit or delete events

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Adding popup to edit events

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Enable or disable cells

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Add schedule and openSchedulepopup props

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Open create task form in edit event

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Update entire schedule

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Update entire schedule

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Fix endpoint to receive task request

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Remove unnecesary function and rename props

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Create hooks to reuse function

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Editing entire schedule

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Using custom hook

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Repeated functions sends to utils file

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Create method to handle editing single event

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Add utils file to be more cleaner

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Setting on or never depending of the schedule value

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Editing single event

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Create a custom hook to get username

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Use custom hook to get usernmae

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Disabling cells without events

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Add test for new component

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Test created

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Order status according to meaning and use ref instead of state to set the current event id

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* End of day using insted of end of minutes in until date

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Set current state when click onSubmit button

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Refresh events after sending submit and after close create task form

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Fix bug editing entire events

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Setting except dates as empty in editing mode

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Separete scheduled component and tasks

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Add explanation comment in new route

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Default cursor in cells without events

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Using the same terminology between edit and delete.

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Rename file name to be more descriptive

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Change name of Radio group

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Move function from utils to task/utils since it is related to just tasks

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Rename component name to be more descriptive

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Fix test accoriing to changes on the component

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Delete unnecesary props

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Rename props to be more descriptive

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Some minor changes to be more descriptive and clear

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Make comments a little more descriptive, instead of pseudocode.

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Add at time in schedule interface to set the time correctly

Signed-off-by: angatupyry <fierrofenix@gmail.com>

---------

Signed-off-by: angatupyry <fierrofenix@gmail.com>
…no callback (#776)

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
… runs the concurrently command (#779)

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
* Add rounds and join places in the short description function

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Add [] between places

Signed-off-by: angatupyry <fierrofenix@gmail.com>

---------

Signed-off-by: angatupyry <fierrofenix@gmail.com>
* Support offline doc generation

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Lint

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Splitting static from run

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* psql config to use static as well

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Change static to cache for cached files, serve bundle in static

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Creating the cache directory just in case it is not called from pnpm

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Moved bundle into package, fixed package_data invocation, use absolute path to bundles

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Remove rogue print statement

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

---------

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
(cherry picked from commit 828171e)
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
* Fix editing single event setting the correct date

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Add toIsoFormat

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* format date to isoFormat

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Format to isoFormat

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Revert to exceptDateref insted of the schedule request time

Signed-off-by: angatupyry <fierrofenix@gmail.com>

---------

Signed-off-by: angatupyry <fierrofenix@gmail.com>
* Detect 0 as number as well

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Display error when fields are left empty during submit

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

---------

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
* Add react three fiber and drei

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Use component property in Box material ui component to avoid three Box component noise

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Use component property in Box material ui component to avoid three Box component noise

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Use component property in Box material ui component to avoid three Box component noise

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Export function

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Add wall draw calculation

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Add reac three fiber logical

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Migrate to react three fiber

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Remove center state

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Remove map setting

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Make circle shape smaller

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Add zindex to for the text layers to appear on top

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Ensure that React doesn't attempt to create or update component

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Add text rendering

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Rendering labels

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Hover and zoom text

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Show labesl correctly

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Remove unused imports

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Implementing debounce to show labels with delay

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Small fixes to react-three-fiber migration (#788)

* Disable walls

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Use useLoader with url only, catch CORS errors potentially due to timeout issues when images are large

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

---------

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Add labels for elevator and door names

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Wrap checkboxes into a div and use select to choose levels

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Add zoom icon

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Add levelselect event to persits between tabs

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Using AppEvents to persits levels

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Camera control component has been added

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Zoom in and zoom out events

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Add camera control component

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Add a wheel function to test event

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Expose debounce function

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Add wheel function to get the zoom value

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Updating zoom properly

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Remove conditional useLoader

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Remove zoom icon

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Remove zoom implementation

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Fix lint

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Rewrite debounce functino

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Add layers for pickup and dropoff waypoints

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Fix dashboard CI for react-three-fiber migration (#795)

* Set max heap size

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Stop producing sourcemap for CI

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* max space to ci

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Try build without sourcemap for CI, alongside heap size increment

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Increasing heapsize on bootstrap step

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Use experimental support for ECMAScript modules

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Use react-components as a module instead

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Remove use of meshes for robot icons

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Revert module call

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

---------

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: angatupyry <fierrofenix@gmail.com>
Co-authored-by: angatupyry <fierrofenix@gmail.com>

* Add spaces in layer names

Signed-off-by: angatupyry <fierrofenix@gmail.com>

---------

Signed-off-by: angatupyry <fierrofenix@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Co-authored-by: Aaron Chong <aaronchongth@gmail.com>
* Re-introduced and refactored zoom button implementation

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Use IconButton, sizing props instead of sx, shuffle according to figma

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Add handleScroll function to persits zoom between tabs (#801)

Signed-off-by: angatupyry <fierrofenix@gmail.com>

---------

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: angatupyry <fierrofenix@gmail.com>
Co-authored-by: César Rolón <37310205+Angatupyry@users.noreply.github.com>
* Fix indexing of doors for entire building, minor refactor

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

* Turn off sorting for unrelated columns, sort names by default for robot, doors and lifts

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

---------

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
* Update camera position and save it in a Behaviour subject

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Remove unused useEffect and state

Signed-off-by: angatupyry <fierrofenix@gmail.com>

---------

Signed-off-by: angatupyry <fierrofenix@gmail.com>
* Use gl element instead of window element

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Remove console log

Signed-off-by: angatupyry <fierrofenix@gmail.com>

---------

Signed-off-by: angatupyry <fierrofenix@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: angatupyry <fierrofenix@gmail.com>
Signed-off-by: angatupyry <fierrofenix@gmail.com>
@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Merging #819 (15a9c62) into main (574de78) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #819      +/-   ##
==========================================
- Coverage   51.41%   51.38%   -0.03%     
==========================================
  Files         282      282              
  Lines        7140     7144       +4     
  Branches      960      961       +1     
==========================================
  Hits         3671     3671              
- Misses       3321     3325       +4     
  Partials      148      148              
Flag Coverage Δ
dashboard 16.60% <ø> (ø)
react-components 49.81% <0.00%> (-0.11%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...kages/react-components/lib/confirmation-dialog.tsx 83.33% <ø> (ø)
...ackages/react-components/lib/tasks/create-task.tsx 3.95% <0.00%> (-0.05%) ⬇️

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

* Render image if robot icon exists

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Add scale to robot resource

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Using scale if exists in resource

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Make waypoints transparent

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Adjust text according to its length

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Remove hasOwn property control

Signed-off-by: angatupyry <fierrofenix@gmail.com>

---------

Signed-off-by: angatupyry <fierrofenix@gmail.com>
Copy link
Member

@aaronchongth aaronchongth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Can we also test these scenarios

Angatupyry and others added 4 commits November 1, 2023 01:47
* Separate components to make it more testable

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Create react three components tests

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Add test for shape three rendering component

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Create three fiber component test

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Add test to layers controller

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Add test id to the component

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Install test-renderer in order to create test for three. Remove datatest id because it make app break

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Fix spanish description

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Change the way to import circle shape component

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Fixing merge conflict

Signed-off-by: angatupyry <fierrofenix@gmail.com>

---------

Signed-off-by: angatupyry <fierrofenix@gmail.com>
* Fix the bug that keeps the robot in the opposite position to its task

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Delete robot name from state if we can't get the current level

Signed-off-by: angatupyry <fierrofenix@gmail.com>

* Check if robot location is available before attempting to render (#825)

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>

---------

Signed-off-by: angatupyry <fierrofenix@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Co-authored-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: angatupyry <fierrofenix@gmail.com>
Signed-off-by: angatupyry <fierrofenix@gmail.com>
Signed-off-by: angatupyry <fierrofenix@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Copy link
Member

@aaronchongth aaronchongth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for setting this up! I've verified that it works locally, so I extended the timeout to 5 minutes to see if it is a latency issue on the side of the runner

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

Successfully merging this pull request may close these issues.

2 participants