Skip to content

Commit

Permalink
Copy feedback - change pipe separator to hyphen
Browse files Browse the repository at this point in the history
- to match ' - Elastic'
  • Loading branch information
cee-chen committed Aug 5, 2020
1 parent b4e9b52 commit 8fe1c7a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ import {
describe('generateTitle', () => {
it('creates a pipe separated string from an array of page titles', () => {
const title = generateTitle(['Curations', 'some Engine', 'App Search']);
expect(title).toEqual('Curations | some Engine | App Search');
expect(title).toEqual('Curations - some Engine - App Search');
});
});

describe('enterpriseSearchTitle', () => {
it('automatically appends the Enterprise Search product onto the pages array', () => {
const title = enterpriseSearchTitle(['Setup Guide']);
expect(title).toEqual('Setup Guide | Enterprise Search');
expect(title).toEqual('Setup Guide - Enterprise Search');
});

it('can be mixed and matched', () => {
const title = enterpriseSearchTitle([appSearchTitle(['Some Page'])]);
expect(title).toEqual('Some Page | App Search | Enterprise Search');
expect(title).toEqual('Some Page - App Search - Enterprise Search');
});

it('falls back to product name', () => {
Expand All @@ -38,7 +38,7 @@ describe('enterpriseSearchTitle', () => {
describe('appSearchTitle', () => {
it('automatically appends the App Search product onto the pages array', () => {
const title = appSearchTitle(['Engines']);
expect(title).toEqual('Engines | App Search');
expect(title).toEqual('Engines - App Search');
});

it('falls back to product name', () => {
Expand All @@ -50,7 +50,7 @@ describe('appSearchTitle', () => {
describe('workplaceSearchTitle', () => {
it('automatically appends the Workplace Search product onto the pages array', () => {
const title = workplaceSearchTitle(['Sources']);
expect(title).toEqual('Sources | Workplace Search');
expect(title).toEqual('Sources - Workplace Search');
});

it('falls back to product name', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export type TTitle = string[];
* @param pages - e.g., ['Curations', 'some Engine', 'App Search']
* @returns - e.g., 'Curations | some Engine | App Search'
*/
export const generateTitle = (pages: TTitle) => pages.join(' | ');
export const generateTitle = (pages: TTitle) => pages.join(' - ');

/**
* Product-specific helpers
Expand Down

0 comments on commit 8fe1c7a

Please sign in to comment.