Skip to content

Commit

Permalink
Update settings locator
Browse files Browse the repository at this point in the history
  • Loading branch information
SantosGuillamot committed Feb 7, 2024
1 parent e697db0 commit 36a1cc9
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions test/e2e/specs/editor/various/block-bindings.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -499,11 +499,11 @@ test.describe( 'Block bindings', () => {
// Alt textarea is enabled and with the original value.
await expect(
page
.getByRole( 'tabpanel', { name: 'Block' } )
.getByRole( 'tabpanel', { name: 'Settings' } )
.getByLabel( 'Alternative text' )
).toBeEnabled();
const altValue = await page
.getByRole( 'tabpanel', { name: 'Block' } )
.getByRole( 'tabpanel', { name: 'Settings' } )
.getByLabel( 'Alternative text' )
.inputValue();
expect( altValue ).toBe( 'default alt value' );
Expand All @@ -516,11 +516,11 @@ test.describe( 'Block bindings', () => {

await expect(
page
.getByRole( 'tabpanel', { name: 'Block' } )
.getByRole( 'tabpanel', { name: 'Settings' } )
.getByLabel( 'Title attribute' )
).toBeEnabled();
const titleValue = await page
.getByRole( 'tabpanel', { name: 'Block' } )
.getByRole( 'tabpanel', { name: 'Settings' } )
.getByLabel( 'Title attribute' )
.inputValue();
expect( titleValue ).toBe( 'default title value' );
Expand Down Expand Up @@ -563,11 +563,11 @@ test.describe( 'Block bindings', () => {
// Alt textarea is disabled and with the custom field value.
await expect(
page
.getByRole( 'tabpanel', { name: 'Block' } )
.getByRole( 'tabpanel', { name: 'Settings' } )
.getByLabel( 'Alternative text' )
).toBeDisabled();
const altValue = await page
.getByRole( 'tabpanel', { name: 'Block' } )
.getByRole( 'tabpanel', { name: 'Settings' } )
.getByLabel( 'Alternative text' )
.inputValue();
expect( altValue ).toBe( 'text_custom_field' );
Expand All @@ -579,11 +579,11 @@ test.describe( 'Block bindings', () => {
.click();
await expect(
page
.getByRole( 'tabpanel', { name: 'Block' } )
.getByRole( 'tabpanel', { name: 'Settings' } )
.getByLabel( 'Title attribute' )
).toBeEnabled();
const titleValue = await page
.getByRole( 'tabpanel', { name: 'Block' } )
.getByRole( 'tabpanel', { name: 'Settings' } )
.getByLabel( 'Title attribute' )
.inputValue();
expect( titleValue ).toBe( 'default title value' );
Expand Down Expand Up @@ -626,11 +626,11 @@ test.describe( 'Block bindings', () => {
// Alt textarea is enabled and with the original value.
await expect(
page
.getByRole( 'tabpanel', { name: 'Block' } )
.getByRole( 'tabpanel', { name: 'Settings' } )
.getByLabel( 'Alternative text' )
).toBeEnabled();
const altValue = await page
.getByRole( 'tabpanel', { name: 'Block' } )
.getByRole( 'tabpanel', { name: 'Settings' } )
.getByLabel( 'Alternative text' )
.inputValue();
expect( altValue ).toBe( 'default alt value' );
Expand All @@ -642,11 +642,11 @@ test.describe( 'Block bindings', () => {
.click();
await expect(
page
.getByRole( 'tabpanel', { name: 'Block' } )
.getByRole( 'tabpanel', { name: 'Settings' } )
.getByLabel( 'Title attribute' )
).toBeDisabled();
const titleValue = await page
.getByRole( 'tabpanel', { name: 'Block' } )
.getByRole( 'tabpanel', { name: 'Settings' } )
.getByLabel( 'Title attribute' )
.inputValue();
expect( titleValue ).toBe( 'text_custom_field' );
Expand Down Expand Up @@ -698,11 +698,11 @@ test.describe( 'Block bindings', () => {
// Alt textarea is disabled and with the custom field value.
await expect(
page
.getByRole( 'tabpanel', { name: 'Block' } )
.getByRole( 'tabpanel', { name: 'Settings' } )
.getByLabel( 'Alternative text' )
).toBeDisabled();
const altValue = await page
.getByRole( 'tabpanel', { name: 'Block' } )
.getByRole( 'tabpanel', { name: 'Settings' } )
.getByLabel( 'Alternative text' )
.inputValue();
expect( altValue ).toBe( 'text_custom_field' );
Expand All @@ -714,11 +714,11 @@ test.describe( 'Block bindings', () => {
.click();
await expect(
page
.getByRole( 'tabpanel', { name: 'Block' } )
.getByRole( 'tabpanel', { name: 'Settings' } )
.getByLabel( 'Title attribute' )
).toBeEnabled();
const titleValue = await page
.getByRole( 'tabpanel', { name: 'Block' } )
.getByRole( 'tabpanel', { name: 'Settings' } )
.getByLabel( 'Title attribute' )
.inputValue();
expect( titleValue ).toBe( 'default title value' );
Expand Down Expand Up @@ -1106,11 +1106,11 @@ test.describe( 'Block bindings', () => {
// Alt textarea is disabled and with the custom field value.
await expect(
page
.getByRole( 'tabpanel', { name: 'Block' } )
.getByRole( 'tabpanel', { name: 'Settings' } )
.getByLabel( 'Alternative text' )
).toBeDisabled();
const altValue = await page
.getByRole( 'tabpanel', { name: 'Block' } )
.getByRole( 'tabpanel', { name: 'Settings' } )
.getByLabel( 'Alternative text' )
.inputValue();
expect( altValue ).toBe( 'Value of the text_custom_field' );
Expand Down Expand Up @@ -1171,7 +1171,7 @@ test.describe( 'Block bindings', () => {

// Title input is disabled and with the custom field value.
const advancedButton = page
.getByRole( 'tabpanel', { name: 'Block' } )
.getByRole( 'tabpanel', { name: 'Settings' } )
.getByRole( 'button', {
name: 'Advanced',
} );
Expand All @@ -1182,11 +1182,11 @@ test.describe( 'Block bindings', () => {
}
await expect(
page
.getByRole( 'tabpanel', { name: 'Block' } )
.getByRole( 'tabpanel', { name: 'Settings' } )
.getByLabel( 'Title attribute' )
).toBeDisabled();
const titleValue = await page
.getByRole( 'tabpanel', { name: 'Block' } )
.getByRole( 'tabpanel', { name: 'Settings' } )
.getByLabel( 'Title attribute' )
.inputValue();
expect( titleValue ).toBe( 'Value of the text_custom_field' );
Expand Down Expand Up @@ -1252,18 +1252,18 @@ test.describe( 'Block bindings', () => {
// Alt textarea is disabled and with the custom field value.
await expect(
page
.getByRole( 'tabpanel', { name: 'Block' } )
.getByRole( 'tabpanel', { name: 'Settings' } )
.getByLabel( 'Alternative text' )
).toBeDisabled();
const altValue = await page
.getByRole( 'tabpanel', { name: 'Block' } )
.getByRole( 'tabpanel', { name: 'Settings' } )
.getByLabel( 'Alternative text' )
.inputValue();
expect( altValue ).toBe( 'Value of the text_custom_field' );

// Title input is enabled and with the original value.
const advancedButton = page
.getByRole( 'tabpanel', { name: 'Block' } )
.getByRole( 'tabpanel', { name: 'Settings' } )
.getByRole( 'button', {
name: 'Advanced',
} );
Expand All @@ -1274,11 +1274,11 @@ test.describe( 'Block bindings', () => {
}
await expect(
page
.getByRole( 'tabpanel', { name: 'Block' } )
.getByRole( 'tabpanel', { name: 'Settings' } )
.getByLabel( 'Title attribute' )
).toBeEnabled();
const titleValue = await page
.getByRole( 'tabpanel', { name: 'Block' } )
.getByRole( 'tabpanel', { name: 'Settings' } )
.getByLabel( 'Title attribute' )
.inputValue();
expect( titleValue ).toBe( 'default title value' );
Expand Down

0 comments on commit 36a1cc9

Please sign in to comment.