Skip to content

Commit

Permalink
LPS-138201 SF
Browse files Browse the repository at this point in the history
  • Loading branch information
Luizcarlosqueiroz committed Nov 5, 2021
1 parent 6d55cf9 commit 8a81a8d
Showing 1 changed file with 50 additions and 50 deletions.
Expand Up @@ -87,6 +87,56 @@ definition {

}

@description = "LPS-119066: Given the Page Audit Panel
When the user clicks on the language selector and selects other language
Then the title of the page shows the matching translation (if existing), the URL changes (if localized URLs is enabled) and the API is called so the progress bar shows"
@priority = "3"
test AssertPageAuditLocale {
task ("Set Google PageSpeed API") {
Navigator.openWithAppendToBaseURL(urlAppend = "web/test-site-name/content-page");

PageAudit.setAPIViaSiteSettings(apiKey = "AIzaSyAq-oKsvIhlYHdk1UXCFy63h74ECIgbgbE");
}

task ("Add a translation for that page") {
SitePages.openPagesAdmin(siteURLKey = "test-site-name");

SitePages.gotoPageMenuItem(
menuItem = "Configure",
pageName = "Content Page");

Page.addFriendlyURLLocalizedPG(
friendlyUrlLocalized = "fr_FR",
localizedFriendlyURL = "");

PortletEntry.inputName(name = "Principal");

Button.clickSave();
}

task ("Open Page Audit panel and run it") {
Navigator.openWithAppendToBaseURL(urlAppend = "web/test-site-name/content-page");

PageAudit.openPanelBeforeConfiguration();

AssertTextPresent(
locator1 = "PageAudit#PANEL_PAGE_TITLE",
value1 = "Home");
}

task ("Change language") {
PageAudit.changeLocale(locale = "French");

AssertTextPresent(
locator1 = "PageAudit#PANEL_PAGE_TITLE",
value1 = "Principal");

AssertElementPresent(
locator1 = "PageAudit#PANEL_PAGE_URL",
partialUrl = "/fr/");
}
}

@description = "LPS-119066: Given the Page Audit Panel
When the audit is launched (the API is called)
Then a progress bar shows and moves forward while retrieving the data until they can be shown"
Expand Down Expand Up @@ -2810,56 +2860,6 @@ definition {
}
}

@description = "LPS-119066: Given the Page Audit Panel
When the user clicks on the language selector and selects other language
Then the title of the page shows the matching translation (if existing), the URL changes (if localized URLs is enabled) and the API is called so the progress bar shows"
@priority = "3"
test AssertPageAuditLocale {
task ("Set Google PageSpeed API") {
Navigator.openWithAppendToBaseURL(urlAppend = "web/test-site-name/content-page");

PageAudit.setAPIViaSiteSettings(apiKey = "AIzaSyAq-oKsvIhlYHdk1UXCFy63h74ECIgbgbE");
}

task ("Add a translation for that page") {
SitePages.openPagesAdmin(siteURLKey = "test-site-name");

SitePages.gotoPageMenuItem(
menuItem = "Configure",
pageName = "Content Page");

Page.addFriendlyURLLocalizedPG(
friendlyUrlLocalized = "fr_FR",
localizedFriendlyURL = "");

PortletEntry.inputName(name = "Principal");

Button.clickSave();
}

task ("Open Page Audit panel and run it") {
Navigator.openWithAppendToBaseURL(urlAppend = "web/test-site-name/content-page");

PageAudit.openPanelBeforeConfiguration();

AssertTextPresent(
locator1 = "PageAudit#PANEL_PAGE_TITLE",
value1 = "Home");
}

task ("Change language") {
PageAudit.changeLocale(locale = "French");

AssertTextPresent(
locator1 = "PageAudit#PANEL_PAGE_TITLE",
value1 = "Principal");

AssertElementPresent(
locator1 = "PageAudit#PANEL_PAGE_URL",
partialUrl = "/fr/");
}
}

@description = "LPS-119068: When the user, after s/he has clicked on the Connect with Page Speed (button) and being led to Site Settings > Pages > Google PageSpeed, clicks on Back button, s/he is led to the page view again"
@priority = "3"
test PageAuditBackButton {
Expand Down

0 comments on commit 8a81a8d

Please sign in to comment.