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
41 changes: 33 additions & 8 deletions __tests__/end-to-end.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ function makeMakeTest (defaultDependentTests: Array<string> | string = []) {
}

if (
name !== ISOLATED_TEST ||
name !== ISOLATED_TEST &&
testDependencies[ISOLATED_TEST].indexOf(name) === -1
) {
testResults[name] = true
Expand Down Expand Up @@ -1265,7 +1265,7 @@ describe('end-to-end', () => {
// wait for editor to get ready and show starting dialog
await waitForAndClick('[data-test-id="import-latest-version-button"]')
// wait for snapshot to get created
waitAndClearCompletedJobs()
await waitAndClearCompletedJobs()

// begin editing
await waitForAndClick('[data-test-id="begin-editing-button"]')
Expand Down Expand Up @@ -1304,7 +1304,7 @@ describe('end-to-end', () => {
// wait for editor to get ready and show starting dialog
await waitForAndClick('[data-test-id="edit-from-scratch-button"]')
// wait for snapshot to get created
waitAndClearCompletedJobs()
await waitAndClearCompletedJobs()

// begin editing
await waitForAndClick('[data-test-id="begin-editing-button"]')
Expand Down Expand Up @@ -1739,7 +1739,12 @@ describe('end-to-end', () => {
// verify data was saved and retrieved from server
await expectSelectorToContainHtml(
'[data-test-id="stop-stop_id-input-container"]',
'test-stop-1'
dummyStop1.id
)
// verify stop shows up in stop entity list
await expectSelectorToContainHtml(
'.EntityList',
dummyStop1.name
)
}, defaultTestTimeout)

Expand All @@ -1765,14 +1770,24 @@ describe('end-to-end', () => {
'[data-test-id="stop-stop_desc-input-container"] input'
)

// verify data was saved and retrieved from server
// verify the second stop was saved and retrieved from server
await expectSelectorToContainHtml(
'[data-test-id="stop-stop_desc-input-container"]',
'test 2 updated'
)
}, defaultTestTimeout)
// verify the second stop shows up in stop entity list
await expectSelectorToContainHtml(
'.EntityList',
dummyStop2.name
)
// verify the first stop shows up in stop entity list
await expectSelectorToContainHtml(
'.EntityList',
dummyStop1.name
)
}, defaultTestTimeout, 'should create stop')

makeEditorEntityTest('should delete stop data', async () => {
makeEditorEntityTest('should delete stop', async () => {
// create a new stop that will get deleted
await click('[data-test-id="clone-stop-button"]')

Expand Down Expand Up @@ -1822,7 +1837,17 @@ describe('end-to-end', () => {
'.entity-list',
'Russell Ave and Valley Dr to delete (3)'
)
}, defaultTestTimeout, 'should create stop')
// verify the second stop shows up in stop entity list
await expectSelectorToContainHtml(
'.EntityList',
dummyStop2.name
)
// verify the first stop shows up in stop entity list
await expectSelectorToContainHtml(
'.EntityList',
dummyStop1.name
)
}, defaultTestTimeout, 'should update stop data')
})

// ---------------------------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion lib/alerts/util/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ export const EFFECTS = [
'ADDITIONAL_SERVICE',
'MODIFIED_SERVICE',
'STOP_MOVED',
'OTHER_EFFECT'
'OTHER_EFFECT',
'NO_EFFECT',
'ACCESSIBILITY_ISSUE'
]

export function filterAlertsByCategory (alerts: Array<Alert>, filter: string) {
Expand Down
3 changes: 3 additions & 0 deletions lib/editor/actions/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,9 @@ export function fetchBaseGtfs ({
schedule_exceptions (limit: -1) {
id
name
# Fetch dates to ensure we can do validation in the UI
# (avoid duplicate dates).
dates
}
stops (limit: -1) {
id
Expand Down