Skip to content

Commit

Permalink
refactor(shared): make trackNums start at 1
Browse files Browse the repository at this point in the history
  • Loading branch information
tsa96 committed Aug 31, 2024
1 parent 3f4bbe1 commit 58316d6
Show file tree
Hide file tree
Showing 37 changed files with 267 additions and 374 deletions.
44 changes: 22 additions & 22 deletions apps/backend-e2e/src/admin.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ describe('Admin', () => {
create: {
mapID: map.id,
gamemode: Gamemode.AHOP,
trackNum: 1,
trackNum: 2,
trackType: TrackType.MAIN
}
}
Expand Down Expand Up @@ -966,7 +966,7 @@ describe('Admin', () => {
{
gamemode: Gamemode.RJ,
trackType: TrackType.MAIN,
trackNum: 0,
trackNum: 1,
tier: 1,
type: LeaderboardType.IN_SUBMISSION
}
Expand Down Expand Up @@ -1016,7 +1016,7 @@ describe('Admin', () => {
{
gamemode: Gamemode.RJ,
trackType: TrackType.MAIN,
trackNum: 0,
trackNum: 1,
tier: 5,
type: LeaderboardType.UNRANKED
}
Expand All @@ -1042,7 +1042,7 @@ describe('Admin', () => {
submission: {
suggestions: [
{
trackNum: 0,
trackNum: 1,
trackType: TrackType.MAIN,
gamemode: Gamemode.RJ,
tier: 1,
Expand Down Expand Up @@ -1077,7 +1077,7 @@ describe('Admin', () => {
{
gamemode: Gamemode.RJ,
trackType: TrackType.MAIN,
trackNum: 0,
trackNum: 1,
tier: 5,
type: LeaderboardType.UNRANKED
}
Expand Down Expand Up @@ -1126,7 +1126,7 @@ describe('Admin', () => {
{
gamemode: Gamemode.RJ,
trackType: TrackType.MAIN,
trackNum: 0,
trackNum: 1,
tier: 5,
type: LeaderboardType.UNRANKED
}
Expand All @@ -1150,7 +1150,7 @@ describe('Admin', () => {
name: 'surf_asbestos',
suggestions: [
{
trackNum: 0,
trackNum: 1,
trackType: TrackType.MAIN,
gamemode: Gamemode.BHOP,
tier: 1,
Expand Down Expand Up @@ -1248,7 +1248,7 @@ describe('Admin', () => {
? [
{
gamemode: Gamemode.RJ,
trackNum: 0,
trackNum: 1,
trackType: 0,
tier: 1,
type: LeaderboardType.RANKED
Expand Down Expand Up @@ -1328,7 +1328,7 @@ describe('Admin', () => {
finalLeaderboards: [
{
gamemode: Gamemode.RJ,
trackNum: 0,
trackNum: 1,
trackType: 0,
tier: 1,
type: LeaderboardType.RANKED
Expand Down Expand Up @@ -1390,7 +1390,7 @@ describe('Admin', () => {
{
gamemode: Gamemode.RJ,
trackType: TrackType.MAIN,
trackNum: 0,
trackNum: 1,
tier: 1,
type: LeaderboardType.UNRANKED
}
Expand Down Expand Up @@ -1421,21 +1421,21 @@ describe('Admin', () => {
{
gamemode: Gamemode.RJ,
trackType: TrackType.MAIN,
trackNum: 0,
trackNum: 1,
tier: 5,
type: LeaderboardType.UNRANKED
},
{
gamemode: Gamemode.DEFRAG_VQ3,
trackType: TrackType.BONUS,
trackNum: 0,
trackNum: 1,
tier: 5,
type: LeaderboardType.RANKED
},
{
gamemode: Gamemode.DEFRAG_CPM,
trackType: TrackType.BONUS,
trackNum: 0,
trackNum: 1,
type: LeaderboardType.HIDDEN
}
];
Expand Down Expand Up @@ -1561,7 +1561,7 @@ describe('Admin', () => {
rank: 1,
gamemode: Gamemode.RJ,
trackType: TrackType.MAIN,
trackNum: 0
trackNum: 1
});

await db.createLbRun({
Expand All @@ -1570,7 +1570,7 @@ describe('Admin', () => {
rank: 1,
gamemode: Gamemode.CONC,
trackType: TrackType.MAIN,
trackNum: 0
trackNum: 1
});

expect(
Expand Down Expand Up @@ -1601,7 +1601,7 @@ describe('Admin', () => {
mapID: map.id,
gamemode: Gamemode.RJ,
trackType: TrackType.MAIN,
trackNum: 0,
trackNum: 1,
linear: false,
style: 0,
tier: 5,
Expand All @@ -1612,7 +1612,7 @@ describe('Admin', () => {
mapID: map.id,
gamemode: Gamemode.RJ,
trackType: TrackType.STAGE,
trackNum: 0,
trackNum: 1,
linear: null,
tier: null,
type: LeaderboardType.UNRANKED,
Expand All @@ -1623,7 +1623,7 @@ describe('Admin', () => {
mapID: map.id,
gamemode: Gamemode.RJ,
trackType: TrackType.STAGE,
trackNum: 1,
trackNum: 2,
linear: null,
tier: null,
type: LeaderboardType.UNRANKED,
Expand All @@ -1634,7 +1634,7 @@ describe('Admin', () => {
mapID: map.id,
gamemode: Gamemode.DEFRAG_VQ3,
trackType: TrackType.BONUS,
trackNum: 0,
trackNum: 1,
linear: null,
tier: 5,
type: LeaderboardType.RANKED,
Expand All @@ -1645,7 +1645,7 @@ describe('Admin', () => {
mapID: map.id,
gamemode: Gamemode.DEFRAG_CPM,
trackType: TrackType.BONUS,
trackNum: 0,
trackNum: 1,
linear: null,
tier: null,
type: LeaderboardType.HIDDEN,
Expand Down Expand Up @@ -2032,7 +2032,7 @@ describe('Admin', () => {
suggestions: [
{
trackType: TrackType.MAIN,
trackNum: 0,
trackNum: 1,
gamemode: Gamemode.AHOP,
tier: 10,
gameplayRating: 1
Expand Down Expand Up @@ -2137,7 +2137,7 @@ describe('Admin', () => {
suggestions: [
{
trackType: TrackType.MAIN,
trackNum: 0,
trackNum: 1,
gamemode: Gamemode.AHOP,
tier: 10,
gameplayRating: 1
Expand Down
8 changes: 4 additions & 4 deletions apps/backend-e2e/src/map-review.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('Map Reviews', () => {
suggestions: [
{
trackType: TrackType.MAIN,
trackNum: 0,
trackNum: 1,
gamemode: Gamemode.RJ,
tier: 2,
comment: 'True',
Expand Down Expand Up @@ -156,7 +156,7 @@ describe('Map Reviews', () => {
suggestions: [
{
trackType: TrackType.MAIN,
trackNum: 0,
trackNum: 1,
gamemode: Gamemode.AHOP,
tier: 10,
gameplayRating: 1
Expand Down Expand Up @@ -189,7 +189,7 @@ describe('Map Reviews', () => {
suggestions: [
{
trackType: TrackType.MAIN,
trackNum: 0,
trackNum: 1,
gamemode: Gamemode.AHOP,
tier: 1,
gameplayRating: 10
Expand All @@ -211,7 +211,7 @@ describe('Map Reviews', () => {
suggestions: [
{
trackType: TrackType.MAIN,
trackNum: 1,
trackNum: 2,
gamemode: Gamemode.DEFRAG_CPM,
tier: 1,
gameplayRating: 10
Expand Down
14 changes: 7 additions & 7 deletions apps/backend-e2e/src/maps-2.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1611,7 +1611,7 @@ describe('Maps Part 2', () => {
user,
rank: 1,
trackType: TrackType.MAIN,
trackNum: 0,
trackNum: 1,
style: 0,
gamemode: Gamemode.AHOP
});
Expand All @@ -1631,7 +1631,7 @@ describe('Maps Part 2', () => {
leaderboard: { trackType, trackNum },
totalRuns
} of res.body) {
if (trackType === TrackType.MAIN && trackNum === 0) {
if (trackType === TrackType.MAIN && trackNum === 1) {
expect(totalRuns).toBe(1);
} else {
expect(totalRuns).toBe(0);
Expand Down Expand Up @@ -1662,7 +1662,7 @@ describe('Maps Part 2', () => {
suggestions: [
{
trackType: TrackType.MAIN,
trackNum: 0,
trackNum: 1,
gamemode: Gamemode.SURF,
tier: 2,
comment: 'What',
Expand All @@ -1683,7 +1683,7 @@ describe('Maps Part 2', () => {
suggestions: [
{
trackType: TrackType.MAIN,
trackNum: 0,
trackNum: 1,
gamemode: Gamemode.SURF,
tier: 9,
comment: 'The second ramp gave me cholera',
Expand Down Expand Up @@ -1910,7 +1910,7 @@ describe('Maps Part 2', () => {
{
gamemode: Gamemode.AHOP,
trackType: 0,
trackNum: 0,
trackNum: 1,
tier: 1,
gameplayRating: 1
}
Expand Down Expand Up @@ -1955,7 +1955,7 @@ describe('Maps Part 2', () => {
{
gamemode: Gamemode.AHOP,
trackType: 0,
trackNum: 0,
trackNum: 1,
tier: 1,
gameplayRating: 1
}
Expand All @@ -1977,7 +1977,7 @@ describe('Maps Part 2', () => {
{
gamemode: Gamemode.AHOP,
trackType: 0,
trackNum: 0,
trackNum: 1,
tier: 1,
gameplayRating: 1
}
Expand Down
Loading

0 comments on commit 58316d6

Please sign in to comment.