Skip to content

Commit c03a5f4

Browse files
Merge pull request PrestaShop#35498 from Progi1984/improveHummingbird
Functional Tests : Refactoring Install Hummingbird with remove zip
2 parents a8c3b2b + 88e7c53 commit c03a5f4

30 files changed

+6
-56
lines changed

tests/UI/campaigns/functional/BO/08_design/01_themeAndLogo/01_themeAndLogo/01_addNewTheme.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('BO - Design - Theme & Logo : Add new theme', async () => {
2020
let browserContext: BrowserContext;
2121
let page: Page;
2222

23-
const urlTheme: string = 'https://github.com/PrestaShop/hummingbird/releases/download/v0.1.5/hummingbird.zip';
23+
const urlTheme: string = 'https://github.com/PrestaShop/hummingbird/releases/download/v0.1.6/hummingbird.zip';
2424

2525
// before and after functions
2626
before(async function () {

tests/UI/campaigns/functional/FO/hummingbird/01_login/01_passwordReminder.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
import helper from '@utils/helpers';
33
import mailHelper from '@utils/mailHelper';
44
import testContext from '@utils/testContext';
5-
import type {BrowserContext, Page} from 'playwright';
6-
import files from '@utils/files';
75

86
// Import commonTests
97
import {setupSmtpConfigTest, resetSmtpConfigTest} from '@commonTests/BO/advancedParameters/smtp';
@@ -23,6 +21,7 @@ import type MailDevEmail from '@data/types/maildevEmail';
2321

2422
import {expect} from 'chai';
2523
import type MailDev from 'maildev';
24+
import type {BrowserContext, Page} from 'playwright';
2625

2726
const baseContext: string = 'functional_FO_hummingbird_login_passwordReminder';
2827

@@ -77,7 +76,6 @@ describe('FO - Login : Password reminder', async () => {
7776
after(async () => {
7877
await helper.closeBrowserContext(browserContext);
7978
mailHelper.stopListener(mailListener);
80-
await files.deleteFile('../../admin-dev/hummingbird.zip');
8179
});
8280

8381
describe('Go to FO and check the password reminder', async () => {

tests/UI/campaigns/functional/FO/hummingbird/01_login/02_login.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Import utils
22
import helper from '@utils/helpers';
33
import testContext from '@utils/testContext';
4-
import files from '@utils/files';
54

65
// Import commonTests
76
import {installHummingbird, uninstallHummingbird} from '@commonTests/FO/hummingbird';
@@ -38,7 +37,6 @@ describe('FO - Login : Login in FO', async () => {
3837

3938
after(async () => {
4039
await helper.closeBrowserContext(browserContext);
41-
await files.deleteFile('../../admin-dev/hummingbird.zip');
4240
});
4341

4442
describe('Login in FO', () => {

tests/UI/campaigns/functional/FO/hummingbird/01_login/03_logout.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Import utils
22
import helper from '@utils/helpers';
33
import testContext from '@utils/testContext';
4-
import files from '@utils/files';
54

65
// Import commonTests
76
import {installHummingbird, uninstallHummingbird} from '@commonTests/FO/hummingbird';
@@ -34,7 +33,6 @@ describe('FO - Login : Logout from FO', async () => {
3433

3534
after(async () => {
3635
await helper.closeBrowserContext(browserContext);
37-
await files.deleteFile('../../admin-dev/hummingbird.zip');
3836
});
3937

4038
describe('Create account', () => {

tests/UI/campaigns/functional/FO/hummingbird/01_login/04_createAccount.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Import utils
22
import helper from '@utils/helpers';
33
import testContext from '@utils/testContext';
4-
import files from '@utils/files';
54

65
// Import commonTests
76
import {deleteCustomerTest} from '@commonTests/BO/customers/customer';
@@ -37,7 +36,6 @@ describe('FO - Login : Create account', async () => {
3736

3837
after(async () => {
3938
await helper.closeBrowserContext(browserContext);
40-
await files.deleteFile('../../admin-dev/hummingbird.zip');
4139
});
4240

4341
describe('Create account', () => {

tests/UI/campaigns/functional/FO/hummingbird/02_headerAndFooter/01_checkLinksInHeader.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Import utils
22
import helper from '@utils/helpers';
33
import testContext from '@utils/testContext';
4-
import files from '@utils/files';
54

65
// Import commonTests
76
import {installHummingbird, uninstallHummingbird} from '@commonTests/FO/hummingbird';
@@ -49,7 +48,6 @@ describe('FO - Header and Footer : Check links in header page', async () => {
4948

5049
after(async () => {
5150
await helper.closeBrowserContext(browserContext);
52-
await files.deleteFile('../../admin-dev/hummingbird.zip');
5351
});
5452

5553
it('should go to FO home page', async function () {

tests/UI/campaigns/functional/FO/hummingbird/02_headerAndFooter/02_checkLinksInFooter.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Import utils
22
import helper from '@utils/helpers';
33
import testContext from '@utils/testContext';
4-
import files from '@utils/files';
54

65
// Import commonTests
76
import deleteCacheTest from '@commonTests/BO/advancedParameters/cache';
@@ -84,7 +83,6 @@ describe('FO - Header and Footer : Check links in footer page', async () => {
8483

8584
after(async () => {
8685
await helper.closeBrowserContext(browserContext);
87-
await files.deleteFile('../../admin-dev/hummingbird.zip');
8886
});
8987

9088
it('should go to FO home page', async function () {

tests/UI/campaigns/functional/FO/hummingbird/02_headerAndFooter/03_changeCurrency.ts

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// Import utils
2-
import files from '@utils/files';
32
import helper from '@utils/helpers';
43
import testContext from '@utils/testContext';
54

@@ -42,7 +41,6 @@ Post-condition:
4241
describe('FO - Header and Footer : Change currency', async () => {
4342
let browserContext: BrowserContext;
4443
let page: Page;
45-
let filePath: string;
4644
let exchangeRateValue: number = 0;
4745

4846
// Pre-condition : Install Hummingbird
@@ -55,7 +53,6 @@ describe('FO - Header and Footer : Change currency', async () => {
5553
});
5654

5755
after(async () => {
58-
await files.deleteFile(filePath);
5956
await helper.closeBrowserContext(browserContext);
6057
});
6158

tests/UI/campaigns/functional/FO/hummingbird/02_headerAndFooter/04_changeLanguage.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Import utils
22
import helper from '@utils/helpers';
33
import testContext from '@utils/testContext';
4-
import files from '@utils/files';
54

65
// Import commonTests
76
import loginCommon from '@commonTests/BO/loginBO';
@@ -46,7 +45,6 @@ describe('FO - Header and Footer : Change language', async () => {
4645

4746
after(async () => {
4847
await helper.closeBrowserContext(browserContext);
49-
await files.deleteFile('../../admin-dev/hummingbird.zip');
5048
});
5149

5250
// 1 - Disable language

tests/UI/campaigns/functional/FO/hummingbird/03_userAccount/01_editInformation.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Import utils
22
import helper from '@utils/helpers';
33
import testContext from '@utils/testContext';
4-
import files from '@utils/files';
54

65
// Import commonTests
76
import {deleteCustomerTest} from '@commonTests/BO/customers/customer';
@@ -78,7 +77,6 @@ describe('FO - Account : Edit information', async () => {
7877

7978
after(async () => {
8079
await helper.closeBrowserContext(browserContext);
81-
await files.deleteFile('../../admin-dev/hummingbird.zip');
8280
});
8381

8482
it('should open the shop page', async function () {

tests/UI/campaigns/functional/FO/hummingbird/03_userAccount/02_CRUDAddress.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Import utils
22
import helper from '@utils/helpers';
33
import testContext from '@utils/testContext';
4-
import files from '@utils/files';
54

65
// Import commonTests
76
import {deleteCustomerTest} from '@commonTests/BO/customers/customer';
@@ -69,7 +68,6 @@ describe('FO - Account : CRUD address', async () => {
6968

7069
after(async () => {
7170
await helper.closeBrowserContext(browserContext);
72-
await files.deleteFile('../../admin-dev/hummingbird.zip');
7371
});
7472

7573
describe('Go to \'Add first address\' page and create address', async () => {

tests/UI/campaigns/functional/FO/hummingbird/03_userAccount/03_viewVoucher.ts

-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import date from '@utils/date';
33
import helper from '@utils/helpers';
44
import testContext from '@utils/testContext';
5-
import files from '@utils/files';
65

76
// Import commonTests
87
import {createCartRuleTest} from '@commonTests/BO/catalog/cartRule';
@@ -81,7 +80,6 @@ describe('FO - Account : View vouchers', async () => {
8180

8281
after(async () => {
8382
await helper.closeBrowserContext(browserContext);
84-
await files.deleteFile('../../admin-dev/hummingbird.zip');
8583
});
8684

8785
describe('View vouchers on FO', async () => {

tests/UI/campaigns/functional/FO/hummingbird/03_userAccount/04_logOut.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Import utils
22
import helper from '@utils/helpers';
33
import testContext from '@utils/testContext';
4-
import files from '@utils/files';
54

65
// Import common tests
76
import {installHummingbird, uninstallHummingbird} from '@commonTests/FO/hummingbird';
@@ -34,7 +33,6 @@ describe('FO - User Account : LogOut', async () => {
3433

3534
after(async () => {
3635
await helper.closeBrowserContext(browserContext);
37-
await files.deleteFile('../../admin-dev/hummingbird.zip');
3836
});
3937

4038
describe('Logout in FO', async () => {

tests/UI/campaigns/functional/FO/hummingbird/04_newsletter/01_subscribeNewsletter.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Import utils
22
import helper from '@utils/helpers';
33
import testContext from '@utils/testContext';
4-
import files from '@utils/files';
54

65
// Import commonTests
76
import loginCommon from '@commonTests/BO/loginBO';
@@ -63,7 +62,6 @@ describe('FO - Newsletter : Subscribe to Newsletter', async () => {
6362

6463
after(async () => {
6564
await helper.closeBrowserContext(browserContext);
66-
await files.deleteFile('../../admin-dev/hummingbird.zip');
6765
});
6866

6967
describe('Go to FO and try to subscribe with already used email', async () => {

tests/UI/campaigns/functional/FO/hummingbird/05_contactUs/01_checkMailtoLink.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Import utils
22
import helper from '@utils/helpers';
33
import testContext from '@utils/testContext';
4-
import files from '@utils/files';
54

65
// Import common tests
76
import {installHummingbird, uninstallHummingbird} from '@commonTests/FO/hummingbird';
@@ -43,7 +42,6 @@ describe('FO - Contact us : Check mail link on contact us page', async () => {
4342

4443
after(async () => {
4544
await helper.closeBrowserContext(browserContext);
46-
await files.deleteFile('../../admin-dev/hummingbird.zip');
4745
});
4846

4947
describe('Check mail link on contact us page', async () => {

tests/UI/campaigns/functional/FO/hummingbird/05_contactUs/02_sendMessageWithCustomer.ts

-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ describe('FO - Contact us : Send message from contact us page with customer logg
9191
await helper.closeBrowserContext(browserContext);
9292

9393
await files.deleteFile(`${contactUsData.fileName}.txt`);
94-
await files.deleteFile('../../admin-dev/hummingbird.zip');
9594

9695
// Stop listening to maildev server
9796
mailHelper.stopListener(mailListener);

tests/UI/campaigns/functional/FO/hummingbird/05_contactUs/03_sendMessageAsAnonymous.ts

-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ describe('FO - Contact us : Send message from contact us page with customer not
108108
await helper.closeBrowserContext(browserContext);
109109

110110
await files.deleteFile(`${contactUsData.fileName}.txt`);
111-
await files.deleteFile('../../admin-dev/hummingbird.zip');
112111
// Stop listening to maildev server
113112
mailHelper.stopListener(mailListener);
114113
});

tests/UI/campaigns/functional/FO/hummingbird/05_contactUs/04_addAttachment.ts

-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ describe('FO - Contact us : Add attachment', async () => {
7171

7272
await files.deleteFile(`${contactUsData.fileName}.csv`);
7373
await files.deleteFile(`${contactUsData.fileName}.png`);
74-
await files.deleteFile('../../admin-dev/hummingbird.zip');
7574
});
7675

7776
describe('Add attachment', async () => {

tests/UI/campaigns/functional/FO/hummingbird/06_homePage/01_checkSlider.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Import utils
22
import helper from '@utils/helpers';
33
import testContext from '@utils/testContext';
4-
import files from '@utils/files';
54

65
// Import common tests
76
import {installHummingbird, uninstallHummingbird} from '@commonTests/FO/hummingbird';
@@ -29,7 +28,6 @@ describe('FO - Home Page : Check slider', async () => {
2928

3029
after(async () => {
3130
await helper.closeBrowserContext(browserContext);
32-
await files.deleteFile('../../admin-dev/hummingbird.zip');
3331
});
3432

3533
describe('Check slider', async () => {

tests/UI/campaigns/functional/FO/hummingbird/06_homePage/02_displaySomeProducts.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Import utils
22
import helper from '@utils/helpers';
33
import testContext from '@utils/testContext';
4-
import files from '@utils/files';
54

65
// Import common tests
76
import {installHummingbird, uninstallHummingbird} from '@commonTests/FO/hummingbird';
@@ -42,7 +41,6 @@ describe('FO - Home Page : Display some products', async () => {
4241

4342
after(async () => {
4443
await helper.closeBrowserContext(browserContext);
45-
await files.deleteFile('../../admin-dev/hummingbird.zip');
4644
});
4745

4846
describe('Check popular products block', async () => {

tests/UI/campaigns/functional/FO/hummingbird/06_homePage/03_allProducts.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Import utils
22
import helper from '@utils/helpers';
33
import testContext from '@utils/testContext';
4-
import files from '@utils/files';
54

65
// Import commonTests
76
import loginCommon from '@commonTests/BO/loginBO';
@@ -37,7 +36,6 @@ describe('FO - Home Page : Display all products', async () => {
3736

3837
after(async () => {
3938
await helper.closeBrowserContext(browserContext);
40-
await files.deleteFile('../../admin-dev/hummingbird.zip');
4139
});
4240

4341
describe('BO : Get the number of products', async () => {

tests/UI/campaigns/functional/FO/hummingbird/06_homePage/04_productQuickView.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Import utils
22
import helper from '@utils/helpers';
33
import testContext from '@utils/testContext';
4-
import files from '@utils/files';
54

65
// Import commonTests
76
import {createProductTest, deleteProductTest} from '@commonTests/BO/catalog/product';
@@ -75,7 +74,6 @@ describe('FO - Home Page : Product quick view', async () => {
7574

7675
after(async () => {
7776
await helper.closeBrowserContext(browserContext);
78-
await files.deleteFile('../../admin-dev/hummingbird.zip');
7977
});
8078

8179
describe('Quick view product with combinations', async () => {

tests/UI/campaigns/functional/FO/hummingbird/09_productPage/01_quickView/01_addToCart.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Import utils
22
import helper from '@utils/helpers';
33
import testContext from '@utils/testContext';
4-
import files from '@utils/files';
54

65
// Import common tests
76
import {installHummingbird, uninstallHummingbird} from '@commonTests/FO/hummingbird';
@@ -71,7 +70,6 @@ describe('FO - Product page - Quick view : Add to cart', async () => {
7170

7271
after(async () => {
7372
await helper.closeBrowserContext(browserContext);
74-
await files.deleteFile('../../admin-dev/hummingbird.zip');
7573
});
7674

7775
describe('Add to cart', async () => {

tests/UI/campaigns/functional/FO/hummingbird/09_productPage/01_quickView/02_changeQuantity.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Import utils
22
import helper from '@utils/helpers';
33
import testContext from '@utils/testContext';
4-
import files from '@utils/files';
54

65
// Import common tests
76
import {installHummingbird, uninstallHummingbird} from '@commonTests/FO/hummingbird';
@@ -42,7 +41,6 @@ describe('FO - Product page - Quick view : Change quantity', async () => {
4241

4342
after(async () => {
4443
await helper.closeBrowserContext(browserContext);
45-
await files.deleteFile('../../admin-dev/hummingbird.zip');
4644
});
4745

4846
describe('Change quantity', async () => {

tests/UI/campaigns/functional/FO/hummingbird/09_productPage/01_quickView/03_shareLinks.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Import utils
22
import helper from '@utils/helpers';
33
import testContext from '@utils/testContext';
4-
import files from '@utils/files';
54

65
// Import common tests
76
import {installHummingbird, uninstallHummingbird} from '@commonTests/FO/hummingbird';
@@ -40,7 +39,6 @@ describe('FO - Product page - Quick view : Share links', async () => {
4039

4140
after(async () => {
4241
await helper.closeBrowserContext(browserContext);
43-
await files.deleteFile('../../admin-dev/hummingbird.zip');
4442
});
4543

4644
describe('Check share links', async () => {

tests/UI/campaigns/functional/FO/hummingbird/10_cart/02_cart/01_changeQuantity.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Import utils
22
import helper from '@utils/helpers';
33
import testContext from '@utils/testContext';
4-
import files from '@utils/files';
54

65
// Import common tests
76
import {installHummingbird, uninstallHummingbird} from '@commonTests/FO/hummingbird';
@@ -40,7 +39,6 @@ describe('FO - cart : Change quantity', async () => {
4039

4140
after(async () => {
4241
await helper.closeBrowserContext(browserContext);
43-
await files.deleteFile('../../admin-dev/hummingbird.zip');
4442
});
4543

4644
describe('Change quantity', async () => {

0 commit comments

Comments
 (0)