Skip to content

Commit

Permalink
Fix problem with getting mail (#543)
Browse files Browse the repository at this point in the history
In all those tests there is 2 times getting mail
And first time will mark all mail in inbox as read
And second time will only search for unread mail

Fix #538
  • Loading branch information
ShockwaveNN authored Nov 27, 2021
1 parent 774dd0c commit 4f06c8e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions gems.locked
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ GEM
onlyoffice_file_helper (0.5.0)
onlyoffice_logger_helper (~> 1)
rubyzip (~> 2)
onlyoffice_iredmail_helper (0.2.1)
onlyoffice_iredmail_helper (0.3.0)
mail (~> 2)
onlyoffice_logger_helper (~> 1)
onlyoffice_logger_helper (1.2.0)
Expand Down Expand Up @@ -176,4 +176,4 @@ DEPENDENCIES
wrata_api

BUNDLED WITH
2.2.29
2.2.32
9 changes: 4 additions & 5 deletions spec/functional/pricing/site_buy_notification_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
avangate = pricing_page.go_to_avangate_from_pricing_page(pricing_page.buy_now_enterprise_plus_element, test_purchase: true)
avangate.submit_avangate_order_for_notification(email: @mail.username)
expect(@mail.check_email_by_subject({ subject: TestingSiteOnlyoffice::SiteNotificationData::PAYMENT_RECEIVED }, 300, true)).to be_truthy
expect(@mail.check_email_by_subject({ subject: TestingSiteOnlyoffice::SiteNotificationData::PURCHASE_WORKSPACE }, 300, true)).to be_truthy
expect(@mail.check_email_by_subject({ subject: TestingSiteOnlyoffice::SiteNotificationData::PURCHASE_WORKSPACE, include_read: true }, 300, true)).to be_truthy
end

it '[Site][PricingDocsEnterprise] Buy Docs Enterprise Edition and check notify /docs-enterprise-prices.aspx' do
Expand All @@ -31,18 +31,17 @@
avangate = pricing_page.go_to_avangate_from_pricing_page(pricing_page.buy_now_single_server_element, test_purchase: true)
avangate.submit_avangate_order_for_notification(email: @mail.username)
expect(@mail.check_email_by_subject({ subject: TestingSiteOnlyoffice::SiteNotificationData::PAYMENT_RECEIVED }, 300, true)).to be_truthy
expect(@mail.check_email_by_subject({ subject: TestingSiteOnlyoffice::SiteNotificationData::PURCHASE_DOCS_ENTERPRISE }, 300,
expect(@mail.check_email_by_subject({ subject: TestingSiteOnlyoffice::SiteNotificationData::PURCHASE_DOCS_ENTERPRISE, include_read: true }, 300,
true)).to be_truthy
end

it '[Site][PricingDocsEnterprise] Buy Docs Enterprise Edition for home and check notify /docs-enterprise-prices.aspx' do
skip('The second letter does not arrive in the mail')
pricing_page = @site_home_page.click_link_on_toolbar(:pricing_enterprise)
pricing_page.choose_home_tariff
avangate = pricing_page.go_to_avangate_from_pricing_page(pricing_page.buy_now_home_server_element, test_purchase: true)
avangate.submit_avangate_order_for_notification(email: @mail.username)
expect(@mail.check_email_by_subject({ subject: TestingSiteOnlyoffice::SiteNotificationData::PAYMENT_RECEIVED }, 300, true)).to be_truthy
expect(@mail.check_email_by_subject({ subject: TestingSiteOnlyoffice::SiteNotificationData::PURCHASE_DOCS_ENTERPRISE }, 300,
expect(@mail.check_email_by_subject({ subject: TestingSiteOnlyoffice::SiteNotificationData::PURCHASE_DOCS_ENTERPRISE, include_read: true }, 300,
true)).to be_truthy
end

Expand All @@ -51,7 +50,7 @@
avangate = pricing_page.go_to_avangate_from_pricing_page(pricing_page.buy_now_single_server_element, test_purchase: true)
avangate.submit_avangate_order_for_notification(email: @mail.username)
expect(@mail.check_email_by_subject({ subject: TestingSiteOnlyoffice::SiteNotificationData::PAYMENT_RECEIVED }, 300, true)).to be_truthy
expect(@mail.check_email_by_subject({ subject: TestingSiteOnlyoffice::SiteNotificationData::PURCHASE_DOCS_DEVELOPER }, 300,
expect(@mail.check_email_by_subject({ subject: TestingSiteOnlyoffice::SiteNotificationData::PURCHASE_DOCS_DEVELOPER, include_read: true }, 300,
true)).to be_truthy
end
end

0 comments on commit 4f06c8e

Please sign in to comment.