Browse Source

better naming for apps

Guénaël Muller 6 years ago
parent
commit
aab5c2d3e9

+ 9 - 9
tracim/models/applications.py View File

@@ -57,30 +57,30 @@ file = Application(
57 57
     main_route='/#/workspaces/{workspace_id}/contents?type=file',
58 58
 )
59 59
 
60
-pagemarkdownplus = Application(
61
-    label='Rich Markdown Files',  # TODO - G.M - 24-05-2018 - Check label
62
-    slug='contents/pagemarkdownplus',
60
+markdownpluspage = Application(
61
+    label='Markdown Plus Documents',  # TODO - G.M - 24-05-2018 - Check label
62
+    slug='contents/markdownpluspage',
63 63
     icon='file-code',
64 64
     hexcolor='#f12d2d',
65 65
     is_active=True,
66 66
     config={},
67
-    main_route='/#/workspaces/{workspace_id}/contents?type=pagemarkdownplus',
67
+    main_route='/#/workspaces/{workspace_id}/contents?type=markdownpluspage',
68 68
 )
69 69
 
70
-pagehtml = Application(
70
+htmlpage = Application(
71 71
     label='Text Documents',  # TODO - G.M - 24-05-2018 - Check label
72
-    slug='contents/pagehtml',
72
+    slug='contents/htmlpage',
73 73
     icon='file-text-o',
74 74
     hexcolor='#3f52e3',
75 75
     is_active=True,
76 76
     config={},
77
-    main_route='/#/workspaces/{workspace_id}/contents?type=pagehtml',
77
+    main_route='/#/workspaces/{workspace_id}/contents?type=htmlpage',
78 78
 )
79 79
 # TODO - G.M - 08-06-2018 - This is hardcoded lists of app, make this dynamic.
80 80
 # List of applications
81 81
 applications = [
82
-    pagehtml,
83
-    pagemarkdownplus,
82
+    htmlpage,
83
+    markdownpluspage,
84 84
     file,
85 85
     thread,
86 86
     calendar,

+ 3 - 3
tracim/tests/functional/test_system.py View File

@@ -25,14 +25,14 @@ class TestApplicationsEndpoint(FunctionalTest):
25 25
         res = res.json_body
26 26
         application = res[0]
27 27
         assert application['label'] == "Text Documents"
28
-        assert application['slug'] == 'contents/pagehtml'
28
+        assert application['slug'] == 'contents/htmlpage'
29 29
         assert application['icon'] == 'file-text-o'
30 30
         assert application['hexcolor'] == '#3f52e3'
31 31
         assert application['is_active'] is True
32 32
         assert 'config' in application
33 33
         application = res[1]
34
-        assert application['label'] == "Rich Markdown Files"
35
-        assert application['slug'] == 'contents/pagemarkdownplus'
34
+        assert application['label'] == "Markdown Plus Documents"
35
+        assert application['slug'] == 'contents/markdownpluspage'
36 36
         assert application['icon'] == 'file-code'
37 37
         assert application['hexcolor'] == '#f12d2d'
38 38
         assert application['is_active'] is True

+ 5 - 5
tracim/tests/functional/test_user.py View File

@@ -47,16 +47,16 @@ class TestUserWorkspaceEndpoint(FunctionalTest):
47 47
         assert sidebar_entry['icon'] == ""
48 48
 
49 49
         sidebar_entry = workspace['sidebar_entries'][2]
50
-        assert sidebar_entry['slug'] == 'contents/pagehtml'
50
+        assert sidebar_entry['slug'] == 'contents/htmlpage'
51 51
         assert sidebar_entry['label'] == 'Text Documents'
52
-        assert sidebar_entry['route'] == '/#/workspaces/1/contents?type=pagehtml'  # nopep8
52
+        assert sidebar_entry['route'] == '/#/workspaces/1/contents?type=htmlpage'  # nopep8
53 53
         assert sidebar_entry['hexcolor'] == "#3f52e3"
54 54
         assert sidebar_entry['icon'] == "file-text-o"
55 55
 
56 56
         sidebar_entry = workspace['sidebar_entries'][3]
57
-        assert sidebar_entry['slug'] == 'contents/pagemarkdownplus'
58
-        assert sidebar_entry['label'] == 'Rich Markdown Files'
59
-        assert sidebar_entry['route'] == "/#/workspaces/1/contents?type=pagemarkdownplus"    # nopep8
57
+        assert sidebar_entry['slug'] == 'contents/markdownpluspage'
58
+        assert sidebar_entry['label'] == 'Markdown Plus Documents'
59
+        assert sidebar_entry['route'] == "/#/workspaces/1/contents?type=markdownpluspage"    # nopep8
60 60
         assert sidebar_entry['hexcolor'] == "#f12d2d"
61 61
         assert sidebar_entry['icon'] == "file-code"
62 62
 

+ 5 - 5
tracim/tests/functional/test_workspaces.py View File

@@ -48,16 +48,16 @@ class TestWorkspaceEndpoint(FunctionalTest):
48 48
         assert sidebar_entry['icon'] == ""
49 49
 
50 50
         sidebar_entry = workspace['sidebar_entries'][2]
51
-        assert sidebar_entry['slug'] == 'contents/pagehtml'
51
+        assert sidebar_entry['slug'] == 'contents/htmlpage'
52 52
         assert sidebar_entry['label'] == 'Text Documents'
53
-        assert sidebar_entry['route'] == '/#/workspaces/1/contents?type=pagehtml'  # nopep8
53
+        assert sidebar_entry['route'] == '/#/workspaces/1/contents?type=htmlpage'  # nopep8
54 54
         assert sidebar_entry['hexcolor'] == "#3f52e3"
55 55
         assert sidebar_entry['icon'] == "file-text-o"
56 56
 
57 57
         sidebar_entry = workspace['sidebar_entries'][3]
58
-        assert sidebar_entry['slug'] == 'contents/pagemarkdownplus'
59
-        assert sidebar_entry['label'] == 'Rich Markdown Files'
60
-        assert sidebar_entry['route'] == "/#/workspaces/1/contents?type=pagemarkdownplus"    # nopep8
58
+        assert sidebar_entry['slug'] == 'contents/markdownpluspage'
59
+        assert sidebar_entry['label'] == 'Markdown Plus Documents'
60
+        assert sidebar_entry['route'] == "/#/workspaces/1/contents?type=markdownpluspage"    # nopep8
61 61
         assert sidebar_entry['hexcolor'] == "#f12d2d"
62 62
         assert sidebar_entry['icon'] == "file-code"
63 63