-
Notifications
You must be signed in to change notification settings - Fork 136
UI tests - Fix update script #1656
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
Merged
nesrineabdmouleh
merged 15 commits into
PrestaShop:dev
from
nesrineabdmouleh:fixNightly1-02
Feb 16, 2026
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
b832340
Fix uninstall module
nesrineabdmouleh eeab2cd
Fix install update script
nesrineabdmouleh ec47afb
Test nightly
nesrineabdmouleh 7d19ab5
Update ui testing library
nesrineabdmouleh 7724045
Fix upgrade ui
nesrineabdmouleh 412b3dc
Fix upgrade ui
nesrineabdmouleh b3e94bc
Fix install script
nesrineabdmouleh 6be69ff
Fix package.json
nesrineabdmouleh c944683
Revert install-update script
nesrineabdmouleh 0896c2b
Add permission
nesrineabdmouleh cc1ace4
Add permission
nesrineabdmouleh 9639fd2
Fix nightly-ui
nesrineabdmouleh d28d350
Add some fixes
nesrineabdmouleh 6ef8ca4
Add some fixes
nesrineabdmouleh 39c76fd
Add some fixes
nesrineabdmouleh 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
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -68,4 +68,4 @@ | |
| "UPGRADE_CHANNEL": "local" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
This file contains hidden or 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 hidden or 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 hidden or 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,108 @@ | ||
| /** | ||
| * Copyright since 2007 PrestaShop SA and Contributors | ||
| * PrestaShop is an International Registered Trademark & Property of PrestaShop SA | ||
| * | ||
| * NOTICE OF LICENSE | ||
| * | ||
| * This source file is subject to the Academic Free License version 3.0 | ||
| * that is bundled with this package in the file LICENSE.md. | ||
| * It is also available through the world-wide-web at this URL: | ||
| * https://opensource.org/licenses/AFL-3.0 | ||
| * If you did not receive a copy of the license and are unable to | ||
| * obtain it through the world-wide-web, please send an email | ||
| * to license@prestashop.com so we can send you a copy immediately. | ||
| * | ||
| * @author PrestaShop SA and Contributors <contact@prestashop.com> | ||
| * @copyright Since 2007 PrestaShop SA and Contributors | ||
| * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 | ||
| */ | ||
|
|
||
| import { | ||
| // Import BO pages | ||
| boDashboardPage, | ||
| boLoginPage, | ||
| modAutoupgradeBoMain, | ||
| modAutoupgradeBoModal, | ||
| } from '@prestashop-core/ui-testing'; | ||
|
|
||
| import { | ||
| test, expect, Page, BrowserContext, | ||
| } from '@playwright/test'; | ||
|
|
||
| /* | ||
| Check update modal | ||
| */ | ||
| test.describe('Check Update modal', () => { | ||
| let browserContext: BrowserContext; | ||
| let page: Page; | ||
| let isModalVisible: boolean = true; | ||
|
|
||
| test.beforeAll(async ({browser}) => { | ||
| browserContext = await browser.newContext(); | ||
| page = await browserContext.newPage(); | ||
| }); | ||
| test.afterAll(async () => { | ||
| await page.close(); | ||
| }); | ||
|
|
||
| // Steps | ||
| test('should login in BO', async () => { | ||
| await boLoginPage.goTo(page, global.BO.URL); | ||
| await boLoginPage.successLogin(page, global.BO.EMAIL, global.BO.PASSWD, false); | ||
|
|
||
| const pageTitle = await boDashboardPage.getPageTitle(page); | ||
| expect(pageTitle).toContain(boDashboardPage.pageTitle); | ||
| }); | ||
|
|
||
| test('should get if the update modal is visible', async () => { | ||
| isModalVisible = await modAutoupgradeBoModal.isModalVisible(page); | ||
| }); | ||
|
|
||
| test('should check the update link', async () => { | ||
| if (isModalVisible) { | ||
| const updateLink = await modAutoupgradeBoModal.getUpdateLinkFromModal(page); | ||
| expect(updateLink).toContain('https://build.prestashop-project.org/news'); | ||
| } else { | ||
| test.skip(); | ||
| } | ||
| }); | ||
|
|
||
| test('should click on the update link from the modal', async () => { | ||
| if (isModalVisible) { | ||
| page = await modAutoupgradeBoModal.openUpdateLinkFromTheModal(page); | ||
|
|
||
| const pageTitle = await modAutoupgradeBoModal.getPageTitle(page); | ||
| expect(pageTitle).toContain('PrestaShop'); | ||
| expect(pageTitle.toLowerCase()).toContain('available'); | ||
|
|
||
| page = await modAutoupgradeBoModal.closePage(browserContext, page, 0); | ||
| } else { | ||
| test.skip(); | ||
| } | ||
| }); | ||
|
|
||
| test('should check the support link', async () => { | ||
| if (isModalVisible) { | ||
| const supportLink = await modAutoupgradeBoModal.getSupportLinkFromModal(page); | ||
| expect(supportLink).toEqual('https://www.prestashop-project.org/support/'); | ||
| } else { | ||
| test.skip(); | ||
| } | ||
| }); | ||
|
|
||
| test('should click on Update and check the PS version', async () => { | ||
| if (isModalVisible) { | ||
| const version = await modAutoupgradeBoModal.getPSVersionFromTheModal(page); | ||
|
|
||
| await modAutoupgradeBoModal.clickOnUpdateButton(page); | ||
|
|
||
| const pageTitle = await modAutoupgradeBoMain.getPageTitle(page); | ||
| expect(pageTitle).toEqual(modAutoupgradeBoMain.pageTitle); | ||
|
|
||
| const currentVersion = await modAutoupgradeBoMain.getCurrentPSAndPHPVersion(page); | ||
| expect(currentVersion).not.toContain(version); | ||
| } else { | ||
| test.skip(); | ||
| } | ||
| }); | ||
| }); |
This file contains hidden or 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 hidden or 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
File renamed without changes.
File renamed without changes.
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.