Skip to content

Commit 33bb383

Browse files
committed
Unify URL style for Knowledge Models
1 parent a056937 commit 33bb383

17 files changed

+99
-99
lines changed

cypress/e2e/km-editor/create.spec.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ describe('KM Editor Create', () => {
1313
const kmName = 'Test Knowledge Model'
1414
const kmId = 'test-km'
1515

16-
cy.visitApp('/km-editor')
16+
cy.visitApp('/knowledge-model-editors')
1717

1818
cy.getCy('km-editor_create-button').click()
19-
cy.url().should('contain', '/km-editor/create')
19+
cy.url().should('contain', '/knowledge-model-editors/create')
2020

2121
cy.fillFields({
2222
name: kmName,
@@ -26,9 +26,9 @@ describe('KM Editor Create', () => {
2626
'version-patch': '0'
2727
})
2828
cy.submitForm()
29-
cy.url().should('contain', '/km-editor/editor/')
29+
cy.url().should('contain', '/knowledge-model-editors/editor/')
3030

31-
cy.visitApp('/km-editor')
31+
cy.visitApp('/knowledge-model-editors')
3232
cy.getListingItem(kmId).should('contain', kmName)
3333
})
3434

@@ -39,7 +39,7 @@ describe('KM Editor Create', () => {
3939
cy.visitApp('/knowledge-models/dsw:test-km-1:1.0.0')
4040

4141
cy.clickDropdownAction('create-km-editor')
42-
cy.url().should('contain', '/km-editor/create')
42+
cy.url().should('contain', '/knowledge-model-editors/create')
4343

4444
cy.checkFields({
4545
name: kmName,
@@ -52,9 +52,9 @@ describe('KM Editor Create', () => {
5252
})
5353

5454
cy.submitForm()
55-
cy.url().should('contain', '/km-editor/editor/')
55+
cy.url().should('contain', '/knowledge-model-editors/editor/')
5656

57-
cy.visitApp('/km-editor')
57+
cy.visitApp('/knowledge-model-editors')
5858
cy.getListingItem(kmId).should('contain', kmName)
5959
})
6060

@@ -65,7 +65,7 @@ describe('KM Editor Create', () => {
6565
cy.visitApp('/knowledge-models/dsw:test-km-1:1.0.0')
6666

6767
cy.clickDropdownAction('fork')
68-
cy.url().should('contain', '/km-editor/create')
68+
cy.url().should('contain', '/knowledge-model-editors/create')
6969

7070
cy.checkFields({ name: '', kmId: '' })
7171
cy.fillFields({
@@ -77,17 +77,17 @@ describe('KM Editor Create', () => {
7777
})
7878

7979
cy.submitForm()
80-
cy.url().should('contain', '/km-editor/editor/')
80+
cy.url().should('contain', '/knowledge-model-editors/editor/')
8181

82-
cy.visitApp('/km-editor')
82+
cy.visitApp('/knowledge-model-editors')
8383
cy.getListingItem(kmId).should('contain', kmName)
8484
})
8585

8686
it('prefill KM ID', () => {
8787
const kmName = 'Test Knowledge Model'
8888
const kmId = 'test-knowledge-model'
8989

90-
cy.visitApp('/km-editor')
90+
cy.visitApp('/knowledge-model-editors')
9191
cy.getCy('km-editor_create-button').click()
9292

9393
cy.get('#name').type(kmName).blur()

cypress/e2e/km-editor/editor/add.spec.js

+21-21
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ describe('KM Editor Add Entity', () => {
1313

1414
cy.createKMEditor({ kmId, name: kmName, version: '1.0.0', previousPackageId: null })
1515
cy.loginAs('datasteward')
16-
cy.visitApp('/km-editor')
16+
cy.visitApp('/knowledge-model-editors')
1717
})
1818

1919

@@ -31,7 +31,7 @@ describe('KM Editor Add Entity', () => {
3131
editor.createChildren([['chapter', chapter]])
3232

3333
// Reopen editor again and check that the chapter is there
34-
cy.visitApp('/km-editor')
34+
cy.visitApp('/knowledge-model-editors')
3535
editor.open(kmId)
3636
editor.openChild(chapter.title)
3737
cy.checkFields(chapter)
@@ -49,7 +49,7 @@ describe('KM Editor Add Entity', () => {
4949
editor.createChildren([['metric', metric]])
5050

5151
// Reopen editor and check that the metric is there
52-
cy.visitApp('/km-editor')
52+
cy.visitApp('/knowledge-model-editors')
5353
editor.open(kmId)
5454
editor.openChild(metric.title)
5555
cy.checkFields(metric)
@@ -66,7 +66,7 @@ describe('KM Editor Add Entity', () => {
6666
editor.createChildren([['phase', phase]])
6767

6868
// Reopen editor and check that the phase is there
69-
cy.visitApp('/km-editor')
69+
cy.visitApp('/knowledge-model-editors')
7070
editor.open(kmId)
7171
editor.openChild(phase.title)
7272
cy.checkFields(phase)
@@ -84,7 +84,7 @@ describe('KM Editor Add Entity', () => {
8484
cy.getCy('form-group_color_color-button', ':nth-child(5)').click()
8585

8686
// Reopen editor again and check that the tag is there
87-
cy.visitApp('/km-editor')
87+
cy.visitApp('/knowledge-model-editors')
8888
editor.open(kmId)
8989
editor.openChild(tag.name)
9090
cy.checkFields({ ...tag, color: '#34495E' })
@@ -133,7 +133,7 @@ describe('KM Editor Add Entity', () => {
133133
editor.awaitSave()
134134

135135
// Reopen editor again and check that the integration is there
136-
cy.visitApp('/km-editor')
136+
cy.visitApp('/knowledge-model-editors')
137137
editor.open(kmId)
138138
editor.openChild(integration.name)
139139
checkProp('name', 1)
@@ -153,7 +153,7 @@ describe('KM Editor Add Entity', () => {
153153
editor.createChildren([['resource-collection', resourceCollection]])
154154

155155
// Reopen editor and check that the resource is there
156-
cy.visitApp('/km-editor')
156+
cy.visitApp('/knowledge-model-editors')
157157
editor.open(kmId)
158158
editor.openChild(resourceCollection.title)
159159
cy.checkFields(resourceCollection)
@@ -195,7 +195,7 @@ describe('KM Editor Add Entity', () => {
195195
])
196196

197197
// Reopen editor again and check that the question is there
198-
cy.visitApp('/km-editor')
198+
cy.visitApp('/knowledge-model-editors')
199199
editor.open(kmId)
200200
editor.traverseChildren([chapter.title, question.title])
201201
cy.checkFields(question)
@@ -234,7 +234,7 @@ describe('KM Editor Add Entity', () => {
234234
})
235235

236236
// Open editor again and check that the question is there
237-
cy.visitApp('/km-editor')
237+
cy.visitApp('/knowledge-model-editors')
238238
editor.open(kmId)
239239
editor.traverseChildren([chapter.title, question.title])
240240
cy.checkFields(question)
@@ -474,7 +474,7 @@ describe('KM Editor Add Entity', () => {
474474
editor.awaitSave()
475475

476476
// Reopen editor again and check that the answer is there
477-
cy.visitApp('/km-editor')
477+
cy.visitApp('/knowledge-model-editors')
478478
editor.open(kmId)
479479
editor.traverseChildren([...path, followUpAnswer.label])
480480
cy.checkFields(followUpAnswer)
@@ -498,7 +498,7 @@ describe('KM Editor Add Entity', () => {
498498
])
499499

500500
// Reopen editor again and check that the follow-up question is there
501-
cy.visitApp('/km-editor')
501+
cy.visitApp('/knowledge-model-editors')
502502
editor.open(kmId)
503503
editor.traverseChildren([...path, answer.label, followUpQuestion.title])
504504
cy.checkFields(followUpQuestion)
@@ -519,7 +519,7 @@ describe('KM Editor Add Entity', () => {
519519
editor.awaitSave()
520520

521521
// Reopen editor again and check that the choice is there
522-
cy.visitApp('/km-editor')
522+
cy.visitApp('/knowledge-model-editors')
523523
editor.open(kmId)
524524
editor.traverseChildren([...path, choice.label])
525525
cy.checkFields(choice)
@@ -539,7 +539,7 @@ describe('KM Editor Add Entity', () => {
539539
editor.createChildren([...childrenList, ['question', itemQuestion]])
540540

541541
// Reopen editor again and check that the answer item question is there
542-
cy.visitApp('/km-editor')
542+
cy.visitApp('/knowledge-model-editors')
543543
editor.open(kmId)
544544
editor.traverseChildren([...path, itemQuestion.title])
545545
cy.checkFields(itemQuestion)
@@ -557,7 +557,7 @@ describe('KM Editor Add Entity', () => {
557557
editor.createChildren([...childrenOptions, ['reference', reference]])
558558

559559
// Reopen editor again and check that the reference is there
560-
cy.visitApp('/km-editor')
560+
cy.visitApp('/knowledge-model-editors')
561561
editor.open(kmId)
562562
editor.traverseChildren([...path, reference.label])
563563
cy.checkFields(reference)
@@ -581,14 +581,14 @@ describe('KM Editor Add Entity', () => {
581581
cy.url().then((url) => {
582582
const uuid = url.split('/').pop()
583583
reference.s_resourcePageUuid = uuid
584-
cy.visitApp('/km-editor')
584+
cy.visitApp('/knowledge-model-editors')
585585

586586
// Add reference and its parents
587587
editor.open(kmId)
588588
editor.createChildren([...childrenOptions, ['reference', reference]])
589589

590590
// Reopen editor again and check that the reference is there
591-
cy.visitApp('/km-editor')
591+
cy.visitApp('/knowledge-model-editors')
592592
editor.open(kmId)
593593
editor.traverseChildren([...path, resourcePage.title])
594594
cy.checkFields(reference)
@@ -606,7 +606,7 @@ describe('KM Editor Add Entity', () => {
606606
editor.createChildren([...childrenList, ['expert', expert]])
607607

608608
// Reopen editor again and check that the expert is there
609-
cy.visitApp('/km-editor')
609+
cy.visitApp('/knowledge-model-editors')
610610
editor.open(kmId)
611611
editor.traverseChildren([...path, expert.name])
612612
cy.checkFields(expert)
@@ -641,7 +641,7 @@ describe('KM Editor Add Entity', () => {
641641
editor.createChildren([['question', itemSelectQuestion]])
642642

643643
// Reopen editor again and check that the item select question is there
644-
cy.visitApp('/km-editor')
644+
cy.visitApp('/knowledge-model-editors')
645645
editor.open(kmId)
646646
editor.traverseChildren([chapter.title, itemSelectQuestion.title])
647647

@@ -667,7 +667,7 @@ describe('KM Editor Add Entity', () => {
667667
editor.createChildren([['chapter', chapter], ['question', fileQuestion]])
668668

669669
// Reopen editor again and check that the file question is there
670-
cy.visitApp('/km-editor')
670+
cy.visitApp('/knowledge-model-editors')
671671
editor.open(kmId)
672672
editor.traverseChildren([chapter.title, fileQuestion.title])
673673
cy.checkFields(fileQuestion)
@@ -702,7 +702,7 @@ describe('KM Editor Add Entity', () => {
702702
const uuid = url.split('/').pop()
703703
reference.s_resourcePageUuid = uuid
704704

705-
cy.visitApp('/km-editor')
705+
cy.visitApp('/knowledge-model-editors')
706706
editor.open(kmId)
707707
editor.createChildren([
708708
['chapter', chapter],
@@ -711,7 +711,7 @@ describe('KM Editor Add Entity', () => {
711711
])
712712

713713
// Reopen editor again and check that the resource is there
714-
cy.visitApp('/km-editor')
714+
cy.visitApp('/knowledge-model-editors')
715715
editor.open(kmId)
716716
editor.traverseChildren([chapter.title, question.title, resourcePage.title])
717717
cy.checkFields(reference)

cypress/e2e/km-editor/editor/delete.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('KM Editor Delete Entity', () => {
2020

2121
cy.createKMEditor({ kmId, name: kmName, version: '1.0.0', previousPackageId })
2222
cy.loginAs('datasteward')
23-
cy.visitApp('/km-editor')
23+
cy.visitApp('/knowledge-model-editors')
2424
})
2525

2626
const fixtures = [{
@@ -163,7 +163,7 @@ describe('KM Editor Delete Entity', () => {
163163
cy.clickModalAction()
164164

165165
// Check that the entity is not there
166-
cy.visitApp('/km-editor')
166+
cy.visitApp('/knowledge-model-editors')
167167
editor.open(kmId)
168168
editor.traverseChildren(path)
169169
editor.shouldNotHaveChild(child)

0 commit comments

Comments
 (0)