Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove 'read full answer' summary from ask-cfpb per research #8735

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
13 changes: 2 additions & 11 deletions cfgov/ask_cfpb/jinja2/ask-cfpb/answer-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,9 @@ <h1>
</div>
{% endif %}

<div class="block block--sub">
<div class="block block--sub answer-text">

<div class="o-summary o-summary--mobile">
<div class="o-summary__content answer-text">
{% include_block page.answer_content %}
</div>

<button class="o-summary__btn u-hidden">
{{ _('Read full answer') }}
{{ svg_icon('plus-round') }}
</button>
</div>
{% include_block page.answer_content %}

<div class="block related-questions">
<h2>{{ _('Don\'t see what you\'re looking for?') }}</h2>
Expand Down
Binary file modified cfgov/ask_cfpb/locale/es/LC_MESSAGES/django.mo
Binary file not shown.
4 changes: 0 additions & 4 deletions cfgov/ask_cfpb/locale/es/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ msgstr ""
msgid "last reviewed"
msgstr "revisado"

#: ask_cfpb/jinja2/ask-cfpb/answer-page.html:60
msgid "Read full answer"
msgstr "Leer más"

#: ask_cfpb/jinja2/ask-cfpb/answer-page.html:66
#: ask_cfpb/jinja2/ask-cfpb/see-all.html:86
msgid "Don't see what you're looking for?"
Expand Down

This file was deleted.

59 changes: 0 additions & 59 deletions test/cypress/integration/consumer-tools/ask-cfpb/ask-cfpb.cy.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { AskCfpbSearch } from './search-helpers.cy.js';
import { AskCfpbAnswerPage } from './answer-helpers.cy.js';

const search = new AskCfpbSearch();
const answerPage = new AskCfpbAnswerPage();

describe('Ask CFPB', () => {
describe('Search', () => {
Expand Down Expand Up @@ -50,61 +48,4 @@ describe('Ask CFPB', () => {
search.resetButton().should('not.be.visible');
});
});

describe('Answer Page', () => {
describe('on desktop', () => {
beforeEach(() => {
cy.viewport(1200, 800);
answerPage.open();
});

it('should not hide content on desktop', () => {
answerPage.getFirstLinkInSummary().should('be.visible');
answerPage.getFirstLinkInSummary().focus();
answerPage.getFirstLinkInSummary().should('be.visible');
answerPage.getSummaryBtn().should('not.be.visible');
});
});

describe('on mobile', () => {
beforeEach(() => {
answerPage.open();
cy.viewport(480, 800);
});

it('should hide content on mobile', () => {
cy.get('.o-summary__content').should(
'have.class',
'u-max-height-transition',
);
cy.get('.o-summary__content').should(
'have.class',
'u-max-height-summary',
);
cy.get('.o-summary__content')
.invoke('outerHeight')
.should('be.lte', 92);
answerPage.getFirstLinkInSummary().should('not.be.visible');
answerPage.getSummaryBtn().click();
answerPage.getFirstLinkInSummary().should('be.visible');
cy.get('.o-summary__content').should(
'have.class',
'u-max-height-transition',
);
cy.get('.o-summary__content').should(
'not.have.class',
'u-no-animation',
);
cy.get('.o-summary__content').should(
'not.have.class',
'u-max-height-summary',
);
cy.get('.o-summary__content').should(
'have.class',
'u-max-height-default',
);
cy.get('.o-summary__content').invoke('outerHeight').should('be.gt', 92);
});
});
});
});
Loading