Skip to content

Commit e18b4cc

Browse files
committed
Fix: test
1 parent 9989080 commit e18b4cc

4 files changed

Lines changed: 7 additions & 12 deletions

File tree

assets/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { createApp } from 'vue';
33
import App from './vue/App.vue';
44
import { router } from './router';
55

6-
const appElement = document.getElementById('vue-app') || document.getElementById('vue-subscribers');
6+
const appElement = document.getElementById('vue-app');
77

88
if (appElement) {
99
const app = createApp(App);

src/Controller/DashboardController.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ public function __construct(AuthClient $apiClient)
2020
#[Route('/', name: 'home', methods: ['GET'])]
2121
public function index(Request $request): Response
2222
{
23-
// if (!$request->getSession()->has('auth_token')) {
24-
// return $this->redirectToRoute('login');
25-
// }
26-
27-
return $this->render('dashboard/index.html.twig', [
28-
]);
23+
return $this->render('dashboard/index.html.twig');
2924
}
3025
}

templates/subscribers/index.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
{% block title %}phpList - Subscribers{% endblock %}
44

55
{% block body %}
6-
<div id="vue-subscribers"></div>
6+
<div id="vue-app"></div>
77
{% endblock %}

tests/Integration/Auth/LoginTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ public function testLoginPageFormFieldsAreVisible(): void
3030

3131
$this->assertSelectorExists('input[name="username"]');
3232
$this->assertSelectorExists('input[name="password"]');
33-
$this->assertSelectorTextContains('label[for="username"]', 'Username');
33+
$this->assertSelectorTextContains('label[for="username"]', 'Login');
3434
$this->assertSelectorTextContains('label[for="password"]', 'Password');
3535
$this->assertSelectorExists('button[type="submit"]');
36-
$this->assertSelectorTextContains('button[type="submit"]', 'Sign in');
36+
$this->assertSelectorTextContains('button[type="submit"]', 'Sign In');
3737
$this->assertSelectorExists('.login-container');
3838
$this->assertSelectorExists('#vue-app');
3939

40-
$this->assertSelectorTextContains('h1', 'Sign in to phpList');
40+
$this->assertSelectorTextContains('h4', 'Sign in to your account');
4141
}
4242

4343
public function testLoginFormSubmission(): void
@@ -48,7 +48,7 @@ public function testLoginFormSubmission(): void
4848
]);
4949
$client->request('GET', '/app_test.php/login');
5050

51-
$client->submitForm('Sign in', [
51+
$client->submitForm('Sign In', [
5252
'username' => 'invalid_user',
5353
'password' => 'invalid_password'
5454
]);

0 commit comments

Comments
 (0)