Skip to content

Commit

Permalink
test(): added e2e test for bitbucket integration and refactored tests…
Browse files Browse the repository at this point in the history
… for github
  • Loading branch information
Izak88 authored and jkuri committed Aug 2, 2017
1 parent 00e2bc6 commit 426ce0b
Show file tree
Hide file tree
Showing 82 changed files with 2,879 additions and 4,358 deletions.
4 changes: 2 additions & 2 deletions e2e/040_repositories.e2e.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { browser, by, element } from 'protractor';
import { isLoaded, login, logout } from './utils';
import { request, header } from '../tests/e2e/webhooks/github/PingEvent';
import { sendRequest } from '../tests/e2e/utils/utils';
import { sendGitHubRequest } from '../tests/e2e/utils/utils';

describe('Repositories', () => {

Expand All @@ -22,7 +22,7 @@ describe('Repositories', () => {
});

it('should add repository bterm (send ping event)', () => {
return sendRequest(request, header)
return sendGitHubRequest(request, header)
.then(() => browser.get('/repositories'))
.then((): any => isLoaded())
.then((): any => browser.wait(() => element(by.css('.bold')).isPresent()))
Expand Down
8 changes: 4 additions & 4 deletions e2e/050_builds.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { request as pushEventRequest, header as pushEventHeader }
from '../tests/e2e/webhooks/github/PushEvent';
import { requestOpened, requestReopened, header as pullRequestHeader }
from '../tests/e2e/webhooks/github/PullRequestEvent';
import { sendRequest } from '../tests/e2e/utils/utils';
import { sendGitHubRequest } from '../tests/e2e/utils/utils';

describe('Builds', () => {

Expand All @@ -27,7 +27,7 @@ describe('Builds', () => {
});

it('should start new build (send push event)', () => {
return sendRequest(pushEventRequest, pushEventHeader)
return sendGitHubRequest(pushEventRequest, pushEventHeader)
.then(() => browser.get('/'))
.then((): any => isLoaded())
.then((): any => browser.wait(() => element(by.css('.list-item')).isPresent()));
Expand Down Expand Up @@ -60,7 +60,7 @@ describe('Builds', () => {
});

it('should start new build (send open_pull_request event)', () => {
return sendRequest(requestOpened, pullRequestHeader)
return sendGitHubRequest(requestOpened, pullRequestHeader)
.then(() => browser.get('/'))
.then((): any => browser.wait(() => element(by.css('.list-item')).isPresent()))
.then((): any => browser.wait(() => {
Expand Down Expand Up @@ -91,7 +91,7 @@ describe('Builds', () => {
});

it('should start new build (send reopen_pull_request event)', () => {
return sendRequest(requestReopened, pullRequestHeader)
return sendGitHubRequest(requestReopened, pullRequestHeader)
.then(() => browser.get('/'))
.then((): any => browser.wait(() => element(by.css('.list-item')).isPresent()))
.then((): any => browser.wait(() => {
Expand Down
4 changes: 2 additions & 2 deletions e2e/060_build.e2e.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { browser, by, element, ExpectedConditions } from 'protractor';
import { isLoaded, login, logout, delay } from './utils';
import { request, header } from '../tests/e2e/webhooks/github/PushEvent';
import { sendRequest } from '../tests/e2e/utils/utils';
import { sendGitHubRequest } from '../tests/e2e/utils/utils';

describe('Build', () => {

Expand All @@ -16,7 +16,7 @@ describe('Build', () => {
});

it('should start new build (send open_pull_request event)', () => {
return sendRequest(request, header)
return sendGitHubRequest(request, header)
.then(() => browser.get('/'))
.then((): any => browser.wait(() => element(by.css('.list-item')).isPresent()))
.then((): any => browser.wait(() => {
Expand Down
Loading

0 comments on commit 426ce0b

Please sign in to comment.