Skip to content

Commit

Permalink
macOS thank you screen test
Browse files Browse the repository at this point in the history
  • Loading branch information
mgurgel committed Nov 8, 2024
1 parent 551cc4e commit 239f667
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions integration-tests/DashboardPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,13 @@ export class DashboardPage {
.waitFor();
}

async showsBreakageFormSuccessScreen() {
await this.page.getByRole('heading', { name: 'Thank you!' }).waitFor();
await this.page
.getByText('Your report helps make DuckDuckGo better for everyone!')
.waitFor();
}

async clickingSuccessScreenClosesDashboard() {
await this.page
.getByRole('heading', {
Expand Down
3 changes: 3 additions & 0 deletions integration-tests/macos.spec-int.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ test.describe('breakage form', () => {
await dash.breakageFormIsVisible();
await dash.screenshot('screen-breakage-form.png');
await dash.submitFeedbackForm();
await dash.showsBreakageFormSuccessScreen();
await dash.mocks.calledForSubmitBreakageForm({ category: 'layout', description: '' });
});

Expand Down Expand Up @@ -127,6 +128,8 @@ test.describe('breakage form', () => {
await dash.selectsCategory('Something else', 'other');
await dash.breakageFormIsVisible();
await dash.submitOtherFeedbackFormWithDescription('something happened');
await dash.screenshot('screen-breakage-form-success.png');
await dash.showsBreakageFormSuccessScreen();
});
});

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion v2/screens/breakage-form-screen.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ function FormSent() {
return (
<div className="success__container">
<div className="success__icon"></div>
<p className="token-body-em">{ns.report('thankYou.title')}</p>
<h1 className="token-body-em">{ns.report('thankYou.title')}</h1>
<p className="token-body success__message">{ns.report('yourReportWillHelpDesc.title', { newline: '\n' })}</p>
</div>
);
Expand Down

0 comments on commit 239f667

Please sign in to comment.