metasfresh / metasfresh-e2e-legacy

metasfresh End-2-End Testing project.
7 stars 1 forks source link

Enable checking for user notifications #78

Closed metas-ts closed 5 years ago

metas-ts commented 5 years ago

Allow a cypress test author to wait for a particular user notification, e.g. when they started the invoicing process

metas-ts commented 5 years ago

hi @siemiatj so if i want to replace a cy.wait(5000) with the new commands to wait for a notification (with a particular text or link maybe), how do i go about it? Example in https://github.com/metasfresh/metasfresh-e2e/blob/master/cypress/integration/sales/sales_order_to_invoice_spec.js :

[...]
it('Zoom to the new invoice', function() {
      cy.wait(5000); // this static wait is what i would like to replace
[...]
siemiatj commented 5 years ago

@metas-ts Have you checked the updated test ?

https://github.com/metasfresh/metasfresh-e2e/blob/master/cypress/integration/sales/sales_order_to_invoice_spec.js#L123

and my change https://github.com/metasfresh/metasfresh-e2e/commit/b3b786fc772c73df467f4af38241924cfb628468#diff-745a51858a759d5efa0316b1d994dcbbR125

So basically you have to wrap your test in response function from the notification helpers.

metas-ts commented 5 years ago

Hi, @siemiatj, no i hadn't run the test. Or, maybe I only ran it up to the cy.selectReference('C_Order_C_Invoice_Candidate', 10000).click(); part which failed locally.

I think it's more efficient if you contact me directly in case of such questions. I get a lot of github notifications and it takes some time until i see and reqact to them.