Skip to content

Commit

Permalink
fixing delete ttd test
Browse files Browse the repository at this point in the history
  • Loading branch information
wrt95 committed Feb 6, 2024
1 parent a6f0e74 commit 31846c9
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import { DeployPage } from '../../pages/DeployPage';
import { Header } from '../../components/Header';
import { Gitea } from '../../helpers/Gitea';

const getTtdApp = (appName: string) => `ttd-app-${appName}`;

// Before the tests starts, we need to create the dashboard app
test.beforeAll(async ({ testAppName, request, storageState }) => {
// Create a new app
Expand All @@ -28,7 +30,7 @@ test.afterAll(async ({ request, testAppName }) => {
expect(response.ok()).toBeTruthy();

const responseTTD = await request.delete(
gitea.getDeleteAppEndpoint({ org: 'ttd', app: testAppName }),
gitea.getDeleteAppEndpoint({ org: 'ttd', app: getTtdApp(testAppName) }),
);
expect(responseTTD.ok()).toBeTruthy();
});
Expand Down Expand Up @@ -138,7 +140,7 @@ test('That it is possible to navigate from overview to the deploy page and back
storageState,
}) => {
const testDepartmentOrg: string = 'ttd';
const appName: string = `ttd-app-${testAppName}`; // Need a different app name than the one generated by the user in beforeAll()
const appName: string = getTtdApp(testAppName); // Need a different app name than the one generated by the user in beforeAll()

const designerApi = new DesignerApi({ app: appName });
const response = await designerApi.createApp(
Expand Down

0 comments on commit 31846c9

Please sign in to comment.