Remove redundant test class prefixes
This commit is contained in:
parent
a5b31b1956
commit
5bd420a823
35
.gitattributes
vendored
35
.gitattributes
vendored
|
@ -1,28 +1,7 @@
|
|||
app/config/* linguist-detectable=false
|
||||
app/config/*/* linguist-detectable=false
|
||||
app/config/*/*/* linguist-detectable=false
|
||||
app/config/*/*/*/* linguist-detectable=false
|
||||
app/views/* linguist-detectable=false
|
||||
app/views/*/* linguist-detectable=false
|
||||
app/views/*/*/* linguist-detectable=false
|
||||
app/views/*/*/*/* linguist-detectable=false
|
||||
app/controllers/* linguist-detectable=false
|
||||
app/controllers/*/* linguist-detectable=false
|
||||
app/controllers/*/*/* linguist-detectable=false
|
||||
app/controllers/*/*/*/* linguist-detectable=false
|
||||
app/controllers/*/*/*/*/* linguist-detectable=false
|
||||
src/* linguist-detectable=false
|
||||
src/*/* linguist-detectable=false
|
||||
src/*/*/* linguist-detectable=false
|
||||
src/*/*/*/* linguist-detectable=false
|
||||
src/*/*/*/*/* linguist-detectable=false
|
||||
tests/* linguist-detectable=false
|
||||
tests/*/* linguist-detectable=false
|
||||
tests/*/*/* linguist-detectable=false
|
||||
tests/*/*/*/* linguist-detectable=false
|
||||
tests/*/*/*/*/* linguist-detectable=false
|
||||
tests/*/*/*/*/*/* linguist-detectable=false
|
||||
public/scripts/* linguist-detectable=false
|
||||
public/scripts/*/*/* linguist-detectable=false
|
||||
public/scripts/*/*/*/* linguist-detectable=false
|
||||
public/dist/scripts/* linguist-detectable=false
|
||||
app/config/** linguist-detectable=false
|
||||
app/views/** linguist-detectable=false
|
||||
app/controllers/** linguist-detectable=false
|
||||
src/** linguist-detectable=false
|
||||
tests/** linguist-detectable=false
|
||||
public/scripts/** linguist-detectable=false
|
||||
public/dist/scripts/** linguist-detectable=false
|
||||
|
|
|
@ -10,11 +10,11 @@ use Utopia\App;
|
|||
use Utopia\Database\Permission;
|
||||
use Utopia\Database\Role;
|
||||
|
||||
class GraphQLAbuseTest extends Scope
|
||||
class AbuseTest extends Scope
|
||||
{
|
||||
use ProjectCustom;
|
||||
use SideServer;
|
||||
use GraphQLBase;
|
||||
use Base;
|
||||
|
||||
public function testComplexQueryBlocked()
|
||||
{
|
|
@ -8,11 +8,11 @@ use Tests\E2E\Scopes\Scope;
|
|||
use Tests\E2E\Scopes\SideClient;
|
||||
use Utopia\Database\ID;
|
||||
|
||||
class GraphQLAccountTest extends Scope
|
||||
class AccountTest extends Scope
|
||||
{
|
||||
use ProjectCustom;
|
||||
use SideClient;
|
||||
use GraphQLBase;
|
||||
use Base;
|
||||
|
||||
public function testCreateAccount(): array
|
||||
{
|
|
@ -10,11 +10,11 @@ use Utopia\Database\ID;
|
|||
use Utopia\Database\Role;
|
||||
use Utopia\Database\Permission;
|
||||
|
||||
class GraphQLAuthTest extends Scope
|
||||
class AuthTest extends Scope
|
||||
{
|
||||
use ProjectCustom;
|
||||
use SideClient;
|
||||
use GraphQLBase;
|
||||
use Base;
|
||||
|
||||
private array $account1;
|
||||
private array $account2;
|
||||
|
@ -79,6 +79,7 @@ class GraphQLAuthTest extends Scope
|
|||
|
||||
// Create session 2
|
||||
$graphQLPayload['variables']['email'] = $email2;
|
||||
|
||||
$session2 = $this->client->call(Client::METHOD_POST, '/graphql', [
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $projectId,
|
|
@ -7,11 +7,11 @@ use Tests\E2E\Scopes\ProjectCustom;
|
|||
use Tests\E2E\Scopes\Scope;
|
||||
use Tests\E2E\Scopes\SideServer;
|
||||
|
||||
class GraphQLAvatarsTest extends Scope
|
||||
class AvatarsTest extends Scope
|
||||
{
|
||||
use ProjectCustom;
|
||||
use SideServer;
|
||||
use GraphQLBase;
|
||||
use Base;
|
||||
|
||||
public function testGetCreditCardIcon()
|
||||
{
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Tests\E2E\Services\GraphQL;
|
||||
|
||||
trait GraphQLBase
|
||||
trait Base
|
||||
{
|
||||
// Databases
|
||||
public static string $CREATE_DATABASE = 'create_database';
|
||||
|
@ -560,8 +560,8 @@ trait GraphQLBase
|
|||
}
|
||||
}';
|
||||
case self::$GET_USERS:
|
||||
return 'query listUsers($search: String, $queries: [String!]) {
|
||||
usersList(search: $search, queries: $queries) {
|
||||
return 'query listUsers($queries: [String!], $search: String) {
|
||||
usersList(queries: $queries, search: $search) {
|
||||
total
|
||||
users {
|
||||
_id
|
|
@ -8,7 +8,7 @@ use Tests\E2E\Scopes\Scope;
|
|||
use Tests\E2E\Scopes\SideClient;
|
||||
use Utopia\Database\ID;
|
||||
|
||||
class GraphQLBatchTest extends Scope
|
||||
class BatchTest extends Scope
|
||||
{
|
||||
use ProjectCustom;
|
||||
use SideClient;
|
|
@ -11,11 +11,11 @@ use Utopia\Database\ID;
|
|||
use Utopia\Database\Permission;
|
||||
use Utopia\Database\Role;
|
||||
|
||||
class GraphQLContentTypeTest extends Scope
|
||||
class ContentTypeTest extends Scope
|
||||
{
|
||||
use ProjectCustom;
|
||||
use SideServer;
|
||||
use GraphQLBase;
|
||||
use Base;
|
||||
|
||||
public function testGraphQLContentType()
|
||||
{
|
|
@ -10,11 +10,11 @@ use Utopia\Database\ID;
|
|||
use Utopia\Database\Permission;
|
||||
use Utopia\Database\Role;
|
||||
|
||||
class GraphQLDatabaseClientTest extends Scope
|
||||
class DatabaseClientTest extends Scope
|
||||
{
|
||||
use ProjectCustom;
|
||||
use SideClient;
|
||||
use GraphQLBase;
|
||||
use Base;
|
||||
|
||||
public function testCreateDatabase(): array
|
||||
{
|
|
@ -11,11 +11,11 @@ use Utopia\Database\ID;
|
|||
use Utopia\Database\Permission;
|
||||
use Utopia\Database\Role;
|
||||
|
||||
class GraphQLDatabaseServerTest extends Scope
|
||||
class DatabaseServerTest extends Scope
|
||||
{
|
||||
use ProjectCustom;
|
||||
use SideServer;
|
||||
use GraphQLBase;
|
||||
use Base;
|
||||
|
||||
public function testCreateDatabase(): array
|
||||
{
|
||||
|
@ -862,6 +862,37 @@ class GraphQLDatabaseServerTest extends Scope
|
|||
$this->assertStringContainsString('New Document Name', $document['data']);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @depends testCreateCustomEntity
|
||||
// * @throws Exception
|
||||
// */
|
||||
// public function testUpdateCustomEntity(array $data) {
|
||||
// $projectId = $this->getProject()['$id'];
|
||||
// $query = $this->getQuery(self::$UPDATE_CUSTOM_ENTITY);
|
||||
// $gqlPayload = [
|
||||
// 'query' => $query,
|
||||
// 'variables' => [
|
||||
// 'id' => $data['_id'],
|
||||
// 'data' => [
|
||||
// 'name' => 'New Custom Entity Name',
|
||||
// ],
|
||||
// ]
|
||||
// ];
|
||||
//
|
||||
// $entity = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([
|
||||
// 'content-type' => 'application/json',
|
||||
// 'x-appwrite-project' => $projectId,
|
||||
// ], $this->getHeaders()), $gqlPayload);
|
||||
//
|
||||
// \var_dump($entity);
|
||||
//
|
||||
// $this->assertArrayNotHasKey('errors', $entity['body']);
|
||||
// $this->assertIsArray($entity['body']['data']);
|
||||
// $entity = $entity['body']['data']['actorsUpdate'];
|
||||
// $this->assertIsArray($entity);
|
||||
// $this->assertStringContainsString('New Custom Entity Name', $entity['data']);
|
||||
// }
|
||||
|
||||
/**
|
||||
* @depends testCreateDocument
|
||||
* @throws Exception
|
||||
|
@ -965,4 +996,27 @@ class GraphQLDatabaseServerTest extends Scope
|
|||
$this->assertIsNotArray($database['body']);
|
||||
$this->assertEquals(204, $database['headers']['status-code']);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @depends testCreateCustomEntity
|
||||
// * @throws Exception
|
||||
// */
|
||||
// public function testDeleteCustomEntity(array $data) {
|
||||
// $projectId = $this->getProject()['$id'];
|
||||
// $query = $this->getQuery(self::$DELETE_CUSTOM_ENTITY);
|
||||
// $gqlPayload = [
|
||||
// 'query' => $query,
|
||||
// 'variables' => [
|
||||
// 'id' => $data['_id'],
|
||||
// ]
|
||||
// ];
|
||||
//
|
||||
// $entity = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([
|
||||
// 'content-type' => 'application/json',
|
||||
// 'x-appwrite-project' => $projectId,
|
||||
// ], $this->getHeaders()), $gqlPayload);
|
||||
//
|
||||
// $this->assertIsNotArray($entity['body']);
|
||||
// $this->assertEquals(204, $entity['headers']['status-code']);
|
||||
// }
|
||||
}
|
|
@ -10,11 +10,11 @@ use Tests\E2E\Scopes\SideClient;
|
|||
use Utopia\Database\ID;
|
||||
use Utopia\Database\Role;
|
||||
|
||||
class GraphQLFunctionsClientTest extends Scope
|
||||
class FunctionsClientTest extends Scope
|
||||
{
|
||||
use ProjectCustom;
|
||||
use SideClient;
|
||||
use GraphQLBase;
|
||||
use Base;
|
||||
|
||||
public function testCreateFunction(): array
|
||||
{
|
|
@ -10,11 +10,11 @@ use Tests\E2E\Scopes\SideServer;
|
|||
use Utopia\Database\ID;
|
||||
use Utopia\Database\Role;
|
||||
|
||||
class GraphQLFunctionsServerTest extends Scope
|
||||
class FunctionsServerTest extends Scope
|
||||
{
|
||||
use ProjectCustom;
|
||||
use SideServer;
|
||||
use GraphQLBase;
|
||||
use Base;
|
||||
|
||||
public function testCreateFunction(): array
|
||||
{
|
|
@ -7,11 +7,11 @@ use Tests\E2E\Scopes\ProjectCustom;
|
|||
use Tests\E2E\Scopes\Scope;
|
||||
use Tests\E2E\Scopes\SideServer;
|
||||
|
||||
class GraphQLHealthTest extends Scope
|
||||
class HealthTest extends Scope
|
||||
{
|
||||
use ProjectCustom;
|
||||
use SideServer;
|
||||
use GraphQLBase;
|
||||
use Base;
|
||||
|
||||
public function testGetHTTPHealth()
|
||||
{
|
|
@ -7,11 +7,11 @@ use Tests\E2E\Scopes\ProjectCustom;
|
|||
use Tests\E2E\Scopes\Scope;
|
||||
use Tests\E2E\Scopes\SideServer;
|
||||
|
||||
class GraphQLLocalizationTest extends Scope
|
||||
class LocalizationTest extends Scope
|
||||
{
|
||||
use ProjectCustom;
|
||||
use SideServer;
|
||||
use GraphQLBase;
|
||||
use Base;
|
||||
|
||||
public function testGetLocale(): array
|
||||
{
|
|
@ -9,11 +9,11 @@ use Tests\E2E\Scopes\SideClient;
|
|||
use Tests\E2E\Scopes\SideServer;
|
||||
use Utopia\Database\ID;
|
||||
|
||||
class GraphQLScopeTest extends Scope
|
||||
class ScopeTest extends Scope
|
||||
{
|
||||
use ProjectCustom;
|
||||
use SideServer;
|
||||
use GraphQLBase;
|
||||
use Base;
|
||||
|
||||
public function testInvalidScope()
|
||||
{
|
|
@ -11,11 +11,11 @@ use Utopia\Database\ID;
|
|||
use Utopia\Database\Permission;
|
||||
use Utopia\Database\Role;
|
||||
|
||||
class GraphQLStorageClientTest extends Scope
|
||||
class StorageClientTest extends Scope
|
||||
{
|
||||
use ProjectCustom;
|
||||
use SideClient;
|
||||
use GraphQLBase;
|
||||
use Base;
|
||||
|
||||
public function testCreateBucket(): array
|
||||
{
|
|
@ -11,11 +11,11 @@ use Utopia\Database\ID;
|
|||
use Utopia\Database\Permission;
|
||||
use Utopia\Database\Role;
|
||||
|
||||
class GraphQLStorageServerTest extends Scope
|
||||
class StorageServerTest extends Scope
|
||||
{
|
||||
use ProjectCustom;
|
||||
use SideServer;
|
||||
use GraphQLBase;
|
||||
use Base;
|
||||
|
||||
public function testCreateBucket(): array
|
||||
{
|
|
@ -8,10 +8,10 @@ use Tests\E2E\Scopes\Scope;
|
|||
use Tests\E2E\Scopes\SideClient;
|
||||
use Utopia\Database\ID;
|
||||
|
||||
class GraphQLTeamsClientTest extends Scope
|
||||
class TeamsClientTest extends Scope
|
||||
{
|
||||
use ProjectCustom;
|
||||
use GraphQLBase;
|
||||
use Base;
|
||||
use SideClient;
|
||||
|
||||
public function testCreateTeam(): array
|
|
@ -8,10 +8,10 @@ use Tests\E2E\Scopes\Scope;
|
|||
use Tests\E2E\Scopes\SideServer;
|
||||
use Utopia\Database\ID;
|
||||
|
||||
class GraphQLTeamsServerTest extends Scope
|
||||
class TeamsServerTest extends Scope
|
||||
{
|
||||
use ProjectCustom;
|
||||
use GraphQLBase;
|
||||
use Base;
|
||||
use SideServer;
|
||||
|
||||
public function testCreateTeam(): array
|
|
@ -9,11 +9,11 @@ use Tests\E2E\Scopes\SideServer;
|
|||
use Utopia\Database\ID;
|
||||
use Utopia\Database\Query;
|
||||
|
||||
class GraphQLUsersTest extends Scope
|
||||
class UsersTest extends Scope
|
||||
{
|
||||
use ProjectCustom;
|
||||
use SideServer;
|
||||
use GraphQLBase;
|
||||
use Base;
|
||||
|
||||
public function testCreateUser(): array
|
||||
{
|
Loading…
Reference in a new issue