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

Fix condition for showing incidents introduced by 99b4127 #151

Merged
merged 1 commit into from Nov 3, 2022

Conversation

Martchus
Copy link
Contributor

@Martchus Martchus commented Nov 3, 2022

* If there's only one incident we'd likely want to show it as well.
* Related ticket: https://progress.opensuse.org/issues/119557
@Martchus
Copy link
Contributor Author

Martchus commented Nov 3, 2022

Note that there are no test changes because tests actually were failing and this fixes them.

@kraih
Copy link
Member

kraih commented Nov 3, 2022

How odd, the tests actually pass for me locally even without the patch.

$ TEST_ONLINE=postgres:///dashboard HARNESS_OPTIONS=j9 prove -l t/*.t
t/api_cleanup.t .. ok                                                   
t/json.t ......... ok                                                   
t/amqp.t ......... ok                                                   
t/api.t .......... ok                                                   
t/ui.t ........... ok   
All tests successful.
Files=5, Tests=25,  4 wallclock secs ( 0.03 usr  0.01 sys +  6.73 cusr  0.27 csys =  7.04 CPU)
Result: PASS

@kraih kraih merged commit 5183229 into openSUSE:main Nov 3, 2022
@kraih
Copy link
Member

kraih commented Nov 3, 2022

The change is obviously correct, but i'm still rather confused by the passing local tests (and bad fail report in the GitHub Action).

@Martchus Martchus deleted the fix-cond branch November 3, 2022 12:54
@Martchus
Copy link
Contributor Author

Martchus commented Nov 3, 2022

Your glob isn't matching the .js test file and that is the one which is failing. (I reproduced the problem via TEST_ONLINE=postgresql://postgres:postgres@localhost:5432/postgres prove -l t/ui.t.js -v.)

@kraih
Copy link
Member

kraih commented Nov 3, 2022

Your glob isn't matching the .js test file and that is the one which is failing. (I reproduced the problem via TEST_ONLINE=postgresql://postgres:postgres@localhost:5432/postgres prove -l t/ui.t.js -v.)

Oh no, i had the right one in my bash history too. 🤦

@kraih
Copy link
Member

kraih commented Nov 3, 2022

The error is pretty obvious with the details and TEST_HEADLESS=0:

$ TEST_ONLINE=postgres:///dashboard node TEST_HEADLESS=0 t/ui.t.js 
TAP version 13
# Subtest: Test dashboard ui
    # Subtest: Navigation
        ok 1 - should be equal
        ok 2 - should be equal
        ok 3 - should be equal
        ok 4 - should be equal
        ok 5 - should be equal
        ok 6 - should be equal
        1..6
    ok 1 - Navigation # time=4503.337ms
    
    # Subtest: Overview
        ok 1 - should match pattern provided
        ok 2 - should match pattern provided
        ok 3 - should match pattern provided
        ok 4 - should match pattern provided
        ok 5 - should match pattern provided
        ok 6 - should match pattern provided
        ok 7 - should be equal
        ok 8 - should be equal
        1..8
    ok 2 - Overview # time=170.142ms
    
    # Subtest: Filter blocked
        not ok 1 - page.waitForSelector: Timeout 30000ms exceeded. =========================== logs =========================== waiting for selector "tbody" to be visible ============================================================
          ---
          stack: |
            ============================================================
                Test.<anonymous> (file://t/ui.t.js:60:16)
          type: TimeoutError
          tapCaught: returnedPromiseRejection
          test: Filter blocked
          ...
        
        1..1
        # failed 1 test
    not ok 3 - Filter blocked # time=30066.593ms
    
    # Subtest: Incident popup
        ok 1 - should be equal
        ok 2 - should be equal
        1..2
    ok 4 - Incident popup # time=1010.067ms
    
    ok 5 - should be equivalent
    1..5
    # failed 1 of 5 tests
not ok 1 - Test dashboard ui # time=36069.447ms

1..1
# failed 1 test
# time=36071.347ms

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.

None yet

2 participants