-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MFTF] Added AdminStartupPageTest and AssertAdminPageTitleActionGroup #32771
Merged
magento-engcom-team
merged 6 commits into
magento:2.4-develop
from
Usik2203:mftf-startap-page
Oct 23, 2021
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
29ddaf9
Added AdminStartupPageTest and AssertAdminPageTitleActionGroup
Usik2203 864b2a9
Merge branch '2.4-develop' into mftf-startap-page
Usik2203 f88cb85
Merge branch '2.4-develop' into mftf-startap-page
Usik2203 3cb57d8
apply additional changes
Usik2203 bb20f40
Merge branch '2.4-develop' into mftf-startap-page
Usik2203 18c5a21
Merge branch '2.4-develop' into mftf-startap-page
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
app/code/Magento/Backend/Test/Mftf/ActionGroup/AssertAdminPageTitleActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AssertAdminPageTitleActionGroup"> | ||
<annotations> | ||
<description>Check Admin Page Title is present and correct.</description> | ||
</annotations> | ||
<arguments> | ||
<argument name="value" type="string"/> | ||
</arguments> | ||
|
||
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="{{value}}" stepKey="seePageTitle"/> | ||
</actionGroup> | ||
</actionGroups> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
app/code/Magento/Backend/Test/Mftf/Test/AdminStartupPageTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="AdminStartupPageTest"> | ||
<annotations> | ||
<features value="Backend"/> | ||
<stories value="Admin should see selected Startup Page after login."/> | ||
<title value="Admin should see selected Startup Page after login."/> | ||
<description value="Admin should see selected Startup Page after login."/> | ||
<severity value="MINOR"/> | ||
</annotations> | ||
<before> | ||
<magentoCLI command="config:set admin/startup/menu_item_id Magento_Sales::sales_order" stepKey="selectSalesOrderStartupPage"/> | ||
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> | ||
</before> | ||
<after> | ||
<magentoCLI command="config:set admin/startup/menu_item_id Magento_Backend::dashboard" stepKey="selectDashboardStartupPage"/> | ||
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> | ||
</after> | ||
|
||
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches"> | ||
<argument name="tags" value="config full_page"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="AssertAdminPageTitleActionGroup" stepKey="checkPageTitle"> | ||
<argument name="value" value="Orders"/> | ||
</actionGroup> | ||
</test> | ||
</tests> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,7 +92,9 @@ | |
<closeAdminNotification stepKey="closeAdminNotificationInvoice" after="seeConfigurableProductInItemsOrdered"/> | ||
<click selector="{{AdminOrderDetailsMainActionsSection.invoice}}" stepKey="clickInvoiceAction" after="closeAdminNotificationInvoice"/> | ||
<seeInCurrentUrl url="{{AdminInvoiceNewPage.url}}" stepKey="seeOrderInvoiceUrl" after="clickInvoiceAction"/> | ||
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Invoice" stepKey="seePageNameNewInvoicePage" after="seeOrderInvoiceUrl"/> | ||
<actionGroup ref="AssertAdminPageTitleActionGroup" stepKey="seePageNameNewInvoicePage" after="seeOrderInvoiceUrl"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we do the same for the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
<argument name="value" value="New Invoice"/> | ||
</actionGroup> | ||
|
||
<!--Check Invoice Data--> | ||
<see selector="{{AdminInvoiceOrderInformationSection.orderStatus}}" userInput="Pending" stepKey="seeOrderPendingInvoice" after="seePageNameNewInvoicePage"/> | ||
|
@@ -132,7 +134,9 @@ | |
<comment userInput="Admin creates credit memo" stepKey="createCreditMemoComment" after="clickOrderIdOnShipment"/> | ||
<click selector="{{AdminOrderDetailsMainActionsSection.creditMemo}}" stepKey="clickCreateCreditMemo" after="createCreditMemoComment"/> | ||
<seeInCurrentUrl url="{{AdminCreditMemoNewPage.url}}" stepKey="seeNewCreditMemoPage" after="clickCreateCreditMemo"/> | ||
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Memo" stepKey="seeNewMemoInPageTitle" after="seeNewCreditMemoPage"/> | ||
<actionGroup ref="AssertAdminPageTitleActionGroup" stepKey="seeNewMemoInPageTitle" after="seeNewCreditMemoPage"> | ||
<argument name="value" value="New Memo"/> | ||
</actionGroup> | ||
<!--Check Credit Memo Order Data--> | ||
<actionGroup ref="VerifyBasicCreditMemoInformationActionGroup" stepKey="verifyOrderCreditMemoInformation" after="seeNewMemoInPageTitle"> | ||
<argument name="customer" value="Simple_US_Customer"/> | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Usik2203 are we required to clean the full_page cache to see the changes? Is cleaning the caches really needed here?
I'd probably even completely remove this test and preserve the title assertions only.
Thank you.