-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
25d2282
commit f102dec
Showing
11 changed files
with
207 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
describe('Painel de Controle - Página de Conta e Privacidade', () => { | ||
beforeEach(() => { | ||
cy.viewport(1920, 1080); | ||
cy.visit('/login'); | ||
cy.get('[data-cy="email"]').type('[email protected]'); | ||
cy.get('[data-cy="password"]').type('Aurora@2024'); | ||
cy.get('[data-cy="submit"]').click(); | ||
cy.visit('/painel'); | ||
}); | ||
|
||
it('Deve acessar a página de Conta e Privacidade a partir do menu do usuário', () => { | ||
cy.url().should('include', '/painel'); | ||
cy.contains('Olá, Talyson Soares', { timeout: 10000 }).should('be.visible'); | ||
|
||
cy.contains('Talyson Soares', { timeout: 10000 }) | ||
.should('be.visible') | ||
.click(); | ||
|
||
cy.contains('Conta e Privacidade', { timeout: 10000 }) | ||
.should('be.visible') | ||
.click(); | ||
cy.url().should('include', '/account-privacy'); | ||
cy.contains('Configurações da conta do usuário', { timeout: 10000 }).should('be.visible'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{% extends "_layouts/blank.html.twig" %} | ||
|
||
{% block title %} {{ 'account_privacy' | trans }} - {{ user.name }}{% endblock %} | ||
|
||
{% block content %} | ||
{% include '_components/modal-confirm-remove.html.twig' %} | ||
<section class="d-flex"> | ||
{% include "_components/side-bar.html.twig" %} | ||
|
||
<section class="account-privacy w-100 px-3"> | ||
<div class="d-flex align-items-center my-4"> | ||
<span class="iconify me-2" data-icon="bi:gear-fill" style="font-size: 2rem; color: #000;"></span> | ||
<h2 class="fw-bold mb-0" style="font-size: 1.75rem;">{{ 'account_privacy' | trans }}</h2> | ||
</div> | ||
|
||
<div class="d-flex align-items-center my-4"> | ||
<div class="avatar-wrapper me-3" style="width: 100px; height: 100px; border-radius: 50%; overflow: hidden; background-color: #f5f5f5; display: flex; align-items: center; justify-content: center; border: 2px solid #ddd;"> | ||
<span class="iconify" data-icon="bi:person-fill" style="font-size: 2.5rem; color: #6c757d;"></span> | ||
</div> | ||
<div class="w-100 d-flex align-items-start"> | ||
<div> | ||
<h4 class="fw-bold mb-0" style="font-size: 1.5rem;">{{ user.name }}</h4> | ||
<p class="text-muted mb-0" style="font-size: 1rem;">ID: {{ user.id }}</p> | ||
<p>Status: | ||
<strong class="{% if user.isActive %}text-success{% else %}text-danger{% endif %}"> | ||
{{ user.isActive ? 'Ativo' : 'Inativo' }} | ||
</strong> | ||
</p> | ||
</div> | ||
<div class="ms-4"> | ||
<p class="mb-1"><strong>{{ 'last_logiin' | trans }}</strong> {{ user.lastLogin|date('d/m/Y H:i') }}</p> | ||
<p class="mb-0"><strong>{{ 'date_created' | trans }}</strong> {{ user.createdAt|date('d/m/Y H:i') }}</p> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="card shadow-sm mb-4"> | ||
<div class="card-body"> | ||
<h5 class="mb-3">{{ 'account_settings' | trans }}</h5> | ||
<p> | ||
<strong>{{ 'E-mail' }}:</strong> {{ user.email }} | ||
<a href="#" class="text-primary ms-2"> | ||
{{ 'change_email' | trans }} | ||
<span class="iconify" data-icon="bi:pencil-fill" style="font-size: 1rem; margin-left: 5px;"></span> | ||
</a> | ||
</p> | ||
<p> | ||
<strong>{{ 'password' }}:</strong> ******** | ||
<a href="#" class="text-primary ms-2"> | ||
{{ 'change_password' | trans }} | ||
<span class="iconify" data-icon="bi:pencil-fill" style="font-size: 1rem; margin-left: 5px;"></span> | ||
</a> | ||
</p> | ||
</div> | ||
</div> | ||
|
||
<div class="card shadow-sm mb-4"> | ||
<div class="card-body"> | ||
<h5 class="mb-3">{{ 'accept_terms' | trans }}</h5> | ||
{% if user.acceptedTerms %} | ||
<p> Os termos foram aceitos em {{ user.acceptedTermsDate|date('d/m/Y') }}</p> | ||
{% else %} | ||
<p class="text-danger">O usuário ainda não aceitou os termos.</p> | ||
{% endif %} | ||
</div> | ||
</div> | ||
</section> | ||
</section> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.