Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
f84a59a
feat: add claim bounty test
sachintom999 May 30, 2024
2badb53
feat: added test for bounty claim
sachintom999 Jun 3, 2024
6d9525c
merge: merging main branch
sachintom999 Jun 3, 2024
c060b84
fix: fixed import error
sachintom999 Jun 3, 2024
c679f03
feat: refactored tests to function based, added fixtures
sachintom999 Jun 10, 2024
027a246
chore: added black formatting
sachintom999 Jun 10, 2024
6de1c80
chore: added black formatting to files
sachintom999 Jun 10, 2024
3d870f0
merge: merging main branch
sachintom999 Jun 10, 2024
13bbd18
chore: added black formatting to files
sachintom999 Jun 10, 2024
c8652ce
fix: increased page timeout for db operation to complete
sachintom999 Jun 10, 2024
1ba4817
fix: increase timeout
sachintom999 Jun 10, 2024
4f0c31f
Update test_claim_bounty.py
endalkh Jun 12, 2024
65671ff
feat: merge the e2e test
endalkh Jun 12, 2024
a02eff0
feat: add e2e folder
endalkh Jun 12, 2024
18a70a4
feat: add e2e folder
endalkh Jun 12, 2024
2921632
Merge branch 'main' of https://github.com/OpenUnited/platform into pa…
endalkh Jun 19, 2024
b9ed940
fix: e2e issues
endalkh Jun 19, 2024
d356079
fix: e2e issues
endalkh Jun 19, 2024
e551bc8
fix: e2e issues
endalkh Jun 19, 2024
30aefca
fix: e2e issues
endalkh Jun 19, 2024
2433699
fix: e2e issues
endalkh Jun 19, 2024
6aa2af0
fix: e2e issues
endalkh Jun 19, 2024
47cd3e9
fix: e2e issues
endalkh Jun 19, 2024
1941df6
fix: e2e issues
endalkh Jun 19, 2024
4a0ca05
fix: e2e issues
endalkh Jun 19, 2024
f2a6292
fix: e2e issues
endalkh Jun 19, 2024
c22b0a4
fix: e2e issues
endalkh Jun 19, 2024
5b6364d
fix: e2e issues
endalkh Jun 19, 2024
58b76c2
fix: e2e issues
endalkh Jun 19, 2024
fb880c8
fix: e2e issues
endalkh Jun 19, 2024
021d563
fix: e2e issues
endalkh Jun 19, 2024
44cf0fb
fix: e2e issues
endalkh Jun 19, 2024
d598370
fix: e2e issues
endalkh Jun 19, 2024
0596ce7
fix: e2e issues
endalkh Jun 19, 2024
7d157b9
fix: e2e issues
endalkh Jun 20, 2024
6382709
Merge branch 'main' of https://github.com/OpenUnited/platform into pa…
endalkh Jun 20, 2024
1d41321
fix: e2e issues
endalkh Jun 20, 2024
6629286
fix: e2e issues
endalkh Jun 20, 2024
0592196
fix: e2e issues
endalkh Jun 20, 2024
db0f6f6
fix: e2e issues
endalkh Jun 20, 2024
feaa09b
fix: e2e issues
endalkh Jun 20, 2024
7bda5f7
fix: e2e issues
endalkh Jun 20, 2024
f4fe0e0
fix: e2e issues
endalkh Jun 20, 2024
c23e985
fix: e2e issues
endalkh Jun 20, 2024
7be1de8
fix: e2e issues
endalkh Jun 20, 2024
8ff6944
fix: e2e issues
endalkh Jun 20, 2024
3a909f6
fix: e2e issues
endalkh Jun 20, 2024
0a5f54c
fix: e2e issues
endalkh Jun 20, 2024
1778712
fix: e2e issues
endalkh Jun 20, 2024
11b1430
fix: e2e issues
endalkh Jun 20, 2024
a23128a
fix: e2e issues
endalkh Jun 20, 2024
ad71ebb
fix: e2e issues
endalkh Jun 20, 2024
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
Prev Previous commit
Next Next commit
chore: added black formatting to files
  • Loading branch information
sachintom999 committed Jun 10, 2024
commit 6de1c807e4502af8e23be7a66a86dead27525f10
12 changes: 3 additions & 9 deletions apps/commerce/migrations/0002_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name="productaccountcredit",
name="actioned_by",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="talent.person"
),
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="talent.person"),
),
migrations.AddField(
model_name="productaccountcredit",
Expand Down Expand Up @@ -203,16 +201,12 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name="contributoraccount",
name="owner",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="talent.person"
),
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="talent.person"),
),
migrations.AddField(
model_name="cart",
name="creator",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="talent.person"
),
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="talent.person"),
),
migrations.AddField(
model_name="cart",
Expand Down
14 changes: 8 additions & 6 deletions apps/product_management/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,12 +568,14 @@ class Meta:
exclude = ["created_by"]

widgets = {
"title": forms.TextInput(attrs={
"class": (
"block w-full rounded-md border-0 p-2 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300"
" focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:max-w-xs sm:text-sm sm:leading-6"
)
}),
"title": forms.TextInput(
attrs={
"class": (
"block w-full rounded-md border-0 p-2 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300"
" focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:max-w-xs sm:text-sm sm:leading-6"
)
}
),
"effective_date": forms.DateInput(
attrs={
"type": "date",
Expand Down
4 changes: 1 addition & 3 deletions apps/product_management/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,7 @@ class Migration(migrations.Migration):
("uuid", models.UUIDField(default=uuid.uuid4, editable=False)),
(
"photo",
models.ImageField(
blank=True, null=True, upload_to="avatars/"
),
models.ImageField(blank=True, null=True, upload_to="avatars/"),
),
("name", models.TextField()),
("short_description", models.TextField()),
Expand Down
8 changes: 2 additions & 6 deletions apps/product_management/migrations/0002_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name="idea",
name="person",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="talent.person"
),
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="talent.person"),
),
migrations.AddField(
model_name="idea",
Expand Down Expand Up @@ -228,9 +226,7 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name="bounty",
name="expertise",
field=models.ManyToManyField(
related_name="bounty_expertise", to="talent.expertise"
),
field=models.ManyToManyField(related_name="bounty_expertise", to="talent.expertise"),
),
migrations.AddField(
model_name="bounty",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name="product",
name="photo",
field=models.ImageField(
blank=True, null=True, upload_to="products/"
),
field=models.ImageField(blank=True, null=True, upload_to="products/"),
),
]
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name="capability",
name="description",
field=models.TextField(
blank=True, default="", max_length=1000, null=True
),
field=models.TextField(blank=True, default="", max_length=1000, null=True),
),
]
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ class Migration(migrations.Migration):
(
"id",
models.UUIDField(
default=uuid.UUID(
"09332c8a-0484-43c7-b283-42e07798686e"
),
default=uuid.UUID("09332c8a-0484-43c7-b283-42e07798686e"),
primary_key=True,
serialize=False,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name="productareaattachment",
name="file",
field=models.FileField(
blank=True, null=True, upload_to="attachments"
),
field=models.FileField(blank=True, null=True, upload_to="attachments"),
),
migrations.RemoveField(
model_name="productareaattachment",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,15 @@
def forward_func(apps, schema_editor):
Bounty = apps.get_model("product_management.Bounty")
for bounty in Bounty.objects.all():
expertise_as_str = ", ".join(
[exp.name.title() for exp in bounty.expertise.all()]
)
expertise_as_str = ", ".join([exp.name.title() for exp in bounty.expertise.all()])
skill_name = ""
if expertise_as_str:
expertise_as_str = f"({expertise_as_str})"

if bounty.skill:
skill_name = bounty.skill.name

bounty.title = (
f"{skill_name} {expertise_as_str} - {bounty.challenge.title}"
)
bounty.title = f"{skill_name} {expertise_as_str} - {bounty.challenge.title}"
bounty.save()


Expand Down
16 changes: 13 additions & 3 deletions apps/product_management/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,17 @@
from apps.talent.utils import serialize_skills
from apps.utility import utils as global_utils

from .models import Bounty, Bug, Challenge, ProductContributorAgreementTemplate, Idea, IdeaVote, Initiative, Product, ProductArea
from .models import (
Bounty,
Bug,
Challenge,
ProductContributorAgreementTemplate,
Idea,
IdeaVote,
Initiative,
Product,
ProductArea,
)


class ProductListView(ListView):
Expand Down Expand Up @@ -63,7 +73,7 @@ def get_context_data(self, **kwargs):
context["can_modify_product"] = False

context["challenges"] = challenges
context["tree_data"] = [utils.serialize_tree(node) for node in ProductArea.get_root_nodes()]
context["tree_data"] = [utils.serialize_tree(node) for node in ProductArea.get_root_nodes()]
return context


Expand Down Expand Up @@ -1302,7 +1312,7 @@ def post(self, request, *args, **kwargs):
instance = form.save(commit=False)
instance.created_by = request.user.person
instance.save()

messages.success(request, "The contribution agreement is successfully created!")

self.success_url = reverse(
Expand Down
4 changes: 1 addition & 3 deletions apps/security/migrations/0002_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name="productroleassignment",
name="person",
field=models.OneToOneField(
on_delete=django.db.models.deletion.CASCADE, to="talent.person"
),
field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to="talent.person"),
),
migrations.AddField(
model_name="productroleassignment",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name="productroleassignment",
name="person",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="talent.person"
),
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="talent.person"),
),
]
8 changes: 2 additions & 6 deletions apps/talent/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ class Migration(migrations.Migration):
("preferred_name", models.CharField(max_length=128)),
(
"photo",
models.ImageField(
blank=True, null=True, upload_to="avatars/"
),
models.ImageField(blank=True, null=True, upload_to="avatars/"),
),
("headline", models.TextField()),
("overview", models.TextField(blank=True)),
Expand Down Expand Up @@ -208,9 +206,7 @@ class Migration(migrations.Migration):
("website", models.CharField(max_length=200)),
(
"type",
models.IntegerField(
choices=[(0, "Personal"), (1, "Company")]
),
models.IntegerField(choices=[(0, "Personal"), (1, "Company")]),
),
(
"person",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name="bountydeliveryattempt",
name="person",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="talent.person"
),
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="talent.person"),
),
migrations.DeleteModel(
name="BountyDeliveryAttachment",
Expand Down