web icon indicating copy to clipboard operation
web copied to clipboard

Stop support for old acceptance tests

Open ScharfViktor opened this issue 1 year ago • 12 comments

2 years ago, we stopped implement old acceptance tests and started using e2e with playwright. Now we want to:

  • delete all unworkable, repetitive, irrelevant tests
  • rewrite useful tests
  • close all issues related acceptance tests

Steps:

  • [x] delete all tests labeled @skipOnOCIS

    • https://github.com/owncloud/web/pull/10416
  • [x] Remove repetitive test scenarios (compare with e2e)

    • https://github.com/owncloud/web/pull/10267
  • [x] check the expected-failures-with-ocis-server-ocis-storage.md file and remove the string and irrelevant tests (@saw-jan @PrajwolAmatya)

    • https://github.com/owncloud/web/pull/10427
    • https://github.com/owncloud/web/pull/10428
    • https://github.com/owncloud/web/pull/10449
    • https://github.com/owncloud/web/pull/10480
    • https://github.com/owncloud/web/pull/10488
    • https://github.com/owncloud/web/pull/10550
    • https://github.com/owncloud/web/pull/10574
    • https://github.com/owncloud/web/pull/10575
  • [x] find and close all the related issues in GH @ScharfViktor

  • [ ] rewrite existing acceptance tests

    • [ ] api tests
      • https://github.com/owncloud/ocis/pull/9015
      • https://github.com/owncloud/ocis/pull/9018
      • https://github.com/owncloud/ocis/pull/9083
      • https://github.com/owncloud/ocis/pull/9121
      • https://github.com/owncloud/ocis/pull/9126
      • https://github.com/owncloud/ocis/pull/9150
    • [x] e2e tests (Updated from comment https://github.com/owncloud/web/issues/10259#issuecomment-2006653617)
      • [x] breadcrumb navigation on normal folders https://github.com/owncloud/web/pull/10664
      • [x] preview different files (.png file) @Salipa-Gurung (https://github.com/owncloud/web/pull/10670)
      • [x] pubilc user preview files: https://github.com/owncloud/web/pull/10565
      • [x] edit password of public link and public user refresh the public link page @grgprarup https://github.com/owncloud/web/pull/10826
      • [x] update content of file (Assigned to pradip) https://github.com/owncloud/web/pull/10838
    • [ ] unit tests
  • [ ] delete acceptance tests suite and middleware

    • https://github.com/owncloud/web/pull/10858
    • https://github.com/owncloud/web/pull/10861
    • https://github.com/owncloud/web/pull/10878
    • https://github.com/owncloud/web/pull/10889
    • https://github.com/owncloud/web/pull/10890
    • https://github.com/owncloud/web/pull/10898
  • [ ] clean up web CI and ocis CI

  • [ ] after shifting of old acceptance tests to new e2e finish pipeline should be balanced Screenshot from 2024-03-01 15-30-02

  • [x] delete changes in the middleware https://github.com/owncloud/owncloud-test-middleware/pull/143

ScharfViktor avatar Jan 03 '24 09:01 ScharfViktor

CC @saw-jan

ScharfViktor avatar Jan 04 '24 09:01 ScharfViktor

cc @PrajwolAmatya @Salipa-Gurung @saw-jan currently facing problems while running keycloak tests in drone ci. IMO it will be nice to check locally whether keycloak-related tests pass or not https://github.com/owncloud/web/pull/10481. Otherwise, my PR will be stuck for a long time.

amrita-shrestha avatar Mar 04 '24 05:03 amrita-shrestha

cc @PrajwolAmatya @Salipa-Gurung @saw-jan currently facing problems while running keycloak tests in drone ci. IMO it will be nice to check locally whether keycloak-related tests pass or not #10481. Otherwise, my PR will be stuck for a long time.

Sorry, how this task is related to #10481 ?

ScharfViktor avatar Mar 04 '24 08:03 ScharfViktor

cc @PrajwolAmatya @Salipa-Gurung @saw-jan currently facing problems while running keycloak tests in drone ci. IMO it will be nice to check locally whether keycloak-related tests pass or not #10481. Otherwise, my PR will be stuck for a long time.

Let's run /journeys/kindergarten.feature with the keycloak for now, then we can go on to include more tests. CC @amrita-shrestha @ScharfViktor

saw-jan avatar Mar 05 '24 10:03 saw-jan

cc @PrajwolAmatya @Salipa-Gurung @saw-jan currently facing problems while running keycloak tests in drone ci. IMO it will be nice to check locally whether keycloak-related tests pass or not #10481. Otherwise, my PR will be stuck for a long time.

Sorry, how this task is related to #10481 ?

If we add some scenario/step on space.feature and journey then maybe that step needs refactoring to work on ocis-keycloak. I am not saying to check all scenario/step. Just step/scenario which falls under keycloak tests(currently journey/space.feature).

amrita-shrestha avatar Mar 06 '24 04:03 amrita-shrestha

I have listed the tests that has been already covered in E2E and tests that needs to be added in E2E.

Tests that has been covered

  • create files/folders
  • upload files
  • delete files/folders
  • copy/move files/folders
  • openid login
  • download resources
  • sharing to user and group
  • public link share
  • public link share with different roles
  • trashbin delete/restore

E2E tests that needs to be added

  • [x] breadcrumb ~- [x] breadcrumb navigation on normal folders @PrajwolAmatya https://github.com/owncloud/web/pull/10664~ ~- breadbrumb navigation on folders with quotes and special characters~

~- Files details~ ~- view different areas in app-sidebar for file and folder~ ~- [ ] Preview~ ~- [ ] preview different files (.png file) @Salipa-Gurung (https://github.com/owncloud/web/pull/10670)~ ~- [x] pubilc user preview files: https://github.com/owncloud/web/pull/10565~

~- sorting resources~ ~- share autocompletion of recipient user/group~ ~- check for sharing details of items inside a shared folder~ ~- check for sharing indicator~ ~- check for public link indicator~ ~- [ ] edit password of public link and public user refresh the public link page~ ~- [ ] update content of file~

CC. @ScharfViktor @saw-jan

Updated according to comment: https://github.com/owncloud/web/issues/10259#issuecomment-2009826676

Note:- All TODOs tasks have been added to the main description of this issue.

PrajwolAmatya avatar Mar 19 '24 10:03 PrajwolAmatya

pubilc user preview files: https://github.com/owncloud/web/pull/10565

the PR is just a port. we already have the tests in master

saw-jan avatar Mar 19 '24 10:03 saw-jan

E2E tests that needs to be added

I'd like to continue to only have happy path tests in e2e. That being said, some of the test scenarios you mentioned are not needed for e2e and I'd like to not have them anymore.

  • breadcrumb
    • breadcrumb navigation on normal folders

Yes, good one.

  • breadbrumb navigation on folders with quotes and special characters

Not needed.

  • Files details
    • view different areas in app-sidebar for file and folder

What exactly do you have in mind? I'd expect this mostly to be tested via unit tests. Some e2e test coverage makes sense of course, but please be more specific in what you want to test.

  • Preview
    • preview different files

One .png file is sufficient.

Yes 👍

Sorting resources is not something I would test at all in e2e. Only in unit tests.

  • share autocompletion of recipient user/group

I believe we have that somewhat covered in sharing related tests. no additional test needed.

  • check for sharing details of items inside a shared folder

sufficient as a unit test, no e2e needed.

  • check for sharing indicator

sufficient as a unit test, no e2e needed.

  • check for public link indicator

sufficient as a unit test, no e2e needed.

  • edit password of public link and public user refresh the public link page

Yes, good one.

  • update content of file

Yes, good one.

kulmann avatar Mar 20 '24 15:03 kulmann

@kulmann Thank you for the suggestion. :+1: I will update the E2E test list and work accordingly.

PrajwolAmatya avatar Mar 21 '24 03:03 PrajwolAmatya

  • breadcrumb

    • breadcrumb navigation on normal folders

Yes, good one.

  • breadbrumb navigation on folders with quotes and special characters

Not needed.

I'd like to come back to this one again. I'd love to have a "navigation"-scenario in the e2e tests:

  • create a folder hierarchy, with a variety of folder names (also some including quotes and special characters, like you proposed for breadcrumbs)
  • navigate up and down the folder hierarchy by clicking on folder names in the file list for going down and on breadcrumb items for going up

That would bring certainty especially for representation and handling of weird chars in the URL.

Do we have something like this? Or something that could be extended into this behaviour? I don't want all these cases tested individually (file list with simple folder names, file list with complex folder names, breadcrumb with simple folder names, breadcrumb with complex folder names), but really in one scenario.

I know that the common pattern for acceptance tests is to write short scenarios. For our e2e test suite I see much more value in chains of actions and test patterns that semantically belong together, so that the test setup time doesn't kill us.

What do you think @PrajwolAmatya ?

kulmann avatar Mar 21 '24 08:03 kulmann

@kulmann Yes, I think we can check for navigation through breadcrumb for variety of folder names within a single scenario.

PrajwolAmatya avatar Mar 21 '24 08:03 PrajwolAmatya

@saw-jan @Salipa-Gurung @PrajwolAmatya can we close this issue https://github.com/owncloud/web/issues/7264 or we going to let it open?

amrita-shrestha avatar Apr 09 '24 08:04 amrita-shrestha

@ScharfViktor Let's close this one. The only thing remaining is to cleanup in ocis drone config but that should be done along with the web bump to ocis

saw-jan avatar May 17 '24 07:05 saw-jan

@ScharfViktor Let's close this one. The only thing remaining is to cleanup in ocis drone config but that should be done along with the web bump to ocis

Yes, I close it, but before I wanted to clean up ocis CI

ScharfViktor avatar May 17 '24 07:05 ScharfViktor

closed as completed

ScharfViktor avatar May 19 '24 19:05 ScharfViktor