Page MenuHomePhorge

Display user/domain status in UI, add Active status
ClosedPublic

Authored by machniak on Mar 20 2020, 2:51 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 4, 3:21 PM
Unknown Object (File)
Wed, Sep 18, 12:48 AM
Unknown Object (File)
Fri, Sep 13, 1:22 PM
Unknown Object (File)
Thu, Sep 12, 2:35 PM
Unknown Object (File)
Thu, Sep 12, 1:23 PM
Unknown Object (File)
Sat, Sep 7, 9:49 AM
Unknown Object (File)
Sat, Sep 7, 9:48 AM
Unknown Object (File)
Sat, Sep 7, 6:39 AM
Subscribers
None

Diff Detail

Repository
rK kolab
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

machniak created this revision.
  • Add console script to set/get user status
  • Add console command to set/get domain status
  • Browser tests for status indicators
This revision was not accepted when it landed; it landed in state Needs Review.Mar 23 2020, 4:10 PM
This revision was automatically updated to reflect the committed changes.

@bohlender, there are two helper commands you can use to test the functionality.

$ php artisan user:status --del=imapReady
$ php artisan user:status --add=imapReady
$ php artisan domain:status --del=verified
$ php artisan domain:status --add=verified

Reopening, closed by pushing the branch dev/status.

Can't say much about the php side of things.

Looks like we'll need a "this is not ready yet" thing in our UI language and a standard "notification/status" message thing.
Can all be done in a second iteration.

from a UX / UI perspective I am fine with this for now as it is an improvement in every area it touches

src/resources/js/app.js
227

looks like component specific UI code to me.
could you explain why this is in app.js and not in the component?

This is more about me learning where to put things rather than a complaint.

src/resources/sass/menu.scss
8

not sure what this has to do with the topic of this patch

src/resources/vue/Dashboard.vue
7โ€“9

"have not" should be "has not" ?

10

in the end we might only want to display the things that have not happened yet.
let's do this in a second iteration

src/resources/vue/Domain/List.vue
17

I am not a fan of the (red) icon in the list to indicate the status. I'd keep it in though and we can polish the UX another time. We probably need a standard "this is inactive/not usable" UI thing.

src/resources/vue/User/List.vue
22

Again, I am not a fan of the (red) icon in the list to indicate the status. I'd keep it in though and we can polish the UX another time. We probably need a standard "this is inactive/not usable" UI thing.

src/resources/js/app.js
227

I put shared code in app.js, so if something is (going to be) used in multiple components I put it here. These methods are then available "automatically" in all components.

src/resources/sass/menu.scss
8

Nothing ;)

src/resources/vue/Dashboard.vue
7โ€“9

I'll fix that

10

I think it's better visually to display all. It looks nicer when the unchecked boxes change live.

Requesting review on the following test failures;

$ php -dzend_extension=xdebug.so vendor/bin/phpunit 
PHPUnit 7.5.20 by Sebastian Bergmann and contributors.

IIII............II.......I.IIII.........IIIII...........I......  63 / 196 ( 32%)
.................I......I...I.I...................I............ 126 / 196 ( 64%)
......III..IIII...I.I.I.................FS.....F........E...... 189 / 196 ( 96%)
.......                                                         196 / 196 (100%)

Time: 4.29 minutes, Memory: 68.50 MB

There was 1 error:

1) Tests\Browser\StatusTest::testUserStatus
Facebook\WebDriver\Exception\NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"body #user-list table tbody tr:first-child td:first-child svg.fa-user.text-success"}
  (Session info: headless chrome=79.0.3945.130)

/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/vendor/php-webdriver/webdriver/lib/Exception/WebDriverException.php:117
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/vendor/php-webdriver/webdriver/lib/Remote/HttpCommandExecutor.php:370
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/vendor/php-webdriver/webdriver/lib/Remote/RemoteWebDriver.php:590
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/vendor/php-webdriver/webdriver/lib/Remote/RemoteWebDriver.php:214
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/vendor/laravel/dusk/src/ElementResolver.php:373
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/vendor/laravel/dusk/src/Concerns/MakesAssertions.php:562
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/tests/Browser/StatusTest.php:151
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:68
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/tests/Browser/StatusTest.php:165

--

There were 2 failures:

1) Tests\Browser\LogonTest::testLogonSuccessful
Saw unexpected element [body #status-box].
Failed asserting that false is true.

/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/vendor/laravel/dusk/src/Concerns/MakesAssertions.php:603
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/tests/Browser/LogonTest.php:81
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:68
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/tests/Browser/LogonTest.php:93

2) Tests\Browser\PaymentTest::testPayment
Did not see expected text [Current account balance is 10,00 CHF] within element [body #wallet .card-text].
Failed asserting that false is true.

/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/vendor/laravel/dusk/src/Concerns/MakesAssertions.php:173
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/tests/Browser/PaymentTest.php:79
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:68
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/tests/Browser/PaymentTest.php:80

ERRORS!
Tests: 196, Assertions: 2133, Errors: 1, Failures: 2, Skipped: 1, Incomplete: 32.

Generating code coverage report in HTML format ... done
This revision now requires changes to proceed.Mar 24 2020, 12:39 PM
This revision was not accepted when it landed; it landed in state Needs Revision.Mar 24 2020, 12:41 PM
Closed by commit rKfe4ff9750886: CS and typos fixes (authored by machniak). ยท Explain Why
This revision was automatically updated to reflect the committed changes.
vanmeeuwen requested changes to this revision.

Didn't have the tunnel up.

This revision now requires changes to proceed.Mar 24 2020, 12:43 PM

One failure remains;

$ php -dzend_extension=xdebug.so vendor/bin/phpunit 
PHPUnit 7.5.20 by Sebastian Bergmann and contributors.

IIII............II.......I.IIII.........IIIII...........I......  63 / 196 ( 32%)
.................I......I...I.I...................I............ 126 / 196 ( 64%)
......III..IIII...I.I.I.................................E...... 189 / 196 ( 96%)
.......                                                         196 / 196 (100%)

Time: 3.99 minutes, Memory: 70.50 MB

There was 1 error:

1) Tests\Browser\StatusTest::testUserStatus
Facebook\WebDriver\Exception\NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"body #user-list table tbody tr:first-child td:first-child svg.fa-user.text-success"}
  (Session info: headless chrome=79.0.3945.130)

/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/vendor/php-webdriver/webdriver/lib/Exception/WebDriverException.php:117
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/vendor/php-webdriver/webdriver/lib/Remote/HttpCommandExecutor.php:370
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/vendor/php-webdriver/webdriver/lib/Remote/RemoteWebDriver.php:590
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/vendor/php-webdriver/webdriver/lib/Remote/RemoteWebDriver.php:214
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/vendor/laravel/dusk/src/ElementResolver.php:373
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/vendor/laravel/dusk/src/Concerns/MakesAssertions.php:562
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/tests/Browser/StatusTest.php:151
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:68
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/tests/Browser/StatusTest.php:165

ERRORS!
Tests: 196, Assertions: 2152, Errors: 1, Incomplete: 32.

Generating code coverage report in HTML format ... done
  • Add console script to set/get user status
  • Add console command to set/get domain status
  • Browser tests for status indicators
  • Make user:status and domain:status commands available in non-production mode only
  • CS and typos fixes
This revision is now accepted and ready to land.Mar 24 2020, 2:11 PM
This revision was automatically updated to reflect the committed changes.