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
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/campuses/__tests__/sections.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe('Carleton', () => {
})

test('titles its contacts as its tile does, and leads from them to its own directory', () => {
expect(carleton.contacts?.title).toBe('Directory')
expect(carleton.contacts?.title).toBe('Contacts')
expect(carleton.contacts?.directoryUrl).toBe('https://www.carleton.edu/directory/')
})
})
Expand Down
2 changes: 1 addition & 1 deletion source/campuses/edu-carleton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const carleton = {
phoneNumber: '5072225999',
},
},
contacts: {title: 'Directory', directoryUrl: 'https://www.carleton.edu/directory/'},
contacts: {title: 'Contacts', directoryUrl: 'https://www.carleton.edu/directory/'},
api: {
defaultUrl: 'https://carleton.frogpond.tech/v1/',
storageKey: 'settings:server-address:edu.carleton',
Expand Down
17 changes: 8 additions & 9 deletions source/campuses/edu-carleton/home-tiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@ export const carletonHomeTiles: ReadonlyArray<ViewType> = [
icon: 'briefcase.fill',
gradient: c.goldGradient,
},
// The CARLS app's Balances tile; the OneCard site shows them, and the card's other uses.
{
type: 'url',
url: 'https://get.cbord.com/carletonstolaf/full/prelogin.php',
title: 'OneCard',
icon: 'creditcard.fill',
gradient: c.mintGradient,
},
{
type: 'view',
view: '/hours?campus=edu.carleton',
Expand All @@ -50,7 +42,7 @@ export const carletonHomeTiles: ReadonlyArray<ViewType> = [
{
type: 'view',
view: '/contacts',
title: 'Directory',
title: 'Contacts',
icon: 'phone.fill',
gradient: c.orangeGradient,
},
Expand Down Expand Up @@ -127,5 +119,12 @@ export const carletonHomeTiles: ReadonlyArray<ViewType> = [
icon: 'megaphone.fill',
gradient: c.indigoGradient,
},
{
type: 'url',
url: 'https://www.carleton.edu/directory/',
title: 'Directory',
icon: 'person.fill',
gradient: c.redGradient,
},
developerTile,
]
16 changes: 14 additions & 2 deletions source/features/__tests__/views.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,9 @@ describe("Carleton's Home tiles", () => {
expect(carleton().map((view) => [view.title, viewTarget(view)])).toEqual([
['Menus', '/menus'],
['Workday', 'https://www.carleton.edu/workday/'],
['OneCard', 'https://get.cbord.com/carletonstolaf/full/prelogin.php'],
['Building Hours', '/hours?campus=edu.carleton'],
['Calendar', '/calendar'],
['Directory', '/contacts'],
['Contacts', '/contacts'],
['KRLX', 'radio:krlx'],
['SUMO', '/schedule/sumo'],
['The Carletonian', '/newspaper'],
Expand All @@ -171,6 +170,7 @@ describe("Carleton's Home tiles", () => {
['Student Orgs', 'https://www.carleton.edu/student-organizations/'],
['Moodle', 'https://moodle.carleton.edu/'],
['Carleton News', '/news'],
['Directory', 'https://www.carleton.edu/directory/'],
['Developer', '/developer'],
])
})
Expand Down Expand Up @@ -205,6 +205,18 @@ describe('opensInBrowser for a station', () => {
let krlx = carletonView((v) => v.type === 'radio')
expect(opensInBrowser(krlx)).toBe(false)
})

test('is true for the Directory web link', () => {
let directoryLink = carletonView(
(v) => v.type === 'url' && v.url === 'https://www.carleton.edu/directory/',
)
expect(directoryLink).toMatchObject({
type: 'url',
url: 'https://www.carleton.edu/directory/',
icon: 'person.fill',
})
expect(opensInBrowser(directoryLink)).toBe(true)
})
})

function carletonView(matches: (view: ViewType) => boolean): ViewType {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ describe('on Carleton', () => {
'Menus',
'Building Hours',
'Calendar',
'Directory',
'Contacts',
'SUMO',
'The Carletonian',
'Transportation',
Expand Down
2 changes: 1 addition & 1 deletion uitests/CampusSmokeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ final class CarletonSmokeTests: CampusSmokeTests {
building: "Burton",
mapRoute: "/map?campus=edu.carleton",
mapPlace: "Boliou Hall",
contactsTitle: "Directory",
contactsTitle: "Contacts",
contact: "Security Services",
word: "A & I",
transitTitle: "Transportation",
Expand Down
Loading