Skip to content

Commit

Permalink
update site selectors (#2227)
Browse files Browse the repository at this point in the history
  • Loading branch information
JuliaBuvx authored Dec 16, 2024
1 parent 7340ea9 commit 845ddf5
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Metrics/BlockLength:
# Offense count: 3
# Configuration parameters: CountComments, CountAsOne.
Metrics/ClassLength:
Max: 140
Max: 142

# Offense count: 3
# Configuration parameters: AllowedMethods, AllowedPatterns.
Expand Down
3 changes: 2 additions & 1 deletion lib/testing_site_onlyoffice/data/site_download_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ def self.desktop_mobile_info
MOBILE_PROJECTS_APP_STORE = 'ONLYOFFICE Projects on the App Store'

# Onlyoffice API
EXTERNAL_ACCES_API_ONLYOFFICE_TITLE = 'External access to the document editing - ONLYOFFICE Api Documentation'
EXTERNAL_ACCES_API_ONLYOFFICE_TITLE = 'External access to the document editing'
OVERVIEW_API_ONLYOFFICE_TITLE = 'Overview'
CONVERSION_API_ONLYOFFICE_TITLE = 'Conversion API'
DOCSPACE_API_TITLE = 'DocSpace'

# Helpcenter - accessibility
HELPCENTER_ONLYOFFICE_ACCESSIBILITY = 'Accessibility of ONLYOFFICE editors - ONLYOFFICE'
Expand Down
4 changes: 2 additions & 2 deletions lib/testing_site_onlyoffice/data/site_integrations_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
"get_it_now": "Office-Editor und virtueller Klassenraum (powered by frentix) – OpenOlat"
},
"powerfolder": {
"more_info": "ONLYOFFICE Setup Guide - PowerFolder - Confluence",
"more_info": "ONLYOFFICE Setup Guide - PowerFolder - PowerFolder",
"website": "File Sync, Share und Backup Lösungen für Unternehmen",
"get_it_now": "ONLYOFFICE Setup Guide - PowerFolder - Confluence"
"get_it_now": "ONLYOFFICE Setup Guide - PowerFolder - PowerFolder"
},
"pydio": {
"more_info": "Pydio | [ED] Only office",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ class SiteForDevelopers
link(:docspace_api, xpath: '//a[contains(@href, "api.onlyoffice.com/docspace")]')
link(:docspace_check_tutorial, xpath: '//a[contains(@href, "integrating-onlyoffice-docspace-into-a-single-page-application")]')
link(:docs_integration_examples, xpath: '//a[@href = "https://api.onlyoffice.com/editors/demopreview"]')
link(:docs_compare_api_wopi, xpath: '//a[@href = "/wopi-comparison.aspx"]')
link(:docs_open_wopi, xpath: '//a[contains(@href, "/docs-api/using-wopi/")]')
link(:docs_open_api, xpath: '//a[contains(@href, "/docs-api/using-wopi/")]')
link(:docs_try_now, xpath: '//a[@href = "/download-docs.aspx?from=for-developers#docs-developer"]')
link(:docs_learn_more, xpath: '//a[@href = "/developer-edition.aspx?from=for-developers" and @class="button bl"]')
link(:docbuilder_check_examples, xpath: '//a[@href = "https://api.onlyoffice.com/docbuilder/integratingdocumentbuilder"]')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class SiteForBusinessDocsEnterpriseEdition
include SiteEditorsLinksCheckingHelper

div(:enterprise_edition, xpath: "//div[@id='forenterprises']")
link(:get_it_now, xpath: '//a[contains(@href, "/see-it-in-action.aspx?from=docs-enterprise")]//preceding-sibling::a')
link(:get_it_now, xpath: '(//a[contains(@href, "/download.aspx#docs-enterprise")])[2]')
link(:see_it_in_action, xpath: '//a[contains(@href, "/see-it-in-action.aspx?from=docs-enterprise")]')
link(:document_editing, xpath: "//div[@class='fe_cards']//a[@href='/document-editor.aspx']")
link(:spreadsheet_editing, xpath: "//div[@class='fe_cards']//a[@href='/spreadsheet-editor.aspx']")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,15 @@ def click_docs_learn_more
TestingSiteOnlyoffice::SiteForDevelopersDocDevEdition.new(@instance)
end

def click_docs_compare_api_wopi
docs_compare_api_wopi_element.click
def click_docs_open_wopi
docs_open_wopi_element.click
TestingSiteOnlyoffice::SiteWOPIComparison.new(@instance)
end

def click_docs_open_api
docs_open_api_element.click
end

def click_docbuilder_download_now
docbuilder_download_now_element.click
TestingSiteOnlyoffice::SiteGetOnlyofficeDocsDeveloper.new(@instance)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ class SiteForDevelopersDocBuilder
include SiteToolbar
include SiteDownloadHelper

link(:download_now_top, xpath: '//div[@class="dbl-header-button-area"]//a[@href="/download-builder.aspx"]')
link(:get_started_top, xpath: "//a[@class='button red' and contains(@href, '/docs/document-builder/get-started/overview/')]")
link(:code_download_link, xpath: '//a[contains(@class, "code_download_link")]')
link(:github_open_source, xpath: '//a[contains(@href, "github.com/ONLYOFFICE/DocumentBuilder")]')
link(:read_documentaion_top, xpath: '(//a[@class="dbldb_block_link" and @href="https://api.onlyoffice.com/docbuilder/basic"])[1]')
link(:read_documentaion_bottom, xpath: '(//a[@class="dbldb_block_link" and @href="https://api.onlyoffice.com/docbuilder/basic"])[2]')
link(:read_documentaion_top, xpath: "(//a[contains(@href, '/docs/document-builder/get-started/overview/')])[2]")
link(:read_documentaion_bottom, xpath: "(//a[contains(@href, '/docs/document-builder/get-started/overview/')])[3]")
link(:download_now_bottom, xpath: '//div[@class="dbldb_block_download_button"]//a[@href="/download-builder.aspx"]')
link(:docs_developer, xpath: '//p//a[contains(@href, "/developer-edition.aspx")]')
link(:buy_now, xpath: '//div[@class="dbldisc_block_contact_button"]//a[@href="/developer-edition-prices.aspx"]')
Expand Down Expand Up @@ -44,8 +44,8 @@ def wait_to_load
end
end

def click_download_now_top
download_now_top_element.click
def click_get_started_top
get_started_top_element.click
SiteGetOnlyofficeDownloadDocBuilder.new(@instance)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,18 @@
@test&.webdriver&.quit
end

it '[Developers] [All Developer Solutions] Docspace "learn more" link works' do
expect(@all_developer_solutions.click_docspace_learn_more).to be_a TestingSiteOnlyoffice::SiteDocSpaceMainPage
end

it '[Developers] [All Developer Solutions] Docspace "API" link works' do
@all_developer_solutions.click_docspace_api
expect(@all_developer_solutions.check_opened_page_title).to eq(TestingSiteOnlyoffice::SiteDownloadData::OVERVIEW_API_ONLYOFFICE_TITLE)
expect(@all_developer_solutions.check_opened_page_title).to eq(TestingSiteOnlyoffice::SiteDownloadData::DOCSPACE_API_TITLE)
end

it '[Developers] [All Developer Solutions] Docs "Integration examples" link works' do
@all_developer_solutions.click_docs_integration_examples
expected_title = 'Language-specific examples - ONLYOFFICE Api Documentation'
expect(@all_developer_solutions.check_opened_page_title).to eq(expected_title)
it '[Developers] [All Developer Solutions] Docs "Open wopi support" link works' do
expect(@all_developer_solutions.click_docs_open_wopi).to be_a TestingSiteOnlyoffice::SiteWOPIComparison
end

it '[Developers] [All Developer Solutions] Docs "Compare api and wopi" link works' do
expect(@all_developer_solutions.click_docs_compare_api_wopi).to be_a TestingSiteOnlyoffice::SiteWOPIComparison
end

it '[Developers] [All Developer Solutions] Docs "Try now" link works' do
expect(@all_developer_solutions.click_docs_try_now).to be_a TestingSiteOnlyoffice::SiteGetOnlyofficeDocsDeveloper
it '[Developers] [All Developer Solutions] Docs "Open api support" link works' do
@all_developer_solutions.click_docs_open_api
expect(@all_developer_solutions.check_opened_page_title).to eq(TestingSiteOnlyoffice::SiteDownloadData::OVERVIEW_API_ONLYOFFICE_TITLE)
end

it '[Developers] [All Developer Solutions] Docs "learn more" link works' do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
end

it '[Developers] [Document Builder] "Download now" button at top block works' do
result_page = @document_builder.click_download_now_top
result_page = @document_builder.click_get_started_top
expect(result_page).to be_a TestingSiteOnlyoffice::SiteGetOnlyofficeDownloadDocBuilder
end

Expand Down Expand Up @@ -74,9 +74,4 @@
result_page = @document_builder.click_docs_developer
expect(result_page).to be_a TestingSiteOnlyoffice::SiteForDevelopersDocDevEdition
end

it '[Developers] [Document Builder] "Buy now" button works' do
result_page = @document_builder.click_buy_now
expect(result_page).to be_a TestingSiteOnlyoffice::SitePriceDocsDeveloper
end
end

0 comments on commit 845ddf5

Please sign in to comment.