forked from statping/statping
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
74d77b6
commit bbd36d3
Showing
28 changed files
with
225 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,19 +66,6 @@ context('Users Tests', () => { | |
cy.get('#users_table > tr').eq(2).contains('ADMIN') | ||
}) | ||
|
||
it('should confirm edit user', () => { | ||
cy.visit('/dashboard/users') | ||
cy.get('#users_table > tr').should('have.length', 3) | ||
cy.get('#users_table > tr').eq(2).find('a.edit-user').click() | ||
cy.get('#email').should('have.value', '[email protected]') | ||
cy.get('#email').clear().type('[email protected]') | ||
cy.get('#password').type('password123') | ||
cy.get('#password_confirm').type('password123') | ||
cy.get('button[type="submit"]').click() | ||
|
||
cy.get('#users_table > tr').should('have.length', 3) | ||
}) | ||
|
||
it('should delete new users', () => { | ||
cy.visit('/dashboard/users') | ||
cy.get('#users_table > tr').should('have.length', 3) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,23 @@ | ||
import Vue from "vue"; | ||
import axios from 'axios' | ||
import * as Sentry from "@sentry/browser"; | ||
import * as Integrations from "@sentry/integrations"; | ||
const qs = require('querystring'); | ||
|
||
const qs = require('querystring') | ||
const tokenKey = "statping_user"; | ||
const errorReporter = "https://[email protected]/3" | ||
|
||
class Api { | ||
constructor() { | ||
|
||
} | ||
|
||
async core() { | ||
return axios.get('api').then(response => (response.data)) | ||
const core = axios.get('api').then(response => (response.data)) | ||
if (core.allow_reports) { | ||
await this.sentry_init() | ||
} | ||
return core | ||
} | ||
|
||
async core_save(obj) { | ||
|
@@ -258,6 +266,13 @@ class Api { | |
await axios.all([all]) | ||
} | ||
|
||
async sentry_init() { | ||
Sentry.init({ | ||
dsn: errorReporter, | ||
integrations: [new Integrations.Vue({Vue, attachProps: true})], | ||
}); | ||
} | ||
|
||
} | ||
const api = new Api() | ||
export default api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.