Compare commits
1 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
3b6666ef4a | 3 years ago |
@ -0,0 +1,22 @@ |
||||
import { defineConfig } from 'cypress' |
||||
|
||||
export default defineConfig({ |
||||
e2e: { |
||||
setupNodeEvents(on, config) { |
||||
console.log(config) // see everything in here!
|
||||
|
||||
// modify config values
|
||||
config.defaultCommandTimeout = 10000 |
||||
config.baseUrl = 'https://insports.tv' |
||||
|
||||
// modify env var value
|
||||
config.env.ENV = 'staging' |
||||
config.env.EMAIL = 'manager@um-teh.ru' |
||||
config.env.PASS = '12345678' |
||||
config.env.DOMAIN = 'insports.tv' |
||||
|
||||
// IMPORTANT return the updated config object
|
||||
return config |
||||
}, |
||||
}, |
||||
}) |
||||
@ -0,0 +1,20 @@ |
||||
/// <reference types="cypress" />
|
||||
|
||||
describe('check auth page', () => { |
||||
beforeEach(() => { |
||||
cy.visit(`https://auth.${Cypress.env('DOMAIN')}/authorize?client_id=insports-ott-web&redirect_uri=https%3A%2F%2Finsports.tv%2Fredirect&response_type=id_token%20token&scope=openid&state=9132f8d339bb4f07b6ad48d0a4b32664&nonce=fcf22b26396c4424b1c88ea23d62f6e9&response_mode=query&lang=en`) |
||||
}) |
||||
|
||||
it('displays email and password inputs and authorization', () => { |
||||
cy.get('input[name="email"]').clear().type(Cypress.env('EMAIL')) |
||||
cy.get('input[name="password"]').clear().type(Cypress.env('PASS')) |
||||
cy.get('form').submit() |
||||
cy.url().should('contain', `https://${Cypress.env('DOMAIN')}/?date=`) |
||||
cy.getAllLocalStorage() |
||||
.then((result) => { |
||||
expect(result[`https://${Cypress.env('DOMAIN')}`].token).to.not.be.null |
||||
}).end() |
||||
// .clearLocalStorage('token')
|
||||
// .clearCookie('access_token')
|
||||
}) |
||||
}) |
||||
@ -0,0 +1,5 @@ |
||||
{ |
||||
"name": "Using fixtures to represent data", |
||||
"email": "hello@cypress.io", |
||||
"body": "Fixtures are a great way to mock data for responses to routes" |
||||
} |
||||
@ -0,0 +1,5 @@ |
||||
{ |
||||
"id": 8739, |
||||
"name": "Jane", |
||||
"email": "jane@example.com" |
||||
} |
||||
@ -0,0 +1,232 @@ |
||||
[ |
||||
{ |
||||
"id": 1, |
||||
"name": "Leanne Graham", |
||||
"username": "Bret", |
||||
"email": "Sincere@april.biz", |
||||
"address": { |
||||
"street": "Kulas Light", |
||||
"suite": "Apt. 556", |
||||
"city": "Gwenborough", |
||||
"zipcode": "92998-3874", |
||||
"geo": { |
||||
"lat": "-37.3159", |
||||
"lng": "81.1496" |
||||
} |
||||
}, |
||||
"phone": "1-770-736-8031 x56442", |
||||
"website": "hildegard.org", |
||||
"company": { |
||||
"name": "Romaguera-Crona", |
||||
"catchPhrase": "Multi-layered client-server neural-net", |
||||
"bs": "harness real-time e-markets" |
||||
} |
||||
}, |
||||
{ |
||||
"id": 2, |
||||
"name": "Ervin Howell", |
||||
"username": "Antonette", |
||||
"email": "Shanna@melissa.tv", |
||||
"address": { |
||||
"street": "Victor Plains", |
||||
"suite": "Suite 879", |
||||
"city": "Wisokyburgh", |
||||
"zipcode": "90566-7771", |
||||
"geo": { |
||||
"lat": "-43.9509", |
||||
"lng": "-34.4618" |
||||
} |
||||
}, |
||||
"phone": "010-692-6593 x09125", |
||||
"website": "anastasia.net", |
||||
"company": { |
||||
"name": "Deckow-Crist", |
||||
"catchPhrase": "Proactive didactic contingency", |
||||
"bs": "synergize scalable supply-chains" |
||||
} |
||||
}, |
||||
{ |
||||
"id": 3, |
||||
"name": "Clementine Bauch", |
||||
"username": "Samantha", |
||||
"email": "Nathan@yesenia.net", |
||||
"address": { |
||||
"street": "Douglas Extension", |
||||
"suite": "Suite 847", |
||||
"city": "McKenziehaven", |
||||
"zipcode": "59590-4157", |
||||
"geo": { |
||||
"lat": "-68.6102", |
||||
"lng": "-47.0653" |
||||
} |
||||
}, |
||||
"phone": "1-463-123-4447", |
||||
"website": "ramiro.info", |
||||
"company": { |
||||
"name": "Romaguera-Jacobson", |
||||
"catchPhrase": "Face to face bifurcated interface", |
||||
"bs": "e-enable strategic applications" |
||||
} |
||||
}, |
||||
{ |
||||
"id": 4, |
||||
"name": "Patricia Lebsack", |
||||
"username": "Karianne", |
||||
"email": "Julianne.OConner@kory.org", |
||||
"address": { |
||||
"street": "Hoeger Mall", |
||||
"suite": "Apt. 692", |
||||
"city": "South Elvis", |
||||
"zipcode": "53919-4257", |
||||
"geo": { |
||||
"lat": "29.4572", |
||||
"lng": "-164.2990" |
||||
} |
||||
}, |
||||
"phone": "493-170-9623 x156", |
||||
"website": "kale.biz", |
||||
"company": { |
||||
"name": "Robel-Corkery", |
||||
"catchPhrase": "Multi-tiered zero tolerance productivity", |
||||
"bs": "transition cutting-edge web services" |
||||
} |
||||
}, |
||||
{ |
||||
"id": 5, |
||||
"name": "Chelsey Dietrich", |
||||
"username": "Kamren", |
||||
"email": "Lucio_Hettinger@annie.ca", |
||||
"address": { |
||||
"street": "Skiles Walks", |
||||
"suite": "Suite 351", |
||||
"city": "Roscoeview", |
||||
"zipcode": "33263", |
||||
"geo": { |
||||
"lat": "-31.8129", |
||||
"lng": "62.5342" |
||||
} |
||||
}, |
||||
"phone": "(254)954-1289", |
||||
"website": "demarco.info", |
||||
"company": { |
||||
"name": "Keebler LLC", |
||||
"catchPhrase": "User-centric fault-tolerant solution", |
||||
"bs": "revolutionize end-to-end systems" |
||||
} |
||||
}, |
||||
{ |
||||
"id": 6, |
||||
"name": "Mrs. Dennis Schulist", |
||||
"username": "Leopoldo_Corkery", |
||||
"email": "Karley_Dach@jasper.info", |
||||
"address": { |
||||
"street": "Norberto Crossing", |
||||
"suite": "Apt. 950", |
||||
"city": "South Christy", |
||||
"zipcode": "23505-1337", |
||||
"geo": { |
||||
"lat": "-71.4197", |
||||
"lng": "71.7478" |
||||
} |
||||
}, |
||||
"phone": "1-477-935-8478 x6430", |
||||
"website": "ola.org", |
||||
"company": { |
||||
"name": "Considine-Lockman", |
||||
"catchPhrase": "Synchronised bottom-line interface", |
||||
"bs": "e-enable innovative applications" |
||||
} |
||||
}, |
||||
{ |
||||
"id": 7, |
||||
"name": "Kurtis Weissnat", |
||||
"username": "Elwyn.Skiles", |
||||
"email": "Telly.Hoeger@billy.biz", |
||||
"address": { |
||||
"street": "Rex Trail", |
||||
"suite": "Suite 280", |
||||
"city": "Howemouth", |
||||
"zipcode": "58804-1099", |
||||
"geo": { |
||||
"lat": "24.8918", |
||||
"lng": "21.8984" |
||||
} |
||||
}, |
||||
"phone": "210.067.6132", |
||||
"website": "elvis.io", |
||||
"company": { |
||||
"name": "Johns Group", |
||||
"catchPhrase": "Configurable multimedia task-force", |
||||
"bs": "generate enterprise e-tailers" |
||||
} |
||||
}, |
||||
{ |
||||
"id": 8, |
||||
"name": "Nicholas Runolfsdottir V", |
||||
"username": "Maxime_Nienow", |
||||
"email": "Sherwood@rosamond.me", |
||||
"address": { |
||||
"street": "Ellsworth Summit", |
||||
"suite": "Suite 729", |
||||
"city": "Aliyaview", |
||||
"zipcode": "45169", |
||||
"geo": { |
||||
"lat": "-14.3990", |
||||
"lng": "-120.7677" |
||||
} |
||||
}, |
||||
"phone": "586.493.6943 x140", |
||||
"website": "jacynthe.com", |
||||
"company": { |
||||
"name": "Abernathy Group", |
||||
"catchPhrase": "Implemented secondary concept", |
||||
"bs": "e-enable extensible e-tailers" |
||||
} |
||||
}, |
||||
{ |
||||
"id": 9, |
||||
"name": "Glenna Reichert", |
||||
"username": "Delphine", |
||||
"email": "Chaim_McDermott@dana.io", |
||||
"address": { |
||||
"street": "Dayna Park", |
||||
"suite": "Suite 449", |
||||
"city": "Bartholomebury", |
||||
"zipcode": "76495-3109", |
||||
"geo": { |
||||
"lat": "24.6463", |
||||
"lng": "-168.8889" |
||||
} |
||||
}, |
||||
"phone": "(775)976-6794 x41206", |
||||
"website": "conrad.com", |
||||
"company": { |
||||
"name": "Yost and Sons", |
||||
"catchPhrase": "Switchable contextually-based project", |
||||
"bs": "aggregate real-time technologies" |
||||
} |
||||
}, |
||||
{ |
||||
"id": 10, |
||||
"name": "Clementina DuBuque", |
||||
"username": "Moriah.Stanton", |
||||
"email": "Rey.Padberg@karina.biz", |
||||
"address": { |
||||
"street": "Kattie Turnpike", |
||||
"suite": "Suite 198", |
||||
"city": "Lebsackbury", |
||||
"zipcode": "31428-2261", |
||||
"geo": { |
||||
"lat": "-38.2386", |
||||
"lng": "57.2232" |
||||
} |
||||
}, |
||||
"phone": "024-648-3804", |
||||
"website": "ambrose.net", |
||||
"company": { |
||||
"name": "Hoeger LLC", |
||||
"catchPhrase": "Centralized empowering task-force", |
||||
"bs": "target end-to-end models" |
||||
} |
||||
} |
||||
] |
||||
@ -0,0 +1,36 @@ |
||||
/// <reference types="cypress" />
|
||||
// ***********************************************
|
||||
// This example commands.ts shows you how to
|
||||
// create various custom commands and overwrite
|
||||
// existing commands.
|
||||
//
|
||||
// For more comprehensive examples of custom
|
||||
// commands please read more here:
|
||||
// https://on.cypress.io/custom-commands
|
||||
// ***********************************************
|
||||
//
|
||||
//
|
||||
// -- This is a parent command --
|
||||
// Cypress.Commands.add('login', (email, password) => { ... })
|
||||
//
|
||||
//
|
||||
// -- This is a child command --
|
||||
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
|
||||
//
|
||||
//
|
||||
// -- This is a dual command --
|
||||
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
|
||||
//
|
||||
//
|
||||
// -- This will overwrite an existing command --
|
||||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
||||
//
|
||||
// declare global {
|
||||
// namespace Cypress {
|
||||
// interface Chainable {
|
||||
// login(email: string, password: string): Chainable<void>
|
||||
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
||||
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
||||
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
|
||||
// }
|
||||
// }
|
||||
@ -0,0 +1,20 @@ |
||||
// ***********************************************************
|
||||
// This example support/e2e.ts is processed and
|
||||
// loaded automatically before your test files.
|
||||
//
|
||||
// This is a great place to put global configuration and
|
||||
// behavior that modifies Cypress.
|
||||
//
|
||||
// You can change the location of this file or turn off
|
||||
// automatically serving support files with the
|
||||
// 'supportFile' configuration option.
|
||||
//
|
||||
// You can read more here:
|
||||
// https://on.cypress.io/configuration
|
||||
// ***********************************************************
|
||||
|
||||
// Import commands.js using ES2015 syntax:
|
||||
import './commands' |
||||
|
||||
// Alternatively you can use CommonJS syntax:
|
||||
// require('./commands')
|
||||
@ -1 +0,0 @@ |
||||
google.com, pub-6802442215403184, DIRECT, f08c47fec0942fa0 |
||||
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 793 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 802 B |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
@ -1,12 +0,0 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<browserconfig> |
||||
<msapplication> |
||||
<tile> |
||||
<square70x70logo src="/mstile-70x70.png"/> |
||||
<square144x144logo src="/mstile-144x144.png"/> |
||||
<square150x150logo src="/mstile-150x150.png"/> |
||||
<square310x310logo src="/mstile-310x310.png"/> |
||||
<TileColor>#da532c</TileColor> |
||||
</tile> |
||||
</msapplication> |
||||
</browserconfig> |
||||
|
Before Width: | Height: | Size: 477 B |
|
Before Width: | Height: | Size: 982 B |
|
Before Width: | Height: | Size: 15 KiB |
@ -1,19 +0,0 @@ |
||||
{ |
||||
"name": "", |
||||
"short_name": "", |
||||
"icons": [ |
||||
{ |
||||
"src": "/android-chrome-192x192.png", |
||||
"sizes": "192x192", |
||||
"type": "image/png" |
||||
}, |
||||
{ |
||||
"src": "/android-chrome-512x512.png", |
||||
"sizes": "512x512", |
||||
"type": "image/png" |
||||
} |
||||
], |
||||
"theme_color": "#ffffff", |
||||
"background_color": "#ffffff", |
||||
"display": "standalone" |
||||
} |
||||
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 884 B After Width: | Height: | Size: 598 B |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
@ -1,12 +0,0 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<browserconfig> |
||||
<msapplication> |
||||
<tile> |
||||
<square70x70logo src="/mstile-70x70.png"/> |
||||
<square144x144logo src="/mstile-144x144.png"/> |
||||
<square150x150logo src="/mstile-150x150.png"/> |
||||
<square310x310logo src="/mstile-310x310.png"/> |
||||
<TileColor>#da532c</TileColor> |
||||
</tile> |
||||
</msapplication> |
||||
</browserconfig> |
||||
|
Before Width: | Height: | Size: 477 B |
|
Before Width: | Height: | Size: 982 B |
|
Before Width: | Height: | Size: 15 KiB |
@ -1,19 +0,0 @@ |
||||
{ |
||||
"name": "", |
||||
"short_name": "", |
||||
"icons": [ |
||||
{ |
||||
"src": "/android-chrome-192x192.png", |
||||
"sizes": "192x192", |
||||
"type": "image/png" |
||||
}, |
||||
{ |
||||
"src": "/android-chrome-512x512.png", |
||||
"sizes": "512x512", |
||||
"type": "image/png" |
||||
} |
||||
], |
||||
"theme_color": "#ffffff", |
||||
"background_color": "#ffffff", |
||||
"display": "standalone" |
||||
} |
||||
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 568 B |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 624 B |
|
Before Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 170 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 229 B |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 908 B |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 451 B |