"uploaded image file preview"() {
return FunctionalHelpers.openPage(this, url, ".js-image-upload-label")
.findById("image")
.type("tests/fixtures/green_square.png")
.sleep(1000)
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
| // Cria uma função que retorna uma Promise. | |
| // Essa função recebe como argumento uma URL e faz uma request HTTP | |
| // para essa URL. A Promise resolve se a request tiver sido bem sucedida | |
| // e retorna os dados da resposta da request. Se a request nao for bem | |
| // sucedida a Promise sera rejeitada. | |
| function getData(url) { | |
| return new Promise(function (resolve, reject) { | |
| // Cria uma nova request | |
| const req = new XMLHttpRequest() | |
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 React from 'react' | |
| import IdCrop from 'idcrop' | |
| import Head from 'next/head' | |
| class IdCropComponent extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| } | |
| componentDidMount() { |
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
| module.exports = function(file, api) { | |
| // Alias the jscodeshift API. | |
| var j = api.jscodeshift; | |
| // Parse JS code into AST. | |
| var root = j(file.source); | |
| root.find(j.ExpressionStatement).forEach(function(p) { | |
| // Only change the registerSuite method. | |
| if (p.value.expression.callee && | |
| p.value.expression.callee.name === "registerSuite") { |
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
| "Add a screenshot to a comment": async function() { | |
| await FunctionalHelpers.openPage( | |
| this, | |
| url("/issues/100"), | |
| ".wc-Comment-body" | |
| ); | |
| let input = await this.remote.findById("image"); | |
| await input.type(require.toUrl("../fixtures/green_square.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
| "Add a screenshot to a comment": async function() { | |
| await FunctionalHelpers.openPage( | |
| this, | |
| url("/issues/100"), | |
| ".wc-Comment-body" | |
| ); | |
| let input = await this.remote.findById("image"); | |
| await this.remote.execute(function(element){ | |
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
| <template> | |
| <div class="whiteWrapper"> | |
| <div class="container"> | |
| <div class="row"> | |
| <figure class="logo valign-wrapper"> | |
| <img class="responsive-img" src="/static/img/logo.svg" /> | |
| </figure> | |
| <h1 class="logo-legend center-align">O App oficial!</h1> | |
| </div> |
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
| <template> | |
| <div class="whiteWrapper"> | |
| <div class="container"> | |
| <div class="row"> | |
| <figure class="logo valign-wrapper"> | |
| <img class="responsive-img" src="/static/img/logo.svg" /> | |
| </figure> | |
| <h1 class="logo-legend center-align">O App oficial!</h1> | |
| </div> |
NewerOlder