Skip to content
Snippets Groups Projects
Commit 31a34b06 authored by Fabrice Gangler's avatar Fabrice Gangler :art:
Browse files

fix(twig): use H1 instead of H2 for some pages

parent 2bb81a50
No related branches found
No related tags found
No related merge requests found
Pipeline #91289 failed
......@@ -19,9 +19,9 @@
<div class="col-md-7">
<h2>
<h1>
{{ 'forgot_password.page.title'|trans }}
</h2>
</h1>
{{ form_start(forgotPasswordForm) }}
{{ form_widget(forgotPasswordForm) }}
<button id="public_forgotPassword_newPasswordForm_submit" class="btn btn-primary">
......
......@@ -17,9 +17,9 @@
</nav>
<div class="col-md-9">
<h2>
<h1>
{{ 'forgot_password.not-voalid-token.page.title'|trans }}
</h2>
</h1>
<p id="error_forgot-password_not-voalid-token" class="alert alert-danger">
{{ 'forgot_password.not-voalid-token.error_msg'|trans }}
</p>
......
......@@ -19,9 +19,9 @@
</nav>
<div class="col-md-7">
<h2>
<h1>
{{ 'forgot_password.request.page.title'|trans }}
</h2>
</h1>
{{ form_start(forgotPasswordForm) }}
{{ form_widget(forgotPasswordForm) }}
<button id="public_forgotPassword_requestForm_submit" class="btn btn-primary">
......
......@@ -18,9 +18,9 @@
</ol>
</nav>
<h2>
<h1>
{{ 'forgot_password.request.page.title'|trans }}
</h2>
</h1>
<div class="col-md-7">
<p class="alert alert-success">
{{ 'forgot_password.request.result'|trans }}
......
......@@ -15,9 +15,9 @@
</nav>
<h2>
<h1>
{{ 'login.page.title'|trans }}
</h2>
</h1>
{% if error %}
<div class="alert alert-warning">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
{% endif %}
......
......@@ -153,7 +153,7 @@ private function sendForgotPasswordNewPasswordFormWithWrongData(
);
$this->assertRouteSame("app_account_forgot_password_new-password");
$this->assertResponseStatusCodeSame(Response::HTTP_OK); // HTTP status code = 200
$this->assertSelectorTextSame('h2', 'Reset your password');
$this->assertSelectorTextSame('h1', 'Reset your password');
$this->assertSelectorExists("div.invalid-feedback");
// $this->assertSelectorTextSame('div.alert-danger', 'The form contains some errors, as described below.');
return $crawler;
......@@ -169,7 +169,7 @@ private function sendRequestForgotPasswordFormWithWrongData(
);
$this->assertRouteSame("app_account_forgot_password_request");
$this->assertResponseStatusCodeSame(Response::HTTP_OK); // HTTP status code = 200
$this->assertSelectorTextSame('h2', 'Forgot your password?');
$this->assertSelectorTextSame('h1', 'Forgot your password?');
// $this->assertSelectorTextSame('div.alert-danger', 'The form contains some errors, as described below.');
return $crawler;
}
......@@ -187,7 +187,7 @@ private function loadEmptyForgotPasswordNewPasswordForm(
if ($enableBasicAssertions === true) {
$this->assertRouteSame("app_account_forgot_password_new-password");
$this->assertResponseStatusCodeSame(Response::HTTP_OK); // HTTP status code = 200
$this->assertSelectorTextContains('h2', "Reset your password");
$this->assertSelectorTextContains('h1', "Reset your password");
}
if (\is_null($expectedErrorMsg)) {
......@@ -263,7 +263,7 @@ private function loadEmptyForgotPasswordRequestForm(
if ($enableAssertions === true) {
$this->assertRouteSame("app_account_forgot_password_request");
$this->assertResponseStatusCodeSame(Response::HTTP_OK); // HTTP status code = 200
$this->assertSelectorTextSame('h2', 'Forgot your password?');
$this->assertSelectorTextSame('h1', 'Forgot your password?');
$htmlFormName = "reset_password_request_form";
$this->checkAttribute(crawler: $crawler, cssFilter: "form[name=$htmlFormName]", attributesExpected: []);
$this->checkFormField(
......@@ -907,7 +907,7 @@ public function testAnonymousUserCanSendNewPasswordFormAndLoginWithNewPassword()
$this->assertResponseStatusCodeSame(Response::HTTP_SEE_OTHER); // HTTP status code = 303
$this->assertResponseHeaderSame("Location", '/en/account/login');
$crawler = $kernelBrowser->request('GET', '/en/account/login');
$this->assertSelectorTextSame('h2', 'Login');
$this->assertSelectorTextSame('h1', 'Login');
$this->assertSelectorTextContains('.alert-success', "Your password has been successfully changed.");
// Check that password has been changed in database
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment