feat(cypress): api base url

Signed-off-by: Rémi Doreau <remi.d45@gmail.com>
This commit is contained in:
Rémi Doreau
2021-05-14 15:30:05 +02:00
parent ba109136a1
commit f57575b6b7
3 changed files with 21 additions and 4 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
{
"baseUrl": "http://localhost:7000",
"baseUrl": "http://localhost:3000",
"integrationFolder": "./src/integration",
"supportFile": "./src/support",
"fixturesFolder": "./src/fixtures",
+4 -3
View File
@@ -15,13 +15,14 @@
*/
/// <reference types="cypress" />
import 'os';
import { API_BASE_URL } from '../settings';
describe('Integrations', () => {
describe('ReadTree', () => {
it('should work for github', () => {
cy.loginAsGuest();
cy.request('POST', '/api/catalog/locations', {
cy.request('POST', `${API_BASE_URL}/api/catalog/locations`, {
target:
'https://github.com/backstage-verification/test-repo/blob/main/**/*',
type: 'url',
@@ -48,7 +49,7 @@ describe('Integrations', () => {
it('should work for gitlab', () => {
cy.loginAsGuest();
cy.request('POST', '/api/catalog/locations', {
cy.request('POST', `${API_BASE_URL}/api/catalog/locations`, {
target:
'https://gitlab.com/backstage-verification/test-repo/-/tree/master/**/*',
type: 'url',
@@ -65,7 +66,7 @@ describe('Integrations', () => {
it('should work for bitbucket', () => {
cy.loginAsGuest();
cy.request('POST', '/api/catalog/locations', {
cy.request('POST', `${API_BASE_URL}/api/catalog/locations`, {
target:
'https://bitbucket.org/backstage-verification/test-repo/src/master/**/*',
type: 'url',
+16
View File
@@ -0,0 +1,16 @@
/*
* Copyright 2021 Spotify AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const API_BASE_URL = 'http://localhost:7000';