Skip to content

Commit

Permalink
[backend] tests: +1 capa +1 entity (#4903)
Browse files Browse the repository at this point in the history
  • Loading branch information
marieflorescontact committed Jan 13, 2024
1 parent 5eae684 commit f64dac8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ type Query {
# Mutation
type Mutation {
publicDashboardAdd(dashboard_id: String!): PublicDashboard @auth(for: [KNOWLEDGE, EXPLORE])
publishPublicDashboard(dashboard_id: ID!, uri_keys)
}

Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ describe('Elasticsearch pagination', () => {
it('should entity paginate everything', async () => {
const data = await elPaginate(testContext, ADMIN_USER, READ_ENTITIES_INDICES, { first: 1000 });
expect(data).not.toBeNull();
expect(data.edges.length).toEqual(493);
expect(data.edges.length).toEqual(494);
const filterBaseTypes = R.uniq(R.map((e) => e.node.base_type, data.edges));
expect(filterBaseTypes.length).toEqual(1);
expect(R.head(filterBaseTypes)).toEqual('ENTITY');
Expand Down Expand Up @@ -471,7 +471,7 @@ describe('Elasticsearch pagination', () => {
filterGroups: [],
};
const data = await elPaginate(testContext, ADMIN_USER, READ_ENTITIES_INDICES, { filters, first: 1000 });
expect(data.edges.length).toEqual(486);
expect(data.edges.length).toEqual(487);
});
it('should entity paginate with field exist filter', async () => {
const filters = {
Expand Down Expand Up @@ -552,7 +552,7 @@ describe('Elasticsearch pagination', () => {
orderMode: 'asc',
first: 1000
});
expect(data.edges.length).toEqual(493);
expect(data.edges.length).toEqual(494);
const createdDates = R.map((e) => e.node.created, data.edges);
let previousCreatedDate = null;
for (let index = 0; index < createdDates.length; index += 1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ describe('Role resolver standard behavior', () => {
}
`;
const queryResult = await queryAsAdmin({ query: LIST_CAPABILITIES_QUERY, variables: { first: 50 } });
expect(queryResult.data.capabilities.edges.length).toEqual(26);
expect(queryResult.data.capabilities.edges.length).toEqual(27);
});
it('should update role', async () => {
const UPDATE_QUERY = gql`
Expand Down

0 comments on commit f64dac8

Please sign in to comment.