Skip to content

Commit

Permalink
fix: tratativa de asset de status de bloco quando possui varios proce…
Browse files Browse the repository at this point in the history
…ssos (#621)

Co-authored-by: Mauro Costa <[email protected]>
  • Loading branch information
Mauro1706 and Mauro Costa authored Sep 6, 2024
1 parent d5917ca commit 662d6fe
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 45 deletions.
37 changes: 23 additions & 14 deletions tests_sei4/funcional/tests/TramiteBlocoExternoLimiteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,21 +170,30 @@ public function test_verificar_envio_processo()
*/
public function test_verificar_envio_tramite_em_bloco()
{
$this->acessarSistema(
self::$remetente['URL'],
self::$remetente['SIGLA_UNIDADE'],
self::$remetente['LOGIN'],
self::$remetente['SENHA']
);
$this->paginaCadastrarProcessoEmBloco->navegarListagemBlocoDeTramite();
$this->acessarSistema(
self::$remetente['URL'],
self::$remetente['SIGLA_UNIDADE'],
self::$remetente['LOGIN'],
self::$remetente['SENHA']
);
$this->paginaCadastrarProcessoEmBloco->navegarListagemBlocoDeTramite();
$novoStatus = $this->paginaCadastrarProcessoEmBloco->retornarTextoColunaDaTabelaDeBlocos();

if (self::$tramitar == true) {
$this->waitUntil(function ($testCase) {
sleep(5);
$testCase->refresh();
$novoStatus = $this->paginaCadastrarProcessoEmBloco->retornarTextoColunaDaTabelaDeBlocos();
$this->assertNotEquals('Aguardando Processamento', $novoStatus);
return true;
}, PEN_WAIT_TIMEOUT);

$novoStatus = $this->paginaCadastrarProcessoEmBloco->retornarTextoColunaDaTabelaDeBlocos();
$this->assertEquals(utf8_encode("Concluído"), $novoStatus);
} else {
$this->assertEquals("Aberto", $novoStatus);
}

if (self::$tramitar == true) {
$this->assertEquals(utf8_encode("Concluído"), $novoStatus);
} else {
$this->assertEquals(utf8_encode("Aberto"), $novoStatus);
}

$this->sairSistema();
$this->sairSistema();
}
}
39 changes: 22 additions & 17 deletions tests_sei41/funcional/tests/TramiteBlocoExternoLimiteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,25 +170,30 @@ public function test_verificar_envio_processo()
*/
public function test_verificar_envio_tramite_em_bloco()
{
$this->acessarSistema(
self::$remetente['URL'],
self::$remetente['SIGLA_UNIDADE'],
self::$remetente['LOGIN'],
self::$remetente['SENHA']
);
$this->paginaCadastrarProcessoEmBloco->navegarListagemBlocoDeTramite();
$novoStatus = $this->paginaCadastrarProcessoEmBloco->retornarTextoColunaDaTabelaDeBlocos();

if (self::$tramitar == true) {
$this->waitUntil(function ($testCase) {
sleep(5);
$testCase->refresh();
$novoStatus = $this->paginaCadastrarProcessoEmBloco->retornarTextoColunaDaTabelaDeBlocos();
$this->assertNotEquals('Aguardando Processamento', $novoStatus);
return true;
}, PEN_WAIT_TIMEOUT);

self::$remetente = $this->definirContextoTeste(CONTEXTO_ORGAO_A);
self::$destinatario = $this->definirContextoTeste(CONTEXTO_ORGAO_B);

$this->acessarSistema(
self::$remetente['URL'],
self::$remetente['SIGLA_UNIDADE'],
self::$remetente['LOGIN'],
self::$remetente['SENHA']
);
$this->paginaCadastrarProcessoEmBloco->navegarListagemBlocoDeTramite();
$novoStatus = $this->paginaCadastrarProcessoEmBloco->retornarTextoColunaDaTabelaDeBlocos();
$this->assertEquals(utf8_encode("Concluído"), $novoStatus);
} else {
$this->assertEquals("Aberto", $novoStatus);
}

if (self::$tramitar == true) {
$this->assertEquals(utf8_encode("Concluído"), $novoStatus);
} else {
$this->assertEquals(utf8_encode("Aberto"), $novoStatus);
}

$this->sairSistema();
$this->sairSistema();
}
}
37 changes: 23 additions & 14 deletions tests_super/funcional/tests/TramiteBlocoExternoLimiteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,21 +176,30 @@ public function test_verificar_envio_processo()
*/
public function test_verificar_envio_tramite_em_bloco()
{
$this->acessarSistema(
self::$remetente['URL'],
self::$remetente['SIGLA_UNIDADE'],
self::$remetente['LOGIN'],
self::$remetente['SENHA']
);
$this->paginaCadastrarProcessoEmBloco->navegarListagemBlocoDeTramite();
$this->acessarSistema(
self::$remetente['URL'],
self::$remetente['SIGLA_UNIDADE'],
self::$remetente['LOGIN'],
self::$remetente['SENHA']
);
$this->paginaCadastrarProcessoEmBloco->navegarListagemBlocoDeTramite();
$novoStatus = $this->paginaCadastrarProcessoEmBloco->retornarTextoColunaDaTabelaDeBlocos();

if (self::$tramitar == true) {
$this->waitUntil(function ($testCase) {
sleep(5);
$testCase->refresh();
$novoStatus = $this->paginaCadastrarProcessoEmBloco->retornarTextoColunaDaTabelaDeBlocos();
$this->assertNotEquals('Aguardando Processamento', $novoStatus);
return true;
}, PEN_WAIT_TIMEOUT);

$novoStatus = $this->paginaCadastrarProcessoEmBloco->retornarTextoColunaDaTabelaDeBlocos();
$this->assertEquals(utf8_encode("Concluído"), $novoStatus);
} else {
$this->assertEquals("Aberto", $novoStatus);
}

if (self::$tramitar == true) {
$this->assertEquals(utf8_encode("Concluído"), $novoStatus);
} else {
$this->assertEquals(utf8_encode("Aberto"), $novoStatus);
}

$this->sairSistema();
$this->sairSistema();
}
}

0 comments on commit 662d6fe

Please sign in to comment.