Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions cypress/e2e/report.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@ describe('Feature Report', () => {
it('can\'t report with an empty reason', () => {
loginAsVoluntary();
accessToReportModal();
cy.get('p-button').contains('Envoyer')
.click();
cy.get('app-textarea-field p')
.contains('Ce champ est requis')
.should('be.visible');
cy.get('p-button[label="Envoyer"] button')
.should('be.disabled');
cy.get('body').find('.p-dialog-mask')
.click({ force: true });
logout();
Expand Down
5 changes: 5 additions & 0 deletions cypress/fixtures/common/userByToken.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"user": {

}
}
1 change: 1 addition & 0 deletions cypress/support/e2e.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
beforeEach(() => {
// the home page's necessary mocks
cy.intercept('GET', '/auth/token', {fixture: null}).as('getUserByToken');
cy.intercept('GET', '/activities/future', { fixture: '/common/activities.json' }).as('getActivities');
cy.intercept('GET', '/themes', { fixture: '/common/themes.json' }).as('getThemes');
cy.intercept('GET', 'https://api.maptiler.com/maps/**', { statusCode: 200, body: {} }).as('mapTiler');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,21 +121,6 @@
background-color: var(--primary-dark-color);
}

.btn-reset {
margin-top: 1rem;
padding: 0.5rem 1rem;
border: none;
border-radius: 6px;
background-color: #007ad9;
color: #fff;
cursor: pointer;
font-weight: 500;
}

.btn-reset:hover {
background-color: #005fa3;
}

i {
margin-right: 8px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h3>Commentaire libre</h3>

<div class="actions-footer">
<p-button label="Annuler" severity="secondary" (click)="closeModal()" />
<p-button label="Envoyer" [disabled]="reportForm.invalid" (click)="sendReport()" />
<p-button #reportSubmit label="Envoyer" [disabled]="reportForm.invalid" (click)="sendReport()" />
</div>
</form>
</p-dialog>
Expand Down
Loading