Skip to content

Commit

Permalink
Removed usage of sending umbracoApi to our testHelpers (#14526)
Browse files Browse the repository at this point in the history
* Cleaned up in Advanced

* Cleaned up in Areas

* Cleaned up in Content

* Cleaned up in Rendering

* Cleaned up in Settings

* Updated the timeout to 40 seconds, 30 seconds is not always enough anymore.

* Bumped version of testhelpers and builders
  • Loading branch information
andr317c authored Jul 7, 2023
1 parent d116366 commit 45083b6
Show file tree
Hide file tree
Showing 8 changed files with 149 additions and 149 deletions.
18 changes: 9 additions & 9 deletions tests/Umbraco.Tests.AcceptanceTest/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/Umbraco.Tests.AcceptanceTest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"wait-on": "^6.0.1"
},
"dependencies": {
"@umbraco/json-models-builders": "^1.0.5",
"@umbraco/playwright-testhelpers": "^1.0.22",
"@umbraco/json-models-builders": "^1.0.6",
"@umbraco/playwright-testhelpers": "^1.0.24",
"camelize": "^1.0.0",
"faker": "^4.1.0",
"form-data": "^4.0.0",
Expand Down
10 changes: 5 additions & 5 deletions tests/Umbraco.Tests.AcceptanceTest/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dotenv.config();
const config: PlaywrightTestConfig = {
testDir: './tests/',
/* Maximum time one test can run for. */
timeout: 30 * 1000,
timeout: 40 * 1000,
expect: {
/**
* Maximum time expect() should wait for the condition to be met.
Expand All @@ -27,18 +27,18 @@ const config: PlaywrightTestConfig = {
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: process.env.CI ? 'line' : 'html',
outputDir : "./results",

/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
actionTimeout: 0,
/* Base URL to use in actions like `await page.goto('/')`. */
// baseURL: 'http://localhost:44332',

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
// When working locally it can be a good idea to use trace: 'on-first-retry' instead of 'retain-on-failure', it can cut the local test times in half.
// When working locally it can be a good idea to use trace: 'on-first-retry' instead of 'retain-on-failure', it can cut the local test times in half.
trace: 'retain-on-failure',
ignoreHTTPSErrors: true,
ignoreHTTPSErrors: true,
},

/* Configure projects for major browsers */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ test.describe('BlockGridEditorAdvancedContent', () => {
.build();
const dataType = await umbracoApi.dataTypes.save(dataTypeBlockGrid);

await umbracoApi.documentTypes.createDefaultDocumentWithBlockGridEditor(umbracoApi, element, dataType);
await umbracoApi.documentTypes.createDefaultDocumentWithBlockGridEditor(element, dataType);

const rootContentNode = new ContentBuilder()
.withContentTypeAlias(documentAlias)
Expand Down Expand Up @@ -134,7 +134,7 @@ test.describe('BlockGridEditorAdvancedContent', () => {
.build();
const dataType = await umbracoApi.dataTypes.save(dataTypeBlockGrid);

await umbracoApi.content.createDefaultContentWithABlockGridEditor(umbracoApi, element, dataType, null);
await umbracoApi.content.createDefaultContentWithABlockGridEditor(element, dataType, null);

await umbracoUi.navigateToContent(blockGridName);

Expand All @@ -160,7 +160,7 @@ test.describe('BlockGridEditorAdvancedContent', () => {
.build();
const dataType = await umbracoApi.dataTypes.save(dataTypeBlockGrid);

await umbracoApi.content.createDefaultContentWithABlockGridEditor(umbracoApi, element, dataType, null);
await umbracoApi.content.createDefaultContentWithABlockGridEditor(element, dataType, null);

await umbracoUi.navigateToContent(blockGridName);

Expand All @@ -186,7 +186,7 @@ test.describe('BlockGridEditorAdvancedContent', () => {
.build();
const dataType = await umbracoApi.dataTypes.save(dataTypeBlockGrid);

await umbracoApi.content.createDefaultContentWithABlockGridEditor(umbracoApi, element, dataType, null);
await umbracoApi.content.createDefaultContentWithABlockGridEditor(element, dataType, null);

await umbracoUi.navigateToContent(blockGridName);

Expand All @@ -213,7 +213,7 @@ test.describe('BlockGridEditorAdvancedContent', () => {
.build();
const dataType = await umbracoApi.dataTypes.save(dataTypeBlockGrid);

await umbracoApi.content.createDefaultContentWithABlockGridEditor(umbracoApi, element, dataType, null);
await umbracoApi.content.createDefaultContentWithABlockGridEditor(element, dataType, null);

await umbracoUi.navigateToContent(blockGridName);

Expand Down Expand Up @@ -250,7 +250,7 @@ test.describe('BlockGridEditorAdvancedContent', () => {
.build();
const dataType = await umbracoApi.dataTypes.save(dataTypeBlockGrid);

await umbracoApi.content.createDefaultContentWithABlockGridEditor(umbracoApi, element, dataType, null);
await umbracoApi.content.createDefaultContentWithABlockGridEditor(element, dataType, null);

await umbracoUi.navigateToContent(blockGridName);

Expand Down Expand Up @@ -288,7 +288,7 @@ test.describe('BlockGridEditorAdvancedContent', () => {
.build();
const dataType = await umbracoApi.dataTypes.save(dataTypeBlockGrid);

await umbracoApi.content.createDefaultContentWithABlockGridEditor(umbracoApi, element, dataType, null);
await umbracoApi.content.createDefaultContentWithABlockGridEditor(element, dataType, null);

await umbracoUi.navigateToContent(blockGridName);

Expand Down Expand Up @@ -336,7 +336,7 @@ test.describe('BlockGridEditorAdvancedContent', () => {
.build();
const dataType = await umbracoApi.dataTypes.save(dataTypeBlockGrid);

await umbracoApi.content.createDefaultContentWithABlockGridEditor(umbracoApi, element, dataType, null);
await umbracoApi.content.createDefaultContentWithABlockGridEditor(element, dataType, null);

await umbracoUi.navigateToContent(blockGridName);

Expand Down
Loading

0 comments on commit 45083b6

Please sign in to comment.