Browse Source

fix: remove extra `/`

pull/6644/head
Pranav C 11 months ago
parent
commit
2af447afff
  1. 6
      packages/nocodb/tests/unit/factory/base.ts
  2. 2
      packages/nocodb/tests/unit/factory/table.ts
  3. 2
      tests/playwright/pages/Dashboard/TreeView.ts
  4. 4
      tests/playwright/pages/ProjectsPage/index.ts
  5. 2
      tests/playwright/tests/db/features/swagger.spec.ts

6
packages/nocodb/tests/unit/factory/base.ts

@ -59,7 +59,7 @@ const defaultSharedBaseValue = {
const createSharedBase = async (app, token, base, sharedBaseArgs = {}) => { const createSharedBase = async (app, token, base, sharedBaseArgs = {}) => {
await request(app) await request(app)
.post(`//api/v1/db/meta/bases/${base.id}/shared`) .post(`/api/v1/db/meta/bases/${base.id}/shared`)
.set('xc-auth', token) .set('xc-auth', token)
.send({ .send({
...defaultSharedBaseValue, ...defaultSharedBaseValue,
@ -69,7 +69,7 @@ const createSharedBase = async (app, token, base, sharedBaseArgs = {}) => {
const createSakilaProject = async (context) => { const createSakilaProject = async (context) => {
const response = await request(context.app) const response = await request(context.app)
.post('//api/v1/db/meta/bases/') .post('/api/v1/db/meta/bases/')
.set('xc-auth', context.token) .set('xc-auth', context.token)
.send(sakilaProjectConfig(context)); .send(sakilaProjectConfig(context));
@ -81,7 +81,7 @@ const createProject = async (
baseArgs: ProjectArgs = defaultProjectValue, baseArgs: ProjectArgs = defaultProjectValue,
) => { ) => {
const response = await request(context.app) const response = await request(context.app)
.post('//api/v1/db/meta/bases/') .post('/api/v1/db/meta/bases/')
.set('xc-auth', context.token) .set('xc-auth', context.token)
.send({ .send({
...baseArgs, ...baseArgs,

2
packages/nocodb/tests/unit/factory/table.ts

@ -12,7 +12,7 @@ const defaultTableValue = (context) => ({
const createTable = async (context, base, args = {}) => { const createTable = async (context, base, args = {}) => {
const defaultValue = defaultTableValue(context); const defaultValue = defaultTableValue(context);
const response = await request(context.app) const response = await request(context.app)
.post(`//api/v1/db/meta/bases/${base.id}/tables`) .post(`/api/v1/db/meta/bases/${base.id}/tables`)
.set('xc-auth', context.token) .set('xc-auth', context.token)
.send({ ...defaultValue, ...args }); .send({ ...defaultValue, ...args });

2
tests/playwright/pages/Dashboard/TreeView.ts

@ -143,7 +143,7 @@ export class TreeViewPage extends BasePage {
await this.waitForResponse({ await this.waitForResponse({
uiAction: () => this.dashboard.get().locator('button:has-text("Create Table")').click(), uiAction: () => this.dashboard.get().locator('button:has-text("Create Table")').click(),
httpMethodsToMatch: ['POST'], httpMethodsToMatch: ['POST'],
requestUrlPathToMatch: `//api/v1/db/meta/bases/`, requestUrlPathToMatch: `/api/v1/db/meta/bases/`,
responseJsonMatcher: json => json.title === title && json.type === 'table', responseJsonMatcher: json => json.title === title && json.type === 'table',
}); });

4
tests/playwright/pages/ProjectsPage/index.ts

@ -41,7 +41,7 @@ export class ProjectsPage extends BasePage {
await this.waitForResponse({ await this.waitForResponse({
uiAction: createProjectSubmitAction, uiAction: createProjectSubmitAction,
httpMethodsToMatch: ['POST'], httpMethodsToMatch: ['POST'],
requestUrlPathToMatch: '//api/v1/db/meta/bases/', requestUrlPathToMatch: '/api/v1/db/meta/bases/',
}); });
// wait for dashboard to render // wait for dashboard to render
@ -180,7 +180,7 @@ export class ProjectsPage extends BasePage {
await this.waitForResponse({ await this.waitForResponse({
uiAction: deleteProjectAction, uiAction: deleteProjectAction,
httpMethodsToMatch: ['DELETE'], httpMethodsToMatch: ['DELETE'],
requestUrlPathToMatch: '//api/v1/db/meta/bases/', requestUrlPathToMatch: '/api/v1/db/meta/bases/',
}); });
await this.get().locator('.ant-table-row', { hasText: title }).waitFor({ state: 'hidden' }); await this.get().locator('.ant-table-row', { hasText: title }).waitFor({ state: 'hidden' });

2
tests/playwright/tests/db/features/swagger.spec.ts

@ -17,7 +17,7 @@ test.describe('Swagger', () => {
test('Create column', async () => { test('Create column', async () => {
// access swagger link // access swagger link
const link = `http://localhost:8080//api/v1/db/meta/bases/${context.base.id}/swagger`; const link = `http://localhost:8080/api/v1/db/meta/bases/${context.base.id}/swagger`;
await dashboard.rootPage.goto(link); await dashboard.rootPage.goto(link);
const swagger = dashboard.rootPage; const swagger = dashboard.rootPage;

Loading…
Cancel
Save