Skip to content

Commit

Permalink
merge dev into billing (#1694)
Browse files Browse the repository at this point in the history
* Release latest to Stage (#988)

* Add French translation and set the language selection (#978)

* should be almost set

* dropdown styling

* done with translation

* nits here and there

* Apply suggestions from code review

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* missing translations

* add locale with dayjs

* lingui extract

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>

* Fix design nits (#987)

* setup warning

* colors

* icon

* buttons

* dropdown menu 14

* images

* nits

* title too big and switch buttons order

* Apply suggestions from code review

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* update link closes #849

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Michael Yankelev <myankelev@gmail.com>

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>

* fix link (#1025)

* create buckets for new users

* remove depraecated files call

* [Storage] Copy cid functionality (#1437)

* Copy features added, overflow issue still present

* Swapped to button

* lingui extract

* Updated button

* lingui extract

* Apply suggestions from code review

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Fixed size

* lingui extract

* minmax

* lingui extract

* revert unrelated changes

* lingui extract

* Apply suggestions from code review

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <github@thib.top>

* [STORAGE] Rename file in bucket (#1471)

* formik submit not firing

* fix mobile

* lingui extract

* Update packages/storage-ui/src/Components/Modules/FileSystemItem/FileSystemTableItem.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* make eslint :)

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* 10min timeout for everyone (#1472)

* Translated using Weblate (French) (#1478)

Currently translated at 100.0% (262 of 262 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* add ui tests for search (#1479)

* bump cypress to v8.3.1 (#1480)

* Sharing feature explainer (#1477)

* refactor modal

* steps logic

* image centered

* lingui extract

* lingui extract

* typo

* refactor with hook, change icon, ad to share menu

* nits

* fix storage building

Co-authored-by: GitHub Actions <actions@github.com>

* Adding multi selects on mobile view with long press (#1470)

* using long press

* dragg preview problems

* typos

* events almost ready

* resets

* long press options

* long press updates

* formats

* dark mode colors

* added hover with breakpoints

* lingui extract

* Apply suggestions from code review

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* curly spacing

* borders

* clicks proper placement

* reverted linting

* removed preview on mobile

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* bump to 1.18.5 (#1493)

* [Files] - New survey - Discord link and tiny fix (#1487)

* a nice mix of things

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>

* Translations update from Weblate (#1496)

* Translated using Weblate (French)

Currently translated at 100.0% (266 of 266 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

* Translated using Weblate (German)

Currently translated at 73.3% (195 of 266 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/de/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* update axios (#1498)

* Added docs link (#1497)

* Added doc link

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>

* upgrade (#1501)

* Published (#1503)

Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* Add ui tests for file preview (#1489)

* Toasts refactor (#1495)

* Toast content ready

* toast animations

* toasts before relative positioning

* component ready, start integration

* normal notifications ready

* downloads ready

* toasts ready

* toasts inn storage

* Toasts refactor okk

* lingui extract

* minor changes

* Update packages/common-components/src/index.ts

Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>

* translates

* post merge updates

* translates update

* progress and overrides

* updates in lock file

* updates ready

* lingui extract

* removing dark theme from storage and gaming

* Update packages/common-components/src/Toasts/types.ts

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/stories/Toasts.stories.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/stories/Toasts.stories.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* toasts types

* missed type updates

* update element identifier for toast

* Update packages/common-components/src/stories/Toasts.stories.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContent.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* download error messages

* Update packages/common-components/src/Toasts/types.ts

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/FileBrowsers/CSFFileBrowser.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/FileBrowsers/SharedFileBrowser.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* lingui extract

* Update packages/files-ui/src/App.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* storybooks update

* using usref (#1513)

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>
Co-authored-by: Michael Yankelev <myankelev@gmail.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Andrew Snaith <andrew@chainsafe.io>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Progress cancellations (#1500)

* Toast content ready

* toast animations

* toasts before relative positioning

* component ready, start integration

* normal notifications ready

* downloads ready

* toasts ready

* toasts inn storage

* Toasts refactor okk

* lingui extract

* minor changes

* Update packages/common-components/src/index.ts

Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>

* translates

* post merge updates

* translates update

* progress and overrides

* updates in lock file

* updates ready

* lingui extract

* removing dark theme from storage and gaming

* Update packages/common-components/src/Toasts/types.ts

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/stories/Toasts.stories.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/common-components/src/stories/Toasts.stories.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* toasts types

* missed type updates

* uploads ready

* uploads ready

* lingui extract

* update element identifier for toast

* cancel source tokens

* toasts added

* Update packages/common-components/src/stories/Toasts.stories.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContent.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/common-components/src/Toasts/ToastContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* download error messages

* Update packages/common-components/src/Toasts/types.ts

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/FileBrowsers/CSFFileBrowser.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/FileBrowsers/SharedFileBrowser.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* lingui extract

* resolved errors and lints

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* added closabble states

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>
Co-authored-by: Michael Yankelev <myankelev@gmail.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Andrew Snaith <andrew@chainsafe.io>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* survey banner on safari fix (#1512)

* banner fix

* Update packages/files-ui/src/Components/SurveyBanner.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* fix what I broke (#1518)

Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* Change the survey to a call for a user interview (#1517)

* change fore a user interview call

* lingui extract

* Apply suggestions from code review

Co-authored-by: Andrew Snaith <asnaith@users.noreply.github.com>

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Andrew Snaith <asnaith@users.noreply.github.com>

* bump cypress to v8.4 (#1521)

* Translations update from Weblate (#1522)

* Translated using Weblate (French)

Currently translated at 100.0% (271 of 271 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

* Translated using Weblate (German)

Currently translated at 71.9% (195 of 271 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/de/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* Adjusting login screen sizes. (#1519)

* login screen sizes

* check for instanceof Error

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <github@thib.top>

* Gaming Dashboard overhaul (#1504)

* Updating the dashboard api

* Reflected functionality

* lingui extract

* CS favicon

* Update packages/gaming-ui/src/Components/Modules/ApiKeys.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/gaming-ui/src/Components/Pages/LoginPage.tsx

Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Thibaut Sardan <github@thib.top>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* bulk recover operation (#1526)

* recovers working

* removed consoles

* Add new ui tests for illogical folder and file move errors (#1520)

* Add tests for illogical folder move attempts

* Add new check to spec file

* Finalize changes to spec file

* Removed string checking following PR feedback

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Posthog Analytics Integration (#1514)

* added posthog integration

* Banner logic working correctly

* handle uninitialized posthog

* fix lint

* extract messages

* lingui extract

* resolve warning

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Michael Yankelev <myankelev@gmail.com>
Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Translated using Weblate (French) (#1528)

Currently translated at 100.0% (272 of 272 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* [Files] - Share to home or other shared folder (#1527)

* share to home or other shared folder

* small changes for a better UX

* lingui extract

* lingui extract

* Update packages/files-ui/src/Components/Modules/FileBrowsers/ShareModal.tsx

Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* fix console warnings

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* Folder uploads  (#1515)

* add basic folder upload

* wire up folder uploads for modal

* Rename Modal

* fix types

* remove types

* lingui extract

* fix lint

* add source attribution

* lingui extract

* incorporate feedback

* lingui extract

* fix lint

* Fix casing

* Rename component for consistency

* lingui extract

* clean up types

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>

* Translated using Weblate (French) (#1532)

Currently translated at 100.0% (276 of 276 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* Don't track before opt-in (#1531)

* dont track users before they opt-in

* nits and remove log, calls are still fires

* default to not track

* lingui extract

* with init check

* Update packages/files-ui/src/Contexts/PosthogContext.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* [Files] - Show current bucket decryption key (#1534)

* show current bucket decryption key

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>

* [Files] - Get admin public key from the api (#1485)

* bump

* use api client

* merge dev

* lingui extract

* support several keys

* wih scroll because pub/decryption key are long

Co-authored-by: GitHub Actions <actions@github.com>

* Add lint rules for test debug commands (#1535)

* prevent double opening (#1538)

* Add test coverage for storage summary adjustments (#1536)

* Translated using Weblate (French) (#1540)

Currently translated at 100.0% (278 of 278 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* Better colors for dark mode select and tagsinput components (#1550)

* better colors for dark mode

* lingui extract

* fix typo

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>

* Filter out current bucket (#1548)

* filter out current bucket

* Update packages/files-ui/src/Components/Modules/FileBrowsers/ShareModal.tsx

* fix color (#1555)

* Fix user lookup spamming the api, and throwing (#1553)

* oh yeaah

* lingui extract

* lingui extract

* Apply suggestions from code review

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* Upgrade Torus dependencies (#1549)

* [wip] update dependencies

* Revert "[wip] update dependencies"

This reverts commit 04b593b.

* update torus dependencies

* fix storage test

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* reset fields for shared folders (#1577)

* reset forms and fix a couple error types (#1578)

* Translations update from Weblate (#1557)

* Translated using Weblate (French)

Currently translated at 100.0% (281 of 281 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

* Translated using Weblate (German)

Currently translated at 69.7% (196 of 281 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/de/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* hide when ther's no menu item (#1576)

* Add "maintenance" label to weblate PRs automatically (#1581)

* Upgrade api client and fix issue with shared folder renaming (#1582)

* upgrade api client and fix issue

* Update packages/files-ui/src/Contexts/FilesContext.tsx

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>

* run lint --fix (#1585)

* Gaming dashboard - API keys as cards  (#1575)

* Dashboard cards done

* lingui extract

* extra padding

* Apply suggestions from code review

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* lingui extract

* Feedback

* Removed link

* Apply suggestions from code review

* Made warning bigger

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* New navigations buttons (#1574)

* wip

* lingui extract

* center and add posthog

* Update .eslintrc.json

* Add team feature fake door (#1587)

* wip

* modal and tracking

* use data-posthog instead

Co-authored-by: GitHub Actions <actions@github.com>

* fix tertiary buttons (#1592)

* Posthog identify user on login (#1590)

* identify user on login

* fix effect deps

* show username if known (#1597)

* remove fade effect (#1598)

* Translations update from Weblate (#1599)

* Translated using Weblate (French)

Currently translated at 100.0% (285 of 285 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

* Translated using Weblate (German)

Currently translated at 71.2% (203 of 285 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/de/

* Update packages/files-ui/src/locales/fr/messages.po

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Mv and rm batch calls  (#1596)

* wire up all api calls

* lingui extract

* fix lint

* move to helper

* fix linting

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* refresh buckets after deletion (#1604)

* Toast messages update (#1602)

* messages updated

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Translations update from Weblate (#1600)

* Translated using Weblate (French)

Currently translated at 100.0% (285 of 285 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

* Translated using Weblate (Norwegian Bokmål)

Currently translated at 41.4% (118 of 285 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/nb_NO/

* Translated using Weblate (Norwegian Bokmål)

Currently translated at 41.4% (118 of 285 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/nb_NO/

* Translated using Weblate (German)

Currently translated at 71.2% (203 of 285 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/de/

* Translated using Weblate (Spanish)

Currently translated at 56.1% (160 of 285 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/es/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>

* Translated using Weblate (Norwegian Bokmål) (#1607)

Currently translated at 41.4% (118 of 285 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/nb_NO/

* Fix move single file and test (#1608)

* fix move single file and test

* remove only

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>

* bump cypress to v8.5 (#1609)

* Migrate to API local store cache (#1591)

* Updating for local store manager

* lingui extract

* Wired up store

* lingui extract

* Localstore for Files wired up

* lingui extract

* lingui extract

* Removed done

* Update packages/files-ui/src/Contexts/UserContext.tsx

Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* webkit color added (#1612)

* added resolve browser (#1613)

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Detect and dismiss toasts in ui tests (#1610)

* bump cypress to v8.5

* define necessary toast identifiers

* redefine toasts as separate test objects

* update spec file with new toast interaction, detect and dismiss

* make toast close button identifiers unique

* Add more checks for toasts for greater reliability

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* update tests for unsupported preview

* Transfer multiple files and folders (#1606)

* initial restructure

* folder transfers

* sharing working as expected

* sharing is ready

* toasts and error handling

* error messages

* transfer progress ready

* lingui extract

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* using  reduce and handling each file share error

* updated terms

* lingui extract

* added no files check

* lingui extract

* share  messages

* lingui extract

* lint

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Translations update from Weblate (#1625)

* Translated using Weblate (French)

Currently translated at 100.0% (282 of 282 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

* Translated using Weblate (French)

Currently translated at 100.0% (294 of 294 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* bump cypress to v8.6 (#1628)

* bump cypress to v8.6

* lingui extract

* Update test

Co-authored-by: GitHub Actions <actions@github.com>

* Update api error handling (#1626)

* implement error handling changes

* whoops missed one

* lingui extract

* lingui extract

* resolve linting

* fix TS error

* lingui extract

* lingui extract

* fix package version

* fix package versions

* update create folder modal error

* lingui extract

* lingui extract

* revert change from preview branch

* lingui extract

* make error handling safer

* update comment for consistency

* more safety added

* fix linting

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Hide network requests from cypress test runner (#1643)

* hide requests from the test runner window

* add extra steps for test reliability

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* [Files] Fix survey banner and sharing explainer (#1634)

* fix survey banner and sharing explainer

* fix case where localstore is empty

* add init for the 404

* Translated using Weblate (French) (#1645)

Currently translated at 100.0% (289 of 289 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* Fix Webpack Build with node 17 (#1651)

* Fix build for node 17

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>

* add ui test coverage for the survey banner (#1648)

* Add Support for heic images (#1618)

* add support for heic

* Update packages/files-ui/src/Components/Modules/FileBrowsers/CSFFileBrowser.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* fix lint, useMemo

* use thenable instead of async/await

* fix preview tests

* rename variable

* remove not null check in test

* resolve test issue, add loader

* fix lint

* update image preview test

* use jpg instead of png

* lingui extract

* update image preview markup

* fix lint

* lingui extract

* fix revocation

* fix wrong image

* remove unused ref

* fix lint

* Update packages/files-ui/src/Components/Modules/PreviewRenderers/ImagePreview.tsx

Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* Update packages/files-ui/src/Components/Modules/PreviewRenderers/ImagePreview.tsx

* resolve openssl issue

* update remaining build commands

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Andrew Snaith <andrew@chainsafe.io>
Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* Menu dark mode colors (#1650)

* colors changed

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* [EPIC] Link Sharing (#1632)

* Create a link sharing from a shared folder manage access (#1619)

* wip

* add jose and some any on error

* with jsrsasign

* convert raw to PEM

* valid JWT

* wrap up link overview

* lingui extract

* Apply suggestions from code review

* generic link

* git add fix shared folder creation

* Apply suggestions from code review

Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* no more hack :D

* Link-sharing landing page (#1620)

* link-sharing route and verification

* login message

* nicer messages

* nits

* onBrowseBucket

* Apply suggestions from code review

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* fix comments

* try-catch

* cleanup

* Update packages/files-ui/src/Components/Modules/LinkSharingModule.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* nit color

* Update packages/files-ui/src/Utils/pathUtils.ts

Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>

Co-authored-by: Michael Yankelev <myankelev@gmail.com>
Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>

* trans

* Merge dev to epic/link sharing (#1633)

* update tests for unsupported preview

* Transfer multiple files and folders (#1606)

* initial restructure

* folder transfers

* sharing working as expected

* sharing is ready

* toasts and error handling

* error messages

* transfer progress ready

* lingui extract

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* using  reduce and handling each file share error

* updated terms

* lingui extract

* added no files check

* lingui extract

* share  messages

* lingui extract

* lint

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Translations update from Weblate (#1625)

* Translated using Weblate (French)

Currently translated at 100.0% (282 of 282 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

* Translated using Weblate (French)

Currently translated at 100.0% (294 of 294 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* bump cypress to v8.6 (#1628)

* bump cypress to v8.6

* lingui extract

* Update test

Co-authored-by: GitHub Actions <actions@github.com>

* trans

Co-authored-by: Michael Yankelev <myankelev@gmail.com>
Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>
Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Weblate (bot) <noreply@weblate.org>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Andrew Snaith <asnaith@users.noreply.github.com>

* Merge dev to epic/lin-sharing (#1653)

* update tests for unsupported preview

* Transfer multiple files and folders (#1606)

* initial restructure

* folder transfers

* sharing working as expected

* sharing is ready

* toasts and error handling

* error messages

* transfer progress ready

* lingui extract

* Update packages/files-ui/src/Contexts/FilesContext.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* using  reduce and handling each file share error

* updated terms

* lingui extract

* added no files check

* lingui extract

* share  messages

* lingui extract

* lint

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Translations update from Weblate (#1625)

* Translated using Weblate (French)

Currently translated at 100.0% (282 of 282 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

* Translated using Weblate (French)

Currently translated at 100.0% (294 of 294 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* bump cypress to v8.6 (#1628)

* bump cypress to v8.6

* lingui extract

* Update test

Co-authored-by: GitHub Actions <actions@github.com>

* trans

* Update api error handling (#1626)

* implement error handling changes

* whoops missed one

* lingui extract

* lingui extract

* resolve linting

* fix TS error

* lingui extract

* lingui extract

* fix package version

* fix package versions

* update create folder modal error

* lingui extract

* lingui extract

* revert change from preview branch

* lingui extract

* make error handling safer

* update comment for consistency

* more safety added

* fix linting

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Hide network requests from cypress test runner (#1643)

* hide requests from the test runner window

* add extra steps for test reliability

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* [Files] Fix survey banner and sharing explainer (#1634)

* fix survey banner and sharing explainer

* fix case where localstore is empty

* add init for the 404

* Translated using Weblate (French) (#1645)

Currently translated at 100.0% (289 of 289 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* Fix Webpack Build with node 17 (#1651)

* Fix build for node 17

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>

* add ui test coverage for the survey banner (#1648)

* Add Support for heic images (#1618)

* add support for heic

* Update packages/files-ui/src/Components/Modules/FileBrowsers/CSFFileBrowser.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* fix lint, useMemo

* use thenable instead of async/await

* fix preview tests

* rename variable

* remove not null check in test

* resolve test issue, add loader

* fix lint

* update image preview test

* use jpg instead of png

* lingui extract

* update image preview markup

* fix lint

* lingui extract

* fix revocation

* fix wrong image

* remove unused ref

* fix lint

* Update packages/files-ui/src/Components/Modules/PreviewRenderers/ImagePreview.tsx

Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* Update packages/files-ui/src/Components/Modules/PreviewRenderers/ImagePreview.tsx

* resolve openssl issue

* update remaining build commands

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Andrew Snaith <andrew@chainsafe.io>
Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

Co-authored-by: Michael Yankelev <myankelev@gmail.com>
Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>
Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Weblate (bot) <noreply@weblate.org>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Andrew Snaith <asnaith@users.noreply.github.com>
Co-authored-by: Andrew Snaith <andrew@chainsafe.io>

* Apply suggestions from code review

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

Co-authored-by: Michael Yankelev <myankelev@gmail.com>
Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>
Co-authored-by: Weblate (bot) <noreply@weblate.org>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Andrew Snaith <asnaith@users.noreply.github.com>
Co-authored-by: Andrew Snaith <andrew@chainsafe.io>

* Translated using Weblate (French) (#1661)

Currently translated at 100.0% (299 of 299 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>

* add ui test coverage for the sharing explainer (#1659)

* update nav identifiers

* add header button identifiers

* add identifiers for sharing explainer

* fix mistake in identifiers

* add spec file for sharing explainer tests

* Apply suggestions from code review

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update test spec after pr feedback

* lingui extract

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>

* Fix toast type when no files successfully shared (#1662)

* fix toast type

* fix lint

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Andrew Snaith <asnaith@users.noreply.github.com>

* Update maintenance mode message (#1669)

* Files changes

* update Files markup

* update storage login screen

* lingui extract

* lingui extract

* fix lint

* Apply suggestions from code review

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* removed unnecessary copy

* lingui extract

* lingui extract

* update examples

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Make intercepts in tests less version specific (#1658)

* [Files] Fix home page and nav menu display issues on smaller screens (#1677)

* remove absolute positioning

* fix button connection

* nav bar

* Update AppNav.tsx (#1689)

* Translations update from Weblate (#1686)

* Translated using Weblate (French)

Currently translated at 100.0% (300 of 300 strings)

Translation: ChainSafe Files/Chainsafe Files user interface
Translate-URL: https://hosted.weblate.org/projects/chainsafe-files/chainsafe-files-user-interface/fr/

* Apply suggestions from code review

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* mobile search (#1676)

Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* [Files] Verfy a sharing link asap and give nice error  (#1674)

* ugly redirect

* better UX

* lingui extract

* consistancy

* hide loader when link is invalid

* typo and icon color

* add button to go back

* lingui extract

* nice error with malformed jwt

* lingui extract

* redirect to /

Co-authored-by: GitHub Actions <actions@github.com>

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Michael Yankelev <myankelev@gmail.com>
Co-authored-by: Shiva <82167447+RamidiShiva@users.noreply.github.com>
Co-authored-by: Cindy Chau <47398578+sweetpea22@users.noreply.github.com>
Co-authored-by: Andrew Snaith <asnaith@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <github@thib.top>
Co-authored-by: Priom Chowdhury <priom@chainsafe.io>
Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>
Co-authored-by: Weblate (bot) <hosted@weblate.org>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Andrew Snaith <andrew@chainsafe.io>
Co-authored-by: Weblate (bot) <noreply@weblate.org>
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
  • Loading branch information
16 people committed Nov 4, 2021
1 parent 766facb commit 063bfc1
Show file tree
Hide file tree
Showing 64 changed files with 1,912 additions and 532 deletions.
5 changes: 3 additions & 2 deletions packages/common-components/src/Router/ConditionalRoute.tsx
Expand Up @@ -21,7 +21,7 @@ const ConditionalRoute: React.FC<IConditionalRouteProps> = ({
exact,
...rest
}) => {
const { state, pathname } = useLocation<{from?: string} | undefined>()
const { state, pathname, hash } = useLocation<{from?: string} | undefined>()
const from = (state as any)?.from

return <Route
Expand All @@ -34,7 +34,8 @@ const ConditionalRoute: React.FC<IConditionalRouteProps> = ({
? <Redirect
to={{
pathname: redirectToSource && from ? from : redirectPath,
state: { from: pathname }
state: { from: pathname },
hash
}}
/>
// this may be converted into loading
Expand Down
4 changes: 3 additions & 1 deletion packages/files-ui/.env.example
Expand Up @@ -16,4 +16,6 @@ REACT_APP_FILES_UUID_VERIFIER_NAME=chainsafe-uuid-testnet
# Set to `mainnet` if required
REACT_APP_DIRECT_AUTH_NETWORK=testnet
SENTRY_AUTH_TOKEN=
REACT_APP_TEST=true
REACT_APP_TEST=true
REACT_APP_MAINTENANCE_MODE=false
REACT_APP_MAINTENANCE_TIMESTAMP=
3 changes: 2 additions & 1 deletion packages/files-ui/cypress/fixtures/filesTestData.ts
@@ -1,2 +1,3 @@
export const folderName = "Group"
export const folderPath = `/${folderName}`
export const folderPath = `/${folderName}`
export const profileCreatedDate = "2021-05-20T21:26:36.598924Z"
14 changes: 14 additions & 0 deletions packages/files-ui/cypress/support/index.ts
Expand Up @@ -28,5 +28,19 @@ Cypress.on("uncaught:exception", (err) => {
}
})

// Hide fetch/XHR requests
// interim solution until cypress adds configuration support
// source https://gist.github.com/simenbrekken/3d2248f9e50c1143bf9dbe02e67f5399
const app = window.top

if(app != null && !app.document.head.querySelector("[data-hide-command-log-request]")) {
const style = app.document.createElement("style")
style.innerHTML =
".command-name-request, .command-name-xhr { display: none }"
style.setAttribute("data-hide-command-log-request", "")

app.document.head.appendChild(style)
}

// Alternatively you can use CommonJS syntax:
// require('./commands')
2 changes: 2 additions & 0 deletions packages/files-ui/cypress/support/page-objects/homePage.ts
Expand Up @@ -8,6 +8,8 @@ export const homePage = {
...fileBrowser,

// home page specific file browser elements
closeBannerButton: () => cy.get("[data-cy=button-close-banner"),
surveyBanner: () => cy.get("[data-cy=banner-survey]"),
newFolderButton: () => cy.get("[data-cy=button-new-folder]"),
uploadButton: () => cy.get("[data-cy=button-upload-file]"),
moveSelectedButton: () => cy.get("[data-testId=button-move-selected-file]"),
Expand Down
@@ -0,0 +1,5 @@
export const sharingExplainerModal = {
body: () => cy.get("[data-testId=modal-container-sharing-explainer]"),
gotItButton: () => cy.get("[data-cy=button-got-it]"),
nextButton: () => cy.get("[data-cy=button-next]")
}
Expand Up @@ -2,12 +2,13 @@ import { basePage } from "./basePage"

export const navigationMenu = {
...basePage,
homeNavButton: () => cy.get("[data-cy=home-nav]"),
binNavButton: () => cy.get("[data-cy=bin-nav]"),
settingsNavButton: () => cy.get("[data-cy=settings-nav]"),
homeNavButton: () => cy.get("[data-cy=link-home]"),
binNavButton: () => cy.get("[data-cy=link-bin]"),
settingsNavButton: () => cy.get("[data-cy=link-settings]"),
sharedNavButton: () => cy.get("[data-cy=link-shared]"),
spaceUsedLabel: () => cy.get("[data-cy=label-space-used]", { timeout: 10000 }),
spaceUsedProgressBar: () => cy.get("[data-cy=progress-bar-space-used]"),
sendFeedbackNavButton: () => cy.get("[data-cy=send-feedback-nav]"),
reportABugButton: () => cy.get("[data-cy=button-report-bug]"),
// mobile view only
signOutButton: () => cy.get("[data-cy=signout-nav]")
}
@@ -0,0 +1,4 @@
export const recoverSuccessToast = {
body: () => cy.get("[data-testId=toast-recover-success]", { timeout: 10000 }),
closeButton: () => cy.get("[data-testid=button-close-toast-recover-success]")
}
15 changes: 12 additions & 3 deletions packages/files-ui/cypress/tests/file-management-spec.ts
Expand Up @@ -11,6 +11,7 @@ import { moveItemModal } from "../support/page-objects/modals/moveItemModal"
import { recoverItemModal } from "../support/page-objects/modals/recoverItemModal"
import { deleteSuccessToast } from "../support/page-objects/toasts/deleteSuccessToast"
import { moveSuccessToast } from "../support/page-objects/toasts/moveSuccessToast"
import { recoverSuccessToast } from "../support/page-objects/toasts/recoverSuccessToast"
import { uploadCompleteToast } from "../support/page-objects/toasts/uploadCompleteToast"

describe("File management", () => {
Expand Down Expand Up @@ -89,12 +90,16 @@ describe("File management", () => {

// ensure the home root now has the folder and file
navigationMenu.homeNavButton().click()
homePage.fileItemRow().should("have.length", 2)
homePage.fileItemRow()
.should("be.visible")
.should("have.length", 2)
homePage.fileItemName().should("contain.text", folderName)
homePage.fileItemName().should("contain.text", $fileName)

// ensure folder already in the root cannot be moved to Home
homePage.fileItemName().contains(`${$fileName}`).click()
// ensure file already in the root cannot be moved to Home
homePage.fileItemName().contains(`${$fileName}`)
.should("be.visible")
.click()
homePage.moveSelectedButton().click()
moveItemModal.folderList().contains("Home").click()
moveItemModal.errorLabel().should("be.visible")
Expand All @@ -112,8 +117,10 @@ describe("File management", () => {
// select a parent folder and initiate move action
homePage.fileItemName().contains("Parent").click()
homePage.moveSelectedButton().click()
moveItemModal.body().should("be.visible")

// ensure folder already in the root cannot be moved to Home
moveItemModal.folderList().should("be.visible")
moveItemModal.folderList().contains("Home").click()
moveItemModal.body().should("be.visible")
moveItemModal.errorLabel().should("be.visible")
Expand Down Expand Up @@ -259,6 +266,8 @@ describe("File management", () => {
recoverItemModal.folderList().contains("Home").click()
recoverItemModal.recoverButton().safeClick()
binPage.fileItemRow().should("not.exist")
recoverSuccessToast.body().should("be.visible")
recoverSuccessToast.closeButton().click()

// ensure recovered file is correct
navigationMenu.homeNavButton().click()
Expand Down
16 changes: 12 additions & 4 deletions packages/files-ui/cypress/tests/file-preview-spec.ts
Expand Up @@ -11,6 +11,7 @@ describe("File Preview", () => {
// add files
homePage.uploadFile("../fixtures/uploadedFiles/logo.png")
homePage.uploadFile("../fixtures/uploadedFiles/text-file.txt")
homePage.fileItemRow().should("have.length", 2)

// store their file names as cypress aliases for later comparison
homePage.fileItemName().eq(0).invoke("text").as("fileNameA")
Expand Down Expand Up @@ -68,19 +69,26 @@ describe("File Preview", () => {
homePage.uploadFile("../fixtures/uploadedFiles/file.zip")

// setup an api intercepter for download requests
cy.intercept("POST", "https://stage.imploy.site/api/v1/bucket/*/download").as("downloadRequest").then(() => {
cy.intercept("POST", "**/bucket/*/download").as("downloadRequest").then(() => {
homePage.fileItemName().dblclick()
previewModal.unsupportedFileLabel().should("exist")
previewModal.downloadUnsupportedFileButton().should("be.visible")
cy.get("@downloadRequest").should('be.undefined')
// ensure that the file download does not start until the download button is clicked
cy.get("@downloadRequest").then(($request) => {
// retrieving the alias (spy) should yield null because posts should not have been made yet
expect($request).to.be.null
})

// begin the file download
previewModal.downloadUnsupportedFileButton().click()

// ensure the download request contains the correct file
cy.get("@downloadRequest").its("request.body").should("contain", {
cy.wait("@downloadRequest").its("request.body").should("contain", {
path: "/file.zip"
})
})

// return to the home and ensure preview menu option is not shown for unsupported file
// return to home, ensure the preview menu option is not shown for an unsupported file
previewModal.closeButton().click()
homePage.fileItemKebabButton().click()
homePage.previewMenuOption().should("not.exist")
Expand Down
57 changes: 57 additions & 0 deletions packages/files-ui/cypress/tests/sharing-explainer-spec.ts
@@ -0,0 +1,57 @@
import { navigationMenu } from "../support/page-objects/navigationMenu"
import { sharingExplainerModal } from "../support/page-objects/modals/sharingExplainerModal"

describe("Sharing Explainer", () => {

context("desktop", () => {

const sharingKey = "csf.dismissedSharingExplainer"

it("User can view and dismiss the sharing explainer", () => {
// intercept and stub the response to ensure the explainer is displayed
cy.intercept("GET", "**/user/store", {
body: { [sharingKey]: "false" }
})

cy.web3Login()
navigationMenu.sharedNavButton().click()
sharingExplainerModal.body().should("be.visible")

// set up a spy for the POST response
cy.intercept("POST", "**/user/store").as("storePost").then(() => {

// dismiss the sharing explainer
sharingExplainerModal.nextButton().click()
sharingExplainerModal.nextButton().click()
sharingExplainerModal.gotItButton().click()
sharingExplainerModal.body().should("not.exist")

// intercept POST to ensure the key was updated after the explainer is dismissed
cy.wait("@storePost").its("request.body").should("contain", {
[sharingKey]: "true"
})
})
})

it("User should not see sharing explainer if previously dismissed", () => {
cy.intercept("GET", "**/user/store", {
body: { [sharingKey]: "true" }
})

cy.web3Login()

navigationMenu.sharedNavButton().click()
sharingExplainerModal.body().should("not.exist")
})

it("User should see the sharing explainer if api response is empty", () => {
cy.intercept("GET", "**/user/store", {
body: {}
})

cy.web3Login()
navigationMenu.sharedNavButton().click()
sharingExplainerModal.body().should("be.visible")
})
})
})
74 changes: 74 additions & 0 deletions packages/files-ui/cypress/tests/survey-banner-spec.ts
@@ -0,0 +1,74 @@
import { profileCreatedDate } from "../fixtures/filesTestData"
import { homePage } from "../support/page-objects/homePage"

describe("Survey Banner", () => {

const dismissedSurveyKey = "csf.dismissedSurveyBannerV3"

context("desktop", () => {

it("User can view and dismiss the survey banner", () => {
// intercept and stub the account creation date to be > 7 days
cy.intercept("GET", "**/user/profile", (req) => {
req.on("response", (res) => {
res.body.created_at = profileCreatedDate
})
})

// intercept and stub the response to ensure the banner is displayed
cy.intercept("GET", "**/user/store", {
body: { [dismissedSurveyKey]: "false" }
})

cy.web3Login()
homePage.surveyBanner().should("be.visible")

// set up a spy for the POST response
cy.intercept("POST", "**/user/store").as("storePost").then(() => {

// dismiss the survey banner
homePage.closeBannerButton().click()
homePage.surveyBanner().should("not.exist")

// intercept POST to ensure the key was updated after the banner is dismissed
cy.wait("@storePost").its("request.body").should("contain", {
[dismissedSurveyKey]: "true"
})
})
})

it("User should not see the survey banner if previously dismissed", () => {
cy.intercept("GET", "**/user/store", {
body: { [dismissedSurveyKey]: "true" }
})

cy.web3Login()
homePage.surveyBanner().should("not.exist")
})

it("User should see banner if account age is greater than 7 days and api response is empty", () => {
cy.intercept("GET", "**/user/store", {
body: {}
})

cy.web3Login()
homePage.surveyBanner().should("be.visible")
})

it("User should not see banner if account age is less than 7 days and api response is empty", () => {
// intercept and stub the account creation date to make it less than 7 days
cy.intercept("GET", "**/user/profile", (req) => {
req.on("response", (res) => {
res.body.created_at = res.body.updated_at
})
})

cy.intercept("GET", "**/user/store", {
body: {}
})

cy.web3Login()
homePage.surveyBanner().should("not.exist")
})
})
})
10 changes: 7 additions & 3 deletions packages/files-ui/package.json
Expand Up @@ -6,7 +6,7 @@
"@babel/core": "^7.12.10",
"@babel/runtime": "^7.0.0",
"@chainsafe/browser-storage-hooks": "^1.0.1",
"@chainsafe/files-api-client": "^1.18.16",
"@chainsafe/files-api-client": "^1.18.19",
"@chainsafe/web3-context": "1.1.4",
"@lingui/core": "^3.7.2",
"@lingui/react": "^3.7.2",
Expand All @@ -33,6 +33,9 @@
"ethers": "^5.4.3",
"fflate": "^0.7.1",
"formik": "^2.2.5",
"heic-convert": "^1.2.4",
"jsrsasign": "^10.4.1",
"key-encoder": "^2.0.3",
"mime-matcher": "^1.0.5",
"posthog-js": "^1.13.10",
"react": "^16.14.0",
Expand Down Expand Up @@ -63,6 +66,7 @@
"@testing-library/react": "^11.2.2",
"@testing-library/user-event": "^12.5.0",
"@types/jest": "^26.0.16",
"@types/jsrsasign": "^8.0.13",
"@types/node": "^14.14.10",
"@types/react": "^17.0.0",
"@types/react-beforeunload": "^2.1.0",
Expand All @@ -72,14 +76,14 @@
"@types/yup": "^0.29.9",
"@types/zxcvbn": "^4.4.0",
"babel-plugin-macros": "^2.8.0",
"cypress": "^8.5",
"cypress": "^8.6",
"cypress-file-upload": "^5.0.8",
"cypress-pipe": "^2.0.0"
},
"scripts": {
"postinstall": "yarn compile",
"start": "yarn compile && craco --max_old_space_size=4096 start",
"build": "craco --max_old_space_size=4096 build",
"build": "craco --max_old_space_size=4096 --openssl-legacy-provider build ",
"sentry": "(export REACT_APP_SENTRY_RELEASE=$(sentry-cli releases propose-version); node scripts/sentry.js)",
"release": "(export REACT_APP_SENTRY_RELEASE=$(sentry-cli releases propose-version); yarn compile && yarn build && node scripts/sentry.js)",
"test": "cypress open",
Expand Down

0 comments on commit 063bfc1

Please sign in to comment.