notifications icon indicating copy to clipboard operation
notifications copied to clipboard

[BUG] Cypress test cleanup deleting same config multiple times

Open qreshi opened this issue 3 years ago • 1 comments
trafficstars

What is the bug? The Cypress tests were refactored in https://github.com/opensearch-project/notifications/pull/442 and the tests were updated to clear existing configs in the before() hook. For some reason, the cleanup being done in "Test channel details" is fairly consistently trying to delete the same config multiple times causing 404s.

This could be some strange behavior from the last test in the spec file since the other tests don't have this problem. The before() hook for the problematic tests has been commented out for the time being while the root cause is found and can be added back in at that time.

A few things that were observed:

  1. Tested adding a baseUrl since this Cypress issue mentioned that cy.visit() could cause the before() hook to be invoked twice, this didn't make a difference so is likely unrelated here
  2. Tried to log within the deleteAllConfigs command and sometimes the same config is logged twice implying it's executing a single loop twice, however, sometimes the log only appears once but the request is made twice

qreshi avatar May 10 '22 22:05 qreshi

@amsiglan @sbcd90 could you transfer this issue to https://github.com/opensearch-project/dashboards-notifications/issues

Will need to investigate whether this is still an issue.

AWSHurneyt avatar Dec 13 '24 19:12 AWSHurneyt