Skip to content

Commit

Permalink
Merge pull request PrestaShop#36279 from jolelievre/ui-test-wording
Browse files Browse the repository at this point in the history
Update UI tests expected wording to match new catalog
  • Loading branch information
jolelievre authored May 31, 2024
2 parents e967586 + 8d83867 commit 52f6c73
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,10 @@ describe('FO - Contact us : Send message from contact us page with customer logg
it('should check that the confirmation mail is in mailbox', async function () {
await testContext.addContextItem(this, 'testIdentifier', 'checkMail', baseContext);

expect(newMail.subject).to.contains(`[${global.INSTALL.SHOP_NAME}] Your message has been correctly sent`);
// Translated message looks like this 'Your message no. ct%thread_id% has been correctly sent (thread ID tc%thread_token%)'
// so we check the two parts that are not dynamic
expect(newMail.subject).to.contains(`[${global.INSTALL.SHOP_NAME}] Your message`);
expect(newMail.subject).to.contains('has been correctly sent');
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,10 @@ describe('FO - Contact us : Send message from contact us page with customer not
it('should check that the confirmation mail is in mailbox', async function () {
await testContext.addContextItem(this, 'testIdentifier', 'checkMail', baseContext);

expect(newMail.subject).to.contains(`[${global.INSTALL.SHOP_NAME}] Your message has been correctly sent`);
// Translated message looks like this 'Your message no. ct%thread_id% has been correctly sent (thread ID tc%thread_token%)'
// so we check the two parts that are not dynamic
expect(newMail.subject).to.contains(`[${global.INSTALL.SHOP_NAME}] Your message`);
expect(newMail.subject).to.contains('has been correctly sent');
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,6 @@ describe('FO - Checkout - Addresses: Select address', async () => {
await testContext.addContextItem(this, 'testIdentifier', 'checkNoPaymentMethodAvailable', baseContext);

const alertMessage = await checkoutPage.getNoPaymentAvailableMessage(page);
expect(alertMessage).to.equal('Unfortunately, there are no payment method available.');
expect(alertMessage).to.equal('Unfortunately, there is no payment method available.');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,10 @@ describe('FO - Contact us : Send message from contact us page with customer logg
it('should check that the confirmation mail is in mailbox', async function () {
await testContext.addContextItem(this, 'testIdentifier', 'checkMail', baseContext);

expect(newMail.subject).to.contains(`[${global.INSTALL.SHOP_NAME}] Your message has been correctly sent`);
// Translated message looks like this 'Your message no. ct%thread_id% has been correctly sent (thread ID tc%thread_token%)'
// so we check the two parts that are not dynamic
expect(newMail.subject).to.contains(`[${global.INSTALL.SHOP_NAME}] Your message`);
expect(newMail.subject).to.contains('has been correctly sent');
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,10 @@ describe('FO - Contact us : Send message from contact us page with customer not
it('should check that the confirmation mail is in mailbox', async function () {
await testContext.addContextItem(this, 'testIdentifier', 'checkMail', baseContext);

expect(newMail.subject).to.contains(`[${global.INSTALL.SHOP_NAME}] Your message has been correctly sent`);
// Translated message looks like this 'Your message no. ct%thread_id% has been correctly sent (thread ID tc%thread_token%)'
// so we check the two parts that are not dynamic
expect(newMail.subject).to.contains(`[${global.INSTALL.SHOP_NAME}] Your message`);
expect(newMail.subject).to.contains('has been correctly sent');
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ describe('FO - Checkout - Addresses: Select address', async () => {
await testContext.addContextItem(this, 'testIdentifier', 'checkNoPaymentMethodAvailable', baseContext);

const alertMessage = await checkoutPage.getNoPaymentAvailableMessage(page);
expect(alertMessage).to.equal('Unfortunately, there are no payment method available.');
expect(alertMessage).to.equal('Unfortunately, there is no payment method available.');
});
});

Expand Down
2 changes: 1 addition & 1 deletion tests/UI/pages/BO/modules/psGdpr/tabDataConsent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class PsGdprTabDataConsentPage extends ModuleConfiguration {
constructor() {
super();

this.saveFormMessage = 'Saved with success !';
this.saveFormMessage = 'Saved with success!';

this.checkboxCreationForm = (status: boolean) => `#switch_account_creation_${status ? 'on' : 'off'}`;
this.messageCreationForm = (idLang: number) => `#psgdpr_creation_form_${idLang}_ifr`;
Expand Down
2 changes: 1 addition & 1 deletion tests/UI/pages/FO/classic/myAccount/returnDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ReturnDetails extends FOBasePage {
constructor(theme: string = 'classic') {
super(theme);

this.pageTitle = 'Return details';
this.pageTitle = 'Return Details';
this.errorMessage = 'You must wait for confirmation before returning any merchandise.';
this.orderReturnCardBlock = 'We have logged your return request. Your package must be returned to us within 14 days'
+ ' of receiving your order. The current status of your merchandise return is:';
Expand Down

0 comments on commit 52f6c73

Please sign in to comment.