Commit Graph

75 Commits

Author SHA1 Message Date
kamre
a498149a76
[GH-42] Cypress tests for login actions (#1679)
* Testing API added to server:
 - registered only if `enableTestingAPI` is set to `true` in the config file
 - has only one route `test/reset`
 - reset clears the tables in db for blocks, users, sessions
 - functions `DeleteAllBlocks` and `DeleteAllUsers` added to `Store` interface
 - new functions implemented for `SQLStore`

* Cypress tests (initial version) for login actions added:

  - redirect to login page,
  - register user,
  - test for loading home page deleted,
  - allow js in `tsconfig.json` for cypress tests.

* Cypress tests for login actions:

  - check that main page with workspace is visible after registration,
  - initial version of test for login of register user.

* Cypress tests for login actions:

  - function for checking that workspace is available added,
  - functions for login and logout added,
  - test for password change added,
  - session parameters added to server config for cypress testing.

* Switch Cypress tests to typescript.

* Use ids for inputs instead of placeholder text.

* Use cypress request for login without loading login page.

* Cypress custom command for login added.

* Cypress tests fixed:
 - new cypress commands for server reset, register/login user
 - single test for "create and delete board/card"
 - fixes for `BoardPage` component useEffect callbacks
 - npm script `runserver-test` doesn't use single user mode

* Deletion of all blocks changed:
 - also deletes blocks from history
 - public function renamed to DeleteAllBlocksPermanently
 - code for mocks and public methods generated

* Server tests for files fixed on windows.

* Cypress tests for the registration of second user via invite link added.

* Added `baseUrl` in main `tsconfig.json` (required by cypress configuration).

* Cypress test fixed. Comments as well as log messages added.

* Log a message if testing API is enabled.

* Single cypress test for register/login actions.

* Revert changes to server.

* More convenient cypress commands:
  - all API calls made as separate commands
  - declarations for commands moved to separate global.d.ts file
  - utility functions moved after test actions in 'Login actions' test
2021-11-22 16:59:01 +01:00
Moncy Gopalan
e9e86d8457
Fix the issue where clicking on the + button at the top of a board group wouldn't open the newly-added card (#1708)
Co-authored-by: Moncy Gopalan <ilusivespectre@gmail.com>
2021-11-15 14:56:51 +05:30
Grzegorz Tańczyk
ef22efd917
[GH-1278] Confirm delete when deleting board (#1339)
* Delete board confirmation modal (#1278)

* dialog should fill the screen on small resolution

* Updating delete board confirm UI

* Pass onClose callback to Dialog props

* lint

* removing danger-button-bg-rgb from shared variables, adjusting dialog styles to work both in plugin and standalone version of focalboard

* lint

* remove set timeout

* Update button.scss

* update snpashot

Co-authored-by: Asaad Mahmood <asaadmahmood@users.noreply.github.com>
Co-authored-by: Hossein Ahmadian-Yazdi <hyazdi1997@gmail.com>
Co-authored-by: Harshil Sharma <harshilsharma63@gmail.com>
2021-11-03 08:57:03 -04:00
Hossein
7fae65ea02
Start Welcome Page (#1231)
* start welcome page

* setup template

* setup forwarding logic

* fix linting errors

* Updating UI

* Use intl strings

* Address comments

* go to baords welcome

* Fix image problem

* fix linting

* fix getting shown wrong things

* fix build issues

* fix cypress test and non plugin

* Fix bugs

* remove console

* Add welcome page

* address comments

Co-authored-by: Asaad Mahmood <asaadmahmood@users.noreply.github.com>
2021-09-28 09:51:32 -04:00
Justine Geffen
b5053d982a
Update en.json - UI capitalization (#1178)
* Update en.json

Adjusted capitalization for UI text for consistency.

* Update webapp/i18n/en.json

* Apply suggestions from code review

* Propagating text the changes to the rest of the code

* Fix the snapshots

* Fixing cypress test

* Fixing table tests

Co-authored-by: Jesús Espino <jespinog@gmail.com>
Co-authored-by: Harshil Sharma <harshilsharma63@gmail.com>
2021-09-14 17:28:39 +05:30
Harshil Sharma
08db4fed61
Workspace switcher (#1052)
* API WIP

* WIP

* Finished changes

* Fixed colors:

* Don't enforce charset adn collation in migration, pick from database DSN

* Added MySQL query

* Updated mocks

* Added tests

* Lint fixes

* Fixed typo and removed unsed style

* Checked in a snapshot

* Updated snapshot

* Updated Cypress test

* Updated Cypress test

* Updated Cypress test

* Fixed review comments

* Fixed tests

* Added default collation for MySQL

* Added documentation for ensuring correct database collation

* Updated migrations

* Fixed a bug with collation

* Fixed lint errors

* Used correct collation

* debugging

* Updating css

* Minor UI changes

* USe inbuilt default collation

* Used only charset for mysql

* Fixed linter issue:

* Added migration for matching collation

* Reverted local config changes

* Reverted local config changes

* Handled the case of personal server running on MySQL

* WIP

* Now running collation matching migration onlyt for plugins

* Minor optimization

* Multiple review fixes

* Added group by clause to primary query

* Supported for subpacth

Co-authored-by: Asaad Mahmood <asaadmahmood@users.noreply.github.com>
2021-09-08 10:22:03 +05:30
Jesús Espino
c3dba863c1
Adding support for embed the webapp into the plugin (#597)
* Adding support for embed the webapp into the plugin

* Adding required dependency

* Removed unnecessary prettier command

* Installed imagemin required dependencies

* Open in a new window always

* Fix CSS Conflicts.

* Changing the app id to make it specific to focalboard

* Adding error boundary

* Fix styles on non-plugin environments

* Making the css scoped to focalboard only

* Create the focalboard root portal

* Including missed component

* Adding a missed rollback call

Co-authored-by: Christopher Speller <crspeller@gmail.com>
Co-authored-by: Hossein <hahmadia@users.noreply.github.com>
2021-07-29 20:08:39 +02:00
kamre
bc8d778236
[GH-770] Use textarea for title in the card dialog (#776)
* New widget `EditableArea` introduced:
  - textarea with automatic height
  - implementation is based on AutosizeTextarea from mattermost-webapp
  - used for title in CardDetail

* Cypress test for setting card title fixed.

Co-authored-by: Harshil Sharma <harshilsharma63@gmail.com>
2021-07-26 14:04:21 +05:30
Jesús Espino
d6f760b06b
Sample using @reduxjs/toolkit (#646)
* Sample using @reduxjs/toolkit

* Some improvements related to typescript in the store

* Adding some extra data to the redux store

* Moving the workspace users into redux store

* Wrapping the language into the redux store

* Fix some wrong names

* Fixing typos

* Removing unused imports

* Removing unnecesary users context

* Fixing eslint error

* Fixing memory leak on tests

* Always using the redux store for workspace users

* Fix eslint

* Addressing PR review comments

* Fixing cypress tests

* Fixing cypress tests (second try)

* Fixing cypress tests (third try)
2021-07-14 21:22:40 +02:00
kamre
ba69c8b083
Cypress test for hiding and showing the sidebar with active board added: (#659)
- active board is essential because it can cover the show  button,
  - presence of sidebar heading is used to check if sidebar is visible.
2021-07-01 09:27:46 +05:30
Jesús Espino
a1fa6e4945 Fixing cypress tests 2021-06-04 22:18:37 +02:00
Harshil Sharma
359462b125
Feature/adjust board component scroll (#447)
* Don't change a typical block element to inline-block

* fix scroll behaviour for board component

* Fixing cypress tests

* Fix merge conflict

* Made kanban and table header stay visible when scrolling

* Fixed Cypress tests

* Removed commented out code

Co-authored-by: signalwerk <sh@signalwerk.ch>
Co-authored-by: Jesús Espino <jespinog@gmail.com>
2021-05-27 16:28:07 +05:30
Jesús Espino
5ab3f8d3ce
Addining subpath support (#241)
* Addining subpath support

* Fixing a subpath problem in suburls

* Using the server root for allow subpaths

* Fixing baseURL variable name

* Some improvements

* Making it work in mattermost plugin

* Fixing eslint warnings

* Fixing cypress tests
2021-04-16 13:42:37 +02:00
Jesús Espino
a49688240f Fixing cypress tests 2021-03-30 22:06:39 +02:00
Jesús Espino
a6d0e4cc0b Fixing cypress tests 2021-03-30 20:33:21 +02:00
Chen-I Lim
a10beb52a2 Fix indentation 2021-02-10 10:13:04 -08:00
Chen-I Lim
1a006f47a0 Cypress: single user token 2021-02-09 16:34:54 -08:00
Chen-I Lim
dc69ce315e Rename main-app div 2021-01-29 20:39:06 -08:00
Chen-I Lim
5e4fcf57bd Update mac config 2021-01-18 18:21:10 -08:00
Chen-I Lim
0288adc1c5 Remove now invalid readonly board test 2021-01-14 11:56:02 -08:00
Chen-I Lim
f22527e650 Readonly support in UI 2020-12-17 12:02:12 -08:00
Chen-I Lim
6d1782256c Menu text consistent sentence casing 2020-12-11 11:10:25 -08:00
Chen-I Lim
846a8786d5 Cypress: test create table view and rename view 2020-12-11 10:34:11 -08:00
Chen-I Lim
bc4fee49b7 Fix jest tsconfig 2020-12-10 14:08:51 -08:00
Chen-I Lim
d3a4ea0c02 Add Cypress tests 2020-12-10 13:45:56 -08:00