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
it('Should choose an address', () => { | |
cy.visit(urls.contact); | |
cy.setGooglePlaceAddress('billing_address', 'Pretty street'); | |
... | |
}); |
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
Cypress.Commands.add('setPlace', (fieldName, address) => { | |
cy.get(`#${fieldName}`) | |
.type(address) | |
.wait(2000) | |
.type('{downarrow}') | |
.blur(); | |
}); |
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
{ | |
"projectId": "e54a51", | |
"defaultCommandTimeout": 10000, | |
"pageLoadTimeout": 120000 | |
} |
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
name: integration-tests-frontend | |
on: [pull_request] | |
jobs: | |
cypress-run: | |
runs-on: ubuntu-16.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
containers: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | |
steps: |
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
name: integration-tests | |
on: [pull_request] | |
jobs: | |
cypress-run: | |
runs-on: ubuntu-16.04 | |
strategy: | |
# when one test fails, DO NOT cancel the other | |
# containers, because this will kill Cypress processes | |
# leaving the Dashboard hanging | |
# https://github.com/cypress-io/github-action/issues/48 |
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
name: integration-tests | |
on: [push] | |
jobs: | |
cypress-run: | |
runs-on: ubuntu-16.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
# https://github.com/cypress-io/github-action | |
- name: Cypress run |
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
// console.log(JSON.stringify(event)); | |
{ | |
"version": "1", | |
"region": "eu-west-1", | |
"userPoolId": "eu-west-1_ad663Ml0G", | |
"userName": "Lucas", | |
"callerContext": { | |
"awsSdkVersion": "aws-sdk-unknown-unknown", | |
"clientId": "64ufi53tj8m8" | |
}, |
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
exports.handler = async (event, context, callback) => { | |
const userEmailDomain = event.request.userAttributes.email.split("@")[1]; | |
const allowedDomain = 'andreybleme.com'; | |
if (userEmailDomain === allowedDomain) { | |
callback(null, event); | |
} else { | |
const error = new Error('Cannot authenticate users from domains different from ' + allowedDomain); | |
callback(error, event); |
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
import Vue from 'vue'; | |
export const store = Vue.observable({ | |
role: '', | |
disallowedRoutes: [] as any | |
}); | |
export const mutations = { | |
setRole(role) { | |
store.role = role; |
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
import Vue from 'vue'; | |
import VueRouter from 'vue-router'; | |
import routes from './routes'; | |
import { store, mutations } from '@/setup/observable'; | |
import { api } from '@/api'; | |
Vue.use(VueRouter); | |
const router = new VueRouter({ |