This file contains hidden or 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
| LOG: ModuleItemComponent | |
| { | |
| moduleItenList: [], | |
| iconeImagem: ‘img/modules/administracao-controleprocessos.png’, | |
| titulo: ‘Controle de processos’, url: ‘http://medium.com/codigorefinado' | |
| } |
This file contains hidden or 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 be iconeImagem equal img/modules/administracao-controleprocessos.png', () => { | |
| let urlDebugElement = fixture.debugElement.query(By.css('#module-access-img')); | |
| expect(urlDebugElement).toBeDefined(); | |
| expect(urlDebugElement).not.toBeNull(); | |
| let htmlElement: HTMLImageElement = urlDebugElement.nativeElement; | |
| expect(htmlElement.src).toContain('img/modules/administracao-controleprocessos.png'); | |
| }); |
This file contains hidden or 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 be iconeImagem equal img/modules/administracao-controleprocessos.png', () => { | |
| fixture.whenStable().then (() => { | |
| expect(moduleItemComponent.iconeImagem).toBe('img/modules/administracao-controleprocessos.png'); | |
| }); | |
| }); |
This file contains hidden or 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
| let pets = [ | |
| {name: 'Goofy', type: 'dog'}, | |
| {name: 'Snoopy', type: 'dog'}, | |
| {name: 'Dino', type: 'dog'}, | |
| {name: 'Garfield', type: 'cat'}, | |
| ]; | |
| _.chain(pets) | |
| .filter({type: 'dog'}) | |
| .map('name') |
This file contains hidden or 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
| clone(mapIn: Map<number, Array<Product>>): Map<number, Array<Product>> { | |
| let mapCloned: Map<number, Array<Product>> = new Map<number, Array<Product>>(); | |
| mapIn.forEach((products: Array<Product>, key: number, mapObj: Map<number, Array<Product>>) => { | |
| //products.slice(0) clone array | |
| mapCloned.set(key, products.slice(0)); | |
| }); | |
| return mapCloned; |
This file contains hidden or 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
| // https://github.com/angular/angular-cli/issues/6683 | |
| import { NgModule, LOCALE_ID } from '@angular/core'; | |
| // force to use locale pt-BR | |
| providers: [ {provide: LOCALE_ID, useValue: 'pt-BR' } ] | |
| // Or use below line to get locale from browser | |
| // providers: [ {provide: LOCALE_ID, useValue: window.navigator.language} ] |
This file contains hidden or 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 {Injectable} from '@angular/core'; | |
| import {MessageService} from 'primeng/components/common/messageservice'; | |
| /** | |
| * A little abstraction to use Grow Message component from PrimeNG | |
| * @see https://www.primefaces.org/primeng/#/growl | |
| * | |
| * Don't forget to use the tag <p-growl [(value)]="growlMessage" life="5000"></p-growl> | |
| * | |
| */ |
This file contains hidden or 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
| language: node_js | |
| sudo: required | |
| node_js: | |
| - node | |
| before_script: | |
| - "sudo chown root /opt/google/chrome/chrome-sandbox" | |
| - "sudo chmod 4755 /opt/google/chrome/chrome-sandbox" | |
| before_install: |
This file contains hidden or 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 {Directive, ElementRef, Input} from '@angular/core'; | |
| @Directive({ | |
| selector: '[background-image]' | |
| }) | |
| export class BackgroundImage { | |
| private el: HTMLElement; | |
| constructor(el: ElementRef) { | |
| this.el = el.nativeElement; |
This file contains hidden or 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 java.util.function.Supplier; | |
| import cloud.localstack.TestUtils; | |
| import cloud.localstack.docker.LocalstackDocker; | |
| public class TestAsyncUtils extends TestUtils { | |
| public static AmazonDynamoDBAsync getClientDynamoDBAsync() { | |
| return AmazonDynamoDBAsyncClientBuilder.standard() | |
| .withEndpointConfiguration(createEndpointConfiguration(LocalstackDocker.INSTANCE::getEndpointDynamoDB)) |