Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
75e9c4e
Implementação de parte dos testes da feature XMLImport, incluindo tam…
thaisabr Jun 29, 2014
54c7368
Exclusão de métodos desnecessários, que foram indevidamente incluídos.
thaisabr Jun 29, 2014
9601eb2
Atividade 4
Kamillakrdoso Jul 1, 2014
ed1e75a
Correções da atividade 4: Ajuste na escrita dos cenários, definição d…
thaisabr Jul 5, 2014
59e653b
Atividade 5: Correção do código para os testes implementados por Thaí…
thaisabr Jul 5, 2014
8d3dbfb
Ajuste em código referente à feature Funder
thaisabr Jul 5, 2014
d347cca
Ajuste de testes de XMLImport: inclusão de assert após upload de arqu…
thaisabr Jul 5, 2014
96d93d6
Correção no tratamento ao atributo "members" das publicações importadas.
thaisabr Jul 6, 2014
a7cbf4a
Correção em mensagem usada no título da tela.
thaisabr Jul 6, 2014
58498e1
Mudança para tornar opcional atributos obrigatórios que não existem n…
thaisabr Jul 11, 2014
a50fd9d
Desenvolvimento da feature XMLImport e consequente atualização dos do…
thaisabr Jul 11, 2014
f566959
Exclusão de imports adicionados indevidamente.
thaisabr Jul 11, 2014
07d81d7
Correção das diretivas de pré-processamento e da lógica de definição …
thaisabr Jul 12, 2014
c81ba74
Atividade 5
Kamillakrdoso Jul 15, 2014
ced452c
Atividade 5
Kamillakrdoso Jul 15, 2014
4cb0198
Correção na persistência de publicações importadas no geral e nos dad…
thaisabr Jul 25, 2014
b599f33
Ajustes quanto ao uso de internacionalização em XMLImport.
thaisabr Jul 26, 2014
dab2010
Refatoração: Renomeação de métodos
thaisabr Jul 26, 2014
7f55a3e
Correção para salvar publicações importadas em telas específicas do t…
thaisabr Jul 26, 2014
c131a69
Refatoração: Renomeação de método de savePublication para createPubli…
thaisabr Jul 26, 2014
5ecef4b
Ajuste em label de botão
thaisabr Jul 26, 2014
3a36120
Correção: Exclusão de etapa manual para execução de testes através da…
thaisabr Jul 27, 2014
43e4e7f
Exclusão de chamadas de println
thaisabr Jul 27, 2014
fcff6c8
Refatoração: Inclusão da feature Funder e exclusão de alterações inde…
thaisabr Jul 27, 2014
92fbef3
Inclusão da feature Funder
thaisabr Jul 27, 2014
f97e7f2
Identificação de artefatos relacionados à feature XMLImport.
thaisabr Jul 27, 2014
0842010
Atividade 5 - Correção relacionadas a duplicação e modularidade
Kamillakrdoso Jul 30, 2014
0821da3
Alterações e ajustes decorrentes de atualizações no repositório central.
thaisabr Jul 31, 2014
718540e
Alterações e ajustes decorrentes de atualizações no repositório central.
thaisabr Jul 31, 2014
0e471d8
Inclusão de mensagem de alerta no caso de não haver publicações para …
thaisabr Jul 31, 2014
0dbf706
Inclusão de mensagem de XMLImport.
thaisabr Jul 31, 2014
785900b
Refatoração: Exclusão de método redundante e limpeza de código simples.
thaisabr Jul 31, 2014
edc1091
Refatoração: Reuso de código através de chamada de método; remoção de…
thaisabr Jul 31, 2014
270fc95
Refatoração: Exclusão de métodos redundantes; inclusão de parâmetros …
thaisabr Jul 31, 2014
493c9d4
Ajuste no uso de diretivas de pré-processamento.
thaisabr Jul 31, 2014
ddc8365
Correção em importação de research project (ainda há problema)
thaisabr Jul 31, 2014
cfd51aa
Correção simples em mensagem de alerta ao importar publicação.
thaisabr Jul 31, 2014
823e437
Refatoração: excluindo ResearchTestDataAndOperations, removendo redun…
Kamillakrdoso Aug 1, 2014
c531873
Merge remote-tracking branch 'origin/master'
Kamillakrdoso Aug 1, 2014
85fa255
Ajuste por conta de refatoração realizada por Kamilla: exclusão de co…
thaisabr Aug 5, 2014
bf9c560
Refatoração: Criação de método para encapsular trechos de código repe…
thaisabr Aug 5, 2014
c5293f9
Correção em refatoração realizada por Kamilla: comando import inválido.
thaisabr Aug 5, 2014
feb97ae
Ajuste em refatoração realizada por Kamilla
thaisabr Aug 5, 2014
f288f39
Refatoração: Extração de método para evitar replicação de código.
thaisabr Aug 5, 2014
f022303
Ajuste em alterações realizadas por Kamilla.
thaisabr Aug 5, 2014
db92292
Correção em testes devido às mudanças realizadas em XMLController.gro…
thaisabr Aug 6, 2014
81a64ff
Correção Metodo de Busca Linha de Pesquisa por Member
Kamillakrdoso Aug 6, 2014
49b667d
Correção: removendo redundância
Kamillakrdoso Aug 7, 2014
5443388
Correção: Cenário web, upload de arquivo XML invalido (upload de arqu…
Kamillakrdoso Aug 7, 2014
4827477
Correção: metodo configureFileName(filename), e aumentando o escopo d…
Kamillakrdoso Aug 7, 2014
fb8bb71
Refatoração: nome método
Kamillakrdoso Aug 8, 2014
d8e1a06
Correção da refatoração nome método
Kamillakrdoso Aug 8, 2014
52a2095
Refatoração: removendo métodos redundantes
Kamillakrdoso Aug 8, 2014
1f496bd
Correção: removendo ResearchLineController de alguns passos de XMLImp…
Kamillakrdoso Aug 8, 2014
14cc233
Correção: removendo ResearchLineController de alguns passos de XMLImp…
Kamillakrdoso Aug 8, 2014
088b972
Correção: cenário research line
Kamillakrdoso Aug 12, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions ProductGeneration/ck.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1237,4 +1237,39 @@
<args>test/cucumber/XMLImport.feature</args>
</transformation>
</configuration>
<configuration>
<expression>XMLImport</expression>
<transformation>
<name>selectAndMoveComponent</name>
<args>XMLImportSteps,test/cucumber/steps/XMLImportSteps.groovy</args>
</transformation>
</configuration>
<configuration>
<expression>XMLImport</expression>
<transformation>
<name>preprocessFiles</name>
<args>test/cucumber/steps/XMLImportSteps.groovy</args>
</transformation>
</configuration>
<configuration>
<expression>XMLImport</expression>
<transformation>
<name>selectAndMoveComponent</name>
<args>XMLImportTestDataAndOperations,test/functional/steps/XMLImportTestDataAndOperations.groovy</args>
</transformation>
</configuration>
<configuration>
<expression>XMLImport</expression>
<transformation>
<name>preprocessFiles</name>
<args>test/functional/steps/XMLImportTestDataAndOperations.groovy</args>
</transformation>
</configuration>
<configuration>
<expression>XMLImport</expression>
<transformation>
<name>selectAndMoveComponent</name>
<args>XMLImportPage,test/functional/pages/XMLImportPage.groovy</args>
</transformation>
</configuration>
</configurationModel>
7 changes: 7 additions & 0 deletions ProductGeneration/componentModel.txt
Original file line number Diff line number Diff line change
Expand Up @@ -221,3 +221,10 @@ ArticleEditPage => test/functional/pages/ArticleEditPage.groovy;
ArticleShowPage => test/functional/pages/ArticleShowPage.groovy;
ArticlePage => test/functional/pages/ArticlesPage.groovy;
UserRegisterPage => test/functional/pages/UserRegisterPage.groovy;

XMLController => grails-app/controllers/rgms/publication/XMLController.groovy;
XMLService => grails-app/services/rgms/XMLService.groovy;
XMLImportTest => test/cucumber/XMLImport.feature;
XMLImportSteps => test/cucumber/steps/XMLImportSteps.groovy;
XMLImportTestDataAndOperations => test/functional/steps/XMLImportTestDataAndOperations.groovy;
XMLImportPage => test/functional/pages/XMLImportPage.groovy;
8 changes: 6 additions & 2 deletions ProductGeneration/featureModel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@

<feature min="0" max="1" name="ResearchLine" type="NONE" id="ResearchLine"></feature>

<feature min="0" max="1" name="ResearchProject" type="NONE" id="ResearchProject"></feature>
<feature min="0" max="1" name="ResearchProject" type="NONE" id="ResearchProject">
<featureGroup min="0" max="1" id="projectGroup">
<feature min="0" max="1" name="funder" type="NONE" id="funder"></feature>
</featureGroup>
</feature>

<feature min="0" max="1" name="Orientation" type="NONE" id="Orientation"></feature>

</feature>
</feature>
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,13 @@ class PublicationController {
* Para enviar o post, é preciso esta autenticado com o facebook.
* - Para um usuario novo, no momento do registro basta logar com o FB
* - Para um usuario ja existente, edit esse usuario e adicione o a conta do FB ao usuario.
*/
//#if($facebook)
def static sendPostFacebook(Member user, String title){
def url = "https://graph.facebook.com/me/feed?access_token=" + user?.access_token
*/
//#if($facebook)
def static sendPostFacebook(Member user, String title){
def url = "https://graph.facebook.com/me/feed?access_token=" + user?.access_token
System.out.println(title);
List<NameValuePair> params = new ArrayList<NameValuePair>();

HttpPost post = new HttpPost(url);

params.add(new BasicNameValuePair("access_token", user?.access_token));
Expand All @@ -153,11 +153,11 @@ class PublicationController {

UrlEncodedFormEntity postEntity = new UrlEncodedFormEntity(params, HTTP.UTF_8);
post.setEntity(postEntity);

HttpClient client = new DefaultHttpClient();
HttpResponse response = client.execute(post);
StatusLine statusLine = response.getStatusLine();

// return statusLine.getStatusCode();
}
//#end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ class ResearchLineController {
[researchLineInstanceList: lista]

}


}
//#end

Expand Down Expand Up @@ -238,5 +236,80 @@ class ResearchLineController {

researchLineInstance
}

def findAllResearchLine(){
HashMap<String,String> lista = new HashMap<String, String>()
for(researchline in ResearchLine.getAll())
{
if(!researchline.getDescription().equals("stable")) {
researchline.setDescription("stable")
}
lista.put(researchline.getName(),researchline.getDescription())
}
[researchLineInstanceList: lista]
}

def findResearchByMember(member){
ArrayList<String> lista = new ArrayList<String>()
Member actor = new Member()
for(research in ResearchLine.getAll())
{
for(currentMember in research.getMembers()){
if(member.equals(currentMember.getName())){
actor = currentMember
}
}
}
return actor.getId()
}

def findAllResearchByMember(member, research){
HashMap<String, String> listagem = new HashMap<String, String>()
for(researchL in ResearchLine.getAll()){
if((researchL.getName().equals(research)) && (researchL.getMembers().contains(member))){
listagem.put(member, research)
}
}
return listagem
}

def checkIfResearchLineExists(researchName, list){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todas estas funções parecem não pertencer a um controller. elas não são ações de um controller. deve ter algum lugar mais apropriado para elas.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neste caso teria que adicionar todos os métodos de checagem e verificação,
para testDataAndOperations de ResearchLine?

2014-07-23 15:31 GMT-03:00 Paulo Borba notifications@github.com:

In grails-app/controllers/rgms/publication/ResearchLineController.groovy:

  •        }
    
  •    }
    
  •    return actor
    
  • }
  • def findResearchByActor(def member,def research){
  •    HashMap<String, String> listagem = new  HashMap<String, String>()
    
  •    for(researchL in ResearchLine.getAll()){
    
  •        if((researchL.equals(research)) && (researchL.getMembers().
    
    contains(member))){
  •            listagem.put(member, research)
    
  •        }
    
  •    }
    
  •    return listagem.size()
    
  • }
  • def checkIfResearchLineExists(researchName, list){

todas estas funções parecem não pertencer a um controller. elas não são
ações de um controller. deve ter algum lugar mais apropriado para elas.


Reply to this email directly or view it on GitHub
https://github.com/spgroup/rgms/pull/307/files#r15306018.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alguns devem ficar em testDataAndOperations, outros talvez em Pages, ou em arquivos de steps. Tem que ser analisado caso a caso. Tome como base o código implementado em features como Article.

On Jul 29, 2014, at 8:41 PM, Kamilla Cardoso notifications@github.com wrote:

In grails-app/controllers/rgms/publication/ResearchLineController.groovy:

  •        }
    
  •    }
    
  •    return actor
    
  • }
  • def findResearchByActor(def member,def research){
  •    HashMap<String, String> listagem = new  HashMap<String, String>()
    
  •    for(researchL in ResearchLine.getAll()){
    
  •        if((researchL.equals(research)) && (researchL.getMembers().contains(member))){
    
  •            listagem.put(member, research)
    
  •        }
    
  •    }
    
  •    return listagem.size()
    
  • }
  • def checkIfResearchLineExists(researchName, list){
    Neste caso teria que adicionar todos os métodos de checagem e verificação, para testDataAndOperations de ResearchLine? 2014-07-23 15:31 GMT-03:00 Paulo Borba notifications@github.com:


    Reply to this email directly or view it on GitHub.

for (research in list) {
if (research.getName().equals(researchName)) {
return true
}
}
return false
}

def checkSavedResearchByDescription(nameOfResearch, status){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

problemas similares aos acima. reescrever este e o próximo método

HashMap<String,String> lista = findAllResearchLine()
for(int i; i< lista.size(); i++){

if(lista.containsKey(nameOfResearch)) {
if(lista.containsValue(status)){

return true
}
}
}
return false

}

def checkDeletedResearchByDescription(nameOfResearch, status){
List<ResearchLine> lista = ResearchLine.findAll()
boolean exist = checkSavedResearchByDescription(nameOfResearch, status)
for(research in lista){
if((exist) && (research.getName().equals(nameOfResearch))){
if(research.getDescription().equals(status)){
lista.remove(research)
return true
}

}
}
return false
}
}
//#end
Loading