This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • development/sharing/codeability-sharing-platform
1 result
Show changes
Showing
with 168 additions and 226 deletions
......@@ -97,7 +97,7 @@
<span jhiTranslate="search.noResults">No results found</span>
</div>
<div *ngIf="hitCount !== 0">
<span>{{ 'search.numberResults' | translate: { length: hitCount } }}</span>
<span>{{ 'search.numberResults' | translate : { length: hitCount } }}</span>
</div>
<div class="row">
<jhi-exercise-card
......
......@@ -26,17 +26,15 @@ describe('Home Component', () => {
imageUrl: null,
};
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
imports: [RouterTestingModule.withRoutes([])],
declarations: [HomeComponent],
providers: [AccountService],
})
.overrideTemplate(HomeComponent, '')
.compileComponents();
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [RouterTestingModule.withRoutes([])],
declarations: [HomeComponent],
providers: [AccountService],
})
);
.overrideTemplate(HomeComponent, '')
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(HomeComponent);
......
......@@ -27,26 +27,24 @@ describe('MainComponent', () => {
routerState = routerState;
}
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
imports: [HttpClientTestingModule, TranslateModule.forRoot()],
declarations: [MainComponent],
providers: [
Title,
LocalStorageService,
SessionStorageService,
AccountService,
{
provide: Router,
useClass: MockRouter,
},
],
})
.overrideTemplate(MainComponent, '')
.compileComponents();
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [HttpClientTestingModule, TranslateModule.forRoot()],
declarations: [MainComponent],
providers: [
Title,
LocalStorageService,
SessionStorageService,
AccountService,
{
provide: Router,
useClass: MockRouter,
},
],
})
);
.overrideTemplate(MainComponent, '')
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MainComponent);
......
......@@ -41,21 +41,19 @@ describe('ReviewMenuBadgeComponent Component', () => {
let httpMock: HttpTestingController;
let applicationConfigService: ApplicationConfigService;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
HttpClientTestingModule,
RouterTestingModule.withRoutes([]),
ReactiveFormsModule,
TranslateModule.forRoot(),
NgxWebstorageModule.forRoot(),
],
declarations: [ReviewMenuBadgeComponent],
providers: [LoginService, ReviewManagementService],
}).compileComponents();
})
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
HttpClientTestingModule,
RouterTestingModule.withRoutes([]),
ReactiveFormsModule,
TranslateModule.forRoot(),
NgxWebstorageModule.forRoot(),
],
declarations: [ReviewMenuBadgeComponent],
providers: [LoginService, ReviewManagementService],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ReviewMenuBadgeComponent);
......@@ -88,21 +86,19 @@ describe('ReviewRequestedMenuBadge Component', () => {
let httpMock: HttpTestingController;
let applicationConfigService: ApplicationConfigService;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
HttpClientTestingModule,
RouterTestingModule.withRoutes([]),
ReactiveFormsModule,
TranslateModule.forRoot(),
NgxWebstorageModule.forRoot(),
],
declarations: [ReviewMenuBadgeComponent],
providers: [LoginService, ReviewManagementService],
}).compileComponents();
})
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
HttpClientTestingModule,
RouterTestingModule.withRoutes([]),
ReactiveFormsModule,
TranslateModule.forRoot(),
NgxWebstorageModule.forRoot(),
],
declarations: [ReviewMenuBadgeComponent],
providers: [LoginService, ReviewManagementService],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ReviewRequestedMenuBadgeComponent);
......@@ -133,21 +129,19 @@ describe('ImprovementsRequestedMenuBadge Component', () => {
let httpMock: HttpTestingController;
let applicationConfigService: ApplicationConfigService;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
HttpClientTestingModule,
RouterTestingModule.withRoutes([]),
ReactiveFormsModule,
TranslateModule.forRoot(),
NgxWebstorageModule.forRoot(),
],
declarations: [ReviewMenuBadgeComponent],
providers: [LoginService, ReviewManagementService],
}).compileComponents();
})
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
HttpClientTestingModule,
RouterTestingModule.withRoutes([]),
ReactiveFormsModule,
TranslateModule.forRoot(),
NgxWebstorageModule.forRoot(),
],
declarations: [ReviewMenuBadgeComponent],
providers: [LoginService, ReviewManagementService],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ImprovementsRequestedMenuBadgeComponent);
......@@ -178,21 +172,19 @@ describe('BadgeAwardedMenuBadge Component', () => {
let httpMock: HttpTestingController;
let applicationConfigService: ApplicationConfigService;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
HttpClientTestingModule,
RouterTestingModule.withRoutes([]),
ReactiveFormsModule,
TranslateModule.forRoot(),
NgxWebstorageModule.forRoot(),
],
declarations: [ReviewMenuBadgeComponent],
providers: [LoginService, ReviewManagementService],
}).compileComponents();
})
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
HttpClientTestingModule,
RouterTestingModule.withRoutes([]),
ReactiveFormsModule,
TranslateModule.forRoot(),
NgxWebstorageModule.forRoot(),
],
declarations: [ReviewMenuBadgeComponent],
providers: [LoginService, ReviewManagementService],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(BadgeAwardedMenuBadgeComponent);
......
......@@ -32,23 +32,21 @@ describe('Navbar Component', () => {
imageUrl: '',
};
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
HttpClientTestingModule,
RouterTestingModule.withRoutes([]),
ReactiveFormsModule,
TranslateModule.forRoot(),
NgxWebstorageModule.forRoot(),
],
declarations: [NavbarComponent],
providers: [LoginService],
})
.overrideTemplate(NavbarComponent, '')
.compileComponents();
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
HttpClientTestingModule,
RouterTestingModule.withRoutes([]),
ReactiveFormsModule,
TranslateModule.forRoot(),
NgxWebstorageModule.forRoot(),
],
declarations: [NavbarComponent],
providers: [LoginService],
})
);
.overrideTemplate(NavbarComponent, '')
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(NavbarComponent);
......
......@@ -13,16 +13,14 @@ describe('Page Ribbon Component', () => {
let fixture: ComponentFixture<PageRibbonComponent>;
let profileService: ProfileService;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
imports: [HttpClientTestingModule, TranslateModule.forRoot()],
declarations: [PageRibbonComponent],
})
.overrideTemplate(PageRibbonComponent, '')
.compileComponents();
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [HttpClientTestingModule, TranslateModule.forRoot()],
declarations: [PageRibbonComponent],
})
);
.overrideTemplate(PageRibbonComponent, '')
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PageRibbonComponent);
......
......@@ -21,26 +21,24 @@ describe('LoginComponent', () => {
let mockAccountService: AccountService;
let mockLoginService: LoginService;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
imports: [HttpClientTestingModule, RouterTestingModule.withRoutes([])],
declarations: [LoginComponent],
providers: [
FormBuilder,
AccountService,
{
provide: LoginService,
useValue: {
login: jest.fn(() => of({})),
},
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [HttpClientTestingModule, RouterTestingModule.withRoutes([])],
declarations: [LoginComponent],
providers: [
FormBuilder,
AccountService,
{
provide: LoginService,
useValue: {
login: jest.fn(() => of({})),
},
],
})
.overrideTemplate(LoginComponent, '')
.compileComponents();
},
],
})
);
.overrideTemplate(LoginComponent, '')
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(LoginComponent);
......
......@@ -8,7 +8,7 @@
<span jhiTranslate="search.noResults">No results found</span>
</div>
<div *ngIf="hitCount !== 0">
<span id="numberOfResults">{{ 'search.numberResults' | translate: { length: hitCount } }}</span>
<span id="numberOfResults">{{ 'search.numberResults' | translate : { length: hitCount } }}</span>
</div>
<div>
<span *ngIf="!accountService.isAuthenticated()" jhiTranslate="search.noResultsAnonymous">Anmelden?</span>
......
......@@ -13,17 +13,15 @@ describe('Alert Error Component', () => {
let eventManager: EventManager;
let alertService: AlertService;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
imports: [TranslateModule.forRoot()],
declarations: [AlertErrorComponent],
providers: [EventManager, AlertService],
})
.overrideTemplate(AlertErrorComponent, '')
.compileComponents();
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [TranslateModule.forRoot()],
declarations: [AlertErrorComponent],
providers: [EventManager, AlertService],
})
);
.overrideTemplate(AlertErrorComponent, '')
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AlertErrorComponent);
......
......@@ -11,16 +11,14 @@ describe('Alert Component', () => {
let fixture: ComponentFixture<AlertComponent>;
let mockAlertService: AlertService;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [AlertComponent],
providers: [AlertService],
})
.overrideTemplate(AlertComponent, '')
.compileComponents();
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [AlertComponent],
providers: [AlertService],
})
);
.overrideTemplate(AlertComponent, '')
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AlertComponent);
......
......@@ -22,14 +22,12 @@ describe('HasAnyAuthorityDirective tests', () => {
let mockAccountService: AccountService;
const authenticationState = new Subject<Account | null>();
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [HasAnyAuthorityDirective, TestHasAnyAuthorityDirectiveComponent],
providers: [AccountService],
});
})
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [HasAnyAuthorityDirective, TestHasAnyAuthorityDirectiveComponent],
providers: [AccountService],
});
}));
beforeEach(() => {
mockAccountService = TestBed.inject(AccountService);
......
......@@ -13,14 +13,12 @@ describe('TranslateDirective Tests', () => {
let fixture: ComponentFixture<TestTranslateDirectiveComponent>;
let translateService: TranslateService;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
imports: [TranslateModule.forRoot()],
declarations: [TranslateDirective, TestTranslateDirectiveComponent],
});
})
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [TranslateModule.forRoot()],
declarations: [TranslateDirective, TestTranslateDirectiveComponent],
});
}));
beforeEach(() => {
translateService = TestBed.inject(TranslateService);
......
......@@ -9,14 +9,12 @@ describe('ItemCountComponent test', () => {
let comp: ItemCountComponent;
let fixture: ComponentFixture<ItemCountComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
imports: [TranslateModule.forRoot()],
declarations: [ItemCountComponent, TranslateDirective],
}).compileComponents();
})
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [TranslateModule.forRoot()],
declarations: [ItemCountComponent, TranslateDirective],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ItemCountComponent);
......
......@@ -13,90 +13,60 @@ angular-tag-cloud.teaserCloud {
div.ng-tag-cloud a {
font-size: inherit;
text-decoration: none;
color: inherit;
}
div.ng-tag-cloud span.w10 {
font-size: 550%;
color: #0cf;
}
div.ng-tag-cloud span.w9 {
font-size: 500%;
color: #0cf;
}
div.ng-tag-cloud span.w8 {
font-size: 450%;
color: #0cf;
}
div.ng-tag-cloud span.w7 {
font-size: 400%;
color: #39d;
}
div.ng-tag-cloud span.w6 {
font-size: 350%;
color: #90c5f0;
}
div.ng-tag-cloud span.w5 {
font-size: 300%;
color: #90a0dd;
}
div.ng-tag-cloud span.w4 {
font-size: 250%;
color: #90c5f0;
}
div.ng-tag-cloud span.w3 {
font-size: 200%;
color: #a0ddff;
}
div.ng-tag-cloud span.w2 {
font-size: 150%;
color: #99ccee;
}
div.ng-tag-cloud span.w1 {
font-size: 100%;
color: #aab5f0;
}
/* colors */
/* colors and layout */
div.ng-tag-cloud {
color: #09f;
}
div.ng-tag-cloud a {
color: inherit;
}
div.ng-tag-cloud a:hover {
color: #0df;
overflow: hidden;
position: relative;
}
div.ng-tag-cloud a:hover {
color: #0cf;
}
div.ng-tag-cloud span.w10 {
color: #0cf;
}
div.ng-tag-cloud span.w9 {
color: #0cf;
}
div.ng-tag-cloud span.w8 {
color: #0cf;
}
div.ng-tag-cloud span.w7 {
color: #39d;
}
div.ng-tag-cloud span.w6 {
color: #90c5f0;
}
div.ng-tag-cloud span.w5 {
color: #90a0dd;
}
div.ng-tag-cloud span.w4 {
color: #90c5f0;
}
div.ng-tag-cloud span.w3 {
color: #a0ddff;
}
div.ng-tag-cloud span.w2 {
color: #99ccee;
}
div.ng-tag-cloud span.w1 {
color: #aab5f0;
}
/* layout */
div.ng-tag-cloud {
overflow: hidden;
position: relative;
}
div.ng-tag-cloud span {
padding: 0;
......
......@@ -4,7 +4,6 @@ import static org.assertj.core.api.Assertions.assertThat;
import at.ac.uibk.gitsearch.GitsearchApp;
import at.ac.uibk.gitsearch.service.ZipRepackagingServiceTest.MockedSingletonTreeNodeForFiltering;
import io.netty.util.internal.StringUtil;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
......@@ -14,6 +13,7 @@ import java.util.stream.Collectors;
import java.util.stream.Stream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import org.apache.commons.lang3.StringUtils;
import org.junit.Assert;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
......@@ -47,7 +47,7 @@ class ZipRepackagingServiceIT {
final List<String> zippedEntries = getZippedEntries(new ZipInputStream(this.getClass().getResourceAsStream(TEST_ZIP_LOCATION)))
.stream()
.map(s -> s.substring("junit-quality-tests-exercise-master".length() + 1))
.filter(s -> !StringUtil.isNullOrEmpty(s))
.filter(s -> !StringUtils.isEmpty(s))
.collect(Collectors.toList());
final InputStream resourceStream = this.getClass().getResourceAsStream(TEST_ZIP_LOCATION);
......
......@@ -311,14 +311,14 @@ class StatisticsResourceIT {
restStatisticsMockMvc.perform(get("/api/statistics/exercise/{id}", "143").with(csrf().asHeader())).andExpect(status().isOk());
//wait for the statistics to be created
// Thread.sleep(1000);
assertEquals(statisticsService.findOneByExerciseID("143").get().getExerciseID(), "143");
assertEquals("143", statisticsService.findOneByExerciseID("143").get().getExerciseID());
//Do the same call again to see if the statisticsService understood that the entity already exists and it only needs to increase the views
restStatisticsMockMvc.perform(get("/api/statistics/exercise/{id}", "143").with(csrf().asHeader())).andExpect(status().isOk());
//wait for the statistics to be created
// Thread.sleep(1000);
assertEquals(statisticsService.findOneByExerciseID("143").get().getViews(), 2);
assertEquals(2, statisticsService.findOneByExerciseID("143").get().getViews());
//Test the search for an id which does not exist
assertEquals(Optional.empty(), statisticsService.findOneByExerciseID("notThere"));
......
<?xml version="1.0" encoding="UTF-8"?>
<con:soapui-project id="e5e6ec50-ebc6-40b2-b869-94fd32b98793" activeEnvironment="Default" name="localhost:29200" resourceRoot="" soapui-version="5.7.0" xmlns:con="http://eviware.com/soapui/config"><con:settings/><con:interface xsi:type="con:RestService" id="5e1934cd-82a4-4bba-9ac0-cca93457c9fb" wadlVersion="http://wadl.dev.java.net/2009/02" name="http://localhost:29200" type="rest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache/><con:endpoints><con:endpoint>http://localhost:29200</con:endpoint></con:endpoints><con:resource name="" path="/metadata/_search?pretty" id="b3276207-be96-4f21-8069-7490845e0d2e"><con:settings/><con:parameters/><con:method name="1" id="af5694fe-1ad1-4f25-989b-bd826e1a04b2" method="POST"><con:settings/><con:parameters/><con:representation type="REQUEST"><con:mediaType>application/json</con:mediaType><con:params/></con:representation><con:representation type="FAULT"><con:mediaType>application/json; charset=UTF-8</con:mediaType><con:status>400</con:status><con:params/><con:element xmlns:_se="http://localhost/metadata/_search/">_se:Fault</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>application/json; charset=UTF-8</con:mediaType><con:status>200</con:status><con:params/><con:element xmlns:_se="http://localhost/metadata/_search/">_se:Response</con:element></con:representation><con:request name="Request 1" id="ee6d6b05-b9a9-4d5d-99e2-d4b2cfb1c92c" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://localhost:29200</con:endpoint><con:request>{
<con:soapui-project id="e5e6ec50-ebc6-40b2-b869-94fd32b98793" activeEnvironment="Default" name="localhost:29200" resourceRoot="" soapui-version="5.7.2" abortOnError="false" runType="SEQUENTIAL" xmlns:con="http://eviware.com/soapui/config"><con:settings/><con:interface xsi:type="con:RestService" id="5e1934cd-82a4-4bba-9ac0-cca93457c9fb" wadlVersion="http://wadl.dev.java.net/2009/02" name="http://localhost:29200" type="rest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart=""/><con:endpoints><con:endpoint>http://localhost:39200</con:endpoint></con:endpoints><con:resource name="" path="/metadata/_search?pretty" id="b3276207-be96-4f21-8069-7490845e0d2e"><con:settings/><con:parameters/><con:method name="1" id="af5694fe-1ad1-4f25-989b-bd826e1a04b2" method="POST"><con:settings/><con:parameters/><con:representation type="REQUEST"><con:mediaType>application/json</con:mediaType><con:params/></con:representation><con:representation type="FAULT"><con:mediaType>application/json; charset=UTF-8</con:mediaType><con:status>400</con:status><con:params/><con:element xmlns:_se="http://localhost/metadata/_search/">_se:Fault</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>application/json; charset=UTF-8</con:mediaType><con:status>200</con:status><con:params/><con:element xmlns:_se="http://localhost/metadata/_search/">_se:Response</con:element></con:representation><con:request name="Request 1" id="ee6d6b05-b9a9-4d5d-99e2-d4b2cfb1c92c" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:endpoint>http://localhost:29200</con:endpoint><con:request>{
"query": {
"term": {
"metadata.language": "de"
......