GH Actions: F/E e2e Test (2)

This commit is contained in:
ADAMJR 2021-11-09 13:21:41 +00:00
parent 711ea61d68
commit 81ddfe9d54
6 changed files with 10 additions and 3 deletions

View File

@ -65,6 +65,7 @@ jobs:
browser: chrome
working-directory: ./frontend
start: npm start
wait-on: http://localhost:3000, http://localhost:4200
deploy-frontend:
name: Deploy Frontend

View File

@ -43,6 +43,10 @@ export const Channel = model<ChannelDocument>('channel', new Schema({
type: String,
maxlength: [128, 'Summary too long'],
},
position: {
type: Number,
min: [0, 'Position must be greater than 0'],
},
type: {
type: String,
required: [true, 'Type is required'],

View File

@ -1,5 +1,6 @@
{
"env": {
"PORT": 4200
"PORT": 4200,
"URL": "http://localhost"
}
}

View File

@ -3,7 +3,7 @@ const chance = new Chance();
describe('essential navigation flow', () => {
let token: string;
const url = `http://10.1.0.73:${Cypress.env('PORT')}`;
const url = `${Cypress.env('URL')}:${Cypress.env('PORT')}`;
const email = chance.email();
const username = chance.name();
const password = chance.string({ length: 16 });

View File

@ -1,7 +1,7 @@
import { Chance } from 'chance';
const chance = new Chance();
const url = `http://10.1.0.73:${Cypress.env('PORT')}`;
const url = `${Cypress.env('URL')}:${Cypress.env('PORT')}`;
let token: string;
Cypress.Commands.add('register', (email = chance.email(), password = chance.string()) => {

1
types/entity.d.ts vendored
View File

@ -17,6 +17,7 @@ declare namespace Entity {
lastMessageId?: null | string;
type: ChannelTypes.Type;
overrides?: ChannelTypes.Override[];
position: number;
}
export interface Guild {
id: string;