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

AskVA 1348 - Fix ask-va url to remove too #34097

Merged
merged 18 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
8ff4b77
fix all instances of ask-va-too and replace with just ask-va
hemeshvpatel Jan 15, 2025
da28327
Merge branch 'main' into Ask-VA-1348--Remove-too-from-ask-va
hemeshvpatel Jan 15, 2025
90becc5
Merge branch 'main' into Ask-VA-1348--Remove-too-from-ask-va
hemeshvpatel Jan 15, 2025
f98e8d3
Merge branch 'main' into Ask-VA-1348--Remove-too-from-ask-va
hemeshvpatel Jan 15, 2025
2dd3fc7
Merge branch 'main' into Ask-VA-1348--Remove-too-from-ask-va
hemeshvpatel Jan 15, 2025
75cd4df
Merge branch 'main' into Ask-VA-1348--Remove-too-from-ask-va
hemeshvpatel Jan 15, 2025
098c5b2
Merge branch 'main' into Ask-VA-1348--Remove-too-from-ask-va
hemeshvpatel Jan 15, 2025
386bd31
Merge branch 'main' into Ask-VA-1348--Remove-too-from-ask-va
hemeshvpatel Jan 15, 2025
802053f
Merge branch 'main' into Ask-VA-1348--Remove-too-from-ask-va
hemeshvpatel Jan 17, 2025
a7c78aa
Merge branch 'main' into Ask-VA-1348--Remove-too-from-ask-va
hemeshvpatel Jan 21, 2025
92d8fa3
Merge branch 'main' into Ask-VA-1348--Remove-too-from-ask-va
hemeshvpatel Jan 22, 2025
286f244
Merge branch 'main' into Ask-VA-1348--Remove-too-from-ask-va
hemeshvpatel Jan 22, 2025
afc6ebf
Merge branch 'main' into Ask-VA-1348--Remove-too-from-ask-va
hemeshvpatel Jan 22, 2025
802ba6e
Merge branch 'main' into Ask-VA-1348--Remove-too-from-ask-va
hemeshvpatel Jan 22, 2025
6be5d4d
rename static version of ask-va due to naming conflicts in build, tem…
hemeshvpatel Jan 22, 2025
7e1927d
update chunk name with archived
hemeshvpatel Jan 22, 2025
08afe9e
search ask-va-too and update babel file, update widgetTypes name to a…
hemeshvpatel Jan 22, 2025
1f6af08
fix ref in static-pages-entry for ask-va-archived
hemeshvpatel Jan 22, 2025
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
6 changes: 3 additions & 3 deletions src/applications/ask-va/app-entry.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import 'platform/polyfills';
import './sass/ask-va-too.scss';
import './sass/ask-va.scss';

import startApp from 'platform/startup';

import routes from './routes';
import reducer from './reducers';
import manifest from './manifest.json';
import reducer from './reducers';
import routes from './routes';

startApp({
url: manifest.rootUrl,
Expand Down
3 changes: 2 additions & 1 deletion src/applications/ask-va/components/BreadCrumbs.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import PropTypes from 'prop-types';
import React from 'react';
import { breadcrumbsDictionary } from '../constants';
import manifest from '../manifest.json';

const adjustLocation = currentLocation => {
if (currentLocation.startsWith('/contact-us/ask-va-too/user/dashboard')) {
if (currentLocation.startsWith(`${manifest.rootUrl}/user/dashboard`)) {
return '/user/dashboard';
}
if (currentLocation.startsWith('/response-sent')) {
Expand Down
2 changes: 1 addition & 1 deletion src/applications/ask-va/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ export const contactUsBreadcrumbs = [

export const askVABreadcrumbs = [
...contactUsBreadcrumbs,
{ href: '/contact-us/ask-va-too', label: 'Ask VA', key: 'askVA' },
{ href: '/contact-us/ask-va', label: 'Ask VA', key: 'askVA' },
];

export const questionDetailsBreadcrumbs = [
Expand Down
3 changes: 2 additions & 1 deletion src/applications/ask-va/containers/ConfirmationPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import React, { useEffect, useRef } from 'react';
import { useSelector } from 'react-redux';
import { withRouter } from 'react-router';
import manifest from '../manifest.json';

const contactPrefrencesMap = {
Email: 'email',
Expand Down Expand Up @@ -54,7 +55,7 @@ const ConfirmationPage = ({ location }) => {
const actionLink = currentlyLoggedIn && (
<div className="vads-u-margin-bottom--3 vads-u-margin-top--3">
<va-link-action
href="/contact-us/ask-va-too"
href={`${manifest.rootUrl}`}
text="Return to Ask VA"
type="secondary"
/>
Expand Down
3 changes: 2 additions & 1 deletion src/applications/ask-va/containers/ResponseSentPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { focusElement } from 'platform/utilities/ui';
import React, { useEffect, useRef } from 'react';
import BreadCrumbs from '../components/BreadCrumbs';
import NeedHelpFooter from '../components/NeedHelpFooter';
import manifest from '../manifest.json';

const ResponseSentPage = () => {
const alertRef = useRef(null);
Expand Down Expand Up @@ -37,7 +38,7 @@ const ResponseSentPage = () => {
</p>
<div className="vads-u-margin-bottom--7 vads-u-margin-top--6">
<va-link-action
href="/contact-us/ask-va-too"
href={`${manifest.rootUrl}`}
text="Return to Ask VA Inbox"
type="secondary"
/>
Expand Down
4 changes: 2 additions & 2 deletions src/applications/ask-va/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"appName": "Ask VA",
"entryFile": "./app-entry.jsx",
"entryName": "ask-va-too",
"rootUrl": "/contact-us/ask-va-too",
"entryName": "ask-va",
"rootUrl": "/contact-us/ask-va",
"productId": "18ce03a0-4cc4-4414-a069-0d753038df29"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ import { render } from '@testing-library/react';
import { expect } from 'chai';
import React from 'react';
import BreadCrumbs from '../../components/BreadCrumbs';
import manifest from '../../manifest.json';

describe('BreadCrumbs component', () => {
it('renders breadcrumb links based on currentLocation', () => {
const currentLocation = '/contact-us/ask-va-too/introduction';
const currentLocation = `${manifest.rootUrl}/introduction`;
const screen = render(<BreadCrumbs currentLocation={currentLocation} />);

expect(screen.getByTestId('Breadcrumb')).to.exist;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ describe('YAML tests', () => {

// TODO: Add check for CI here.
if (flow.runOnCI === true) {
// cy.visit('https://staging.va.gov/contact-us/ask-va-too/');
cy.visit('http://localhost:3001/contact-us/ask-va-too/');
// cy.visit('https://staging.va.gov/contact-us/ask-va/');
cy.visit('http://localhost:3001/contact-us/ask-va/');
cy.injectAxeThenAxeCheck();
executeSteps(flow.steps);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
// });

// it('visits landing page of Ask VA ', () => {
// cy.visit('/contact-us/ask-va-too');
// cy.visit('/contact-us/ask-va');
// cy.injectAxeThenAxeCheck();

// // Check for the "Ask a new question" button and click it
Expand Down
Loading