Convert expect to assert style in tests
We primarily use the "TDD" style assert syntax, but had a few cases of
the "BDD" style expect syntax in our code (mainly for dom asserts). They
are equivalent so we should stick to one. This also reduces our globals
(see common-test-setup.ts), which can be further reduced in following
changes.
https://www.chaijs.com/guide/styles/
Release-Notes: skip
Change-Id: I5e18dfd2804a04e66b7699e5967a33fc4cc41398
diff --git a/polygerrit-ui/app/elements/admin/gr-access-section/gr-access-section_test.ts b/polygerrit-ui/app/elements/admin/gr-access-section/gr-access-section_test.ts
index b8cee66..6834ad5 100644
--- a/polygerrit-ui/app/elements/admin/gr-access-section/gr-access-section_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-access-section/gr-access-section_test.ts
@@ -71,102 +71,105 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <fieldset class="gr-form-styles" id="section">
- <div id="mainContainer">
- <div class="header">
- <div class="name">
- <h3 class="heading-3">Reference: refs/*</h3>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <fieldset class="gr-form-styles" id="section">
+ <div id="mainContainer">
+ <div class="header">
+ <div class="name">
+ <h3 class="heading-3">Reference: refs/*</h3>
+ <gr-button
+ aria-disabled="false"
+ id="editBtn"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ <gr-icon icon="edit" id="icon" small filled></gr-icon>
+ </gr-button>
+ </div>
+ <iron-input class="editRefInput">
+ <input class="editRefInput" type="text" />
+ </iron-input>
<gr-button
aria-disabled="false"
- id="editBtn"
+ id="deleteBtn"
link=""
role="button"
tabindex="0"
>
- <gr-icon icon="edit" id="icon" small filled></gr-icon>
+ Remove
</gr-button>
</div>
- <iron-input class="editRefInput">
- <input class="editRefInput" type="text" />
- </iron-input>
+ <div class="sectionContent">
+ <gr-permission> </gr-permission>
+ <div id="addPermission">
+ Add permission:
+ <select id="permissionSelect">
+ <option value="label-Code-Review">Label Code-Review</option>
+ <option value="labelAs-Code-Review">
+ Label Code-Review (On Behalf Of)
+ </option>
+ <option value="abandon">Abandon</option>
+ <option value="addPatchSet">Add Patch Set</option>
+ <option value="create">Create Reference</option>
+ <option value="createSignedTag">Create Signed Tag</option>
+ <option value="createTag">Create Annotated Tag</option>
+ <option value="delete">Delete Reference</option>
+ <option value="deleteChanges">Delete Changes</option>
+ <option value="deleteOwnChanges">Delete Own Changes</option>
+ <option value="editHashtags">Edit Hashtags</option>
+ <option value="editTopicName">Edit Topic Name</option>
+ <option value="forgeAuthor">Forge Author Identity</option>
+ <option value="forgeCommitter">
+ Forge Committer Identity
+ </option>
+ <option value="forgeServerAsCommitter">
+ Forge Server Identity
+ </option>
+ <option value="owner">Owner</option>
+ <option value="push">Push</option>
+ <option value="pushMerge">Push Merge Commit</option>
+ <option value="rebase">Rebase</option>
+ <option value="removeReviewer">Remove Reviewer</option>
+ <option value="revert">Revert</option>
+ <option value="submit">Submit</option>
+ <option value="submitAs">Submit (On Behalf Of)</option>
+ <option value="toggleWipState">
+ Toggle Work In Progress State
+ </option>
+ <option value="viewPrivateChanges">
+ View Private Changes
+ </option>
+ </select>
+ <gr-button
+ aria-disabled="false"
+ id="addBtn"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Add
+ </gr-button>
+ </div>
+ </div>
+ </div>
+ <div id="deletedContainer">
+ <span> Reference: refs/* was deleted </span>
<gr-button
aria-disabled="false"
- id="deleteBtn"
+ id="undoRemoveBtn"
link=""
role="button"
tabindex="0"
>
- Remove
+ Undo
</gr-button>
</div>
- <div class="sectionContent">
- <gr-permission> </gr-permission>
- <div id="addPermission">
- Add permission:
- <select id="permissionSelect">
- <option value="label-Code-Review">Label Code-Review</option>
- <option value="labelAs-Code-Review">
- Label Code-Review (On Behalf Of)
- </option>
- <option value="abandon">Abandon</option>
- <option value="addPatchSet">Add Patch Set</option>
- <option value="create">Create Reference</option>
- <option value="createSignedTag">Create Signed Tag</option>
- <option value="createTag">Create Annotated Tag</option>
- <option value="delete">Delete Reference</option>
- <option value="deleteChanges">Delete Changes</option>
- <option value="deleteOwnChanges">Delete Own Changes</option>
- <option value="editHashtags">Edit Hashtags</option>
- <option value="editTopicName">Edit Topic Name</option>
- <option value="forgeAuthor">Forge Author Identity</option>
- <option value="forgeCommitter">
- Forge Committer Identity
- </option>
- <option value="forgeServerAsCommitter">
- Forge Server Identity
- </option>
- <option value="owner">Owner</option>
- <option value="push">Push</option>
- <option value="pushMerge">Push Merge Commit</option>
- <option value="rebase">Rebase</option>
- <option value="removeReviewer">Remove Reviewer</option>
- <option value="revert">Revert</option>
- <option value="submit">Submit</option>
- <option value="submitAs">Submit (On Behalf Of)</option>
- <option value="toggleWipState">
- Toggle Work In Progress State
- </option>
- <option value="viewPrivateChanges">
- View Private Changes
- </option>
- </select>
- <gr-button
- aria-disabled="false"
- id="addBtn"
- link=""
- role="button"
- tabindex="0"
- >
- Add
- </gr-button>
- </div>
- </div>
- </div>
- <div id="deletedContainer">
- <span> Reference: refs/* was deleted </span>
- <gr-button
- aria-disabled="false"
- id="undoRemoveBtn"
- link=""
- role="button"
- tabindex="0"
- >
- Undo
- </gr-button>
- </div>
- </fieldset>
- `);
+ </fieldset>
+ `
+ );
});
test('updateSection', () => {
diff --git a/polygerrit-ui/app/elements/admin/gr-admin-group-list/gr-admin-group-list_test.ts b/polygerrit-ui/app/elements/admin/gr-admin-group-list/gr-admin-group-list_test.ts
index e792682..39c4e2e 100644
--- a/polygerrit-ui/app/elements/admin/gr-admin-group-list/gr-admin-group-list_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-admin-group-list/gr-admin-group-list_test.ts
@@ -65,45 +65,48 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-list-view>
- <table class="genericList" id="list">
- <tbody>
- <tr class="headerRow">
- <th class="name topHeader">Group Name</th>
- <th class="description topHeader">Group Description</th>
- <th class="topHeader visibleToAll">Visible To All</th>
- </tr>
- <tr class="loading loadingMsg" id="loading">
- <td>Loading...</td>
- </tr>
- </tbody>
- <tbody class="loading"></tbody>
- </table>
- </gr-list-view>
- <gr-overlay
- aria-hidden="true"
- id="createOverlay"
- style="outline: none; display: none;"
- tabindex="-1"
- with-backdrop=""
- >
- <gr-dialog
- class="confirmDialog"
- confirm-label="Create"
- confirm-on-enter=""
- disabled=""
- id="createDialog"
- role="dialog"
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-list-view>
+ <table class="genericList" id="list">
+ <tbody>
+ <tr class="headerRow">
+ <th class="name topHeader">Group Name</th>
+ <th class="description topHeader">Group Description</th>
+ <th class="topHeader visibleToAll">Visible To All</th>
+ </tr>
+ <tr class="loading loadingMsg" id="loading">
+ <td>Loading...</td>
+ </tr>
+ </tbody>
+ <tbody class="loading"></tbody>
+ </table>
+ </gr-list-view>
+ <gr-overlay
+ aria-hidden="true"
+ id="createOverlay"
+ style="outline: none; display: none;"
+ tabindex="-1"
+ with-backdrop=""
>
- <div class="header" slot="header">Create Group</div>
- <div class="main" slot="main">
- <gr-create-group-dialog id="createNewModal">
- </gr-create-group-dialog>
- </div>
- </gr-dialog>
- </gr-overlay>
- `);
+ <gr-dialog
+ class="confirmDialog"
+ confirm-label="Create"
+ confirm-on-enter=""
+ disabled=""
+ id="createDialog"
+ role="dialog"
+ >
+ <div class="header" slot="header">Create Group</div>
+ <div class="main" slot="main">
+ <gr-create-group-dialog id="createNewModal">
+ </gr-create-group-dialog>
+ </div>
+ </gr-dialog>
+ </gr-overlay>
+ `
+ );
});
test('computeGroupUrl', () => {
diff --git a/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view_test.ts b/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view_test.ts
index e37d5bf..21dd9e1 100644
--- a/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view_test.ts
@@ -511,39 +511,42 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-page-nav class="navStyles">
- <ul class="sectionContent">
- <li class="sectionTitle">
- <a
- class="title"
- href="//localhost:9876/admin/repos"
- rel="noopener"
- >
- Repositories
- </a>
- </li>
- <li class="sectionTitle">
- <a
- class="title"
- href="//localhost:9876/admin/groups"
- rel="noopener"
- >
- Groups
- </a>
- </li>
- <li class="sectionTitle">
- <a
- class="title"
- href="//localhost:9876/admin/plugins"
- rel="noopener"
- >
- Plugins
- </a>
- </li>
- </ul>
- </gr-page-nav>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-page-nav class="navStyles">
+ <ul class="sectionContent">
+ <li class="sectionTitle">
+ <a
+ class="title"
+ href="//localhost:9876/admin/repos"
+ rel="noopener"
+ >
+ Repositories
+ </a>
+ </li>
+ <li class="sectionTitle">
+ <a
+ class="title"
+ href="//localhost:9876/admin/groups"
+ rel="noopener"
+ >
+ Groups
+ </a>
+ </li>
+ <li class="sectionTitle">
+ <a
+ class="title"
+ href="//localhost:9876/admin/plugins"
+ rel="noopener"
+ >
+ Plugins
+ </a>
+ </li>
+ </ul>
+ </gr-page-nav>
+ `
+ );
});
suite('repos', () => {
diff --git a/polygerrit-ui/app/elements/admin/gr-confirm-delete-item-dialog/gr-confirm-delete-item-dialog_test.ts b/polygerrit-ui/app/elements/admin/gr-confirm-delete-item-dialog/gr-confirm-delete-item-dialog_test.ts
index cb86a37..4596f7a 100644
--- a/polygerrit-ui/app/elements/admin/gr-confirm-delete-item-dialog/gr-confirm-delete-item-dialog_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-confirm-delete-item-dialog/gr-confirm-delete-item-dialog_test.ts
@@ -20,21 +20,24 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-dialog
- confirm-label="Delete UNKNOWN ITEM TYPE"
- confirm-on-enter=""
- role="dialog"
- >
- <div class="header" slot="header">UNKNOWN ITEM TYPE Deletion</div>
- <div class="main" slot="main">
- <label for="branchInput">
- Do you really want to delete the following UNKNOWN ITEM TYPE?
- </label>
- <div>UNKNOWN ITEM</div>
- </div>
- </gr-dialog>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-dialog
+ confirm-label="Delete UNKNOWN ITEM TYPE"
+ confirm-on-enter=""
+ role="dialog"
+ >
+ <div class="header" slot="header">UNKNOWN ITEM TYPE Deletion</div>
+ <div class="main" slot="main">
+ <label for="branchInput">
+ Do you really want to delete the following UNKNOWN ITEM TYPE?
+ </label>
+ <div>UNKNOWN ITEM</div>
+ </div>
+ </gr-dialog>
+ `
+ );
});
test('_handleConfirmTap', () => {
diff --git a/polygerrit-ui/app/elements/admin/gr-create-change-dialog/gr-create-change-dialog_test.ts b/polygerrit-ui/app/elements/admin/gr-create-change-dialog/gr-create-change-dialog_test.ts
index 5dfdf7a..4a58da9 100644
--- a/polygerrit-ui/app/elements/admin/gr-create-change-dialog/gr-create-change-dialog_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-create-change-dialog/gr-create-change-dialog_test.ts
@@ -37,64 +37,70 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="gr-form-styles">
- <section>
- <span class="title"> Select branch for new change </span>
- <span class="value">
- <gr-autocomplete id="branchInput" placeholder="Destination branch">
- </gr-autocomplete>
- </span>
- </section>
- <section>
- <span class="title"> Provide base commit sha1 for change </span>
- <span class="value">
- <iron-input>
- <input
- id="baseCommitInput"
- maxlength="40"
- placeholder="(optional)"
- />
- </iron-input>
- </span>
- </section>
- <section>
- <span class="title"> Enter topic for new change </span>
- <span class="value">
- <iron-input>
- <input
- id="tagNameInput"
- maxlength="1024"
- placeholder="(optional)"
- />
- </iron-input>
- </span>
- </section>
- <section id="description">
- <span class="title"> Description </span>
- <span class="value">
- <iron-autogrow-textarea
- aria-disabled="false"
- autocomplete="on"
- class="message"
- id="messageInput"
- maxrows="15"
- placeholder="Insert the description of the change."
- rows="4"
- >
- </iron-autogrow-textarea>
- </span>
- </section>
- <section>
- <label class="title" for="privateChangeCheckBox">
- Private change
- </label>
- <span class="value">
- <input id="privateChangeCheckBox" type="checkbox" />
- </span>
- </section>
- </div>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="gr-form-styles">
+ <section>
+ <span class="title"> Select branch for new change </span>
+ <span class="value">
+ <gr-autocomplete
+ id="branchInput"
+ placeholder="Destination branch"
+ >
+ </gr-autocomplete>
+ </span>
+ </section>
+ <section>
+ <span class="title"> Provide base commit sha1 for change </span>
+ <span class="value">
+ <iron-input>
+ <input
+ id="baseCommitInput"
+ maxlength="40"
+ placeholder="(optional)"
+ />
+ </iron-input>
+ </span>
+ </section>
+ <section>
+ <span class="title"> Enter topic for new change </span>
+ <span class="value">
+ <iron-input>
+ <input
+ id="tagNameInput"
+ maxlength="1024"
+ placeholder="(optional)"
+ />
+ </iron-input>
+ </span>
+ </section>
+ <section id="description">
+ <span class="title"> Description </span>
+ <span class="value">
+ <iron-autogrow-textarea
+ aria-disabled="false"
+ autocomplete="on"
+ class="message"
+ id="messageInput"
+ maxrows="15"
+ placeholder="Insert the description of the change."
+ rows="4"
+ >
+ </iron-autogrow-textarea>
+ </span>
+ </section>
+ <section>
+ <label class="title" for="privateChangeCheckBox">
+ Private change
+ </label>
+ <span class="value">
+ <input id="privateChangeCheckBox" type="checkbox" />
+ </span>
+ </section>
+ </div>
+ `
+ );
});
test('new change created with default', async () => {
diff --git a/polygerrit-ui/app/elements/admin/gr-create-group-dialog/gr-create-group-dialog_test.ts b/polygerrit-ui/app/elements/admin/gr-create-group-dialog/gr-create-group-dialog_test.ts
index 11c63b8..c14ebab0 100644
--- a/polygerrit-ui/app/elements/admin/gr-create-group-dialog/gr-create-group-dialog_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-create-group-dialog/gr-create-group-dialog_test.ts
@@ -28,18 +28,21 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="gr-form-styles">
- <div id="form">
- <section>
- <span class="title"> Group name </span>
- <iron-input>
- <input />
- </iron-input>
- </section>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="gr-form-styles">
+ <div id="form">
+ <section>
+ <span class="title"> Group name </span>
+ <iron-input>
+ <input />
+ </iron-input>
+ </section>
+ </div>
</div>
- </div>
- `);
+ `
+ );
});
test('name is updated correctly', async () => {
diff --git a/polygerrit-ui/app/elements/admin/gr-create-pointer-dialog/gr-create-pointer-dialog_test.ts b/polygerrit-ui/app/elements/admin/gr-create-pointer-dialog/gr-create-pointer-dialog_test.ts
index de29ad5..b946f21 100644
--- a/polygerrit-ui/app/elements/admin/gr-create-pointer-dialog/gr-create-pointer-dialog_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-create-pointer-dialog/gr-create-pointer-dialog_test.ts
@@ -29,30 +29,33 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="gr-form-styles">
- <div id="form">
- <section id="itemNameSection">
- <span class="title"> name </span>
- <iron-input>
- <input placeholder=" Name" />
- </iron-input>
- </section>
- <section id="itemRevisionSection">
- <span class="title"> Initial Revision </span>
- <iron-input>
- <input placeholder="Revision (Branch or SHA-1)" />
- </iron-input>
- </section>
- <section id="itemAnnotationSection">
- <span class="title"> Annotation </span>
- <iron-input>
- <input placeholder="Annotation (Optional)" />
- </iron-input>
- </section>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="gr-form-styles">
+ <div id="form">
+ <section id="itemNameSection">
+ <span class="title"> name </span>
+ <iron-input>
+ <input placeholder=" Name" />
+ </iron-input>
+ </section>
+ <section id="itemRevisionSection">
+ <span class="title"> Initial Revision </span>
+ <iron-input>
+ <input placeholder="Revision (Branch or SHA-1)" />
+ </iron-input>
+ </section>
+ <section id="itemAnnotationSection">
+ <span class="title"> Annotation </span>
+ <iron-input>
+ <input placeholder="Annotation (Optional)" />
+ </iron-input>
+ </section>
+ </div>
</div>
- </div>
- `);
+ `
+ );
});
test('branch created', async () => {
diff --git a/polygerrit-ui/app/elements/admin/gr-create-repo-dialog/gr-create-repo-dialog_test.ts b/polygerrit-ui/app/elements/admin/gr-create-repo-dialog/gr-create-repo-dialog_test.ts
index c2de839..dc920f7 100644
--- a/polygerrit-ui/app/elements/admin/gr-create-repo-dialog/gr-create-repo-dialog_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-create-repo-dialog/gr-create-repo-dialog_test.ts
@@ -26,60 +26,63 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="gr-form-styles">
- <div id="form">
- <section>
- <span class="title"> Repository name </span>
- <iron-input>
- <input autocomplete="on" id="repoNameInput" />
- </iron-input>
- </section>
- <section>
- <span class="title"> Default Branch </span>
- <iron-input>
- <input autocomplete="off" id="defaultBranchNameInput" />
- </iron-input>
- </section>
- <section>
- <span class="title"> Rights inherit from </span>
- <span class="value">
- <gr-autocomplete id="rightsInheritFromInput"> </gr-autocomplete>
- </span>
- </section>
- <section>
- <span class="title"> Owner </span>
- <span class="value">
- <gr-autocomplete id="ownerInput"> </gr-autocomplete>
- </span>
- </section>
- <section>
- <span class="title"> Create initial empty commit </span>
- <span class="value">
- <gr-select id="initialCommit">
- <select>
- <option value="false">False</option>
- <option value="true">True</option>
- </select>
- </gr-select>
- </span>
- </section>
- <section>
- <span class="title">
- Only serve as parent for other repositories
- </span>
- <span class="value">
- <gr-select id="parentRepo">
- <select>
- <option value="false">False</option>
- <option value="true">True</option>
- </select>
- </gr-select>
- </span>
- </section>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="gr-form-styles">
+ <div id="form">
+ <section>
+ <span class="title"> Repository name </span>
+ <iron-input>
+ <input autocomplete="on" id="repoNameInput" />
+ </iron-input>
+ </section>
+ <section>
+ <span class="title"> Default Branch </span>
+ <iron-input>
+ <input autocomplete="off" id="defaultBranchNameInput" />
+ </iron-input>
+ </section>
+ <section>
+ <span class="title"> Rights inherit from </span>
+ <span class="value">
+ <gr-autocomplete id="rightsInheritFromInput"> </gr-autocomplete>
+ </span>
+ </section>
+ <section>
+ <span class="title"> Owner </span>
+ <span class="value">
+ <gr-autocomplete id="ownerInput"> </gr-autocomplete>
+ </span>
+ </section>
+ <section>
+ <span class="title"> Create initial empty commit </span>
+ <span class="value">
+ <gr-select id="initialCommit">
+ <select>
+ <option value="false">False</option>
+ <option value="true">True</option>
+ </select>
+ </gr-select>
+ </span>
+ </section>
+ <section>
+ <span class="title">
+ Only serve as parent for other repositories
+ </span>
+ <span class="value">
+ <gr-select id="parentRepo">
+ <select>
+ <option value="false">False</option>
+ <option value="true">True</option>
+ </select>
+ </gr-select>
+ </span>
+ </section>
+ </div>
</div>
- </div>
- `);
+ `
+ );
});
test('default values are populated', () => {
diff --git a/polygerrit-ui/app/elements/admin/gr-group-audit-log/gr-group-audit-log_test.ts b/polygerrit-ui/app/elements/admin/gr-group-audit-log/gr-group-audit-log_test.ts
index 9e32ebe..88deab8 100644
--- a/polygerrit-ui/app/elements/admin/gr-group-audit-log/gr-group-audit-log_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-group-audit-log/gr-group-audit-log_test.ts
@@ -35,21 +35,24 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <table class="genericList" id="list">
- <tbody>
- <tr class="headerRow">
- <th class="date topHeader">Date</th>
- <th class="topHeader type">Type</th>
- <th class="member topHeader">Member</th>
- <th class="by-user topHeader">By User</th>
- </tr>
- <tr class="loading loadingMsg" id="loading">
- <td>Loading...</td>
- </tr>
- </tbody>
- </table>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <table class="genericList" id="list">
+ <tbody>
+ <tr class="headerRow">
+ <th class="date topHeader">Date</th>
+ <th class="topHeader type">Type</th>
+ <th class="member topHeader">Member</th>
+ <th class="by-user topHeader">By User</th>
+ </tr>
+ <tr class="loading loadingMsg" id="loading">
+ <td>Loading...</td>
+ </tr>
+ </tbody>
+ </table>
+ `
+ );
});
suite('members', () => {
diff --git a/polygerrit-ui/app/elements/admin/gr-group-members/gr-group-members_test.ts b/polygerrit-ui/app/elements/admin/gr-group-members/gr-group-members_test.ts
index c789168..d13bc74 100644
--- a/polygerrit-ui/app/elements/admin/gr-group-members/gr-group-members_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-group-members/gr-group-members_test.ts
@@ -147,213 +147,218 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="gr-form-styles main">
- <div id="loading">Loading...</div>
- <div id="loadedContent">
- <h1 class="heading-1" id="Title">Administrators</h1>
- <div id="form">
- <h3 class="heading-3" id="members">Members</h3>
- <fieldset>
- <span class="value">
- <gr-autocomplete
- id="groupMemberSearchInput"
- placeholder="Name Or Email"
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="gr-form-styles main">
+ <div id="loading">Loading...</div>
+ <div id="loadedContent">
+ <h1 class="heading-1" id="Title">Administrators</h1>
+ <div id="form">
+ <h3 class="heading-3" id="members">Members</h3>
+ <fieldset>
+ <span class="value">
+ <gr-autocomplete
+ id="groupMemberSearchInput"
+ placeholder="Name Or Email"
+ >
+ </gr-autocomplete>
+ </span>
+ <gr-button
+ aria-disabled="true"
+ disabled=""
+ id="saveGroupMember"
+ role="button"
+ tabindex="-1"
>
- </gr-autocomplete>
- </span>
- <gr-button
- aria-disabled="true"
- disabled=""
- id="saveGroupMember"
- role="button"
- tabindex="-1"
- >
- Add
- </gr-button>
- <table id="groupMembers">
- <tbody>
- <tr class="headerRow">
- <th class="nameHeader">Name</th>
- <th class="emailAddressHeader">Email Address</th>
- <th class="deleteHeader">Delete Member</th>
- </tr>
- </tbody>
- <tbody>
- <tr>
- <td class="nameColumn">
- <gr-account-label clickable="" deselected="">
- </gr-account-label>
- </td>
- <td>jane.roe@example.com</td>
- <td class="deleteColumn">
- <gr-button
- aria-disabled="false"
- class="deleteMembersButton"
- data-index="0"
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr>
- <td class="nameColumn">
- <gr-account-label clickable="" deselected="">
- </gr-account-label>
- </td>
- <td>john.doe@example.com</td>
- <td class="deleteColumn">
- <gr-button
- aria-disabled="false"
- class="deleteMembersButton"
- data-index="1"
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr>
- <td class="nameColumn">
- <gr-account-label clickable="" deselected="">
- </gr-account-label>
- </td>
- <td></td>
- <td class="deleteColumn">
- <gr-button
- aria-disabled="false"
- class="deleteMembersButton"
- data-index="2"
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr>
- <td class="nameColumn">
- <gr-account-label clickable="" deselected="">
- </gr-account-label>
- </td>
- <td></td>
- <td class="deleteColumn">
- <gr-button
- aria-disabled="false"
- class="deleteMembersButton"
- data-index="3"
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- </tbody>
- </table>
- </fieldset>
- <h3 class="heading-3" id="includedGroups">Included Groups</h3>
- <fieldset>
- <span class="value">
- <gr-autocomplete
- id="includedGroupSearchInput"
- placeholder="Group Name"
+ Add
+ </gr-button>
+ <table id="groupMembers">
+ <tbody>
+ <tr class="headerRow">
+ <th class="nameHeader">Name</th>
+ <th class="emailAddressHeader">Email Address</th>
+ <th class="deleteHeader">Delete Member</th>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr>
+ <td class="nameColumn">
+ <gr-account-label clickable="" deselected="">
+ </gr-account-label>
+ </td>
+ <td>jane.roe@example.com</td>
+ <td class="deleteColumn">
+ <gr-button
+ aria-disabled="false"
+ class="deleteMembersButton"
+ data-index="0"
+ role="button"
+ tabindex="0"
+ >
+ Delete
+ </gr-button>
+ </td>
+ </tr>
+ <tr>
+ <td class="nameColumn">
+ <gr-account-label clickable="" deselected="">
+ </gr-account-label>
+ </td>
+ <td>john.doe@example.com</td>
+ <td class="deleteColumn">
+ <gr-button
+ aria-disabled="false"
+ class="deleteMembersButton"
+ data-index="1"
+ role="button"
+ tabindex="0"
+ >
+ Delete
+ </gr-button>
+ </td>
+ </tr>
+ <tr>
+ <td class="nameColumn">
+ <gr-account-label clickable="" deselected="">
+ </gr-account-label>
+ </td>
+ <td></td>
+ <td class="deleteColumn">
+ <gr-button
+ aria-disabled="false"
+ class="deleteMembersButton"
+ data-index="2"
+ role="button"
+ tabindex="0"
+ >
+ Delete
+ </gr-button>
+ </td>
+ </tr>
+ <tr>
+ <td class="nameColumn">
+ <gr-account-label clickable="" deselected="">
+ </gr-account-label>
+ </td>
+ <td></td>
+ <td class="deleteColumn">
+ <gr-button
+ aria-disabled="false"
+ class="deleteMembersButton"
+ data-index="3"
+ role="button"
+ tabindex="0"
+ >
+ Delete
+ </gr-button>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </fieldset>
+ <h3 class="heading-3" id="includedGroups">Included Groups</h3>
+ <fieldset>
+ <span class="value">
+ <gr-autocomplete
+ id="includedGroupSearchInput"
+ placeholder="Group Name"
+ >
+ </gr-autocomplete>
+ </span>
+ <gr-button
+ aria-disabled="true"
+ disabled=""
+ id="saveIncludedGroups"
+ role="button"
+ tabindex="-1"
>
- </gr-autocomplete>
- </span>
- <gr-button
- aria-disabled="true"
- disabled=""
- id="saveIncludedGroups"
- role="button"
- tabindex="-1"
- >
- Add
- </gr-button>
- <table id="includedGroups">
- <tbody>
- <tr class="headerRow">
- <th class="groupNameHeader">Group Name</th>
- <th class="descriptionHeader">Description</th>
- <th class="deleteIncludedHeader">Delete Group</th>
- </tr>
- </tbody>
- <tbody>
- <tr>
- <td class="nameColumn">
- <a href="https://group/url" rel="noopener"> testName </a>
- </td>
- <td></td>
- <td class="deleteColumn">
- <gr-button
- aria-disabled="false"
- class="deleteIncludedGroupButton"
- data-index="0"
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr>
- <td class="nameColumn">
- <a href="https://test/site/group/url" rel="noopener">
- testName2
- </a>
- </td>
- <td></td>
- <td class="deleteColumn">
- <gr-button
- aria-disabled="false"
- class="deleteIncludedGroupButton"
- data-index="1"
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr>
- <td class="nameColumn">
- <a href="https://test/site/group/url" rel="noopener">
- testName3
- </a>
- </td>
- <td></td>
- <td class="deleteColumn">
- <gr-button
- aria-disabled="false"
- class="deleteIncludedGroupButton"
- data-index="2"
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- </tbody>
- </table>
- </fieldset>
+ Add
+ </gr-button>
+ <table id="includedGroups">
+ <tbody>
+ <tr class="headerRow">
+ <th class="groupNameHeader">Group Name</th>
+ <th class="descriptionHeader">Description</th>
+ <th class="deleteIncludedHeader">Delete Group</th>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr>
+ <td class="nameColumn">
+ <a href="https://group/url" rel="noopener">
+ testName
+ </a>
+ </td>
+ <td></td>
+ <td class="deleteColumn">
+ <gr-button
+ aria-disabled="false"
+ class="deleteIncludedGroupButton"
+ data-index="0"
+ role="button"
+ tabindex="0"
+ >
+ Delete
+ </gr-button>
+ </td>
+ </tr>
+ <tr>
+ <td class="nameColumn">
+ <a href="https://test/site/group/url" rel="noopener">
+ testName2
+ </a>
+ </td>
+ <td></td>
+ <td class="deleteColumn">
+ <gr-button
+ aria-disabled="false"
+ class="deleteIncludedGroupButton"
+ data-index="1"
+ role="button"
+ tabindex="0"
+ >
+ Delete
+ </gr-button>
+ </td>
+ </tr>
+ <tr>
+ <td class="nameColumn">
+ <a href="https://test/site/group/url" rel="noopener">
+ testName3
+ </a>
+ </td>
+ <td></td>
+ <td class="deleteColumn">
+ <gr-button
+ aria-disabled="false"
+ class="deleteIncludedGroupButton"
+ data-index="2"
+ role="button"
+ tabindex="0"
+ >
+ Delete
+ </gr-button>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </fieldset>
+ </div>
</div>
</div>
- </div>
- <gr-overlay
- aria-hidden="true"
- id="overlay"
- style="outline: none; display: none;"
- tabindex="-1"
- with-backdrop=""
- >
- <gr-confirm-delete-item-dialog class="confirmDialog">
- </gr-confirm-delete-item-dialog>
- </gr-overlay>
- `);
+ <gr-overlay
+ aria-hidden="true"
+ id="overlay"
+ style="outline: none; display: none;"
+ tabindex="-1"
+ with-backdrop=""
+ >
+ <gr-confirm-delete-item-dialog class="confirmDialog">
+ </gr-confirm-delete-item-dialog>
+ </gr-overlay>
+ `
+ );
});
test('includedGroups', () => {
diff --git a/polygerrit-ui/app/elements/admin/gr-group/gr-group_test.ts b/polygerrit-ui/app/elements/admin/gr-group/gr-group_test.ts
index 9b74f60..2c7dcd5 100644
--- a/polygerrit-ui/app/elements/admin/gr-group/gr-group_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-group/gr-group_test.ts
@@ -46,108 +46,111 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="gr-form-styles main read-only">
- <div class="loading" id="loading">Loading...</div>
- <div class="loading" id="loadedContent">
- <h1 class="heading-1" id="Title"></h1>
- <h2 class="heading-2" id="configurations">General</h2>
- <div id="form">
- <fieldset>
- <h3 class="heading-3" id="groupUUID">Group UUID</h3>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="gr-form-styles main read-only">
+ <div class="loading" id="loading">Loading...</div>
+ <div class="loading" id="loadedContent">
+ <h1 class="heading-1" id="Title"></h1>
+ <h2 class="heading-2" id="configurations">General</h2>
+ <div id="form">
<fieldset>
- <gr-copy-clipboard id="uuid"> </gr-copy-clipboard>
- </fieldset>
- <h3 class="heading-3" id="groupName">Group Name</h3>
- <fieldset>
- <span class="value">
- <gr-autocomplete disabled="" id="groupNameInput">
- </gr-autocomplete>
- </span>
- <span class="value">
- <gr-button
- aria-disabled="true"
- disabled=""
- id="inputUpdateNameBtn"
- role="button"
- tabindex="-1"
- >
- Rename Group
- </gr-button>
- </span>
- </fieldset>
- <h3 class="heading-3" id="groupOwner">Owners</h3>
- <fieldset>
- <span class="value">
- <gr-autocomplete disabled="" id="groupOwnerInput">
- </gr-autocomplete>
- </span>
- <span class="value">
- <gr-button
- aria-disabled="true"
- disabled=""
- id="inputUpdateOwnerBtn"
- role="button"
- tabindex="-1"
- >
- Change Owners
- </gr-button>
- </span>
- </fieldset>
- <h3 class="heading-3">Description</h3>
- <fieldset>
- <div>
- <gr-textarea
- autocomplete="on"
- class="description monospace"
- disabled=""
- monospace=""
- rows="4"
- >
- </gr-textarea>
- </div>
- <span class="value">
- <gr-button
- aria-disabled="true"
- disabled=""
- role="button"
- tabindex="-1"
- >
- Save Description
- </gr-button>
- </span>
- </fieldset>
- <h3 class="heading-3" id="options">Group Options</h3>
- <fieldset>
- <section>
- <span class="title">
- Make group visible to all registered users
+ <h3 class="heading-3" id="groupUUID">Group UUID</h3>
+ <fieldset>
+ <gr-copy-clipboard id="uuid"> </gr-copy-clipboard>
+ </fieldset>
+ <h3 class="heading-3" id="groupName">Group Name</h3>
+ <fieldset>
+ <span class="value">
+ <gr-autocomplete disabled="" id="groupNameInput">
+ </gr-autocomplete>
</span>
<span class="value">
- <gr-select id="visibleToAll">
- <select disabled="">
- <option value="false">False</option>
- <option value="true">True</option>
- </select>
- </gr-select>
+ <gr-button
+ aria-disabled="true"
+ disabled=""
+ id="inputUpdateNameBtn"
+ role="button"
+ tabindex="-1"
+ >
+ Rename Group
+ </gr-button>
</span>
- </section>
- <span class="value">
- <gr-button
- aria-disabled="true"
- disabled=""
- role="button"
- tabindex="-1"
- >
- Save Group Options
- </gr-button>
- </span>
+ </fieldset>
+ <h3 class="heading-3" id="groupOwner">Owners</h3>
+ <fieldset>
+ <span class="value">
+ <gr-autocomplete disabled="" id="groupOwnerInput">
+ </gr-autocomplete>
+ </span>
+ <span class="value">
+ <gr-button
+ aria-disabled="true"
+ disabled=""
+ id="inputUpdateOwnerBtn"
+ role="button"
+ tabindex="-1"
+ >
+ Change Owners
+ </gr-button>
+ </span>
+ </fieldset>
+ <h3 class="heading-3">Description</h3>
+ <fieldset>
+ <div>
+ <gr-textarea
+ autocomplete="on"
+ class="description monospace"
+ disabled=""
+ monospace=""
+ rows="4"
+ >
+ </gr-textarea>
+ </div>
+ <span class="value">
+ <gr-button
+ aria-disabled="true"
+ disabled=""
+ role="button"
+ tabindex="-1"
+ >
+ Save Description
+ </gr-button>
+ </span>
+ </fieldset>
+ <h3 class="heading-3" id="options">Group Options</h3>
+ <fieldset>
+ <section>
+ <span class="title">
+ Make group visible to all registered users
+ </span>
+ <span class="value">
+ <gr-select id="visibleToAll">
+ <select disabled="">
+ <option value="false">False</option>
+ <option value="true">True</option>
+ </select>
+ </gr-select>
+ </span>
+ </section>
+ <span class="value">
+ <gr-button
+ aria-disabled="true"
+ disabled=""
+ role="button"
+ tabindex="-1"
+ >
+ Save Group Options
+ </gr-button>
+ </span>
+ </fieldset>
</fieldset>
- </fieldset>
+ </div>
</div>
</div>
- </div>
- `);
+ `
+ );
});
test('loading displays before group config is loaded', () => {
diff --git a/polygerrit-ui/app/elements/admin/gr-permission/gr-permission_test.ts b/polygerrit-ui/app/elements/admin/gr-permission/gr-permission_test.ts
index 3e4e7a9..e68876a 100644
--- a/polygerrit-ui/app/elements/admin/gr-permission/gr-permission_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-permission/gr-permission_test.ts
@@ -318,58 +318,64 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <section class="gr-form-styles" id="permission">
- <div id="mainContainer">
- <div class="header">
- <span class="title"> Priority </span>
- <div class="right">
- <paper-toggle-button
- aria-disabled="true"
- aria-pressed="false"
- disabled=""
- id="exclusiveToggle"
- role="button"
- style="pointer-events: none; touch-action: none;"
- tabindex="-1"
- toggles=""
- >
- </paper-toggle-button>
- Not Exclusive
- <gr-button
- aria-disabled="false"
- id="removeBtn"
- link=""
- role="button"
- tabindex="0"
- >
- Remove
- </gr-button>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <section class="gr-form-styles" id="permission">
+ <div id="mainContainer">
+ <div class="header">
+ <span class="title"> Priority </span>
+ <div class="right">
+ <paper-toggle-button
+ aria-disabled="true"
+ aria-pressed="false"
+ disabled=""
+ id="exclusiveToggle"
+ role="button"
+ style="pointer-events: none; touch-action: none;"
+ tabindex="-1"
+ toggles=""
+ >
+ </paper-toggle-button>
+ Not Exclusive
+ <gr-button
+ aria-disabled="false"
+ id="removeBtn"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Remove
+ </gr-button>
+ </div>
+ </div>
+ <div class="rules">
+ <gr-rule-editor> </gr-rule-editor>
+ <gr-rule-editor> </gr-rule-editor>
+ <div id="addRule">
+ <gr-autocomplete
+ id="groupAutocomplete"
+ placeholder="Add group"
+ >
+ </gr-autocomplete>
+ </div>
</div>
</div>
- <div class="rules">
- <gr-rule-editor> </gr-rule-editor>
- <gr-rule-editor> </gr-rule-editor>
- <div id="addRule">
- <gr-autocomplete id="groupAutocomplete" placeholder="Add group">
- </gr-autocomplete>
- </div>
+ <div id="deletedContainer">
+ <span> Priority was deleted </span>
+ <gr-button
+ aria-disabled="false"
+ id="undoRemoveBtn"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Undo
+ </gr-button>
</div>
- </div>
- <div id="deletedContainer">
- <span> Priority was deleted </span>
- <gr-button
- aria-disabled="false"
- id="undoRemoveBtn"
- link=""
- role="button"
- tabindex="0"
- >
- Undo
- </gr-button>
- </div>
- </section>
- `);
+ </section>
+ `
+ );
});
test('adding a rule', async () => {
diff --git a/polygerrit-ui/app/elements/admin/gr-plugin-config-array-editor/gr-plugin-config-array-editor_test.ts b/polygerrit-ui/app/elements/admin/gr-plugin-config-array-editor/gr-plugin-config-array-editor_test.ts
index 4786aff..5e8d8d5 100644
--- a/polygerrit-ui/app/elements/admin/gr-plugin-config-array-editor/gr-plugin-config-array-editor_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-plugin-config-array-editor/gr-plugin-config-array-editor_test.ts
@@ -31,26 +31,29 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="gr-form-styles wrapper">
- <div class="placeholder row">None configured.</div>
- <div class="row">
- <iron-input>
- <input id="input" />
- </iron-input>
- <gr-button
- aria-disabled="true"
- disabled=""
- id="addButton"
- link=""
- role="button"
- tabindex="-1"
- >
- Add
- </gr-button>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="gr-form-styles wrapper">
+ <div class="placeholder row">None configured.</div>
+ <div class="row">
+ <iron-input>
+ <input id="input" />
+ </iron-input>
+ <gr-button
+ aria-disabled="true"
+ disabled=""
+ id="addButton"
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Add
+ </gr-button>
+ </div>
</div>
- </div>
- `);
+ `
+ );
});
suite('adding', () => {
diff --git a/polygerrit-ui/app/elements/admin/gr-plugin-list/gr-plugin-list_test.ts b/polygerrit-ui/app/elements/admin/gr-plugin-list/gr-plugin-list_test.ts
index c2f53e1..40a23d0 100644
--- a/polygerrit-ui/app/elements/admin/gr-plugin-list/gr-plugin-list_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-plugin-list/gr-plugin-list_test.ts
@@ -77,222 +77,225 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-list-view>
- <table class="genericList" id="list">
- <tbody>
- <tr class="headerRow">
- <th class="name topHeader">Plugin Name</th>
- <th class="topHeader version">Version</th>
- <th class="apiVersion topHeader">API Version</th>
- <th class="status topHeader">Status</th>
- </tr>
- </tbody>
- <tbody>
- <tr class="table">
- <td class="name">
- <a href="/plugins/test0/"> test0 </a>
- </td>
- <td class="version">version-0</td>
- <td class="apiVersion">api-version-0</td>
- <td class="status">Enabled</td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/plugins/test1/"> test1 </a>
- </td>
- <td class="version">version-1</td>
- <td class="apiVersion">api-version-1</td>
- <td class="status">Enabled</td>
- </tr>
- <tr class="table">
- <td class="name">test2</td>
- <td class="version">version-2</td>
- <td class="apiVersion">api-version-2</td>
- <td class="status">Enabled</td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/plugins/test3/"> test3 </a>
- </td>
- <td class="version">version-3</td>
- <td class="apiVersion">api-version-3</td>
- <td class="status">Enabled</td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/plugins/test4/"> test4 </a>
- </td>
- <td class="version">version-4</td>
- <td class="apiVersion">
- <span class="placeholder"> -- </span>
- </td>
- <td class="status">Enabled</td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/plugins/test5/"> test5 </a>
- </td>
- <td class="version">version-5</td>
- <td class="apiVersion">api-version-5</td>
- <td class="status">Enabled</td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/plugins/test6/"> test6 </a>
- </td>
- <td class="version">version-6</td>
- <td class="apiVersion">api-version-6</td>
- <td class="status">Enabled</td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/plugins/test7/"> test7 </a>
- </td>
- <td class="version">version-7</td>
- <td class="apiVersion">api-version-7</td>
- <td class="status">Enabled</td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/plugins/test8/"> test8 </a>
- </td>
- <td class="version">version-8</td>
- <td class="apiVersion">api-version-8</td>
- <td class="status">Enabled</td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/plugins/test9/"> test9 </a>
- </td>
- <td class="version">version-9</td>
- <td class="apiVersion">api-version-9</td>
- <td class="status">Enabled</td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/plugins/test10/"> test10 </a>
- </td>
- <td class="version">version-10</td>
- <td class="apiVersion">api-version-10</td>
- <td class="status">Enabled</td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/plugins/test11/"> test11 </a>
- </td>
- <td class="version">version-11</td>
- <td class="apiVersion">api-version-11</td>
- <td class="status">Enabled</td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/plugins/test12/"> test12 </a>
- </td>
- <td class="version">version-12</td>
- <td class="apiVersion">api-version-12</td>
- <td class="status">Enabled</td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/plugins/test13/"> test13 </a>
- </td>
- <td class="version">version-13</td>
- <td class="apiVersion">api-version-13</td>
- <td class="status">Enabled</td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/plugins/test14/"> test14 </a>
- </td>
- <td class="version">version-14</td>
- <td class="apiVersion">api-version-14</td>
- <td class="status">Enabled</td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/plugins/test15/"> test15 </a>
- </td>
- <td class="version">version-15</td>
- <td class="apiVersion">api-version-15</td>
- <td class="status">Enabled</td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/plugins/test16/"> test16 </a>
- </td>
- <td class="version">version-16</td>
- <td class="apiVersion">api-version-16</td>
- <td class="status">Enabled</td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/plugins/test17/"> test17 </a>
- </td>
- <td class="version">version-17</td>
- <td class="apiVersion">api-version-17</td>
- <td class="status">Enabled</td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/plugins/test18/"> test18 </a>
- </td>
- <td class="version">version-18</td>
- <td class="apiVersion">api-version-18</td>
- <td class="status">Enabled</td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/plugins/test19/"> test19 </a>
- </td>
- <td class="version">version-19</td>
- <td class="apiVersion">api-version-19</td>
- <td class="status">Enabled</td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/plugins/test20/"> test20 </a>
- </td>
- <td class="version">version-20</td>
- <td class="apiVersion">api-version-20</td>
- <td class="status">Enabled</td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/plugins/test21/"> test21 </a>
- </td>
- <td class="version">version-21</td>
- <td class="apiVersion">api-version-21</td>
- <td class="status">Enabled</td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/plugins/test22/"> test22 </a>
- </td>
- <td class="version">version-22</td>
- <td class="apiVersion">api-version-22</td>
- <td class="status">Enabled</td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/plugins/test23/"> test23 </a>
- </td>
- <td class="version">version-23</td>
- <td class="apiVersion">api-version-23</td>
- <td class="status">Enabled</td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/plugins/test24/"> test24 </a>
- </td>
- <td class="version">version-24</td>
- <td class="apiVersion">api-version-24</td>
- <td class="status">Enabled</td>
- </tr>
- </tbody>
- </table>
- </gr-list-view>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-list-view>
+ <table class="genericList" id="list">
+ <tbody>
+ <tr class="headerRow">
+ <th class="name topHeader">Plugin Name</th>
+ <th class="topHeader version">Version</th>
+ <th class="apiVersion topHeader">API Version</th>
+ <th class="status topHeader">Status</th>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr class="table">
+ <td class="name">
+ <a href="/plugins/test0/"> test0 </a>
+ </td>
+ <td class="version">version-0</td>
+ <td class="apiVersion">api-version-0</td>
+ <td class="status">Enabled</td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/plugins/test1/"> test1 </a>
+ </td>
+ <td class="version">version-1</td>
+ <td class="apiVersion">api-version-1</td>
+ <td class="status">Enabled</td>
+ </tr>
+ <tr class="table">
+ <td class="name">test2</td>
+ <td class="version">version-2</td>
+ <td class="apiVersion">api-version-2</td>
+ <td class="status">Enabled</td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/plugins/test3/"> test3 </a>
+ </td>
+ <td class="version">version-3</td>
+ <td class="apiVersion">api-version-3</td>
+ <td class="status">Enabled</td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/plugins/test4/"> test4 </a>
+ </td>
+ <td class="version">version-4</td>
+ <td class="apiVersion">
+ <span class="placeholder"> -- </span>
+ </td>
+ <td class="status">Enabled</td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/plugins/test5/"> test5 </a>
+ </td>
+ <td class="version">version-5</td>
+ <td class="apiVersion">api-version-5</td>
+ <td class="status">Enabled</td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/plugins/test6/"> test6 </a>
+ </td>
+ <td class="version">version-6</td>
+ <td class="apiVersion">api-version-6</td>
+ <td class="status">Enabled</td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/plugins/test7/"> test7 </a>
+ </td>
+ <td class="version">version-7</td>
+ <td class="apiVersion">api-version-7</td>
+ <td class="status">Enabled</td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/plugins/test8/"> test8 </a>
+ </td>
+ <td class="version">version-8</td>
+ <td class="apiVersion">api-version-8</td>
+ <td class="status">Enabled</td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/plugins/test9/"> test9 </a>
+ </td>
+ <td class="version">version-9</td>
+ <td class="apiVersion">api-version-9</td>
+ <td class="status">Enabled</td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/plugins/test10/"> test10 </a>
+ </td>
+ <td class="version">version-10</td>
+ <td class="apiVersion">api-version-10</td>
+ <td class="status">Enabled</td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/plugins/test11/"> test11 </a>
+ </td>
+ <td class="version">version-11</td>
+ <td class="apiVersion">api-version-11</td>
+ <td class="status">Enabled</td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/plugins/test12/"> test12 </a>
+ </td>
+ <td class="version">version-12</td>
+ <td class="apiVersion">api-version-12</td>
+ <td class="status">Enabled</td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/plugins/test13/"> test13 </a>
+ </td>
+ <td class="version">version-13</td>
+ <td class="apiVersion">api-version-13</td>
+ <td class="status">Enabled</td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/plugins/test14/"> test14 </a>
+ </td>
+ <td class="version">version-14</td>
+ <td class="apiVersion">api-version-14</td>
+ <td class="status">Enabled</td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/plugins/test15/"> test15 </a>
+ </td>
+ <td class="version">version-15</td>
+ <td class="apiVersion">api-version-15</td>
+ <td class="status">Enabled</td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/plugins/test16/"> test16 </a>
+ </td>
+ <td class="version">version-16</td>
+ <td class="apiVersion">api-version-16</td>
+ <td class="status">Enabled</td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/plugins/test17/"> test17 </a>
+ </td>
+ <td class="version">version-17</td>
+ <td class="apiVersion">api-version-17</td>
+ <td class="status">Enabled</td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/plugins/test18/"> test18 </a>
+ </td>
+ <td class="version">version-18</td>
+ <td class="apiVersion">api-version-18</td>
+ <td class="status">Enabled</td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/plugins/test19/"> test19 </a>
+ </td>
+ <td class="version">version-19</td>
+ <td class="apiVersion">api-version-19</td>
+ <td class="status">Enabled</td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/plugins/test20/"> test20 </a>
+ </td>
+ <td class="version">version-20</td>
+ <td class="apiVersion">api-version-20</td>
+ <td class="status">Enabled</td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/plugins/test21/"> test21 </a>
+ </td>
+ <td class="version">version-21</td>
+ <td class="apiVersion">api-version-21</td>
+ <td class="status">Enabled</td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/plugins/test22/"> test22 </a>
+ </td>
+ <td class="version">version-22</td>
+ <td class="apiVersion">api-version-22</td>
+ <td class="status">Enabled</td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/plugins/test23/"> test23 </a>
+ </td>
+ <td class="version">version-23</td>
+ <td class="apiVersion">api-version-23</td>
+ <td class="status">Enabled</td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/plugins/test24/"> test24 </a>
+ </td>
+ <td class="version">version-24</td>
+ <td class="apiVersion">api-version-24</td>
+ <td class="status">Enabled</td>
+ </tr>
+ </tbody>
+ </table>
+ </gr-list-view>
+ `
+ );
});
test('plugin in the list is formatted correctly', async () => {
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access_test.ts b/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access_test.ts
index 62ed6da..5431097 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access_test.ts
@@ -127,59 +127,62 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="main">
- <div id="loading">Loading...</div>
- <div id="loadedContent">
- <h3 class="heading-3" id="inheritsFrom">
- <span class="rightsText"> Rights Inherit From </span>
- <a href="" id="inheritFromName" rel="noopener"> </a>
- <gr-autocomplete id="editInheritFromInput"> </gr-autocomplete>
- </h3>
- <div class="weblinks">History:</div>
- <div class="referenceContainer">
- <gr-button
- aria-disabled="false"
- id="addReferenceBtn"
- role="button"
- tabindex="0"
- >
- Add Reference
- </gr-button>
- </div>
- <div>
- <gr-button
- aria-disabled="false"
- id="editBtn"
- role="button"
- tabindex="0"
- >
- Edit
- </gr-button>
- <gr-button
- aria-disabled="false"
- class="invisible"
- id="saveBtn"
- primary=""
- role="button"
- tabindex="0"
- >
- Save
- </gr-button>
- <gr-button
- aria-disabled="false"
- class="invisible"
- id="saveReviewBtn"
- primary=""
- role="button"
- tabindex="0"
- >
- Save for review
- </gr-button>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="main">
+ <div id="loading">Loading...</div>
+ <div id="loadedContent">
+ <h3 class="heading-3" id="inheritsFrom">
+ <span class="rightsText"> Rights Inherit From </span>
+ <a href="" id="inheritFromName" rel="noopener"> </a>
+ <gr-autocomplete id="editInheritFromInput"> </gr-autocomplete>
+ </h3>
+ <div class="weblinks">History:</div>
+ <div class="referenceContainer">
+ <gr-button
+ aria-disabled="false"
+ id="addReferenceBtn"
+ role="button"
+ tabindex="0"
+ >
+ Add Reference
+ </gr-button>
+ </div>
+ <div>
+ <gr-button
+ aria-disabled="false"
+ id="editBtn"
+ role="button"
+ tabindex="0"
+ >
+ Edit
+ </gr-button>
+ <gr-button
+ aria-disabled="false"
+ class="invisible"
+ id="saveBtn"
+ primary=""
+ role="button"
+ tabindex="0"
+ >
+ Save
+ </gr-button>
+ <gr-button
+ aria-disabled="false"
+ class="invisible"
+ id="saveReviewBtn"
+ primary=""
+ role="button"
+ tabindex="0"
+ >
+ Save for review
+ </gr-button>
+ </div>
</div>
</div>
- </div>
- `);
+ `
+ );
});
test('_repoChanged called when repo name changes', async () => {
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-commands/gr-repo-commands_test.ts b/polygerrit-ui/app/elements/admin/gr-repo-commands/gr-repo-commands_test.ts
index 321ee06..1ab5e13 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-commands/gr-repo-commands_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-repo-commands/gr-repo-commands_test.ts
@@ -38,54 +38,57 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="gr-form-styles main read-only">
- <h1 class="heading-1" id="Title">Repository Commands</h1>
- <div class="loading" id="loading">Loading...</div>
- <div class="loading" id="loadedContent">
- <h2 class="heading-2" id="options">Command</h2>
- <div id="form">
- <h3 class="heading-3">Create change</h3>
- <gr-button aria-disabled="false" role="button" tabindex="0">
- Create change
- </gr-button>
- <h3 class="heading-3">Edit repo config</h3>
- <gr-button
- aria-disabled="false"
- id="editRepoConfig"
- role="button"
- tabindex="0"
- >
- Edit repo config
- </gr-button>
- <gr-endpoint-decorator name="repo-command">
- <gr-endpoint-param name="config"> </gr-endpoint-param>
- <gr-endpoint-param name="repoName"> </gr-endpoint-param>
- </gr-endpoint-decorator>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="gr-form-styles main read-only">
+ <h1 class="heading-1" id="Title">Repository Commands</h1>
+ <div class="loading" id="loading">Loading...</div>
+ <div class="loading" id="loadedContent">
+ <h2 class="heading-2" id="options">Command</h2>
+ <div id="form">
+ <h3 class="heading-3">Create change</h3>
+ <gr-button aria-disabled="false" role="button" tabindex="0">
+ Create change
+ </gr-button>
+ <h3 class="heading-3">Edit repo config</h3>
+ <gr-button
+ aria-disabled="false"
+ id="editRepoConfig"
+ role="button"
+ tabindex="0"
+ >
+ Edit repo config
+ </gr-button>
+ <gr-endpoint-decorator name="repo-command">
+ <gr-endpoint-param name="config"> </gr-endpoint-param>
+ <gr-endpoint-param name="repoName"> </gr-endpoint-param>
+ </gr-endpoint-decorator>
+ </div>
</div>
</div>
- </div>
- <gr-overlay
- aria-hidden="true"
- id="createChangeOverlay"
- style="outline: none; display: none;"
- tabindex="-1"
- with-backdrop=""
- >
- <gr-dialog
- confirm-label="Create"
- disabled=""
- id="createChangeDialog"
- role="dialog"
+ <gr-overlay
+ aria-hidden="true"
+ id="createChangeOverlay"
+ style="outline: none; display: none;"
+ tabindex="-1"
+ with-backdrop=""
>
- <div class="header" slot="header">Create Change</div>
- <div class="main" slot="main">
- <gr-create-change-dialog id="createNewChangeModal">
- </gr-create-change-dialog>
- </div>
- </gr-dialog>
- </gr-overlay>
- `);
+ <gr-dialog
+ confirm-label="Create"
+ disabled=""
+ id="createChangeDialog"
+ role="dialog"
+ >
+ <div class="header" slot="header">Create Change</div>
+ <div class="main" slot="main">
+ <gr-create-change-dialog id="createNewChangeModal">
+ </gr-create-change-dialog>
+ </div>
+ </gr-dialog>
+ </gr-overlay>
+ `
+ );
});
suite('create new change dialog', () => {
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-dashboards/gr-repo-dashboards_test.ts b/polygerrit-ui/app/elements/admin/gr-repo-dashboards/gr-repo-dashboards_test.ts
index 0426c8f..d82b856 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-dashboards/gr-repo-dashboards_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-repo-dashboards/gr-repo-dashboards_test.ts
@@ -82,23 +82,26 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <table class="genericList loading" id="list">
- <tbody>
- <tr class="headerRow">
- <th class="topHeader">Dashboard name</th>
- <th class="topHeader">Dashboard title</th>
- <th class="topHeader">Dashboard description</th>
- <th class="topHeader">Inherited from</th>
- <th class="topHeader">Default</th>
- </tr>
- <tr id="loadingContainer">
- <td>Loading...</td>
- </tr>
- </tbody>
- <tbody id="dashboards"></tbody>
- </table>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <table class="genericList loading" id="list">
+ <tbody>
+ <tr class="headerRow">
+ <th class="topHeader">Dashboard name</th>
+ <th class="topHeader">Dashboard title</th>
+ <th class="topHeader">Dashboard description</th>
+ <th class="topHeader">Inherited from</th>
+ <th class="topHeader">Default</th>
+ </tr>
+ <tr id="loadingContainer">
+ <td>Loading...</td>
+ </tr>
+ </tbody>
+ <tbody id="dashboards"></tbody>
+ </table>
+ `
+ );
});
test('loading, sections, and ordering', async () => {
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list_test.ts b/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list_test.ts
index 972b0d6..cb836b0 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list_test.ts
@@ -121,1942 +121,1945 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-list-view>
- <table class="genericList gr-form-styles" id="list">
- <tbody>
- <tr class="headerRow">
- <th class="name topHeader">Name</th>
- <th class="revision topHeader">Revision</th>
- <th class="hideItem message topHeader">Message</th>
- <th class="hideItem tagger topHeader">Tagger</th>
- <th class="repositoryBrowser topHeader">
- Repository Browser
- </th>
- <th class="delete topHeader"></th>
- </tr>
- <tr class="loadingMsg" id="loading">
- <td>Loading...</td>
- </tr>
- </tbody>
- <tbody>
- <tr class="table">
- <td class="branches name">
- <a> HEAD </a>
- </td>
- <td class="branches revision">
- <span class="revisionNoEditing"> master </span>
- <span class="revisionEdit">
- <span class="revisionWithEditing"> master </span>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-list-view>
+ <table class="genericList gr-form-styles" id="list">
+ <tbody>
+ <tr class="headerRow">
+ <th class="name topHeader">Name</th>
+ <th class="revision topHeader">Revision</th>
+ <th class="hideItem message topHeader">Message</th>
+ <th class="hideItem tagger topHeader">Tagger</th>
+ <th class="repositoryBrowser topHeader">
+ Repository Browser
+ </th>
+ <th class="delete topHeader"></th>
+ </tr>
+ <tr class="loadingMsg" id="loading">
+ <td>Loading...</td>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr class="table">
+ <td class="branches name">
+ <a> HEAD </a>
+ </td>
+ <td class="branches revision">
+ <span class="revisionNoEditing"> master </span>
+ <span class="revisionEdit">
+ <span class="revisionWithEditing"> master </span>
+ <gr-button
+ aria-disabled="false"
+ class="editBtn"
+ data-index="0"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ edit
+ </gr-button>
+ <iron-input class="editItem">
+ <input />
+ </iron-input>
+ <gr-button
+ aria-disabled="false"
+ class="cancelBtn editItem"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="true"
+ class="editItem saveBtn"
+ data-index="0"
+ disabled=""
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Save
+ </gr-button>
+ </span>
+ </td>
+ <td class="hideItem message"></td>
+ <td class="hideItem tagger"></td>
+ <td class="repositoryBrowser"></td>
+ <td class="delete">
<gr-button
aria-disabled="false"
- class="editBtn"
+ class="deleteButton"
data-index="0"
link=""
role="button"
tabindex="0"
>
- edit
+ Delete
</gr-button>
- <iron-input class="editItem">
- <input />
- </iron-input>
- <gr-button
- aria-disabled="false"
- class="cancelBtn editItem"
- link=""
- role="button"
- tabindex="0"
+ </td>
+ </tr>
+ <tr class="table">
+ <td class="branches name">
+ <a
+ href="https://git.example.org/branch/test;refs/heads/test0"
>
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="true"
- class="editItem saveBtn"
- data-index="0"
- disabled=""
- link=""
- role="button"
- tabindex="-1"
- >
- Save
- </gr-button>
- </span>
- </td>
- <td class="hideItem message"></td>
- <td class="hideItem tagger"></td>
- <td class="repositoryBrowser"></td>
- <td class="delete">
- <gr-button
- aria-disabled="false"
- class="deleteButton"
- data-index="0"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr class="table">
- <td class="branches name">
- <a
- href="https://git.example.org/branch/test;refs/heads/test0"
- >
- test0
- </a>
- </td>
- <td class="branches revision">
- <span class="revisionNoEditing">
- 9c9d08a438e55e52f33b608415e6dddd9b18550d
- </span>
- <span class="revisionEdit">
- <span class="revisionWithEditing">
+ test0
+ </a>
+ </td>
+ <td class="branches revision">
+ <span class="revisionNoEditing">
9c9d08a438e55e52f33b608415e6dddd9b18550d
</span>
+ <span class="revisionEdit">
+ <span class="revisionWithEditing">
+ 9c9d08a438e55e52f33b608415e6dddd9b18550d
+ </span>
+ <gr-button
+ aria-disabled="false"
+ class="editBtn"
+ data-index="1"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ edit
+ </gr-button>
+ <iron-input class="editItem">
+ <input />
+ </iron-input>
+ <gr-button
+ aria-disabled="false"
+ class="cancelBtn editItem"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="true"
+ class="editItem saveBtn"
+ data-index="1"
+ disabled=""
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Save
+ </gr-button>
+ </span>
+ </td>
+ <td class="hideItem message"></td>
+ <td class="hideItem tagger"></td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://git.example.org/branch/test;refs/heads/test0"
+ rel="noopener"
+ target="_blank"
+ >
+ (diffusion)
+ </a>
+ </td>
+ <td class="delete">
<gr-button
aria-disabled="false"
- class="editBtn"
+ class="deleteButton"
data-index="1"
link=""
role="button"
tabindex="0"
>
- edit
+ Delete
</gr-button>
- <iron-input class="editItem">
- <input />
- </iron-input>
- <gr-button
- aria-disabled="false"
- class="cancelBtn editItem"
- link=""
- role="button"
- tabindex="0"
+ </td>
+ </tr>
+ <tr class="table">
+ <td class="branches name">
+ <a
+ href="https://git.example.org/branch/test;refs/heads/test1"
>
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="true"
- class="editItem saveBtn"
- data-index="1"
- disabled=""
- link=""
- role="button"
- tabindex="-1"
- >
- Save
- </gr-button>
- </span>
- </td>
- <td class="hideItem message"></td>
- <td class="hideItem tagger"></td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://git.example.org/branch/test;refs/heads/test0"
- rel="noopener"
- target="_blank"
- >
- (diffusion)
- </a>
- </td>
- <td class="delete">
- <gr-button
- aria-disabled="false"
- class="deleteButton"
- data-index="1"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr class="table">
- <td class="branches name">
- <a
- href="https://git.example.org/branch/test;refs/heads/test1"
- >
- test1
- </a>
- </td>
- <td class="branches revision">
- <span class="revisionNoEditing">
- 9c9d08a438e55e52f33b608415e6dddd9b18550d
- </span>
- <span class="revisionEdit">
- <span class="revisionWithEditing">
+ test1
+ </a>
+ </td>
+ <td class="branches revision">
+ <span class="revisionNoEditing">
9c9d08a438e55e52f33b608415e6dddd9b18550d
</span>
+ <span class="revisionEdit">
+ <span class="revisionWithEditing">
+ 9c9d08a438e55e52f33b608415e6dddd9b18550d
+ </span>
+ <gr-button
+ aria-disabled="false"
+ class="editBtn"
+ data-index="2"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ edit
+ </gr-button>
+ <iron-input class="editItem">
+ <input />
+ </iron-input>
+ <gr-button
+ aria-disabled="false"
+ class="cancelBtn editItem"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="true"
+ class="editItem saveBtn"
+ data-index="2"
+ disabled=""
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Save
+ </gr-button>
+ </span>
+ </td>
+ <td class="hideItem message"></td>
+ <td class="hideItem tagger"></td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://git.example.org/branch/test;refs/heads/test1"
+ rel="noopener"
+ target="_blank"
+ >
+ (diffusion)
+ </a>
+ </td>
+ <td class="delete">
<gr-button
aria-disabled="false"
- class="editBtn"
+ class="deleteButton"
data-index="2"
link=""
role="button"
tabindex="0"
>
- edit
+ Delete
</gr-button>
- <iron-input class="editItem">
- <input />
- </iron-input>
- <gr-button
- aria-disabled="false"
- class="cancelBtn editItem"
- link=""
- role="button"
- tabindex="0"
+ </td>
+ </tr>
+ <tr class="table">
+ <td class="branches name">
+ <a
+ href="https://git.example.org/branch/test;refs/heads/test2"
>
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="true"
- class="editItem saveBtn"
- data-index="2"
- disabled=""
- link=""
- role="button"
- tabindex="-1"
- >
- Save
- </gr-button>
- </span>
- </td>
- <td class="hideItem message"></td>
- <td class="hideItem tagger"></td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://git.example.org/branch/test;refs/heads/test1"
- rel="noopener"
- target="_blank"
- >
- (diffusion)
- </a>
- </td>
- <td class="delete">
- <gr-button
- aria-disabled="false"
- class="deleteButton"
- data-index="2"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr class="table">
- <td class="branches name">
- <a
- href="https://git.example.org/branch/test;refs/heads/test2"
- >
- test2
- </a>
- </td>
- <td class="branches revision">
- <span class="revisionNoEditing">
- 9c9d08a438e55e52f33b608415e6dddd9b18550d
- </span>
- <span class="revisionEdit">
- <span class="revisionWithEditing">
+ test2
+ </a>
+ </td>
+ <td class="branches revision">
+ <span class="revisionNoEditing">
9c9d08a438e55e52f33b608415e6dddd9b18550d
</span>
+ <span class="revisionEdit">
+ <span class="revisionWithEditing">
+ 9c9d08a438e55e52f33b608415e6dddd9b18550d
+ </span>
+ <gr-button
+ aria-disabled="false"
+ class="editBtn"
+ data-index="3"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ edit
+ </gr-button>
+ <iron-input class="editItem">
+ <input />
+ </iron-input>
+ <gr-button
+ aria-disabled="false"
+ class="cancelBtn editItem"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="true"
+ class="editItem saveBtn"
+ data-index="3"
+ disabled=""
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Save
+ </gr-button>
+ </span>
+ </td>
+ <td class="hideItem message"></td>
+ <td class="hideItem tagger"></td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://git.example.org/branch/test;refs/heads/test2"
+ rel="noopener"
+ target="_blank"
+ >
+ (diffusion)
+ </a>
+ </td>
+ <td class="delete">
<gr-button
aria-disabled="false"
- class="editBtn"
+ class="deleteButton"
data-index="3"
link=""
role="button"
tabindex="0"
>
- edit
+ Delete
</gr-button>
- <iron-input class="editItem">
- <input />
- </iron-input>
- <gr-button
- aria-disabled="false"
- class="cancelBtn editItem"
- link=""
- role="button"
- tabindex="0"
+ </td>
+ </tr>
+ <tr class="table">
+ <td class="branches name">
+ <a
+ href="https://git.example.org/branch/test;refs/heads/test3"
>
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="true"
- class="editItem saveBtn"
- data-index="3"
- disabled=""
- link=""
- role="button"
- tabindex="-1"
- >
- Save
- </gr-button>
- </span>
- </td>
- <td class="hideItem message"></td>
- <td class="hideItem tagger"></td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://git.example.org/branch/test;refs/heads/test2"
- rel="noopener"
- target="_blank"
- >
- (diffusion)
- </a>
- </td>
- <td class="delete">
- <gr-button
- aria-disabled="false"
- class="deleteButton"
- data-index="3"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr class="table">
- <td class="branches name">
- <a
- href="https://git.example.org/branch/test;refs/heads/test3"
- >
- test3
- </a>
- </td>
- <td class="branches revision">
- <span class="revisionNoEditing">
- 9c9d08a438e55e52f33b608415e6dddd9b18550d
- </span>
- <span class="revisionEdit">
- <span class="revisionWithEditing">
+ test3
+ </a>
+ </td>
+ <td class="branches revision">
+ <span class="revisionNoEditing">
9c9d08a438e55e52f33b608415e6dddd9b18550d
</span>
+ <span class="revisionEdit">
+ <span class="revisionWithEditing">
+ 9c9d08a438e55e52f33b608415e6dddd9b18550d
+ </span>
+ <gr-button
+ aria-disabled="false"
+ class="editBtn"
+ data-index="4"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ edit
+ </gr-button>
+ <iron-input class="editItem">
+ <input />
+ </iron-input>
+ <gr-button
+ aria-disabled="false"
+ class="cancelBtn editItem"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="true"
+ class="editItem saveBtn"
+ data-index="4"
+ disabled=""
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Save
+ </gr-button>
+ </span>
+ </td>
+ <td class="hideItem message"></td>
+ <td class="hideItem tagger"></td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://git.example.org/branch/test;refs/heads/test3"
+ rel="noopener"
+ target="_blank"
+ >
+ (diffusion)
+ </a>
+ </td>
+ <td class="delete">
<gr-button
aria-disabled="false"
- class="editBtn"
+ class="deleteButton"
data-index="4"
link=""
role="button"
tabindex="0"
>
- edit
+ Delete
</gr-button>
- <iron-input class="editItem">
- <input />
- </iron-input>
- <gr-button
- aria-disabled="false"
- class="cancelBtn editItem"
- link=""
- role="button"
- tabindex="0"
+ </td>
+ </tr>
+ <tr class="table">
+ <td class="branches name">
+ <a
+ href="https://git.example.org/branch/test;refs/heads/test4"
>
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="true"
- class="editItem saveBtn"
- data-index="4"
- disabled=""
- link=""
- role="button"
- tabindex="-1"
- >
- Save
- </gr-button>
- </span>
- </td>
- <td class="hideItem message"></td>
- <td class="hideItem tagger"></td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://git.example.org/branch/test;refs/heads/test3"
- rel="noopener"
- target="_blank"
- >
- (diffusion)
- </a>
- </td>
- <td class="delete">
- <gr-button
- aria-disabled="false"
- class="deleteButton"
- data-index="4"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr class="table">
- <td class="branches name">
- <a
- href="https://git.example.org/branch/test;refs/heads/test4"
- >
- test4
- </a>
- </td>
- <td class="branches revision">
- <span class="revisionNoEditing">
- 9c9d08a438e55e52f33b608415e6dddd9b18550d
- </span>
- <span class="revisionEdit">
- <span class="revisionWithEditing">
+ test4
+ </a>
+ </td>
+ <td class="branches revision">
+ <span class="revisionNoEditing">
9c9d08a438e55e52f33b608415e6dddd9b18550d
</span>
+ <span class="revisionEdit">
+ <span class="revisionWithEditing">
+ 9c9d08a438e55e52f33b608415e6dddd9b18550d
+ </span>
+ <gr-button
+ aria-disabled="false"
+ class="editBtn"
+ data-index="5"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ edit
+ </gr-button>
+ <iron-input class="editItem">
+ <input />
+ </iron-input>
+ <gr-button
+ aria-disabled="false"
+ class="cancelBtn editItem"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="true"
+ class="editItem saveBtn"
+ data-index="5"
+ disabled=""
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Save
+ </gr-button>
+ </span>
+ </td>
+ <td class="hideItem message"></td>
+ <td class="hideItem tagger"></td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://git.example.org/branch/test;refs/heads/test4"
+ rel="noopener"
+ target="_blank"
+ >
+ (diffusion)
+ </a>
+ </td>
+ <td class="delete">
<gr-button
aria-disabled="false"
- class="editBtn"
+ class="deleteButton"
data-index="5"
link=""
role="button"
tabindex="0"
>
- edit
+ Delete
</gr-button>
- <iron-input class="editItem">
- <input />
- </iron-input>
- <gr-button
- aria-disabled="false"
- class="cancelBtn editItem"
- link=""
- role="button"
- tabindex="0"
+ </td>
+ </tr>
+ <tr class="table">
+ <td class="branches name">
+ <a
+ href="https://git.example.org/branch/test;refs/heads/test5"
>
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="true"
- class="editItem saveBtn"
- data-index="5"
- disabled=""
- link=""
- role="button"
- tabindex="-1"
- >
- Save
- </gr-button>
- </span>
- </td>
- <td class="hideItem message"></td>
- <td class="hideItem tagger"></td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://git.example.org/branch/test;refs/heads/test4"
- rel="noopener"
- target="_blank"
- >
- (diffusion)
- </a>
- </td>
- <td class="delete">
- <gr-button
- aria-disabled="false"
- class="deleteButton"
- data-index="5"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr class="table">
- <td class="branches name">
- <a
- href="https://git.example.org/branch/test;refs/heads/test5"
- >
- test5
- </a>
- </td>
- <td class="branches revision">
- <span class="revisionNoEditing">
- 9c9d08a438e55e52f33b608415e6dddd9b18550d
- </span>
- <span class="revisionEdit">
- <span class="revisionWithEditing">
+ test5
+ </a>
+ </td>
+ <td class="branches revision">
+ <span class="revisionNoEditing">
9c9d08a438e55e52f33b608415e6dddd9b18550d
</span>
+ <span class="revisionEdit">
+ <span class="revisionWithEditing">
+ 9c9d08a438e55e52f33b608415e6dddd9b18550d
+ </span>
+ <gr-button
+ aria-disabled="false"
+ class="editBtn"
+ data-index="6"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ edit
+ </gr-button>
+ <iron-input class="editItem">
+ <input />
+ </iron-input>
+ <gr-button
+ aria-disabled="false"
+ class="cancelBtn editItem"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="true"
+ class="editItem saveBtn"
+ data-index="6"
+ disabled=""
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Save
+ </gr-button>
+ </span>
+ </td>
+ <td class="hideItem message"></td>
+ <td class="hideItem tagger"></td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://git.example.org/branch/test;refs/heads/test5"
+ rel="noopener"
+ target="_blank"
+ >
+ (diffusion)
+ </a>
+ </td>
+ <td class="delete">
<gr-button
aria-disabled="false"
- class="editBtn"
+ class="deleteButton"
data-index="6"
link=""
role="button"
tabindex="0"
>
- edit
+ Delete
</gr-button>
- <iron-input class="editItem">
- <input />
- </iron-input>
- <gr-button
- aria-disabled="false"
- class="cancelBtn editItem"
- link=""
- role="button"
- tabindex="0"
+ </td>
+ </tr>
+ <tr class="table">
+ <td class="branches name">
+ <a
+ href="https://git.example.org/branch/test;refs/heads/test6"
>
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="true"
- class="editItem saveBtn"
- data-index="6"
- disabled=""
- link=""
- role="button"
- tabindex="-1"
- >
- Save
- </gr-button>
- </span>
- </td>
- <td class="hideItem message"></td>
- <td class="hideItem tagger"></td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://git.example.org/branch/test;refs/heads/test5"
- rel="noopener"
- target="_blank"
- >
- (diffusion)
- </a>
- </td>
- <td class="delete">
- <gr-button
- aria-disabled="false"
- class="deleteButton"
- data-index="6"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr class="table">
- <td class="branches name">
- <a
- href="https://git.example.org/branch/test;refs/heads/test6"
- >
- test6
- </a>
- </td>
- <td class="branches revision">
- <span class="revisionNoEditing">
- 9c9d08a438e55e52f33b608415e6dddd9b18550d
- </span>
- <span class="revisionEdit">
- <span class="revisionWithEditing">
+ test6
+ </a>
+ </td>
+ <td class="branches revision">
+ <span class="revisionNoEditing">
9c9d08a438e55e52f33b608415e6dddd9b18550d
</span>
+ <span class="revisionEdit">
+ <span class="revisionWithEditing">
+ 9c9d08a438e55e52f33b608415e6dddd9b18550d
+ </span>
+ <gr-button
+ aria-disabled="false"
+ class="editBtn"
+ data-index="7"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ edit
+ </gr-button>
+ <iron-input class="editItem">
+ <input />
+ </iron-input>
+ <gr-button
+ aria-disabled="false"
+ class="cancelBtn editItem"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="true"
+ class="editItem saveBtn"
+ data-index="7"
+ disabled=""
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Save
+ </gr-button>
+ </span>
+ </td>
+ <td class="hideItem message"></td>
+ <td class="hideItem tagger"></td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://git.example.org/branch/test;refs/heads/test6"
+ rel="noopener"
+ target="_blank"
+ >
+ (diffusion)
+ </a>
+ </td>
+ <td class="delete">
<gr-button
aria-disabled="false"
- class="editBtn"
+ class="deleteButton"
data-index="7"
link=""
role="button"
tabindex="0"
>
- edit
+ Delete
</gr-button>
- <iron-input class="editItem">
- <input />
- </iron-input>
- <gr-button
- aria-disabled="false"
- class="cancelBtn editItem"
- link=""
- role="button"
- tabindex="0"
+ </td>
+ </tr>
+ <tr class="table">
+ <td class="branches name">
+ <a
+ href="https://git.example.org/branch/test;refs/heads/test7"
>
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="true"
- class="editItem saveBtn"
- data-index="7"
- disabled=""
- link=""
- role="button"
- tabindex="-1"
- >
- Save
- </gr-button>
- </span>
- </td>
- <td class="hideItem message"></td>
- <td class="hideItem tagger"></td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://git.example.org/branch/test;refs/heads/test6"
- rel="noopener"
- target="_blank"
- >
- (diffusion)
- </a>
- </td>
- <td class="delete">
- <gr-button
- aria-disabled="false"
- class="deleteButton"
- data-index="7"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr class="table">
- <td class="branches name">
- <a
- href="https://git.example.org/branch/test;refs/heads/test7"
- >
- test7
- </a>
- </td>
- <td class="branches revision">
- <span class="revisionNoEditing">
- 9c9d08a438e55e52f33b608415e6dddd9b18550d
- </span>
- <span class="revisionEdit">
- <span class="revisionWithEditing">
+ test7
+ </a>
+ </td>
+ <td class="branches revision">
+ <span class="revisionNoEditing">
9c9d08a438e55e52f33b608415e6dddd9b18550d
</span>
+ <span class="revisionEdit">
+ <span class="revisionWithEditing">
+ 9c9d08a438e55e52f33b608415e6dddd9b18550d
+ </span>
+ <gr-button
+ aria-disabled="false"
+ class="editBtn"
+ data-index="8"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ edit
+ </gr-button>
+ <iron-input class="editItem">
+ <input />
+ </iron-input>
+ <gr-button
+ aria-disabled="false"
+ class="cancelBtn editItem"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="true"
+ class="editItem saveBtn"
+ data-index="8"
+ disabled=""
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Save
+ </gr-button>
+ </span>
+ </td>
+ <td class="hideItem message"></td>
+ <td class="hideItem tagger"></td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://git.example.org/branch/test;refs/heads/test7"
+ rel="noopener"
+ target="_blank"
+ >
+ (diffusion)
+ </a>
+ </td>
+ <td class="delete">
<gr-button
aria-disabled="false"
- class="editBtn"
+ class="deleteButton"
data-index="8"
link=""
role="button"
tabindex="0"
>
- edit
+ Delete
</gr-button>
- <iron-input class="editItem">
- <input />
- </iron-input>
- <gr-button
- aria-disabled="false"
- class="cancelBtn editItem"
- link=""
- role="button"
- tabindex="0"
+ </td>
+ </tr>
+ <tr class="table">
+ <td class="branches name">
+ <a
+ href="https://git.example.org/branch/test;refs/heads/test8"
>
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="true"
- class="editItem saveBtn"
- data-index="8"
- disabled=""
- link=""
- role="button"
- tabindex="-1"
- >
- Save
- </gr-button>
- </span>
- </td>
- <td class="hideItem message"></td>
- <td class="hideItem tagger"></td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://git.example.org/branch/test;refs/heads/test7"
- rel="noopener"
- target="_blank"
- >
- (diffusion)
- </a>
- </td>
- <td class="delete">
- <gr-button
- aria-disabled="false"
- class="deleteButton"
- data-index="8"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr class="table">
- <td class="branches name">
- <a
- href="https://git.example.org/branch/test;refs/heads/test8"
- >
- test8
- </a>
- </td>
- <td class="branches revision">
- <span class="revisionNoEditing">
- 9c9d08a438e55e52f33b608415e6dddd9b18550d
- </span>
- <span class="revisionEdit">
- <span class="revisionWithEditing">
+ test8
+ </a>
+ </td>
+ <td class="branches revision">
+ <span class="revisionNoEditing">
9c9d08a438e55e52f33b608415e6dddd9b18550d
</span>
+ <span class="revisionEdit">
+ <span class="revisionWithEditing">
+ 9c9d08a438e55e52f33b608415e6dddd9b18550d
+ </span>
+ <gr-button
+ aria-disabled="false"
+ class="editBtn"
+ data-index="9"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ edit
+ </gr-button>
+ <iron-input class="editItem">
+ <input />
+ </iron-input>
+ <gr-button
+ aria-disabled="false"
+ class="cancelBtn editItem"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="true"
+ class="editItem saveBtn"
+ data-index="9"
+ disabled=""
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Save
+ </gr-button>
+ </span>
+ </td>
+ <td class="hideItem message"></td>
+ <td class="hideItem tagger"></td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://git.example.org/branch/test;refs/heads/test8"
+ rel="noopener"
+ target="_blank"
+ >
+ (diffusion)
+ </a>
+ </td>
+ <td class="delete">
<gr-button
aria-disabled="false"
- class="editBtn"
+ class="deleteButton"
data-index="9"
link=""
role="button"
tabindex="0"
>
- edit
+ Delete
</gr-button>
- <iron-input class="editItem">
- <input />
- </iron-input>
- <gr-button
- aria-disabled="false"
- class="cancelBtn editItem"
- link=""
- role="button"
- tabindex="0"
+ </td>
+ </tr>
+ <tr class="table">
+ <td class="branches name">
+ <a
+ href="https://git.example.org/branch/test;refs/heads/test9"
>
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="true"
- class="editItem saveBtn"
- data-index="9"
- disabled=""
- link=""
- role="button"
- tabindex="-1"
- >
- Save
- </gr-button>
- </span>
- </td>
- <td class="hideItem message"></td>
- <td class="hideItem tagger"></td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://git.example.org/branch/test;refs/heads/test8"
- rel="noopener"
- target="_blank"
- >
- (diffusion)
- </a>
- </td>
- <td class="delete">
- <gr-button
- aria-disabled="false"
- class="deleteButton"
- data-index="9"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr class="table">
- <td class="branches name">
- <a
- href="https://git.example.org/branch/test;refs/heads/test9"
- >
- test9
- </a>
- </td>
- <td class="branches revision">
- <span class="revisionNoEditing">
- 9c9d08a438e55e52f33b608415e6dddd9b18550d
- </span>
- <span class="revisionEdit">
- <span class="revisionWithEditing">
+ test9
+ </a>
+ </td>
+ <td class="branches revision">
+ <span class="revisionNoEditing">
9c9d08a438e55e52f33b608415e6dddd9b18550d
</span>
+ <span class="revisionEdit">
+ <span class="revisionWithEditing">
+ 9c9d08a438e55e52f33b608415e6dddd9b18550d
+ </span>
+ <gr-button
+ aria-disabled="false"
+ class="editBtn"
+ data-index="10"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ edit
+ </gr-button>
+ <iron-input class="editItem">
+ <input />
+ </iron-input>
+ <gr-button
+ aria-disabled="false"
+ class="cancelBtn editItem"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="true"
+ class="editItem saveBtn"
+ data-index="10"
+ disabled=""
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Save
+ </gr-button>
+ </span>
+ </td>
+ <td class="hideItem message"></td>
+ <td class="hideItem tagger"></td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://git.example.org/branch/test;refs/heads/test9"
+ rel="noopener"
+ target="_blank"
+ >
+ (diffusion)
+ </a>
+ </td>
+ <td class="delete">
<gr-button
aria-disabled="false"
- class="editBtn"
+ class="deleteButton"
data-index="10"
link=""
role="button"
tabindex="0"
>
- edit
+ Delete
</gr-button>
- <iron-input class="editItem">
- <input />
- </iron-input>
- <gr-button
- aria-disabled="false"
- class="cancelBtn editItem"
- link=""
- role="button"
- tabindex="0"
+ </td>
+ </tr>
+ <tr class="table">
+ <td class="branches name">
+ <a
+ href="https://git.example.org/branch/test;refs/heads/test10"
>
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="true"
- class="editItem saveBtn"
- data-index="10"
- disabled=""
- link=""
- role="button"
- tabindex="-1"
- >
- Save
- </gr-button>
- </span>
- </td>
- <td class="hideItem message"></td>
- <td class="hideItem tagger"></td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://git.example.org/branch/test;refs/heads/test9"
- rel="noopener"
- target="_blank"
- >
- (diffusion)
- </a>
- </td>
- <td class="delete">
- <gr-button
- aria-disabled="false"
- class="deleteButton"
- data-index="10"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr class="table">
- <td class="branches name">
- <a
- href="https://git.example.org/branch/test;refs/heads/test10"
- >
- test10
- </a>
- </td>
- <td class="branches revision">
- <span class="revisionNoEditing">
- 9c9d08a438e55e52f33b608415e6dddd9b18550d
- </span>
- <span class="revisionEdit">
- <span class="revisionWithEditing">
+ test10
+ </a>
+ </td>
+ <td class="branches revision">
+ <span class="revisionNoEditing">
9c9d08a438e55e52f33b608415e6dddd9b18550d
</span>
+ <span class="revisionEdit">
+ <span class="revisionWithEditing">
+ 9c9d08a438e55e52f33b608415e6dddd9b18550d
+ </span>
+ <gr-button
+ aria-disabled="false"
+ class="editBtn"
+ data-index="11"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ edit
+ </gr-button>
+ <iron-input class="editItem">
+ <input />
+ </iron-input>
+ <gr-button
+ aria-disabled="false"
+ class="cancelBtn editItem"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="true"
+ class="editItem saveBtn"
+ data-index="11"
+ disabled=""
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Save
+ </gr-button>
+ </span>
+ </td>
+ <td class="hideItem message"></td>
+ <td class="hideItem tagger"></td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://git.example.org/branch/test;refs/heads/test10"
+ rel="noopener"
+ target="_blank"
+ >
+ (diffusion)
+ </a>
+ </td>
+ <td class="delete">
<gr-button
aria-disabled="false"
- class="editBtn"
+ class="deleteButton"
data-index="11"
link=""
role="button"
tabindex="0"
>
- edit
+ Delete
</gr-button>
- <iron-input class="editItem">
- <input />
- </iron-input>
- <gr-button
- aria-disabled="false"
- class="cancelBtn editItem"
- link=""
- role="button"
- tabindex="0"
+ </td>
+ </tr>
+ <tr class="table">
+ <td class="branches name">
+ <a
+ href="https://git.example.org/branch/test;refs/heads/test11"
>
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="true"
- class="editItem saveBtn"
- data-index="11"
- disabled=""
- link=""
- role="button"
- tabindex="-1"
- >
- Save
- </gr-button>
- </span>
- </td>
- <td class="hideItem message"></td>
- <td class="hideItem tagger"></td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://git.example.org/branch/test;refs/heads/test10"
- rel="noopener"
- target="_blank"
- >
- (diffusion)
- </a>
- </td>
- <td class="delete">
- <gr-button
- aria-disabled="false"
- class="deleteButton"
- data-index="11"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr class="table">
- <td class="branches name">
- <a
- href="https://git.example.org/branch/test;refs/heads/test11"
- >
- test11
- </a>
- </td>
- <td class="branches revision">
- <span class="revisionNoEditing">
- 9c9d08a438e55e52f33b608415e6dddd9b18550d
- </span>
- <span class="revisionEdit">
- <span class="revisionWithEditing">
+ test11
+ </a>
+ </td>
+ <td class="branches revision">
+ <span class="revisionNoEditing">
9c9d08a438e55e52f33b608415e6dddd9b18550d
</span>
+ <span class="revisionEdit">
+ <span class="revisionWithEditing">
+ 9c9d08a438e55e52f33b608415e6dddd9b18550d
+ </span>
+ <gr-button
+ aria-disabled="false"
+ class="editBtn"
+ data-index="12"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ edit
+ </gr-button>
+ <iron-input class="editItem">
+ <input />
+ </iron-input>
+ <gr-button
+ aria-disabled="false"
+ class="cancelBtn editItem"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="true"
+ class="editItem saveBtn"
+ data-index="12"
+ disabled=""
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Save
+ </gr-button>
+ </span>
+ </td>
+ <td class="hideItem message"></td>
+ <td class="hideItem tagger"></td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://git.example.org/branch/test;refs/heads/test11"
+ rel="noopener"
+ target="_blank"
+ >
+ (diffusion)
+ </a>
+ </td>
+ <td class="delete">
<gr-button
aria-disabled="false"
- class="editBtn"
+ class="deleteButton"
data-index="12"
link=""
role="button"
tabindex="0"
>
- edit
+ Delete
</gr-button>
- <iron-input class="editItem">
- <input />
- </iron-input>
- <gr-button
- aria-disabled="false"
- class="cancelBtn editItem"
- link=""
- role="button"
- tabindex="0"
+ </td>
+ </tr>
+ <tr class="table">
+ <td class="branches name">
+ <a
+ href="https://git.example.org/branch/test;refs/heads/test12"
>
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="true"
- class="editItem saveBtn"
- data-index="12"
- disabled=""
- link=""
- role="button"
- tabindex="-1"
- >
- Save
- </gr-button>
- </span>
- </td>
- <td class="hideItem message"></td>
- <td class="hideItem tagger"></td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://git.example.org/branch/test;refs/heads/test11"
- rel="noopener"
- target="_blank"
- >
- (diffusion)
- </a>
- </td>
- <td class="delete">
- <gr-button
- aria-disabled="false"
- class="deleteButton"
- data-index="12"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr class="table">
- <td class="branches name">
- <a
- href="https://git.example.org/branch/test;refs/heads/test12"
- >
- test12
- </a>
- </td>
- <td class="branches revision">
- <span class="revisionNoEditing">
- 9c9d08a438e55e52f33b608415e6dddd9b18550d
- </span>
- <span class="revisionEdit">
- <span class="revisionWithEditing">
+ test12
+ </a>
+ </td>
+ <td class="branches revision">
+ <span class="revisionNoEditing">
9c9d08a438e55e52f33b608415e6dddd9b18550d
</span>
+ <span class="revisionEdit">
+ <span class="revisionWithEditing">
+ 9c9d08a438e55e52f33b608415e6dddd9b18550d
+ </span>
+ <gr-button
+ aria-disabled="false"
+ class="editBtn"
+ data-index="13"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ edit
+ </gr-button>
+ <iron-input class="editItem">
+ <input />
+ </iron-input>
+ <gr-button
+ aria-disabled="false"
+ class="cancelBtn editItem"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="true"
+ class="editItem saveBtn"
+ data-index="13"
+ disabled=""
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Save
+ </gr-button>
+ </span>
+ </td>
+ <td class="hideItem message"></td>
+ <td class="hideItem tagger"></td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://git.example.org/branch/test;refs/heads/test12"
+ rel="noopener"
+ target="_blank"
+ >
+ (diffusion)
+ </a>
+ </td>
+ <td class="delete">
<gr-button
aria-disabled="false"
- class="editBtn"
+ class="deleteButton"
data-index="13"
link=""
role="button"
tabindex="0"
>
- edit
+ Delete
</gr-button>
- <iron-input class="editItem">
- <input />
- </iron-input>
- <gr-button
- aria-disabled="false"
- class="cancelBtn editItem"
- link=""
- role="button"
- tabindex="0"
+ </td>
+ </tr>
+ <tr class="table">
+ <td class="branches name">
+ <a
+ href="https://git.example.org/branch/test;refs/heads/test13"
>
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="true"
- class="editItem saveBtn"
- data-index="13"
- disabled=""
- link=""
- role="button"
- tabindex="-1"
- >
- Save
- </gr-button>
- </span>
- </td>
- <td class="hideItem message"></td>
- <td class="hideItem tagger"></td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://git.example.org/branch/test;refs/heads/test12"
- rel="noopener"
- target="_blank"
- >
- (diffusion)
- </a>
- </td>
- <td class="delete">
- <gr-button
- aria-disabled="false"
- class="deleteButton"
- data-index="13"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr class="table">
- <td class="branches name">
- <a
- href="https://git.example.org/branch/test;refs/heads/test13"
- >
- test13
- </a>
- </td>
- <td class="branches revision">
- <span class="revisionNoEditing">
- 9c9d08a438e55e52f33b608415e6dddd9b18550d
- </span>
- <span class="revisionEdit">
- <span class="revisionWithEditing">
+ test13
+ </a>
+ </td>
+ <td class="branches revision">
+ <span class="revisionNoEditing">
9c9d08a438e55e52f33b608415e6dddd9b18550d
</span>
+ <span class="revisionEdit">
+ <span class="revisionWithEditing">
+ 9c9d08a438e55e52f33b608415e6dddd9b18550d
+ </span>
+ <gr-button
+ aria-disabled="false"
+ class="editBtn"
+ data-index="14"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ edit
+ </gr-button>
+ <iron-input class="editItem">
+ <input />
+ </iron-input>
+ <gr-button
+ aria-disabled="false"
+ class="cancelBtn editItem"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="true"
+ class="editItem saveBtn"
+ data-index="14"
+ disabled=""
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Save
+ </gr-button>
+ </span>
+ </td>
+ <td class="hideItem message"></td>
+ <td class="hideItem tagger"></td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://git.example.org/branch/test;refs/heads/test13"
+ rel="noopener"
+ target="_blank"
+ >
+ (diffusion)
+ </a>
+ </td>
+ <td class="delete">
<gr-button
aria-disabled="false"
- class="editBtn"
+ class="deleteButton"
data-index="14"
link=""
role="button"
tabindex="0"
>
- edit
+ Delete
</gr-button>
- <iron-input class="editItem">
- <input />
- </iron-input>
- <gr-button
- aria-disabled="false"
- class="cancelBtn editItem"
- link=""
- role="button"
- tabindex="0"
+ </td>
+ </tr>
+ <tr class="table">
+ <td class="branches name">
+ <a
+ href="https://git.example.org/branch/test;refs/heads/test14"
>
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="true"
- class="editItem saveBtn"
- data-index="14"
- disabled=""
- link=""
- role="button"
- tabindex="-1"
- >
- Save
- </gr-button>
- </span>
- </td>
- <td class="hideItem message"></td>
- <td class="hideItem tagger"></td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://git.example.org/branch/test;refs/heads/test13"
- rel="noopener"
- target="_blank"
- >
- (diffusion)
- </a>
- </td>
- <td class="delete">
- <gr-button
- aria-disabled="false"
- class="deleteButton"
- data-index="14"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr class="table">
- <td class="branches name">
- <a
- href="https://git.example.org/branch/test;refs/heads/test14"
- >
- test14
- </a>
- </td>
- <td class="branches revision">
- <span class="revisionNoEditing">
- 9c9d08a438e55e52f33b608415e6dddd9b18550d
- </span>
- <span class="revisionEdit">
- <span class="revisionWithEditing">
+ test14
+ </a>
+ </td>
+ <td class="branches revision">
+ <span class="revisionNoEditing">
9c9d08a438e55e52f33b608415e6dddd9b18550d
</span>
+ <span class="revisionEdit">
+ <span class="revisionWithEditing">
+ 9c9d08a438e55e52f33b608415e6dddd9b18550d
+ </span>
+ <gr-button
+ aria-disabled="false"
+ class="editBtn"
+ data-index="15"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ edit
+ </gr-button>
+ <iron-input class="editItem">
+ <input />
+ </iron-input>
+ <gr-button
+ aria-disabled="false"
+ class="cancelBtn editItem"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="true"
+ class="editItem saveBtn"
+ data-index="15"
+ disabled=""
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Save
+ </gr-button>
+ </span>
+ </td>
+ <td class="hideItem message"></td>
+ <td class="hideItem tagger"></td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://git.example.org/branch/test;refs/heads/test14"
+ rel="noopener"
+ target="_blank"
+ >
+ (diffusion)
+ </a>
+ </td>
+ <td class="delete">
<gr-button
aria-disabled="false"
- class="editBtn"
+ class="deleteButton"
data-index="15"
link=""
role="button"
tabindex="0"
>
- edit
+ Delete
</gr-button>
- <iron-input class="editItem">
- <input />
- </iron-input>
- <gr-button
- aria-disabled="false"
- class="cancelBtn editItem"
- link=""
- role="button"
- tabindex="0"
+ </td>
+ </tr>
+ <tr class="table">
+ <td class="branches name">
+ <a
+ href="https://git.example.org/branch/test;refs/heads/test15"
>
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="true"
- class="editItem saveBtn"
- data-index="15"
- disabled=""
- link=""
- role="button"
- tabindex="-1"
- >
- Save
- </gr-button>
- </span>
- </td>
- <td class="hideItem message"></td>
- <td class="hideItem tagger"></td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://git.example.org/branch/test;refs/heads/test14"
- rel="noopener"
- target="_blank"
- >
- (diffusion)
- </a>
- </td>
- <td class="delete">
- <gr-button
- aria-disabled="false"
- class="deleteButton"
- data-index="15"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr class="table">
- <td class="branches name">
- <a
- href="https://git.example.org/branch/test;refs/heads/test15"
- >
- test15
- </a>
- </td>
- <td class="branches revision">
- <span class="revisionNoEditing">
- 9c9d08a438e55e52f33b608415e6dddd9b18550d
- </span>
- <span class="revisionEdit">
- <span class="revisionWithEditing">
+ test15
+ </a>
+ </td>
+ <td class="branches revision">
+ <span class="revisionNoEditing">
9c9d08a438e55e52f33b608415e6dddd9b18550d
</span>
+ <span class="revisionEdit">
+ <span class="revisionWithEditing">
+ 9c9d08a438e55e52f33b608415e6dddd9b18550d
+ </span>
+ <gr-button
+ aria-disabled="false"
+ class="editBtn"
+ data-index="16"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ edit
+ </gr-button>
+ <iron-input class="editItem">
+ <input />
+ </iron-input>
+ <gr-button
+ aria-disabled="false"
+ class="cancelBtn editItem"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="true"
+ class="editItem saveBtn"
+ data-index="16"
+ disabled=""
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Save
+ </gr-button>
+ </span>
+ </td>
+ <td class="hideItem message"></td>
+ <td class="hideItem tagger"></td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://git.example.org/branch/test;refs/heads/test15"
+ rel="noopener"
+ target="_blank"
+ >
+ (diffusion)
+ </a>
+ </td>
+ <td class="delete">
<gr-button
aria-disabled="false"
- class="editBtn"
+ class="deleteButton"
data-index="16"
link=""
role="button"
tabindex="0"
>
- edit
+ Delete
</gr-button>
- <iron-input class="editItem">
- <input />
- </iron-input>
- <gr-button
- aria-disabled="false"
- class="cancelBtn editItem"
- link=""
- role="button"
- tabindex="0"
+ </td>
+ </tr>
+ <tr class="table">
+ <td class="branches name">
+ <a
+ href="https://git.example.org/branch/test;refs/heads/test16"
>
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="true"
- class="editItem saveBtn"
- data-index="16"
- disabled=""
- link=""
- role="button"
- tabindex="-1"
- >
- Save
- </gr-button>
- </span>
- </td>
- <td class="hideItem message"></td>
- <td class="hideItem tagger"></td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://git.example.org/branch/test;refs/heads/test15"
- rel="noopener"
- target="_blank"
- >
- (diffusion)
- </a>
- </td>
- <td class="delete">
- <gr-button
- aria-disabled="false"
- class="deleteButton"
- data-index="16"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr class="table">
- <td class="branches name">
- <a
- href="https://git.example.org/branch/test;refs/heads/test16"
- >
- test16
- </a>
- </td>
- <td class="branches revision">
- <span class="revisionNoEditing">
- 9c9d08a438e55e52f33b608415e6dddd9b18550d
- </span>
- <span class="revisionEdit">
- <span class="revisionWithEditing">
+ test16
+ </a>
+ </td>
+ <td class="branches revision">
+ <span class="revisionNoEditing">
9c9d08a438e55e52f33b608415e6dddd9b18550d
</span>
+ <span class="revisionEdit">
+ <span class="revisionWithEditing">
+ 9c9d08a438e55e52f33b608415e6dddd9b18550d
+ </span>
+ <gr-button
+ aria-disabled="false"
+ class="editBtn"
+ data-index="17"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ edit
+ </gr-button>
+ <iron-input class="editItem">
+ <input />
+ </iron-input>
+ <gr-button
+ aria-disabled="false"
+ class="cancelBtn editItem"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="true"
+ class="editItem saveBtn"
+ data-index="17"
+ disabled=""
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Save
+ </gr-button>
+ </span>
+ </td>
+ <td class="hideItem message"></td>
+ <td class="hideItem tagger"></td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://git.example.org/branch/test;refs/heads/test16"
+ rel="noopener"
+ target="_blank"
+ >
+ (diffusion)
+ </a>
+ </td>
+ <td class="delete">
<gr-button
aria-disabled="false"
- class="editBtn"
+ class="deleteButton"
data-index="17"
link=""
role="button"
tabindex="0"
>
- edit
+ Delete
</gr-button>
- <iron-input class="editItem">
- <input />
- </iron-input>
- <gr-button
- aria-disabled="false"
- class="cancelBtn editItem"
- link=""
- role="button"
- tabindex="0"
+ </td>
+ </tr>
+ <tr class="table">
+ <td class="branches name">
+ <a
+ href="https://git.example.org/branch/test;refs/heads/test17"
>
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="true"
- class="editItem saveBtn"
- data-index="17"
- disabled=""
- link=""
- role="button"
- tabindex="-1"
- >
- Save
- </gr-button>
- </span>
- </td>
- <td class="hideItem message"></td>
- <td class="hideItem tagger"></td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://git.example.org/branch/test;refs/heads/test16"
- rel="noopener"
- target="_blank"
- >
- (diffusion)
- </a>
- </td>
- <td class="delete">
- <gr-button
- aria-disabled="false"
- class="deleteButton"
- data-index="17"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr class="table">
- <td class="branches name">
- <a
- href="https://git.example.org/branch/test;refs/heads/test17"
- >
- test17
- </a>
- </td>
- <td class="branches revision">
- <span class="revisionNoEditing">
- 9c9d08a438e55e52f33b608415e6dddd9b18550d
- </span>
- <span class="revisionEdit">
- <span class="revisionWithEditing">
+ test17
+ </a>
+ </td>
+ <td class="branches revision">
+ <span class="revisionNoEditing">
9c9d08a438e55e52f33b608415e6dddd9b18550d
</span>
+ <span class="revisionEdit">
+ <span class="revisionWithEditing">
+ 9c9d08a438e55e52f33b608415e6dddd9b18550d
+ </span>
+ <gr-button
+ aria-disabled="false"
+ class="editBtn"
+ data-index="18"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ edit
+ </gr-button>
+ <iron-input class="editItem">
+ <input />
+ </iron-input>
+ <gr-button
+ aria-disabled="false"
+ class="cancelBtn editItem"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="true"
+ class="editItem saveBtn"
+ data-index="18"
+ disabled=""
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Save
+ </gr-button>
+ </span>
+ </td>
+ <td class="hideItem message"></td>
+ <td class="hideItem tagger"></td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://git.example.org/branch/test;refs/heads/test17"
+ rel="noopener"
+ target="_blank"
+ >
+ (diffusion)
+ </a>
+ </td>
+ <td class="delete">
<gr-button
aria-disabled="false"
- class="editBtn"
+ class="deleteButton"
data-index="18"
link=""
role="button"
tabindex="0"
>
- edit
+ Delete
</gr-button>
- <iron-input class="editItem">
- <input />
- </iron-input>
- <gr-button
- aria-disabled="false"
- class="cancelBtn editItem"
- link=""
- role="button"
- tabindex="0"
+ </td>
+ </tr>
+ <tr class="table">
+ <td class="branches name">
+ <a
+ href="https://git.example.org/branch/test;refs/heads/test18"
>
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="true"
- class="editItem saveBtn"
- data-index="18"
- disabled=""
- link=""
- role="button"
- tabindex="-1"
- >
- Save
- </gr-button>
- </span>
- </td>
- <td class="hideItem message"></td>
- <td class="hideItem tagger"></td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://git.example.org/branch/test;refs/heads/test17"
- rel="noopener"
- target="_blank"
- >
- (diffusion)
- </a>
- </td>
- <td class="delete">
- <gr-button
- aria-disabled="false"
- class="deleteButton"
- data-index="18"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr class="table">
- <td class="branches name">
- <a
- href="https://git.example.org/branch/test;refs/heads/test18"
- >
- test18
- </a>
- </td>
- <td class="branches revision">
- <span class="revisionNoEditing">
- 9c9d08a438e55e52f33b608415e6dddd9b18550d
- </span>
- <span class="revisionEdit">
- <span class="revisionWithEditing">
+ test18
+ </a>
+ </td>
+ <td class="branches revision">
+ <span class="revisionNoEditing">
9c9d08a438e55e52f33b608415e6dddd9b18550d
</span>
+ <span class="revisionEdit">
+ <span class="revisionWithEditing">
+ 9c9d08a438e55e52f33b608415e6dddd9b18550d
+ </span>
+ <gr-button
+ aria-disabled="false"
+ class="editBtn"
+ data-index="19"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ edit
+ </gr-button>
+ <iron-input class="editItem">
+ <input />
+ </iron-input>
+ <gr-button
+ aria-disabled="false"
+ class="cancelBtn editItem"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="true"
+ class="editItem saveBtn"
+ data-index="19"
+ disabled=""
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Save
+ </gr-button>
+ </span>
+ </td>
+ <td class="hideItem message"></td>
+ <td class="hideItem tagger"></td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://git.example.org/branch/test;refs/heads/test18"
+ rel="noopener"
+ target="_blank"
+ >
+ (diffusion)
+ </a>
+ </td>
+ <td class="delete">
<gr-button
aria-disabled="false"
- class="editBtn"
+ class="deleteButton"
data-index="19"
link=""
role="button"
tabindex="0"
>
- edit
+ Delete
</gr-button>
- <iron-input class="editItem">
- <input />
- </iron-input>
- <gr-button
- aria-disabled="false"
- class="cancelBtn editItem"
- link=""
- role="button"
- tabindex="0"
+ </td>
+ </tr>
+ <tr class="table">
+ <td class="branches name">
+ <a
+ href="https://git.example.org/branch/test;refs/heads/test19"
>
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="true"
- class="editItem saveBtn"
- data-index="19"
- disabled=""
- link=""
- role="button"
- tabindex="-1"
- >
- Save
- </gr-button>
- </span>
- </td>
- <td class="hideItem message"></td>
- <td class="hideItem tagger"></td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://git.example.org/branch/test;refs/heads/test18"
- rel="noopener"
- target="_blank"
- >
- (diffusion)
- </a>
- </td>
- <td class="delete">
- <gr-button
- aria-disabled="false"
- class="deleteButton"
- data-index="19"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr class="table">
- <td class="branches name">
- <a
- href="https://git.example.org/branch/test;refs/heads/test19"
- >
- test19
- </a>
- </td>
- <td class="branches revision">
- <span class="revisionNoEditing">
- 9c9d08a438e55e52f33b608415e6dddd9b18550d
- </span>
- <span class="revisionEdit">
- <span class="revisionWithEditing">
+ test19
+ </a>
+ </td>
+ <td class="branches revision">
+ <span class="revisionNoEditing">
9c9d08a438e55e52f33b608415e6dddd9b18550d
</span>
+ <span class="revisionEdit">
+ <span class="revisionWithEditing">
+ 9c9d08a438e55e52f33b608415e6dddd9b18550d
+ </span>
+ <gr-button
+ aria-disabled="false"
+ class="editBtn"
+ data-index="20"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ edit
+ </gr-button>
+ <iron-input class="editItem">
+ <input />
+ </iron-input>
+ <gr-button
+ aria-disabled="false"
+ class="cancelBtn editItem"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="true"
+ class="editItem saveBtn"
+ data-index="20"
+ disabled=""
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Save
+ </gr-button>
+ </span>
+ </td>
+ <td class="hideItem message"></td>
+ <td class="hideItem tagger"></td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://git.example.org/branch/test;refs/heads/test19"
+ rel="noopener"
+ target="_blank"
+ >
+ (diffusion)
+ </a>
+ </td>
+ <td class="delete">
<gr-button
aria-disabled="false"
- class="editBtn"
+ class="deleteButton"
data-index="20"
link=""
role="button"
tabindex="0"
>
- edit
+ Delete
</gr-button>
- <iron-input class="editItem">
- <input />
- </iron-input>
- <gr-button
- aria-disabled="false"
- class="cancelBtn editItem"
- link=""
- role="button"
- tabindex="0"
+ </td>
+ </tr>
+ <tr class="table">
+ <td class="branches name">
+ <a
+ href="https://git.example.org/branch/test;refs/heads/test20"
>
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="true"
- class="editItem saveBtn"
- data-index="20"
- disabled=""
- link=""
- role="button"
- tabindex="-1"
- >
- Save
- </gr-button>
- </span>
- </td>
- <td class="hideItem message"></td>
- <td class="hideItem tagger"></td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://git.example.org/branch/test;refs/heads/test19"
- rel="noopener"
- target="_blank"
- >
- (diffusion)
- </a>
- </td>
- <td class="delete">
- <gr-button
- aria-disabled="false"
- class="deleteButton"
- data-index="20"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr class="table">
- <td class="branches name">
- <a
- href="https://git.example.org/branch/test;refs/heads/test20"
- >
- test20
- </a>
- </td>
- <td class="branches revision">
- <span class="revisionNoEditing">
- 9c9d08a438e55e52f33b608415e6dddd9b18550d
- </span>
- <span class="revisionEdit">
- <span class="revisionWithEditing">
+ test20
+ </a>
+ </td>
+ <td class="branches revision">
+ <span class="revisionNoEditing">
9c9d08a438e55e52f33b608415e6dddd9b18550d
</span>
+ <span class="revisionEdit">
+ <span class="revisionWithEditing">
+ 9c9d08a438e55e52f33b608415e6dddd9b18550d
+ </span>
+ <gr-button
+ aria-disabled="false"
+ class="editBtn"
+ data-index="21"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ edit
+ </gr-button>
+ <iron-input class="editItem">
+ <input />
+ </iron-input>
+ <gr-button
+ aria-disabled="false"
+ class="cancelBtn editItem"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="true"
+ class="editItem saveBtn"
+ data-index="21"
+ disabled=""
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Save
+ </gr-button>
+ </span>
+ </td>
+ <td class="hideItem message"></td>
+ <td class="hideItem tagger"></td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://git.example.org/branch/test;refs/heads/test20"
+ rel="noopener"
+ target="_blank"
+ >
+ (diffusion)
+ </a>
+ </td>
+ <td class="delete">
<gr-button
aria-disabled="false"
- class="editBtn"
+ class="deleteButton"
data-index="21"
link=""
role="button"
tabindex="0"
>
- edit
+ Delete
</gr-button>
- <iron-input class="editItem">
- <input />
- </iron-input>
- <gr-button
- aria-disabled="false"
- class="cancelBtn editItem"
- link=""
- role="button"
- tabindex="0"
+ </td>
+ </tr>
+ <tr class="table">
+ <td class="branches name">
+ <a
+ href="https://git.example.org/branch/test;refs/heads/test21"
>
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="true"
- class="editItem saveBtn"
- data-index="21"
- disabled=""
- link=""
- role="button"
- tabindex="-1"
- >
- Save
- </gr-button>
- </span>
- </td>
- <td class="hideItem message"></td>
- <td class="hideItem tagger"></td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://git.example.org/branch/test;refs/heads/test20"
- rel="noopener"
- target="_blank"
- >
- (diffusion)
- </a>
- </td>
- <td class="delete">
- <gr-button
- aria-disabled="false"
- class="deleteButton"
- data-index="21"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr class="table">
- <td class="branches name">
- <a
- href="https://git.example.org/branch/test;refs/heads/test21"
- >
- test21
- </a>
- </td>
- <td class="branches revision">
- <span class="revisionNoEditing">
- 9c9d08a438e55e52f33b608415e6dddd9b18550d
- </span>
- <span class="revisionEdit">
- <span class="revisionWithEditing">
+ test21
+ </a>
+ </td>
+ <td class="branches revision">
+ <span class="revisionNoEditing">
9c9d08a438e55e52f33b608415e6dddd9b18550d
</span>
+ <span class="revisionEdit">
+ <span class="revisionWithEditing">
+ 9c9d08a438e55e52f33b608415e6dddd9b18550d
+ </span>
+ <gr-button
+ aria-disabled="false"
+ class="editBtn"
+ data-index="22"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ edit
+ </gr-button>
+ <iron-input class="editItem">
+ <input />
+ </iron-input>
+ <gr-button
+ aria-disabled="false"
+ class="cancelBtn editItem"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="true"
+ class="editItem saveBtn"
+ data-index="22"
+ disabled=""
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Save
+ </gr-button>
+ </span>
+ </td>
+ <td class="hideItem message"></td>
+ <td class="hideItem tagger"></td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://git.example.org/branch/test;refs/heads/test21"
+ rel="noopener"
+ target="_blank"
+ >
+ (diffusion)
+ </a>
+ </td>
+ <td class="delete">
<gr-button
aria-disabled="false"
- class="editBtn"
+ class="deleteButton"
data-index="22"
link=""
role="button"
tabindex="0"
>
- edit
+ Delete
</gr-button>
- <iron-input class="editItem">
- <input />
- </iron-input>
- <gr-button
- aria-disabled="false"
- class="cancelBtn editItem"
- link=""
- role="button"
- tabindex="0"
+ </td>
+ </tr>
+ <tr class="table">
+ <td class="branches name">
+ <a
+ href="https://git.example.org/branch/test;refs/heads/test22"
>
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="true"
- class="editItem saveBtn"
- data-index="22"
- disabled=""
- link=""
- role="button"
- tabindex="-1"
- >
- Save
- </gr-button>
- </span>
- </td>
- <td class="hideItem message"></td>
- <td class="hideItem tagger"></td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://git.example.org/branch/test;refs/heads/test21"
- rel="noopener"
- target="_blank"
- >
- (diffusion)
- </a>
- </td>
- <td class="delete">
- <gr-button
- aria-disabled="false"
- class="deleteButton"
- data-index="22"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr class="table">
- <td class="branches name">
- <a
- href="https://git.example.org/branch/test;refs/heads/test22"
- >
- test22
- </a>
- </td>
- <td class="branches revision">
- <span class="revisionNoEditing">
- 9c9d08a438e55e52f33b608415e6dddd9b18550d
- </span>
- <span class="revisionEdit">
- <span class="revisionWithEditing">
+ test22
+ </a>
+ </td>
+ <td class="branches revision">
+ <span class="revisionNoEditing">
9c9d08a438e55e52f33b608415e6dddd9b18550d
</span>
+ <span class="revisionEdit">
+ <span class="revisionWithEditing">
+ 9c9d08a438e55e52f33b608415e6dddd9b18550d
+ </span>
+ <gr-button
+ aria-disabled="false"
+ class="editBtn"
+ data-index="23"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ edit
+ </gr-button>
+ <iron-input class="editItem">
+ <input />
+ </iron-input>
+ <gr-button
+ aria-disabled="false"
+ class="cancelBtn editItem"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="true"
+ class="editItem saveBtn"
+ data-index="23"
+ disabled=""
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Save
+ </gr-button>
+ </span>
+ </td>
+ <td class="hideItem message"></td>
+ <td class="hideItem tagger"></td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://git.example.org/branch/test;refs/heads/test22"
+ rel="noopener"
+ target="_blank"
+ >
+ (diffusion)
+ </a>
+ </td>
+ <td class="delete">
<gr-button
aria-disabled="false"
- class="editBtn"
+ class="deleteButton"
data-index="23"
link=""
role="button"
tabindex="0"
>
- edit
+ Delete
</gr-button>
- <iron-input class="editItem">
- <input />
- </iron-input>
- <gr-button
- aria-disabled="false"
- class="cancelBtn editItem"
- link=""
- role="button"
- tabindex="0"
+ </td>
+ </tr>
+ <tr class="table">
+ <td class="branches name">
+ <a
+ href="https://git.example.org/branch/test;refs/heads/test23"
>
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="true"
- class="editItem saveBtn"
- data-index="23"
- disabled=""
- link=""
- role="button"
- tabindex="-1"
- >
- Save
- </gr-button>
- </span>
- </td>
- <td class="hideItem message"></td>
- <td class="hideItem tagger"></td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://git.example.org/branch/test;refs/heads/test22"
- rel="noopener"
- target="_blank"
- >
- (diffusion)
- </a>
- </td>
- <td class="delete">
- <gr-button
- aria-disabled="false"
- class="deleteButton"
- data-index="23"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr class="table">
- <td class="branches name">
- <a
- href="https://git.example.org/branch/test;refs/heads/test23"
- >
- test23
- </a>
- </td>
- <td class="branches revision">
- <span class="revisionNoEditing">
- 9c9d08a438e55e52f33b608415e6dddd9b18550d
- </span>
- <span class="revisionEdit">
- <span class="revisionWithEditing">
+ test23
+ </a>
+ </td>
+ <td class="branches revision">
+ <span class="revisionNoEditing">
9c9d08a438e55e52f33b608415e6dddd9b18550d
</span>
+ <span class="revisionEdit">
+ <span class="revisionWithEditing">
+ 9c9d08a438e55e52f33b608415e6dddd9b18550d
+ </span>
+ <gr-button
+ aria-disabled="false"
+ class="editBtn"
+ data-index="24"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ edit
+ </gr-button>
+ <iron-input class="editItem">
+ <input />
+ </iron-input>
+ <gr-button
+ aria-disabled="false"
+ class="cancelBtn editItem"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="true"
+ class="editItem saveBtn"
+ data-index="24"
+ disabled=""
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Save
+ </gr-button>
+ </span>
+ </td>
+ <td class="hideItem message"></td>
+ <td class="hideItem tagger"></td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://git.example.org/branch/test;refs/heads/test23"
+ rel="noopener"
+ target="_blank"
+ >
+ (diffusion)
+ </a>
+ </td>
+ <td class="delete">
<gr-button
aria-disabled="false"
- class="editBtn"
+ class="deleteButton"
data-index="24"
link=""
role="button"
tabindex="0"
>
- edit
+ Delete
</gr-button>
- <iron-input class="editItem">
- <input />
- </iron-input>
- <gr-button
- aria-disabled="false"
- class="cancelBtn editItem"
- link=""
- role="button"
- tabindex="0"
- >
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="true"
- class="editItem saveBtn"
- data-index="24"
- disabled=""
- link=""
- role="button"
- tabindex="-1"
- >
- Save
- </gr-button>
- </span>
- </td>
- <td class="hideItem message"></td>
- <td class="hideItem tagger"></td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://git.example.org/branch/test;refs/heads/test23"
- rel="noopener"
- target="_blank"
- >
- (diffusion)
- </a>
- </td>
- <td class="delete">
- <gr-button
- aria-disabled="false"
- class="deleteButton"
- data-index="24"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- </tbody>
- </table>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <gr-overlay
+ aria-hidden="true"
+ id="overlay"
+ style="outline: none; display: none;"
+ tabindex="-1"
+ with-backdrop=""
+ >
+ <gr-confirm-delete-item-dialog class="confirmDialog">
+ </gr-confirm-delete-item-dialog>
+ </gr-overlay>
+ </gr-list-view>
<gr-overlay
aria-hidden="true"
- id="overlay"
+ id="createOverlay"
style="outline: none; display: none;"
tabindex="-1"
with-backdrop=""
>
- <gr-confirm-delete-item-dialog class="confirmDialog">
- </gr-confirm-delete-item-dialog>
+ <gr-dialog
+ confirm-label="Create"
+ disabled=""
+ id="createDialog"
+ role="dialog"
+ >
+ <div class="header" slot="header">Create Branch</div>
+ <div class="main" slot="main">
+ <gr-create-pointer-dialog id="createNewModal">
+ </gr-create-pointer-dialog>
+ </div>
+ </gr-dialog>
</gr-overlay>
- </gr-list-view>
- <gr-overlay
- aria-hidden="true"
- id="createOverlay"
- style="outline: none; display: none;"
- tabindex="-1"
- with-backdrop=""
- >
- <gr-dialog
- confirm-label="Create"
- disabled=""
- id="createDialog"
- role="dialog"
- >
- <div class="header" slot="header">Create Branch</div>
- <div class="main" slot="main">
- <gr-create-pointer-dialog id="createNewModal">
- </gr-create-pointer-dialog>
- </div>
- </gr-dialog>
- </gr-overlay>
- `);
+ `
+ );
});
test('test for branch in the list', () => {
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list_test.ts b/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list_test.ts
index a58538c..ce202d8 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list_test.ts
@@ -67,547 +67,552 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-list-view>
- <table class="genericList" id="list">
- <tbody>
- <tr class="headerRow">
- <th class="name topHeader">Repository Name</th>
- <th class="repositoryBrowser topHeader">Repository Browser</th>
- <th class="changesLink topHeader">Changes</th>
- <th class="readOnly topHeader">Read only</th>
- <th class="description topHeader">Repository Description</th>
- </tr>
- <tr class="loadingMsg" id="loading">
- <td>Loading...</td>
- </tr>
- </tbody>
- <tbody>
- <tr class="table">
- <td class="name">
- <a href="/admin/repos/test"> test </a>
- </td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://phabricator.example.org/r/project/test0"
- rel="noopener"
- target="_blank"
- >
- diffusion
- </a>
- </td>
- <td class="changesLink">
- <a href=""> view all </a>
- </td>
- <td class="readOnly"></td>
- <td class="description"></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/admin/repos/test"> test </a>
- </td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://phabricator.example.org/r/project/test1"
- rel="noopener"
- target="_blank"
- >
- diffusion
- </a>
- </td>
- <td class="changesLink">
- <a href=""> view all </a>
- </td>
- <td class="readOnly"></td>
- <td class="description"></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/admin/repos/test"> test </a>
- </td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://phabricator.example.org/r/project/test2"
- rel="noopener"
- target="_blank"
- >
- diffusion
- </a>
- </td>
- <td class="changesLink">
- <a href=""> view all </a>
- </td>
- <td class="readOnly"></td>
- <td class="description"></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/admin/repos/test"> test </a>
- </td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://phabricator.example.org/r/project/test3"
- rel="noopener"
- target="_blank"
- >
- diffusion
- </a>
- </td>
- <td class="changesLink">
- <a href=""> view all </a>
- </td>
- <td class="readOnly"></td>
- <td class="description"></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/admin/repos/test"> test </a>
- </td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://phabricator.example.org/r/project/test4"
- rel="noopener"
- target="_blank"
- >
- diffusion
- </a>
- </td>
- <td class="changesLink">
- <a href=""> view all </a>
- </td>
- <td class="readOnly"></td>
- <td class="description"></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/admin/repos/test"> test </a>
- </td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://phabricator.example.org/r/project/test5"
- rel="noopener"
- target="_blank"
- >
- diffusion
- </a>
- </td>
- <td class="changesLink">
- <a href=""> view all </a>
- </td>
- <td class="readOnly"></td>
- <td class="description"></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/admin/repos/test"> test </a>
- </td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://phabricator.example.org/r/project/test6"
- rel="noopener"
- target="_blank"
- >
- diffusion
- </a>
- </td>
- <td class="changesLink">
- <a href=""> view all </a>
- </td>
- <td class="readOnly"></td>
- <td class="description"></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/admin/repos/test"> test </a>
- </td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://phabricator.example.org/r/project/test7"
- rel="noopener"
- target="_blank"
- >
- diffusion
- </a>
- </td>
- <td class="changesLink">
- <a href=""> view all </a>
- </td>
- <td class="readOnly"></td>
- <td class="description"></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/admin/repos/test"> test </a>
- </td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://phabricator.example.org/r/project/test8"
- rel="noopener"
- target="_blank"
- >
- diffusion
- </a>
- </td>
- <td class="changesLink">
- <a href=""> view all </a>
- </td>
- <td class="readOnly"></td>
- <td class="description"></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/admin/repos/test"> test </a>
- </td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://phabricator.example.org/r/project/test9"
- rel="noopener"
- target="_blank"
- >
- diffusion
- </a>
- </td>
- <td class="changesLink">
- <a href=""> view all </a>
- </td>
- <td class="readOnly"></td>
- <td class="description"></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/admin/repos/test"> test </a>
- </td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://phabricator.example.org/r/project/test10"
- rel="noopener"
- target="_blank"
- >
- diffusion
- </a>
- </td>
- <td class="changesLink">
- <a href=""> view all </a>
- </td>
- <td class="readOnly"></td>
- <td class="description"></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/admin/repos/test"> test </a>
- </td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://phabricator.example.org/r/project/test11"
- rel="noopener"
- target="_blank"
- >
- diffusion
- </a>
- </td>
- <td class="changesLink">
- <a href=""> view all </a>
- </td>
- <td class="readOnly"></td>
- <td class="description"></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/admin/repos/test"> test </a>
- </td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://phabricator.example.org/r/project/test12"
- rel="noopener"
- target="_blank"
- >
- diffusion
- </a>
- </td>
- <td class="changesLink">
- <a href=""> view all </a>
- </td>
- <td class="readOnly"></td>
- <td class="description"></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/admin/repos/test"> test </a>
- </td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://phabricator.example.org/r/project/test13"
- rel="noopener"
- target="_blank"
- >
- diffusion
- </a>
- </td>
- <td class="changesLink">
- <a href=""> view all </a>
- </td>
- <td class="readOnly"></td>
- <td class="description"></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/admin/repos/test"> test </a>
- </td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://phabricator.example.org/r/project/test14"
- rel="noopener"
- target="_blank"
- >
- diffusion
- </a>
- </td>
- <td class="changesLink">
- <a href=""> view all </a>
- </td>
- <td class="readOnly"></td>
- <td class="description"></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/admin/repos/test"> test </a>
- </td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://phabricator.example.org/r/project/test15"
- rel="noopener"
- target="_blank"
- >
- diffusion
- </a>
- </td>
- <td class="changesLink">
- <a href=""> view all </a>
- </td>
- <td class="readOnly"></td>
- <td class="description"></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/admin/repos/test"> test </a>
- </td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://phabricator.example.org/r/project/test16"
- rel="noopener"
- target="_blank"
- >
- diffusion
- </a>
- </td>
- <td class="changesLink">
- <a href=""> view all </a>
- </td>
- <td class="readOnly"></td>
- <td class="description"></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/admin/repos/test"> test </a>
- </td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://phabricator.example.org/r/project/test17"
- rel="noopener"
- target="_blank"
- >
- diffusion
- </a>
- </td>
- <td class="changesLink">
- <a href=""> view all </a>
- </td>
- <td class="readOnly"></td>
- <td class="description"></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/admin/repos/test"> test </a>
- </td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://phabricator.example.org/r/project/test18"
- rel="noopener"
- target="_blank"
- >
- diffusion
- </a>
- </td>
- <td class="changesLink">
- <a href=""> view all </a>
- </td>
- <td class="readOnly"></td>
- <td class="description"></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/admin/repos/test"> test </a>
- </td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://phabricator.example.org/r/project/test19"
- rel="noopener"
- target="_blank"
- >
- diffusion
- </a>
- </td>
- <td class="changesLink">
- <a href=""> view all </a>
- </td>
- <td class="readOnly"></td>
- <td class="description"></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/admin/repos/test"> test </a>
- </td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://phabricator.example.org/r/project/test20"
- rel="noopener"
- target="_blank"
- >
- diffusion
- </a>
- </td>
- <td class="changesLink">
- <a href=""> view all </a>
- </td>
- <td class="readOnly"></td>
- <td class="description"></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/admin/repos/test"> test </a>
- </td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://phabricator.example.org/r/project/test21"
- rel="noopener"
- target="_blank"
- >
- diffusion
- </a>
- </td>
- <td class="changesLink">
- <a href=""> view all </a>
- </td>
- <td class="readOnly"></td>
- <td class="description"></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/admin/repos/test"> test </a>
- </td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://phabricator.example.org/r/project/test22"
- rel="noopener"
- target="_blank"
- >
- diffusion
- </a>
- </td>
- <td class="changesLink">
- <a href=""> view all </a>
- </td>
- <td class="readOnly"></td>
- <td class="description"></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/admin/repos/test"> test </a>
- </td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://phabricator.example.org/r/project/test23"
- rel="noopener"
- target="_blank"
- >
- diffusion
- </a>
- </td>
- <td class="changesLink">
- <a href=""> view all </a>
- </td>
- <td class="readOnly"></td>
- <td class="description"></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/admin/repos/test"> test </a>
- </td>
- <td class="repositoryBrowser">
- <a
- class="webLink"
- href="https://phabricator.example.org/r/project/test24"
- rel="noopener"
- target="_blank"
- >
- diffusion
- </a>
- </td>
- <td class="changesLink">
- <a href=""> view all </a>
- </td>
- <td class="readOnly"></td>
- <td class="description"></td>
- </tr>
- </tbody>
- </table>
- </gr-list-view>
- <gr-overlay
- aria-hidden="true"
- id="createOverlay"
- style="outline: none; display: none;"
- tabindex="-1"
- with-backdrop=""
- >
- <gr-dialog
- class="confirmDialog"
- confirm-label="Create"
- disabled=""
- id="createDialog"
- role="dialog"
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-list-view>
+ <table class="genericList" id="list">
+ <tbody>
+ <tr class="headerRow">
+ <th class="name topHeader">Repository Name</th>
+ <th class="repositoryBrowser topHeader">
+ Repository Browser
+ </th>
+ <th class="changesLink topHeader">Changes</th>
+ <th class="readOnly topHeader">Read only</th>
+ <th class="description topHeader">Repository Description</th>
+ </tr>
+ <tr class="loadingMsg" id="loading">
+ <td>Loading...</td>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr class="table">
+ <td class="name">
+ <a href="/admin/repos/test"> test </a>
+ </td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://phabricator.example.org/r/project/test0"
+ rel="noopener"
+ target="_blank"
+ >
+ diffusion
+ </a>
+ </td>
+ <td class="changesLink">
+ <a href=""> view all </a>
+ </td>
+ <td class="readOnly"></td>
+ <td class="description"></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/admin/repos/test"> test </a>
+ </td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://phabricator.example.org/r/project/test1"
+ rel="noopener"
+ target="_blank"
+ >
+ diffusion
+ </a>
+ </td>
+ <td class="changesLink">
+ <a href=""> view all </a>
+ </td>
+ <td class="readOnly"></td>
+ <td class="description"></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/admin/repos/test"> test </a>
+ </td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://phabricator.example.org/r/project/test2"
+ rel="noopener"
+ target="_blank"
+ >
+ diffusion
+ </a>
+ </td>
+ <td class="changesLink">
+ <a href=""> view all </a>
+ </td>
+ <td class="readOnly"></td>
+ <td class="description"></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/admin/repos/test"> test </a>
+ </td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://phabricator.example.org/r/project/test3"
+ rel="noopener"
+ target="_blank"
+ >
+ diffusion
+ </a>
+ </td>
+ <td class="changesLink">
+ <a href=""> view all </a>
+ </td>
+ <td class="readOnly"></td>
+ <td class="description"></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/admin/repos/test"> test </a>
+ </td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://phabricator.example.org/r/project/test4"
+ rel="noopener"
+ target="_blank"
+ >
+ diffusion
+ </a>
+ </td>
+ <td class="changesLink">
+ <a href=""> view all </a>
+ </td>
+ <td class="readOnly"></td>
+ <td class="description"></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/admin/repos/test"> test </a>
+ </td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://phabricator.example.org/r/project/test5"
+ rel="noopener"
+ target="_blank"
+ >
+ diffusion
+ </a>
+ </td>
+ <td class="changesLink">
+ <a href=""> view all </a>
+ </td>
+ <td class="readOnly"></td>
+ <td class="description"></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/admin/repos/test"> test </a>
+ </td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://phabricator.example.org/r/project/test6"
+ rel="noopener"
+ target="_blank"
+ >
+ diffusion
+ </a>
+ </td>
+ <td class="changesLink">
+ <a href=""> view all </a>
+ </td>
+ <td class="readOnly"></td>
+ <td class="description"></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/admin/repos/test"> test </a>
+ </td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://phabricator.example.org/r/project/test7"
+ rel="noopener"
+ target="_blank"
+ >
+ diffusion
+ </a>
+ </td>
+ <td class="changesLink">
+ <a href=""> view all </a>
+ </td>
+ <td class="readOnly"></td>
+ <td class="description"></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/admin/repos/test"> test </a>
+ </td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://phabricator.example.org/r/project/test8"
+ rel="noopener"
+ target="_blank"
+ >
+ diffusion
+ </a>
+ </td>
+ <td class="changesLink">
+ <a href=""> view all </a>
+ </td>
+ <td class="readOnly"></td>
+ <td class="description"></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/admin/repos/test"> test </a>
+ </td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://phabricator.example.org/r/project/test9"
+ rel="noopener"
+ target="_blank"
+ >
+ diffusion
+ </a>
+ </td>
+ <td class="changesLink">
+ <a href=""> view all </a>
+ </td>
+ <td class="readOnly"></td>
+ <td class="description"></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/admin/repos/test"> test </a>
+ </td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://phabricator.example.org/r/project/test10"
+ rel="noopener"
+ target="_blank"
+ >
+ diffusion
+ </a>
+ </td>
+ <td class="changesLink">
+ <a href=""> view all </a>
+ </td>
+ <td class="readOnly"></td>
+ <td class="description"></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/admin/repos/test"> test </a>
+ </td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://phabricator.example.org/r/project/test11"
+ rel="noopener"
+ target="_blank"
+ >
+ diffusion
+ </a>
+ </td>
+ <td class="changesLink">
+ <a href=""> view all </a>
+ </td>
+ <td class="readOnly"></td>
+ <td class="description"></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/admin/repos/test"> test </a>
+ </td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://phabricator.example.org/r/project/test12"
+ rel="noopener"
+ target="_blank"
+ >
+ diffusion
+ </a>
+ </td>
+ <td class="changesLink">
+ <a href=""> view all </a>
+ </td>
+ <td class="readOnly"></td>
+ <td class="description"></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/admin/repos/test"> test </a>
+ </td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://phabricator.example.org/r/project/test13"
+ rel="noopener"
+ target="_blank"
+ >
+ diffusion
+ </a>
+ </td>
+ <td class="changesLink">
+ <a href=""> view all </a>
+ </td>
+ <td class="readOnly"></td>
+ <td class="description"></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/admin/repos/test"> test </a>
+ </td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://phabricator.example.org/r/project/test14"
+ rel="noopener"
+ target="_blank"
+ >
+ diffusion
+ </a>
+ </td>
+ <td class="changesLink">
+ <a href=""> view all </a>
+ </td>
+ <td class="readOnly"></td>
+ <td class="description"></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/admin/repos/test"> test </a>
+ </td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://phabricator.example.org/r/project/test15"
+ rel="noopener"
+ target="_blank"
+ >
+ diffusion
+ </a>
+ </td>
+ <td class="changesLink">
+ <a href=""> view all </a>
+ </td>
+ <td class="readOnly"></td>
+ <td class="description"></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/admin/repos/test"> test </a>
+ </td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://phabricator.example.org/r/project/test16"
+ rel="noopener"
+ target="_blank"
+ >
+ diffusion
+ </a>
+ </td>
+ <td class="changesLink">
+ <a href=""> view all </a>
+ </td>
+ <td class="readOnly"></td>
+ <td class="description"></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/admin/repos/test"> test </a>
+ </td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://phabricator.example.org/r/project/test17"
+ rel="noopener"
+ target="_blank"
+ >
+ diffusion
+ </a>
+ </td>
+ <td class="changesLink">
+ <a href=""> view all </a>
+ </td>
+ <td class="readOnly"></td>
+ <td class="description"></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/admin/repos/test"> test </a>
+ </td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://phabricator.example.org/r/project/test18"
+ rel="noopener"
+ target="_blank"
+ >
+ diffusion
+ </a>
+ </td>
+ <td class="changesLink">
+ <a href=""> view all </a>
+ </td>
+ <td class="readOnly"></td>
+ <td class="description"></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/admin/repos/test"> test </a>
+ </td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://phabricator.example.org/r/project/test19"
+ rel="noopener"
+ target="_blank"
+ >
+ diffusion
+ </a>
+ </td>
+ <td class="changesLink">
+ <a href=""> view all </a>
+ </td>
+ <td class="readOnly"></td>
+ <td class="description"></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/admin/repos/test"> test </a>
+ </td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://phabricator.example.org/r/project/test20"
+ rel="noopener"
+ target="_blank"
+ >
+ diffusion
+ </a>
+ </td>
+ <td class="changesLink">
+ <a href=""> view all </a>
+ </td>
+ <td class="readOnly"></td>
+ <td class="description"></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/admin/repos/test"> test </a>
+ </td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://phabricator.example.org/r/project/test21"
+ rel="noopener"
+ target="_blank"
+ >
+ diffusion
+ </a>
+ </td>
+ <td class="changesLink">
+ <a href=""> view all </a>
+ </td>
+ <td class="readOnly"></td>
+ <td class="description"></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/admin/repos/test"> test </a>
+ </td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://phabricator.example.org/r/project/test22"
+ rel="noopener"
+ target="_blank"
+ >
+ diffusion
+ </a>
+ </td>
+ <td class="changesLink">
+ <a href=""> view all </a>
+ </td>
+ <td class="readOnly"></td>
+ <td class="description"></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/admin/repos/test"> test </a>
+ </td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://phabricator.example.org/r/project/test23"
+ rel="noopener"
+ target="_blank"
+ >
+ diffusion
+ </a>
+ </td>
+ <td class="changesLink">
+ <a href=""> view all </a>
+ </td>
+ <td class="readOnly"></td>
+ <td class="description"></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/admin/repos/test"> test </a>
+ </td>
+ <td class="repositoryBrowser">
+ <a
+ class="webLink"
+ href="https://phabricator.example.org/r/project/test24"
+ rel="noopener"
+ target="_blank"
+ >
+ diffusion
+ </a>
+ </td>
+ <td class="changesLink">
+ <a href=""> view all </a>
+ </td>
+ <td class="readOnly"></td>
+ <td class="description"></td>
+ </tr>
+ </tbody>
+ </table>
+ </gr-list-view>
+ <gr-overlay
+ aria-hidden="true"
+ id="createOverlay"
+ style="outline: none; display: none;"
+ tabindex="-1"
+ with-backdrop=""
>
- <div class="header" slot="header">Create Repository</div>
- <div class="main" slot="main">
- <gr-create-repo-dialog id="createNewModal">
- </gr-create-repo-dialog>
- </div>
- </gr-dialog>
- </gr-overlay>
- `);
+ <gr-dialog
+ class="confirmDialog"
+ confirm-label="Create"
+ disabled=""
+ id="createDialog"
+ role="dialog"
+ >
+ <div class="header" slot="header">Create Repository</div>
+ <div class="main" slot="main">
+ <gr-create-repo-dialog id="createNewModal">
+ </gr-create-repo-dialog>
+ </div>
+ </gr-dialog>
+ </gr-overlay>
+ `
+ );
});
test('test for test repo in the list', async () => {
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-plugin-config/gr-repo-plugin-config_test.ts b/polygerrit-ui/app/elements/admin/gr-repo-plugin-config/gr-repo-plugin-config_test.ts
index 38f3e2e..8ea1f5e 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-plugin-config/gr-repo-plugin-config_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-repo-plugin-config/gr-repo-plugin-config_test.ts
@@ -31,23 +31,26 @@
};
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="gr-form-styles">
- <fieldset>
- <h4>testName</h4>
- <section class="STRING section">
- <span class="title">
- <span> </span>
- </span>
- <span class="value">
- <iron-input data-option-key="plugin">
- <input data-option-key="plugin" disabled="" is="iron-input" />
- </iron-input>
- </span>
- </section>
- </fieldset>
- </div>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="gr-form-styles">
+ <fieldset>
+ <h4>testName</h4>
+ <section class="STRING section">
+ <span class="title">
+ <span> </span>
+ </span>
+ <span class="value">
+ <iron-input data-option-key="plugin">
+ <input data-option-key="plugin" disabled="" is="iron-input" />
+ </iron-input>
+ </span>
+ </section>
+ </fieldset>
+ </div>
+ `
+ );
});
test('_computePluginConfigOptions', () => {
diff --git a/polygerrit-ui/app/elements/admin/gr-repo/gr-repo_test.ts b/polygerrit-ui/app/elements/admin/gr-repo/gr-repo_test.ts
index c3e536d..6056a31 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo/gr-repo_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-repo/gr-repo_test.ts
@@ -161,8 +161,9 @@
test('render', () => {
// prettier and shadowDom assert do not agree about span.title wrapping
- expect(element).shadowDom.to
- .equal(/* prettier-ignore */ /* HTML */ `
+ assert.shadowDom.equal(
+ element,
+ /* prettier-ignore */ /* HTML */ `
<div class="gr-form-styles main read-only">
<div class="info">
<h1 class="heading-1" id="Title"></h1>
@@ -399,7 +400,8 @@
</div>
</div>
</div>
- `);
+ `
+ );
});
test('_computePluginData', async () => {
diff --git a/polygerrit-ui/app/elements/admin/gr-rule-editor/gr-rule-editor_test.ts b/polygerrit-ui/app/elements/admin/gr-rule-editor/gr-rule-editor_test.ts
index 3a5a8a2..7ffee30 100644
--- a/polygerrit-ui/app/elements/admin/gr-rule-editor/gr-rule-editor_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-rule-editor/gr-rule-editor_test.ts
@@ -27,44 +27,47 @@
suite('dom tests', () => {
test('default', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="gr-form-styles" id="mainContainer">
- <div id="options">
- <gr-select id="action">
- <select disabled="">
- <option value="ALLOW">ALLOW</option>
- <option value="DENY">DENY</option>
- <option value="BLOCK">BLOCK</option>
- </select>
- </gr-select>
- <a class="groupPath"> </a>
- <gr-select id="force">
- <select disabled=""></select>
- </gr-select>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="gr-form-styles" id="mainContainer">
+ <div id="options">
+ <gr-select id="action">
+ <select disabled="">
+ <option value="ALLOW">ALLOW</option>
+ <option value="DENY">DENY</option>
+ <option value="BLOCK">BLOCK</option>
+ </select>
+ </gr-select>
+ <a class="groupPath"> </a>
+ <gr-select id="force">
+ <select disabled=""></select>
+ </gr-select>
+ </div>
+ <gr-button
+ aria-disabled="false"
+ id="removeBtn"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Remove
+ </gr-button>
</div>
- <gr-button
- aria-disabled="false"
- id="removeBtn"
- link=""
- role="button"
- tabindex="0"
- >
- Remove
- </gr-button>
- </div>
- <div class="gr-form-styles" id="deletedContainer">
- was deleted
- <gr-button
- aria-disabled="false"
- id="undoRemoveBtn"
- link=""
- role="button"
- tabindex="0"
- >
- Undo
- </gr-button>
- </div>
- `);
+ <div class="gr-form-styles" id="deletedContainer">
+ was deleted
+ <gr-button
+ aria-disabled="false"
+ id="undoRemoveBtn"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Undo
+ </gr-button>
+ </div>
+ `
+ );
});
test('push options', async () => {
@@ -80,26 +83,31 @@
.permission=${AccessPermissionId.PUSH}
></gr-rule-editor>
`);
- expect(queryAndAssert(element, '#options')).dom.to.equal(/* HTML */ `
- <div id="options">
- <gr-select id="action">
- <select>
- <option value="ALLOW">ALLOW</option>
- <option value="DENY">DENY</option>
- <option value="BLOCK">BLOCK</option>
- </select>
- </gr-select>
- <a class="groupPath"> </a>
- <gr-select class="force" id="force">
- <select>
- <option value="false">
- Allow pushing (but not force pushing)
- </option>
- <option value="true">Allow pushing with or without force</option>
- </select>
- </gr-select>
- </div>
- `);
+ assert.dom.equal(
+ queryAndAssert(element, '#options'),
+ /* HTML */ `
+ <div id="options">
+ <gr-select id="action">
+ <select>
+ <option value="ALLOW">ALLOW</option>
+ <option value="DENY">DENY</option>
+ <option value="BLOCK">BLOCK</option>
+ </select>
+ </gr-select>
+ <a class="groupPath"> </a>
+ <gr-select class="force" id="force">
+ <select>
+ <option value="false">
+ Allow pushing (but not force pushing)
+ </option>
+ <option value="true">
+ Allow pushing with or without force
+ </option>
+ </select>
+ </gr-select>
+ </div>
+ `
+ );
});
});
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-action-bar/gr-change-list-action-bar_test.ts b/polygerrit-ui/app/elements/change-list/gr-change-list-action-bar/gr-change-list-action-bar_test.ts
index 73fd395..895dfcd 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list-action-bar/gr-change-list-action-bar_test.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list-action-bar/gr-change-list-action-bar_test.ts
@@ -55,21 +55,24 @@
test('renders action bar', async () => {
await selectChange(change1);
- expect(element).shadowDom.to.equal(/* HTML */ `
- <td>
- <div class="container">
- <div class="selectionInfo">
- <span>1 change selected</span>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <td>
+ <div class="container">
+ <div class="selectionInfo">
+ <span>1 change selected</span>
+ </div>
+ <div class="actionButtons">
+ <gr-change-list-bulk-vote-flow></gr-change-list-bulk-vote-flow>
+ <gr-change-list-topic-flow></gr-change-list-topic-flow>
+ <gr-change-list-hashtag-flow></gr-change-list-hashtag-flow>
+ <gr-change-list-reviewer-flow></gr-change-list-reviewer-flow>
+ </div>
</div>
- <div class="actionButtons">
- <gr-change-list-bulk-vote-flow></gr-change-list-bulk-vote-flow>
- <gr-change-list-topic-flow></gr-change-list-topic-flow>
- <gr-change-list-hashtag-flow></gr-change-list-hashtag-flow>
- <gr-change-list-reviewer-flow></gr-change-list-reviewer-flow>
- </div>
- </div>
- </td>
- `);
+ </td>
+ `
+ );
});
test('label reflects number of selected changes', async () => {
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-bulk-abandon-flow/gr-change-list-bulk-abandon-flow_test.ts b/polygerrit-ui/app/elements/change-list/gr-change-list-bulk-abandon-flow/gr-change-list-bulk-abandon-flow_test.ts
index e8dc655..9cab742 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list-bulk-abandon-flow/gr-change-list-bulk-abandon-flow_test.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list-bulk-abandon-flow/gr-change-list-bulk-abandon-flow_test.ts
@@ -79,44 +79,47 @@
await selectChange(change1);
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-button
- aria-disabled="false"
- flatten=""
- id="abandon"
- role="button"
- tabindex="0"
- >
- Abandon
- </gr-button>
- <gr-overlay
- aria-hidden="true"
- id="actionOverlay"
- style="outline: none; display: none;"
- tabindex="-1"
- with-backdrop=""
- >
- <gr-dialog role="dialog">
- <div slot="header">1 changes to abandon</div>
- <div slot="main">
- <table>
- <thead>
- <tr>
- <th>Subject</th>
- <th>Status</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>Change: Test subject</td>
- <td id="status">Status: NOT STARTED</td>
- </tr>
- </tbody>
- </table>
- </div>
- </gr-dialog>
- </gr-overlay>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-button
+ aria-disabled="false"
+ flatten=""
+ id="abandon"
+ role="button"
+ tabindex="0"
+ >
+ Abandon
+ </gr-button>
+ <gr-overlay
+ aria-hidden="true"
+ id="actionOverlay"
+ style="outline: none; display: none;"
+ tabindex="-1"
+ with-backdrop=""
+ >
+ <gr-dialog role="dialog">
+ <div slot="header">1 changes to abandon</div>
+ <div slot="main">
+ <table>
+ <thead>
+ <tr>
+ <th>Subject</th>
+ <th>Status</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>Change: Test subject</td>
+ <td id="status">Status: NOT STARTED</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </gr-dialog>
+ </gr-overlay>
+ `
+ );
});
test('button state updates as changes are updated', async () => {
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-bulk-vote-flow/gr-change-list-bulk-vote-flow_test.ts b/polygerrit-ui/app/elements/change-list/gr-change-list-bulk-vote-flow/gr-change-list-bulk-vote-flow_test.ts
index be28cdc..68ac07f 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list-bulk-vote-flow/gr-change-list-bulk-vote-flow_test.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list-bulk-vote-flow/gr-change-list-bulk-vote-flow_test.ts
@@ -135,7 +135,9 @@
);
await selectChange(change1);
await element.updateComplete;
- expect(element).shadowDom.to.equal(`<gr-button
+ assert.shadowDom.equal(
+ element,
+ `<gr-button
aria-disabled="false"
flatten=""
id="voteFlowButton"
@@ -194,7 +196,8 @@
</div>
</div>
</gr-dialog>
- </gr-overlay> `);
+ </gr-overlay> `
+ );
});
test('renders with errors', async () => {
@@ -223,7 +226,9 @@
ProgressStatus.FAILED
);
- expect(element).shadowDom.to.equal(`<gr-button
+ assert.shadowDom.equal(
+ element,
+ `<gr-button
aria-disabled="false"
flatten=""
id="voteFlowButton"
@@ -286,7 +291,8 @@
</div>
</div>
</gr-dialog>
- </gr-overlay> `);
+ </gr-overlay> `
+ );
});
test('button state updates as changes are updated', async () => {
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-column-requirement/gr-change-list-column-requirement_test.ts b/polygerrit-ui/app/elements/change-list/gr-change-list-column-requirement/gr-change-list-column-requirement_test.ts
index 1ca21a4..1ccaa59 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list-column-requirement/gr-change-list-column-requirement_test.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list-column-requirement/gr-change-list-column-requirement_test.ts
@@ -54,7 +54,8 @@
>
</gr-change-list-column-requirement>`
);
- expect(element).shadowDom.to.equal(
+ assert.shadowDom.equal(
+ element,
/* HTML */
` <div class="container" title="Satisfied">
<gr-icon class="check_circle" filled icon="check_circle"></gr-icon>
@@ -97,14 +98,16 @@
>
</gr-change-list-column-requirement>`
);
- expect(element).shadowDom.to.equal(
+ assert.shadowDom.equal(
+ element,
/* HTML */
` <div class="container">
<gr-vote-chip tooltip-with-who-voted=""></gr-vote-chip>
</div>`
);
const voteChip = queryAndAssert(element, 'gr-vote-chip');
- expect(voteChip).shadowDom.to.equal(
+ assert.shadowDom.equal(
+ voteChip,
/* HTML */
` <gr-tooltip-content
class="container"
@@ -144,14 +147,16 @@
>
</gr-change-list-column-requirement>`
);
- expect(element).shadowDom.to.equal(
+ assert.shadowDom.equal(
+ element,
/* HTML */
` <div class="container">
<gr-vote-chip tooltip-with-who-voted=""></gr-vote-chip>
</div>`
);
const voteChip = queryAndAssert(element, 'gr-vote-chip');
- expect(voteChip).shadowDom.to.equal(
+ assert.shadowDom.equal(
+ voteChip,
/* HTML */
` <gr-tooltip-content
class="container"
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-column-requirements-summary/gr-change-list-column-requirements-summary_test.ts b/polygerrit-ui/app/elements/change-list/gr-change-list-column-requirements-summary/gr-change-list-column-requirements-summary_test.ts
index eecb009..f9badb6 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list-column-requirements-summary/gr-change-list-column-requirements-summary_test.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list-column-requirements-summary/gr-change-list-column-requirements-summary_test.ts
@@ -57,16 +57,15 @@
html`<gr-change-list-column-requirements-summary .change=${change}>
</gr-change-list-column-requirements-summary>`
);
- expect(element).shadowDom.to.equal(/* HTML */ ` <span
- class="block"
- role="button"
- tabindex="0"
- >
- <gr-submit-requirement-dashboard-hovercard>
- </gr-submit-requirement-dashboard-hovercard>
- <gr-icon class="block" role="img" icon="block"></gr-icon>
- <span class="unsatisfied">1 missing</span>
- </span>`);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ ` <span class="block" role="button" tabindex="0">
+ <gr-submit-requirement-dashboard-hovercard>
+ </gr-submit-requirement-dashboard-hovercard>
+ <gr-icon class="block" role="img" icon="block"></gr-icon>
+ <span class="unsatisfied">1 missing</span>
+ </span>`
+ );
});
test('renders comment count', async () => {
@@ -78,21 +77,20 @@
html`<gr-change-list-column-requirements-summary .change=${change}>
</gr-change-list-column-requirements-summary>`
);
- expect(element).shadowDom.to.equal(/* HTML */ ` <span
- class="block"
- role="button"
- tabindex="0"
- >
- <gr-submit-requirement-dashboard-hovercard>
- </gr-submit-requirement-dashboard-hovercard>
- <gr-icon class="block" role="img" icon="block"></gr-icon>
- <span class="unsatisfied">1 missing</span>
- </span>
- <gr-icon
- class="commentIcon"
- filled
- icon="mode_comment"
- title="5 unresolved comments"
- ></gr-icon>`);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ ` <span class="block" role="button" tabindex="0">
+ <gr-submit-requirement-dashboard-hovercard>
+ </gr-submit-requirement-dashboard-hovercard>
+ <gr-icon class="block" role="img" icon="block"></gr-icon>
+ <span class="unsatisfied">1 missing</span>
+ </span>
+ <gr-icon
+ class="commentIcon"
+ filled
+ icon="mode_comment"
+ title="5 unresolved comments"
+ ></gr-icon>`
+ );
});
});
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-hashtag-flow/gr-change-list-hashtag-flow_test.ts b/polygerrit-ui/app/elements/change-list/gr-change-list-hashtag-flow/gr-change-list-hashtag-flow_test.ts
index 9bf605d..fcc8d0c 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list-hashtag-flow/gr-change-list-hashtag-flow_test.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list-hashtag-flow/gr-change-list-hashtag-flow_test.ts
@@ -85,25 +85,28 @@
});
test('skips dropdown render when closed', async () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-button
- id="start-flow"
- flatten=""
- down-arrow=""
- aria-disabled="false"
- role="button"
- tabindex="0"
- >Hashtag</gr-button
- >
- <iron-dropdown
- aria-disabled="false"
- aria-hidden="true"
- style="outline: none; display: none;"
- vertical-align="auto"
- horizontal-align="auto"
- >
- </iron-dropdown>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-button
+ id="start-flow"
+ flatten=""
+ down-arrow=""
+ aria-disabled="false"
+ role="button"
+ tabindex="0"
+ >Hashtag</gr-button
+ >
+ <iron-dropdown
+ aria-disabled="false"
+ aria-hidden="true"
+ style="outline: none; display: none;"
+ vertical-align="auto"
+ horizontal-align="auto"
+ >
+ </iron-dropdown>
+ `
+ );
});
test('dropdown hidden before flow button clicked', async () => {
@@ -227,7 +230,8 @@
});
test('renders hashtags flow', () => {
- expect(element).shadowDom.to.equal(
+ assert.shadowDom.equal(
+ element,
/* HTML */ `
<gr-button
id="start-flow"
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item_test.ts b/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item_test.ts
index ed8c69f..9e54bf5 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item_test.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item_test.ts
@@ -368,37 +368,44 @@
// TODO: Check table elements. The shadowDom helper does not understand
// tables interacting with display: contents, even wrapping the element in a
// table, does not help.
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-change-star></gr-change-star>
- <a href="">42</a>
- <a href="" title="Test subject">
- <div class="container">
- <div class="content">Test subject</div>
- <div class="spacer">Test subject</div>
- <span></span>
- </div>
- </a>
- <span class="placeholder"> -- </span>
- <gr-account-label
- deselected=""
- clickable=""
- highlightattention=""
- ></gr-account-label>
- <div></div>
- <span></span>
- <a class="fullRepo" href=""> test-project </a>
- <a class="truncatedRepo" href="" title="test-project"> test-project </a>
- <a href=""> test-branch </a>
- <gr-date-formatter withtooltip=""></gr-date-formatter>
- <gr-date-formatter withtooltip=""></gr-date-formatter>
- <gr-date-formatter forcerelative="" relativeoptionnoago="" withtooltip="">
- </gr-date-formatter>
- <gr-tooltip-content has-tooltip="" title="Size unknown">
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-change-star></gr-change-star>
+ <a href="">42</a>
+ <a href="" title="Test subject">
+ <div class="container">
+ <div class="content">Test subject</div>
+ <div class="spacer">Test subject</div>
+ <span></span>
+ </div>
+ </a>
<span class="placeholder"> -- </span>
- </gr-tooltip-content>
- <gr-change-list-column-requirements-summary>
- </gr-change-list-column-requirements-summary>
- `);
+ <gr-account-label
+ deselected=""
+ clickable=""
+ highlightattention=""
+ ></gr-account-label>
+ <div></div>
+ <span></span>
+ <a class="fullRepo" href=""> test-project </a>
+ <a class="truncatedRepo" href="" title="test-project"> test-project </a>
+ <a href=""> test-branch </a>
+ <gr-date-formatter withtooltip=""></gr-date-formatter>
+ <gr-date-formatter withtooltip=""></gr-date-formatter>
+ <gr-date-formatter
+ forcerelative=""
+ relativeoptionnoago=""
+ withtooltip=""
+ >
+ </gr-date-formatter>
+ <gr-tooltip-content has-tooltip="" title="Size unknown">
+ <span class="placeholder"> -- </span>
+ </gr-tooltip-content>
+ <gr-change-list-column-requirements-summary>
+ </gr-change-list-column-requirements-summary>
+ `
+ );
});
test('renders requirement with new submit requirements', async () => {
@@ -430,8 +437,10 @@
).element as GrChangeListItem;
const requirement = queryAndAssert(element, '.requirement');
- expect(requirement).dom.to
- .equal(/* HTML */ ` <gr-change-list-column-requirement>
- </gr-change-list-column-requirement>`);
+ assert.dom.equal(
+ requirement,
+ /* HTML */ ` <gr-change-list-column-requirement>
+ </gr-change-list-column-requirement>`
+ );
});
});
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-reviewer-flow/gr-change-list-reviewer-flow_test.ts b/polygerrit-ui/app/elements/change-list/gr-change-list-reviewer-flow/gr-change-list-reviewer-flow_test.ts
index ef48323..417a19f 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list-reviewer-flow/gr-change-list-reviewer-flow_test.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list-reviewer-flow/gr-change-list-reviewer-flow_test.ts
@@ -111,23 +111,26 @@
});
test('skips dialog render when closed', async () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-button
- id="start-flow"
- flatten=""
- aria-disabled="false"
- role="button"
- tabindex="0"
- >add reviewer/cc</gr-button
- >
- <gr-overlay
- id="flow"
- aria-hidden="true"
- with-backdrop=""
- tabindex="-1"
- style="outline: none; display: none;"
- ></gr-overlay>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-button
+ id="start-flow"
+ flatten=""
+ aria-disabled="false"
+ role="button"
+ tabindex="0"
+ >add reviewer/cc</gr-button
+ >
+ <gr-overlay
+ id="flow"
+ aria-hidden="true"
+ with-backdrop=""
+ tabindex="-1"
+ style="outline: none; display: none;"
+ ></gr-overlay>
+ `
+ );
});
test('flow button enabled when changes selected', async () => {
@@ -188,80 +191,99 @@
});
test('renders dialog when opened', async () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-button
- id="start-flow"
- flatten=""
- aria-disabled="false"
- role="button"
- tabindex="0"
- >add reviewer/cc</gr-button
- >
- <gr-overlay
- id="flow"
- with-backdrop=""
- tabindex="-1"
- style="outline: none; display: none;"
- >
- <gr-dialog role="dialog">
- <div slot="header">Add reviewer / CC</div>
- <div slot="main">
- <div class="grid">
- <span>Reviewers</span>
- <gr-account-list id="reviewer-list"></gr-account-list>
- <gr-overlay
- aria-hidden="true"
- id="confirm-reviewer"
- style="outline: none; display: none;"
- >
- <div class="confirmation-text">
- Group
- <span class="groupName"></span>
- has
- <span class="groupSize"></span>
- members.
- <br />
- Are you sure you want to add them all?
- </div>
- <div class="confirmation-buttons">
- <gr-button aria-disabled="false" role="button" tabindex="0">
- Yes
- </gr-button>
- <gr-button aria-disabled="false" role="button" tabindex="0">
- No
- </gr-button>
- </div>
- </gr-overlay>
- <span>CC</span>
- <gr-account-list id="cc-list"></gr-account-list>
- <gr-overlay
- aria-hidden="true"
- id="confirm-cc"
- style="outline: none; display: none;"
- >
- <div class="confirmation-text">
- Group
- <span class="groupName"></span>
- has
- <span class="groupSize"></span>
- members.
- <br />
- Are you sure you want to add them all?
- </div>
- <div class="confirmation-buttons">
- <gr-button aria-disabled="false" role="button" tabindex="0">
- Yes
- </gr-button>
- <gr-button aria-disabled="false" role="button" tabindex="0">
- No
- </gr-button>
- </div>
- </gr-overlay>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-button
+ id="start-flow"
+ flatten=""
+ aria-disabled="false"
+ role="button"
+ tabindex="0"
+ >add reviewer/cc</gr-button
+ >
+ <gr-overlay
+ id="flow"
+ with-backdrop=""
+ tabindex="-1"
+ style="outline: none; display: none;"
+ >
+ <gr-dialog role="dialog">
+ <div slot="header">Add reviewer / CC</div>
+ <div slot="main">
+ <div class="grid">
+ <span>Reviewers</span>
+ <gr-account-list id="reviewer-list"></gr-account-list>
+ <gr-overlay
+ aria-hidden="true"
+ id="confirm-reviewer"
+ style="outline: none; display: none;"
+ >
+ <div class="confirmation-text">
+ Group
+ <span class="groupName"></span>
+ has
+ <span class="groupSize"></span>
+ members.
+ <br />
+ Are you sure you want to add them all?
+ </div>
+ <div class="confirmation-buttons">
+ <gr-button
+ aria-disabled="false"
+ role="button"
+ tabindex="0"
+ >
+ Yes
+ </gr-button>
+ <gr-button
+ aria-disabled="false"
+ role="button"
+ tabindex="0"
+ >
+ No
+ </gr-button>
+ </div>
+ </gr-overlay>
+ <span>CC</span>
+ <gr-account-list id="cc-list"></gr-account-list>
+ <gr-overlay
+ aria-hidden="true"
+ id="confirm-cc"
+ style="outline: none; display: none;"
+ >
+ <div class="confirmation-text">
+ Group
+ <span class="groupName"></span>
+ has
+ <span class="groupSize"></span>
+ members.
+ <br />
+ Are you sure you want to add them all?
+ </div>
+ <div class="confirmation-buttons">
+ <gr-button
+ aria-disabled="false"
+ role="button"
+ tabindex="0"
+ >
+ Yes
+ </gr-button>
+ <gr-button
+ aria-disabled="false"
+ role="button"
+ tabindex="0"
+ >
+ No
+ </gr-button>
+ </div>
+ </gr-overlay>
+ </div>
</div>
- </div>
- </gr-dialog>
- </gr-overlay>
- `);
+ </gr-dialog>
+ </gr-overlay>
+ `
+ );
});
test('only lists reviewers/CCs shared by all changes', async () => {
@@ -611,7 +633,8 @@
await element.updateComplete;
// prettier and shadowDom string don't agree on the long text in divs
- expect(element).shadowDom.to.equal(
+ assert.shadowDom.equal(
+ element,
/* prettier-ignore */
/* HTML */ `
<gr-button
@@ -723,7 +746,8 @@
await waitUntil(() => !!query(dialog, '.error'));
// prettier and shadowDom string don't agree on the long text in divs
- expect(element).shadowDom.to.equal(
+ assert.shadowDom.equal(
+ element,
/* prettier-ignore */
/* HTML */ `
<gr-button
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-section/gr-change-list-section_test.ts b/polygerrit-ui/app/elements/change-list/gr-change-list-section/gr-change-list-section_test.ts
index d09c78f..5e74442 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list-section/gr-change-list-section_test.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list-section/gr-change-list-section_test.ts
@@ -63,8 +63,9 @@
// TODO: Check table elements. The shadowDom helper does not understand
// tables interacting with display: contents, even wrapping the element in a
// table, does not help.
- expect(element).shadowDom.to
- .equal(/* prettier-ignore */ /* HTML */ `
+ assert.shadowDom.equal(
+ element,
+ /* prettier-ignore */ /* HTML */ `
#
SubjectStatusOwnerReviewersCommentsRepoBranchUpdatedSize Status
<gr-change-list-item
@@ -79,7 +80,8 @@
tabindex="0"
>
</gr-change-list-item>
- `);
+ `
+ );
});
test('selection checkbox is only shown if experiment is enabled', async () => {
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-topic-flow/gr-change-list-topic-flow_test.ts b/polygerrit-ui/app/elements/change-list/gr-change-list-topic-flow/gr-change-list-topic-flow_test.ts
index cc3bb51..4ba6a82 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list-topic-flow/gr-change-list-topic-flow_test.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list-topic-flow/gr-change-list-topic-flow_test.ts
@@ -94,25 +94,28 @@
});
test('skips dropdown render when closed', async () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-button
- id="start-flow"
- flatten=""
- down-arrow=""
- aria-disabled="false"
- role="button"
- tabindex="0"
- >Topic</gr-button
- >
- <iron-dropdown
- aria-disabled="false"
- aria-hidden="true"
- style="outline: none; display: none;"
- vertical-align="auto"
- horizontal-align="auto"
- >
- </iron-dropdown>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-button
+ id="start-flow"
+ flatten=""
+ down-arrow=""
+ aria-disabled="false"
+ role="button"
+ tabindex="0"
+ >Topic</gr-button
+ >
+ <iron-dropdown
+ aria-disabled="false"
+ aria-hidden="true"
+ style="outline: none; display: none;"
+ vertical-align="auto"
+ horizontal-align="auto"
+ >
+ </iron-dropdown>
+ `
+ );
});
test('dropdown hidden before flow button clicked', async () => {
@@ -218,7 +221,8 @@
});
test('renders existing-topics flow', () => {
- expect(element).shadowDom.to.equal(
+ assert.shadowDom.equal(
+ element,
/* HTML */ `
<gr-button
id="start-flow"
@@ -535,7 +539,8 @@
});
test('renders no-existing-topics flow', () => {
- expect(element).shadowDom.to.equal(
+ assert.shadowDom.equal(
+ element,
/* HTML */ `
<gr-button
id="start-flow"
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view_test.ts b/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view_test.ts
index 4585af7..ade6782 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view_test.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view_test.ts
@@ -55,18 +55,21 @@
element.loading = false;
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="loading" hidden="">Loading...</div>
- <div>
- <gr-change-list> </gr-change-list>
- <nav>
- Page
- <a href="" id="prevArrow">
- <gr-icon icon="chevron_left" aria-label="Older"></gr-icon>
- </a>
- </nav>
- </div>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="loading" hidden="">Loading...</div>
+ <div>
+ <gr-change-list> </gr-change-list>
+ <nav>
+ Page
+ <a href="" id="prevArrow">
+ <gr-icon icon="chevron_left" aria-label="Older"></gr-icon>
+ </a>
+ </nav>
+ </div>
+ `
+ );
});
suite('bulk actions', () => {
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list_test.ts b/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list_test.ts
index a29d36e..7487b8d 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list_test.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list_test.ts
@@ -63,10 +63,13 @@
{...createChange(), _number: 2 as NumericChangeId},
];
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-change-list-section> </gr-change-list-section>
- <table id="changeList"></table>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-change-list-section> </gr-change-list-section>
+ <table id="changeList"></table>
+ `
+ );
});
suite('test show change number not logged in', () => {
diff --git a/polygerrit-ui/app/elements/change-list/gr-create-change-help/gr-create-change-help_test.ts b/polygerrit-ui/app/elements/change-list/gr-create-change-help/gr-create-change-help_test.ts
index c214848..95eed87 100644
--- a/polygerrit-ui/app/elements/change-list/gr-create-change-help/gr-create-change-help_test.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-create-change-help/gr-create-change-help_test.ts
@@ -28,24 +28,27 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div id="graphic">
- <div id="circle">
- <gr-icon icon="empty_dashboard" id="icon"> </gr-icon>
+ assert.shadowDom.equal(
+ element,
+ /* prettier-ignore */ /* HTML */ `
+ <div id="graphic">
+ <div id="circle">
+ <gr-icon icon="empty_dashboard" id="icon"> </gr-icon>
+ </div>
+ <p>No outgoing changes yet</p>
</div>
- <p>No outgoing changes yet</p>
- </div>
- <div id="help">
- <h2 class="heading-3">Push your first change for code review</h2>
- <p>
- Pushing a change for review is easy, but a little different from other
+ <div id="help">
+ <h2 class="heading-3">Push your first change for code review</h2>
+ <p>
+ Pushing a change for review is easy, but a little different from other
git code review tools. Click on the \`Create Change' button and follow
the step by step instructions.
- </p>
- <gr-button aria-disabled="false" role="button" tabindex="0">
- Create Change
- </gr-button>
- </div>
- `);
+ </p>
+ <gr-button aria-disabled="false" role="button" tabindex="0">
+ Create Change
+ </gr-button>
+ </div>
+ `
+ );
});
});
diff --git a/polygerrit-ui/app/elements/change-list/gr-create-commands-dialog/gr-create-commands-dialog_test.ts b/polygerrit-ui/app/elements/change-list/gr-create-commands-dialog/gr-create-commands-dialog_test.ts
index 53f1f33..ba883d6 100644
--- a/polygerrit-ui/app/elements/change-list/gr-create-commands-dialog/gr-create-commands-dialog_test.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-create-commands-dialog/gr-create-commands-dialog_test.ts
@@ -24,8 +24,9 @@
test('render', () => {
// prettier and shadowDom assert don't agree about wrapping in the <p> tags
- expect(element).shadowDom.to
- .equal(/* prettier-ignore */ /* HTML */ `
+ assert.shadowDom.equal(
+ element,
+ /* prettier-ignore */ /* HTML */ `
<gr-overlay
aria-hidden="true"
id="commandsOverlay"
@@ -71,6 +72,7 @@
</div>
</gr-dialog>
</gr-overlay>
- `);
+ `
+ );
});
});
diff --git a/polygerrit-ui/app/elements/change-list/gr-create-destination-dialog/gr-create-destination-dialog_test.ts b/polygerrit-ui/app/elements/change-list/gr-create-destination-dialog/gr-create-destination-dialog_test.ts
index 4c06911..644b55d 100644
--- a/polygerrit-ui/app/elements/change-list/gr-create-destination-dialog/gr-create-destination-dialog_test.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-create-destination-dialog/gr-create-destination-dialog_test.ts
@@ -18,24 +18,27 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-overlay
- aria-hidden="true"
- id="createOverlay"
- style="outline: none; display: none;"
- tabindex="-1"
- with-backdrop=""
- >
- <gr-dialog confirm-label="View commands" disabled="" role="dialog">
- <div class="header" slot="header">Create change</div>
- <div class="main" slot="main">
- <gr-repo-branch-picker> </gr-repo-branch-picker>
- <p>
- If you haven't done so, you will need to clone the repository.
- </p>
- </div>
- </gr-dialog>
- </gr-overlay>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-overlay
+ aria-hidden="true"
+ id="createOverlay"
+ style="outline: none; display: none;"
+ tabindex="-1"
+ with-backdrop=""
+ >
+ <gr-dialog confirm-label="View commands" disabled="" role="dialog">
+ <div class="header" slot="header">Create change</div>
+ <div class="main" slot="main">
+ <gr-repo-branch-picker> </gr-repo-branch-picker>
+ <p>
+ If you haven't done so, you will need to clone the repository.
+ </p>
+ </div>
+ </gr-dialog>
+ </gr-overlay>
+ `
+ );
});
});
diff --git a/polygerrit-ui/app/elements/change-list/gr-dashboard-view/gr-dashboard-view_test.ts b/polygerrit-ui/app/elements/change-list/gr-dashboard-view/gr-dashboard-view_test.ts
index ce2df31..c380d83 100644
--- a/polygerrit-ui/app/elements/change-list/gr-dashboard-view/gr-dashboard-view_test.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-dashboard-view/gr-dashboard-view_test.ts
@@ -83,41 +83,44 @@
element.requestUpdate();
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="loading" hidden="">Loading...</div>
- <div>
- <h1 class="assistive-tech-only">Dashboard</h1>
- <gr-change-list showstar="">
- <div id="emptyOutgoing" slot="outgoing-slot">No changes</div>
- <div id="emptyYourTurn" slot="your-turn-slot">
- <span> No changes need your attention  🎉 </span>
- </div>
- </gr-change-list>
- </div>
- <gr-overlay
- aria-hidden="true"
- id="confirmDeleteOverlay"
- style="outline: none; display: none;"
- tabindex="-1"
- with-backdrop=""
- >
- <gr-dialog
- confirm-label="Delete"
- id="confirmDeleteDialog"
- role="dialog"
+ assert.shadowDom.equal(
+ element,
+ /* prettier-ignore */ /* HTML */ `
+ <div class="loading" hidden="">Loading...</div>
+ <div>
+ <h1 class="assistive-tech-only">Dashboard</h1>
+ <gr-change-list showstar="">
+ <div id="emptyOutgoing" slot="outgoing-slot">No changes</div>
+ <div id="emptyYourTurn" slot="your-turn-slot">
+ <span> No changes need your attention  🎉 </span>
+ </div>
+ </gr-change-list>
+ </div>
+ <gr-overlay
+ aria-hidden="true"
+ id="confirmDeleteOverlay"
+ style="outline: none; display: none;"
+ tabindex="-1"
+ with-backdrop=""
>
- <div class="header" slot="header">Delete comments</div>
- <div class="main" slot="main">
- Are you sure you want to delete all your draft comments in closed
+ <gr-dialog
+ confirm-label="Delete"
+ id="confirmDeleteDialog"
+ role="dialog"
+ >
+ <div class="header" slot="header">Delete comments</div>
+ <div class="main" slot="main">
+ Are you sure you want to delete all your draft comments in closed
changes? This action cannot be undone.
- </div>
- </gr-dialog>
- </gr-overlay>
- <gr-create-destination-dialog id="destinationDialog">
- </gr-create-destination-dialog>
- <gr-create-commands-dialog id="commandsDialog">
- </gr-create-commands-dialog>
- `);
+ </div>
+ </gr-dialog>
+ </gr-overlay>
+ <gr-create-destination-dialog id="destinationDialog">
+ </gr-create-destination-dialog>
+ <gr-create-commands-dialog id="commandsDialog">
+ </gr-create-commands-dialog>
+ `
+ );
});
suite('bulk actions', () => {
diff --git a/polygerrit-ui/app/elements/change-list/gr-repo-header/gr-repo-header_test.ts b/polygerrit-ui/app/elements/change-list/gr-repo-header/gr-repo-header_test.ts
index 7cbd785..ed67329 100644
--- a/polygerrit-ui/app/elements/change-list/gr-repo-header/gr-repo-header_test.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-repo-header/gr-repo-header_test.ts
@@ -21,19 +21,22 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="info">
- <h1 class="heading-1">test</h1>
- <hr />
- <div>
- <span> Detail: </span>
- <a href=""> Repo settings </a>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="info">
+ <h1 class="heading-1">test</h1>
+ <hr />
+ <div>
+ <span> Detail: </span>
+ <a href=""> Repo settings </a>
+ </div>
+ <div>
+ <span class="browse"> Browse: </span>
+ </div>
</div>
- <div>
- <span class="browse"> Browse: </span>
- </div>
- </div>
- `);
+ `
+ );
});
test('repoUrl reset once repo changed', async () => {
diff --git a/polygerrit-ui/app/elements/change-list/gr-user-header/gr-user-header_test.ts b/polygerrit-ui/app/elements/change-list/gr-user-header/gr-user-header_test.ts
index 1c1a074..99bd765 100644
--- a/polygerrit-ui/app/elements/change-list/gr-user-header/gr-user-header_test.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-user-header/gr-user-header_test.ts
@@ -18,33 +18,36 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-avatar aria-label="Account avatar" hidden=""> </gr-avatar>
- <div class="info">
- <h1 class="heading-1"></h1>
- <hr />
- <div class="hide status">
- <span> Status: </span>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-avatar aria-label="Account avatar" hidden=""> </gr-avatar>
+ <div class="info">
+ <h1 class="heading-1"></h1>
+ <hr />
+ <div class="hide status">
+ <span> Status: </span>
+ </div>
+ <div>
+ <span> Email: </span>
+ <a href="mailto:"> </a>
+ </div>
+ <div>
+ <span> Joined: </span>
+ <gr-date-formatter datestr=""> </gr-date-formatter>
+ </div>
+ <gr-endpoint-decorator name="user-header">
+ <gr-endpoint-param name="accountDetails"> </gr-endpoint-param>
+ <gr-endpoint-param name="loggedIn"> </gr-endpoint-param>
+ </gr-endpoint-decorator>
</div>
- <div>
- <span> Email: </span>
- <a href="mailto:"> </a>
+ <div class="info">
+ <div class="dashboardLink hide">
+ <a href=""> View dashboard </a>
+ </div>
</div>
- <div>
- <span> Joined: </span>
- <gr-date-formatter datestr=""> </gr-date-formatter>
- </div>
- <gr-endpoint-decorator name="user-header">
- <gr-endpoint-param name="accountDetails"> </gr-endpoint-param>
- <gr-endpoint-param name="loggedIn"> </gr-endpoint-param>
- </gr-endpoint-decorator>
- </div>
- <div class="info">
- <div class="dashboardLink hide">
- <a href=""> View dashboard </a>
- </div>
- </div>
- `);
+ `
+ );
});
test('loads and clears account info', async () => {
diff --git a/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions_test.ts b/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions_test.ts
index 0a9d461..9cc482f 100644
--- a/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions_test.ts
@@ -147,132 +147,140 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div id="mainContent">
- <span hidden="" id="actionLoadingMessage"> </span>
- <section id="primaryActions">
- <gr-tooltip-content
- has-tooltip=""
- position-below=""
- title="Submit patch set 2 into master"
- >
- <gr-button
- aria-disabled="false"
- class="submit"
- data-action-key="submit"
- data-label="Submit"
- link=""
- role="button"
- tabindex="0"
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div id="mainContent">
+ <span hidden="" id="actionLoadingMessage"> </span>
+ <section id="primaryActions">
+ <gr-tooltip-content
+ has-tooltip=""
+ position-below=""
+ title="Submit patch set 2 into master"
>
- <gr-icon icon="done_all"></gr-icon>
- Submit
- </gr-button>
- </gr-tooltip-content>
- </section>
- <section id="secondaryActions">
- <gr-tooltip-content
- has-tooltip=""
- position-below=""
- title="Rebase onto tip of branch or parent change"
- >
- <gr-button
- aria-disabled="true"
- class="rebase"
- data-action-key="rebase"
- data-label="Rebase"
- disabled=""
- link=""
- role="button"
- tabindex="-1"
+ <gr-button
+ aria-disabled="false"
+ class="submit"
+ data-action-key="submit"
+ data-label="Submit"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ <gr-icon icon="done_all"></gr-icon>
+ Submit
+ </gr-button>
+ </gr-tooltip-content>
+ </section>
+ <section id="secondaryActions">
+ <gr-tooltip-content
+ has-tooltip=""
+ position-below=""
+ title="Rebase onto tip of branch or parent change"
>
- <gr-icon icon="rebase"> </gr-icon>
- Rebase
- </gr-button>
- </gr-tooltip-content>
- </section>
- <gr-button aria-disabled="false" hidden="" role="button" tabindex="0">
- Loading actions...
- </gr-button>
- <gr-dropdown id="moreActions" link="">
- <gr-icon icon="more_vert" aria-labelledby="moreMessage"></gr-icon>
- <span id="moreMessage"> More </span>
- </gr-dropdown>
- </div>
- <gr-overlay
- aria-hidden="true"
- id="overlay"
- style="outline: none; display: none;"
- tabindex="-1"
- with-backdrop=""
- >
- <gr-confirm-rebase-dialog class="confirmDialog" id="confirmRebase">
- </gr-confirm-rebase-dialog>
- <gr-confirm-cherrypick-dialog
- class="confirmDialog"
- id="confirmCherrypick"
+ <gr-button
+ aria-disabled="true"
+ class="rebase"
+ data-action-key="rebase"
+ data-label="Rebase"
+ disabled=""
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ <gr-icon icon="rebase"> </gr-icon>
+ Rebase
+ </gr-button>
+ </gr-tooltip-content>
+ </section>
+ <gr-button
+ aria-disabled="false"
+ hidden=""
+ role="button"
+ tabindex="0"
+ >
+ Loading actions...
+ </gr-button>
+ <gr-dropdown id="moreActions" link="">
+ <gr-icon icon="more_vert" aria-labelledby="moreMessage"></gr-icon>
+ <span id="moreMessage"> More </span>
+ </gr-dropdown>
+ </div>
+ <gr-overlay
+ aria-hidden="true"
+ id="overlay"
+ style="outline: none; display: none;"
+ tabindex="-1"
+ with-backdrop=""
>
- </gr-confirm-cherrypick-dialog>
- <gr-confirm-cherrypick-conflict-dialog
- class="confirmDialog"
- id="confirmCherrypickConflict"
- >
- </gr-confirm-cherrypick-conflict-dialog>
- <gr-confirm-move-dialog class="confirmDialog" id="confirmMove">
- </gr-confirm-move-dialog>
- <gr-confirm-revert-dialog
- class="confirmDialog"
- id="confirmRevertDialog"
- >
- </gr-confirm-revert-dialog>
- <gr-confirm-abandon-dialog
- class="confirmDialog"
- id="confirmAbandonDialog"
- >
- </gr-confirm-abandon-dialog>
- <gr-confirm-submit-dialog
- class="confirmDialog"
- id="confirmSubmitDialog"
- >
- </gr-confirm-submit-dialog>
- <gr-dialog
- class="confirmDialog"
- confirm-label="Create"
- id="createFollowUpDialog"
- role="dialog"
- >
- <div class="header" slot="header">Create Follow-Up Change</div>
- <div class="main" slot="main">
- <gr-create-change-dialog id="createFollowUpChange">
- </gr-create-change-dialog>
- </div>
- </gr-dialog>
- <gr-dialog
- class="confirmDialog"
- confirm-label="Delete"
- confirm-on-enter=""
- id="confirmDeleteDialog"
- role="dialog"
- >
- <div class="header" slot="header">Delete Change</div>
- <div class="main" slot="main">
- Do you really want to delete the change?
- </div>
- </gr-dialog>
- <gr-dialog
- class="confirmDialog"
- confirm-label="Delete"
- confirm-on-enter=""
- id="confirmDeleteEditDialog"
- role="dialog"
- >
- <div class="header" slot="header">Delete Change Edit</div>
- <div class="main" slot="main">
- Do you really want to delete the edit?
- </div>
- </gr-dialog>
- </gr-overlay>
- `);
+ <gr-confirm-rebase-dialog class="confirmDialog" id="confirmRebase">
+ </gr-confirm-rebase-dialog>
+ <gr-confirm-cherrypick-dialog
+ class="confirmDialog"
+ id="confirmCherrypick"
+ >
+ </gr-confirm-cherrypick-dialog>
+ <gr-confirm-cherrypick-conflict-dialog
+ class="confirmDialog"
+ id="confirmCherrypickConflict"
+ >
+ </gr-confirm-cherrypick-conflict-dialog>
+ <gr-confirm-move-dialog class="confirmDialog" id="confirmMove">
+ </gr-confirm-move-dialog>
+ <gr-confirm-revert-dialog
+ class="confirmDialog"
+ id="confirmRevertDialog"
+ >
+ </gr-confirm-revert-dialog>
+ <gr-confirm-abandon-dialog
+ class="confirmDialog"
+ id="confirmAbandonDialog"
+ >
+ </gr-confirm-abandon-dialog>
+ <gr-confirm-submit-dialog
+ class="confirmDialog"
+ id="confirmSubmitDialog"
+ >
+ </gr-confirm-submit-dialog>
+ <gr-dialog
+ class="confirmDialog"
+ confirm-label="Create"
+ id="createFollowUpDialog"
+ role="dialog"
+ >
+ <div class="header" slot="header">Create Follow-Up Change</div>
+ <div class="main" slot="main">
+ <gr-create-change-dialog id="createFollowUpChange">
+ </gr-create-change-dialog>
+ </div>
+ </gr-dialog>
+ <gr-dialog
+ class="confirmDialog"
+ confirm-label="Delete"
+ confirm-on-enter=""
+ id="confirmDeleteDialog"
+ role="dialog"
+ >
+ <div class="header" slot="header">Delete Change</div>
+ <div class="main" slot="main">
+ Do you really want to delete the change?
+ </div>
+ </gr-dialog>
+ <gr-dialog
+ class="confirmDialog"
+ confirm-label="Delete"
+ confirm-on-enter=""
+ id="confirmDeleteEditDialog"
+ role="dialog"
+ >
+ <div class="header" slot="header">Delete Change Edit</div>
+ <div class="main" slot="main">
+ Do you really want to delete the edit?
+ </div>
+ </gr-dialog>
+ </gr-overlay>
+ `
+ );
});
test('show-revision-actions event should fire', async () => {
diff --git a/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata_test.ts b/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata_test.ts
index 806a3b5..a193ac0 100644
--- a/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata_test.ts
@@ -81,7 +81,9 @@
test('renders', async () => {
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `<div>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `<div>
<div class="metadata-header">
<h3 class="heading-3 metadata-title">Change Info</h3>
<gr-button
@@ -198,7 +200,8 @@
<gr-endpoint-param name="change"> </gr-endpoint-param>
<gr-endpoint-param name="revision"> </gr-endpoint-param>
</gr-endpoint-decorator>
- </div>`);
+ </div>`
+ );
});
test('computeMergedCommitInfo', () => {
diff --git a/polygerrit-ui/app/elements/change/gr-change-summary/gr-change-summary_test.ts b/polygerrit-ui/app/elements/change/gr-change-summary/gr-change-summary_test.ts
index dc8135e..efce4db 100644
--- a/polygerrit-ui/app/elements/change/gr-change-summary/gr-change-summary_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-change-summary/gr-change-summary_test.ts
@@ -40,34 +40,37 @@
createCommentThread([{...createComment(), unresolved: true}]),
];
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `<div>
- <table>
- <tbody>
- <tr>
- <td class="key">Comments</td>
- <td class="value">
- <gr-summary-chip
- category="drafts"
- icon="edit"
- styletype="warning"
- >
- 3 drafts
- </gr-summary-chip>
- <gr-summary-chip category="unresolved" styletype="warning">
- 1 unresolved
- </gr-summary-chip>
- <gr-summary-chip
- category="show all"
- icon="mark_chat_read"
- styletype="check"
- >
- 1 resolved
- </gr-summary-chip>
- </td>
- </tr>
- </tbody>
- </table>
- </div> `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `<div>
+ <table>
+ <tbody>
+ <tr>
+ <td class="key">Comments</td>
+ <td class="value">
+ <gr-summary-chip
+ category="drafts"
+ icon="edit"
+ styletype="warning"
+ >
+ 3 drafts
+ </gr-summary-chip>
+ <gr-summary-chip category="unresolved" styletype="warning">
+ 1 unresolved
+ </gr-summary-chip>
+ <gr-summary-chip
+ category="show all"
+ icon="mark_chat_read"
+ styletype="check"
+ >
+ 1 resolved
+ </gr-summary-chip>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div> `
+ );
});
test('renders checks summary message', async () => {
@@ -76,19 +79,22 @@
element.showChecksSummary = true;
await element.updateComplete;
const checksSummary = queryAndAssert(element, '.checksSummary');
- expect(checksSummary).dom.to.equal(/* HTML */ `
- <div class="checksSummary">
- <gr-checks-chip> </gr-checks-chip>
- <div class="info">
- <div class="left">
- <gr-icon icon="info" filled></gr-icon>
- </div>
- <div class="right">
- <div class="message" title="a message">a message</div>
+ assert.dom.equal(
+ checksSummary,
+ /* HTML */ `
+ <div class="checksSummary">
+ <gr-checks-chip> </gr-checks-chip>
+ <div class="info">
+ <div class="left">
+ <gr-icon icon="info" filled></gr-icon>
+ </div>
+ <div class="right">
+ <div class="message" title="a message">a message</div>
+ </div>
</div>
</div>
- </div>
- `);
+ `
+ );
});
test('renders mentions summary', async () => {
@@ -130,17 +136,20 @@
});
await element.updateComplete;
const mentionSummary = queryAndAssert(element, '.mentionSummary');
- // Only count occurences in unresolved threads
+ // Only count occurrences in unresolved threads
// Resolved threads are ignored hence mention chip count is 2
- expect(mentionSummary).dom.to.equal(/* HTML */ `
- <gr-summary-chip
- category="mentions"
- class="mentionSummary"
- icon="alternate_email"
- styletype="warning"
- >
- 2 mentions
- </gr-summary-chip>
- `);
+ assert.dom.equal(
+ mentionSummary,
+ /* HTML */ `
+ <gr-summary-chip
+ category="mentions"
+ class="mentionSummary"
+ icon="alternate_email"
+ styletype="warning"
+ >
+ 2 mentions
+ </gr-summary-chip>
+ `
+ );
});
});
diff --git a/polygerrit-ui/app/elements/change/gr-change-summary/gr-checks-chip_test.ts b/polygerrit-ui/app/elements/change/gr-change-summary/gr-checks-chip_test.ts
index 1fbbca6..aec01eb 100644
--- a/polygerrit-ui/app/elements/change/gr-change-summary/gr-checks-chip_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-change-summary/gr-checks-chip_test.ts
@@ -23,14 +23,17 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `<div
- aria-label="0 success result"
- class="check_circle checksChip font-small"
- role="link"
- tabindex="0"
- >
- <gr-icon icon="check_circle"></gr-icon>
- <div class="text">0</div>
- </div>`);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `<div
+ aria-label="0 success result"
+ class="check_circle checksChip font-small"
+ role="link"
+ tabindex="0"
+ >
+ <gr-icon icon="check_circle"></gr-icon>
+ <div class="text">0</div>
+ </div>`
+ );
});
});
diff --git a/polygerrit-ui/app/elements/change/gr-change-summary/gr-summary-chip_test.ts b/polygerrit-ui/app/elements/change/gr-change-summary/gr-summary-chip_test.ts
index cb29cf5..9eccfc49 100644
--- a/polygerrit-ui/app/elements/change/gr-change-summary/gr-summary-chip_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-change-summary/gr-summary-chip_test.ts
@@ -22,10 +22,11 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `<button
- class="font-small summaryChip warning"
- >
- <slot> </slot>
- </button>`);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `<button class="font-small summaryChip warning">
+ <slot> </slot>
+ </button>`
+ );
});
});
diff --git a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_test.ts b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_test.ts
index 0d58c99..847a4e2 100644
--- a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_test.ts
@@ -380,177 +380,180 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="container loading">Loading...</div>
- <div aria-hidden="false" class="container" hidden="" id="mainContent">
- <section class="changeInfoSection">
- <div class="header">
- <h1 class="assistive-tech-only">Change :</h1>
- <div class="headerTitle">
- <div class="changeStatuses"></div>
- <gr-change-star id="changeStar"> </gr-change-star>
- <a aria-label="Change undefined" class="changeNumber"> </a>
- <span class="changeNumberColon"> : </span>
- <span class="headerSubject"> </span>
- <gr-copy-clipboard
- class="changeCopyClipboard"
- hideinput=""
- text="undefined: undefined | http://localhost:9876undefined"
- >
- </gr-copy-clipboard>
- </div>
- <div class="commitActions">
- <gr-change-actions hidden="" id="actions"> </gr-change-actions>
- </div>
- </div>
- <h2 class="assistive-tech-only">Change metadata</h2>
- <div class="changeInfo">
- <div class="changeInfo-column changeMetadata hideOnMobileOverlay">
- <gr-change-metadata id="metadata"> </gr-change-metadata>
- </div>
- <div class="changeInfo-column mainChangeInfo" id="mainChangeInfo">
- <div class="hideOnMobileOverlay" id="commitAndRelated">
- <div class="commitContainer">
- <h3 class="assistive-tech-only">Commit Message</h3>
- <div>
- <gr-button
- aria-disabled="false"
- class="reply"
- id="replyBtn"
- primary=""
- role="button"
- tabindex="0"
- title="Open reply dialog to publish comments and add reviewers (shortcut: a)"
- >
- Reply
- </gr-button>
- </div>
- <div class="commitMessage" id="commitMessage">
- <gr-editable-content
- id="commitMessageEditor"
- remove-zero-width-space=""
- >
- <gr-linked-text pre="" remove-zero-width-space="">
- <span id="output" slot="insert"> </span>
- </gr-linked-text>
- </gr-editable-content>
- </div>
- <h3 class="assistive-tech-only">
- Comments and Checks Summary
- </h3>
- <gr-change-summary> </gr-change-summary>
- <gr-endpoint-decorator name="commit-container">
- <gr-endpoint-param name="change"> </gr-endpoint-param>
- <gr-endpoint-param name="revision"> </gr-endpoint-param>
- </gr-endpoint-decorator>
- </div>
- <div class="relatedChanges">
- <gr-related-changes-list id="relatedChanges">
- </gr-related-changes-list>
- </div>
- <div class="emptySpace"></div>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="container loading">Loading...</div>
+ <div aria-hidden="false" class="container" hidden="" id="mainContent">
+ <section class="changeInfoSection">
+ <div class="header">
+ <h1 class="assistive-tech-only">Change :</h1>
+ <div class="headerTitle">
+ <div class="changeStatuses"></div>
+ <gr-change-star id="changeStar"> </gr-change-star>
+ <a aria-label="Change undefined" class="changeNumber"> </a>
+ <span class="changeNumberColon"> : </span>
+ <span class="headerSubject"> </span>
+ <gr-copy-clipboard
+ class="changeCopyClipboard"
+ hideinput=""
+ text="undefined: undefined | http://localhost:9876undefined"
+ >
+ </gr-copy-clipboard>
+ </div>
+ <div class="commitActions">
+ <gr-change-actions hidden="" id="actions"> </gr-change-actions>
</div>
</div>
- </div>
- </section>
- <h2 class="assistive-tech-only">Files and Comments tabs</h2>
- <paper-tabs dir="null" id="tabs" role="tablist" tabindex="0">
- <paper-tab
- aria-disabled="false"
- aria-selected="true"
- class="iron-selected"
- data-name="files"
- role="tab"
- tabindex="0"
- >
- <span> Files </span>
- </paper-tab>
- <paper-tab
- aria-disabled="false"
- aria-selected="false"
- class="commentThreads"
- data-name="comments"
- role="tab"
- tabindex="-1"
- >
- <gr-tooltip-content has-tooltip="" title="">
- <span> Comments </span>
- </gr-tooltip-content>
- </paper-tab>
- <paper-tab
- aria-disabled="false"
- aria-selected="false"
- data-name="change-view-tab-header-url"
- role="tab"
- tabindex="-1"
- >
- <gr-endpoint-decorator name="change-view-tab-header-url">
- <gr-endpoint-param name="change"> </gr-endpoint-param>
- <gr-endpoint-param name="revision"> </gr-endpoint-param>
- </gr-endpoint-decorator>
- </paper-tab>
- </paper-tabs>
- <section class="tabContent">
- <div>
- <gr-file-list-header id="fileListHeader"> </gr-file-list-header>
- <gr-file-list class="hideOnMobileOverlay" id="fileList">
- </gr-file-list>
- </div>
- </section>
- <gr-endpoint-decorator name="change-view-integration">
- <gr-endpoint-param name="change"> </gr-endpoint-param>
- <gr-endpoint-param name="revision"> </gr-endpoint-param>
- </gr-endpoint-decorator>
- <paper-tabs dir="null" role="tablist" tabindex="0">
- <paper-tab
- aria-disabled="false"
- aria-selected="false"
- class="changeLog"
- data-name="_changeLog"
- role="tab"
- tabindex="-1"
- >
- Change Log
- </paper-tab>
- </paper-tabs>
- <section class="changeLog">
- <h2 class="assistive-tech-only">Change Log</h2>
- <gr-messages-list class="hideOnMobileOverlay"> </gr-messages-list>
- </section>
- </div>
- <gr-apply-fix-dialog id="applyFixDialog"> </gr-apply-fix-dialog>
- <gr-overlay
- aria-hidden="true"
- id="downloadOverlay"
- style="outline: none; display: none;"
- tabindex="-1"
- with-backdrop=""
- >
- <gr-download-dialog id="downloadDialog" role="dialog">
- </gr-download-dialog>
- </gr-overlay>
- <gr-overlay
- aria-hidden="true"
- id="includedInOverlay"
- style="outline: none; display: none;"
- tabindex="-1"
- with-backdrop=""
- >
- <gr-included-in-dialog id="includedInDialog"> </gr-included-in-dialog>
- </gr-overlay>
- <gr-overlay
- aria-hidden="true"
- class="scrollable"
- id="replyOverlay"
- no-cancel-on-esc-key=""
- no-cancel-on-outside-click=""
- scroll-action="lock"
- style="outline: none; display: none;"
- tabindex="-1"
- with-backdrop=""
- >
- </gr-overlay>
- `);
+ <h2 class="assistive-tech-only">Change metadata</h2>
+ <div class="changeInfo">
+ <div class="changeInfo-column changeMetadata hideOnMobileOverlay">
+ <gr-change-metadata id="metadata"> </gr-change-metadata>
+ </div>
+ <div class="changeInfo-column mainChangeInfo" id="mainChangeInfo">
+ <div class="hideOnMobileOverlay" id="commitAndRelated">
+ <div class="commitContainer">
+ <h3 class="assistive-tech-only">Commit Message</h3>
+ <div>
+ <gr-button
+ aria-disabled="false"
+ class="reply"
+ id="replyBtn"
+ primary=""
+ role="button"
+ tabindex="0"
+ title="Open reply dialog to publish comments and add reviewers (shortcut: a)"
+ >
+ Reply
+ </gr-button>
+ </div>
+ <div class="commitMessage" id="commitMessage">
+ <gr-editable-content
+ id="commitMessageEditor"
+ remove-zero-width-space=""
+ >
+ <gr-linked-text pre="" remove-zero-width-space="">
+ <span id="output" slot="insert"> </span>
+ </gr-linked-text>
+ </gr-editable-content>
+ </div>
+ <h3 class="assistive-tech-only">
+ Comments and Checks Summary
+ </h3>
+ <gr-change-summary> </gr-change-summary>
+ <gr-endpoint-decorator name="commit-container">
+ <gr-endpoint-param name="change"> </gr-endpoint-param>
+ <gr-endpoint-param name="revision"> </gr-endpoint-param>
+ </gr-endpoint-decorator>
+ </div>
+ <div class="relatedChanges">
+ <gr-related-changes-list id="relatedChanges">
+ </gr-related-changes-list>
+ </div>
+ <div class="emptySpace"></div>
+ </div>
+ </div>
+ </div>
+ </section>
+ <h2 class="assistive-tech-only">Files and Comments tabs</h2>
+ <paper-tabs dir="null" id="tabs" role="tablist" tabindex="0">
+ <paper-tab
+ aria-disabled="false"
+ aria-selected="true"
+ class="iron-selected"
+ data-name="files"
+ role="tab"
+ tabindex="0"
+ >
+ <span> Files </span>
+ </paper-tab>
+ <paper-tab
+ aria-disabled="false"
+ aria-selected="false"
+ class="commentThreads"
+ data-name="comments"
+ role="tab"
+ tabindex="-1"
+ >
+ <gr-tooltip-content has-tooltip="" title="">
+ <span> Comments </span>
+ </gr-tooltip-content>
+ </paper-tab>
+ <paper-tab
+ aria-disabled="false"
+ aria-selected="false"
+ data-name="change-view-tab-header-url"
+ role="tab"
+ tabindex="-1"
+ >
+ <gr-endpoint-decorator name="change-view-tab-header-url">
+ <gr-endpoint-param name="change"> </gr-endpoint-param>
+ <gr-endpoint-param name="revision"> </gr-endpoint-param>
+ </gr-endpoint-decorator>
+ </paper-tab>
+ </paper-tabs>
+ <section class="tabContent">
+ <div>
+ <gr-file-list-header id="fileListHeader"> </gr-file-list-header>
+ <gr-file-list class="hideOnMobileOverlay" id="fileList">
+ </gr-file-list>
+ </div>
+ </section>
+ <gr-endpoint-decorator name="change-view-integration">
+ <gr-endpoint-param name="change"> </gr-endpoint-param>
+ <gr-endpoint-param name="revision"> </gr-endpoint-param>
+ </gr-endpoint-decorator>
+ <paper-tabs dir="null" role="tablist" tabindex="0">
+ <paper-tab
+ aria-disabled="false"
+ aria-selected="false"
+ class="changeLog"
+ data-name="_changeLog"
+ role="tab"
+ tabindex="-1"
+ >
+ Change Log
+ </paper-tab>
+ </paper-tabs>
+ <section class="changeLog">
+ <h2 class="assistive-tech-only">Change Log</h2>
+ <gr-messages-list class="hideOnMobileOverlay"> </gr-messages-list>
+ </section>
+ </div>
+ <gr-apply-fix-dialog id="applyFixDialog"> </gr-apply-fix-dialog>
+ <gr-overlay
+ aria-hidden="true"
+ id="downloadOverlay"
+ style="outline: none; display: none;"
+ tabindex="-1"
+ with-backdrop=""
+ >
+ <gr-download-dialog id="downloadDialog" role="dialog">
+ </gr-download-dialog>
+ </gr-overlay>
+ <gr-overlay
+ aria-hidden="true"
+ id="includedInOverlay"
+ style="outline: none; display: none;"
+ tabindex="-1"
+ with-backdrop=""
+ >
+ <gr-included-in-dialog id="includedInDialog"> </gr-included-in-dialog>
+ </gr-overlay>
+ <gr-overlay
+ aria-hidden="true"
+ class="scrollable"
+ id="replyOverlay"
+ no-cancel-on-esc-key=""
+ no-cancel-on-outside-click=""
+ scroll-action="lock"
+ style="outline: none; display: none;"
+ tabindex="-1"
+ with-backdrop=""
+ >
+ </gr-overlay>
+ `
+ );
});
test('handleMessageAnchorTap', async () => {
@@ -753,12 +756,15 @@
await element.updateComplete;
const tabContent = queryAndAssert(element, '.tabContent');
const endpoint = queryAndAssert(tabContent, 'gr-endpoint-decorator');
- expect(endpoint).dom.to.equal(/* HTML */ `
- <gr-endpoint-decorator>
- <gr-endpoint-param name="change"></gr-endpoint-param>
- <gr-endpoint-param name="revision"></gr-endpoint-param>
- </gr-endpoint-decorator>
- `);
+ assert.dom.equal(
+ endpoint,
+ /* HTML */ `
+ <gr-endpoint-decorator>
+ <gr-endpoint-param name="change"></gr-endpoint-param>
+ <gr-endpoint-param name="revision"></gr-endpoint-param>
+ </gr-endpoint-decorator>
+ `
+ );
});
});
diff --git a/polygerrit-ui/app/elements/change/gr-commit-info/gr-commit-info_test.ts b/polygerrit-ui/app/elements/change/gr-commit-info/gr-commit-info_test.ts
index 363cdd2..1aaff1d 100644
--- a/polygerrit-ui/app/elements/change/gr-commit-info/gr-commit-info_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-commit-info/gr-commit-info_test.ts
@@ -30,12 +30,15 @@
element.serverConfig = createServerInfo();
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="container">
- <a href="" rel="noopener" target="_blank"> </a>
- <gr-copy-clipboard hastooltip="" hideinput=""> </gr-copy-clipboard>
- </div>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="container">
+ <a href="" rel="noopener" target="_blank"> </a>
+ <gr-copy-clipboard hastooltip="" hideinput=""> </gr-copy-clipboard>
+ </div>
+ `
+ );
});
test('weblinks use GerritNav interface', async () => {
diff --git a/polygerrit-ui/app/elements/change/gr-confirm-abandon-dialog/gr-confirm-abandon-dialog_test.ts b/polygerrit-ui/app/elements/change/gr-confirm-abandon-dialog/gr-confirm-abandon-dialog_test.ts
index aaae6b5..43e8899 100644
--- a/polygerrit-ui/app/elements/change/gr-confirm-abandon-dialog/gr-confirm-abandon-dialog_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-confirm-abandon-dialog/gr-confirm-abandon-dialog_test.ts
@@ -20,22 +20,25 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-dialog confirm-label="Abandon" role="dialog">
- <div class="header" slot="header">Abandon Change</div>
- <div class="main" slot="main">
- <label for="messageInput"> Abandon Message </label>
- <iron-autogrow-textarea
- aria-disabled="false"
- autocomplete="on"
- class="message"
- id="messageInput"
- placeholder="<Insert reasoning here>"
- >
- </iron-autogrow-textarea>
- </div>
- </gr-dialog>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-dialog confirm-label="Abandon" role="dialog">
+ <div class="header" slot="header">Abandon Change</div>
+ <div class="main" slot="main">
+ <label for="messageInput"> Abandon Message </label>
+ <iron-autogrow-textarea
+ aria-disabled="false"
+ autocomplete="on"
+ class="message"
+ id="messageInput"
+ placeholder="<Insert reasoning here>"
+ >
+ </iron-autogrow-textarea>
+ </div>
+ </gr-dialog>
+ `
+ );
});
test('handleConfirmTap', () => {
diff --git a/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-conflict-dialog/gr-confirm-cherrypick-conflict-dialog_test.ts b/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-conflict-dialog/gr-confirm-cherrypick-conflict-dialog_test.ts
index 2613d87..4754c9b 100644
--- a/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-conflict-dialog/gr-confirm-cherrypick-conflict-dialog_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-conflict-dialog/gr-confirm-cherrypick-conflict-dialog_test.ts
@@ -21,18 +21,21 @@
});
test('render', async () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-dialog confirm-label="Continue" role="dialog">
- <div class="header" slot="header">Cherry Pick Conflict!</div>
- <div class="main" slot="main">
- <span>Cherry Pick failed! (merge conflicts)</span>
- <span
- >Please select "Continue" to continue with conflicts or select
+ assert.shadowDom.equal(
+ element,
+ /* prettier-ignore */ /* HTML */ `
+ <gr-dialog confirm-label="Continue" role="dialog">
+ <div class="header" slot="header">Cherry Pick Conflict!</div>
+ <div class="main" slot="main">
+ <span>Cherry Pick failed! (merge conflicts)</span>
+ <span
+ >Please select "Continue" to continue with conflicts or select
"cancel" to close the dialog.</span
- >
- </div>
- </gr-dialog>
- `);
+ >
+ </div>
+ </gr-dialog>
+ `
+ );
});
test('confirm', async () => {
diff --git a/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog_test.ts b/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog_test.ts
index 7933896..6a4ff7d 100644
--- a/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog_test.ts
@@ -54,43 +54,49 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-dialog confirm-label="Cherry Pick" disabled="" role="dialog">
- <div class="header title" slot="header">
- Cherry Pick Change to Another Branch
- </div>
- <div class="main" slot="main">
- <gr-endpoint-decorator name="cherrypick-main">
- <gr-endpoint-param name="changes"> </gr-endpoint-param>
- <gr-endpoint-slot name="top"> </gr-endpoint-slot>
- <label for="branchInput"> Cherry Pick to branch </label>
- <gr-autocomplete id="branchInput" placeholder="Destination branch">
- </gr-autocomplete>
- <label for="baseInput">
- Provide base commit sha1 for cherry-pick
- </label>
- <iron-input>
- <input
- id="baseCommitInput"
- is="iron-input"
- maxlength="40"
- placeholder="(optional)"
- />
- </iron-input>
- <label for="messageInput"> Cherry Pick Commit Message </label>
- <iron-autogrow-textarea
- aria-disabled="false"
- autocomplete="on"
- class="message"
- id="messageInput"
- rows="4"
- >
- </iron-autogrow-textarea>
- <gr-endpoint-slot name="bottom"></gr-endpoint-slot>
- </gr-endpoint-decorator>
- </div>
- </gr-dialog>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-dialog confirm-label="Cherry Pick" disabled="" role="dialog">
+ <div class="header title" slot="header">
+ Cherry Pick Change to Another Branch
+ </div>
+ <div class="main" slot="main">
+ <gr-endpoint-decorator name="cherrypick-main">
+ <gr-endpoint-param name="changes"> </gr-endpoint-param>
+ <gr-endpoint-slot name="top"> </gr-endpoint-slot>
+ <label for="branchInput"> Cherry Pick to branch </label>
+ <gr-autocomplete
+ id="branchInput"
+ placeholder="Destination branch"
+ >
+ </gr-autocomplete>
+ <label for="baseInput">
+ Provide base commit sha1 for cherry-pick
+ </label>
+ <iron-input>
+ <input
+ id="baseCommitInput"
+ is="iron-input"
+ maxlength="40"
+ placeholder="(optional)"
+ />
+ </iron-input>
+ <label for="messageInput"> Cherry Pick Commit Message </label>
+ <iron-autogrow-textarea
+ aria-disabled="false"
+ autocomplete="on"
+ class="message"
+ id="messageInput"
+ rows="4"
+ >
+ </iron-autogrow-textarea>
+ <gr-endpoint-slot name="bottom"></gr-endpoint-slot>
+ </gr-endpoint-decorator>
+ </div>
+ </gr-dialog>
+ `
+ );
});
test('with message missing newline', async () => {
diff --git a/polygerrit-ui/app/elements/change/gr-confirm-move-dialog/gr-confirm-move-dialog_test.ts b/polygerrit-ui/app/elements/change/gr-confirm-move-dialog/gr-confirm-move-dialog_test.ts
index a0b55de..b024a9a 100644
--- a/polygerrit-ui/app/elements/change/gr-confirm-move-dialog/gr-confirm-move-dialog_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-confirm-move-dialog/gr-confirm-move-dialog_test.ts
@@ -36,26 +36,29 @@
});
test('render', async () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-dialog confirm-label="Move Change" role="dialog">
- <div class="header" slot="header">Move Change to Another Branch</div>
- <div class="main" slot="main">
- <p class="warning">
- Warning: moving a change will not change its parents.
- </p>
- <label for="branchInput"> Move change to branch </label>
- <gr-autocomplete id="branchInput" placeholder="Destination branch">
- </gr-autocomplete>
- <label for="messageInput"> Move Change Message </label>
- <iron-autogrow-textarea
- aria-disabled="false"
- id="messageInput"
- class="message"
- autocomplete="on"
- ></iron-autogrow-textarea>
- </div>
- </gr-dialog>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-dialog confirm-label="Move Change" role="dialog">
+ <div class="header" slot="header">Move Change to Another Branch</div>
+ <div class="main" slot="main">
+ <p class="warning">
+ Warning: moving a change will not change its parents.
+ </p>
+ <label for="branchInput"> Move change to branch </label>
+ <gr-autocomplete id="branchInput" placeholder="Destination branch">
+ </gr-autocomplete>
+ <label for="messageInput"> Move Change Message </label>
+ <iron-autogrow-textarea
+ aria-disabled="false"
+ id="messageInput"
+ class="message"
+ autocomplete="on"
+ ></iron-autogrow-textarea>
+ </div>
+ </gr-dialog>
+ `
+ );
});
test('with updated commit message', async () => {
diff --git a/polygerrit-ui/app/elements/change/gr-confirm-rebase-dialog/gr-confirm-rebase-dialog_test.ts b/polygerrit-ui/app/elements/change/gr-confirm-rebase-dialog/gr-confirm-rebase-dialog_test.ts
index fa247de..c917c73 100644
--- a/polygerrit-ui/app/elements/change/gr-confirm-rebase-dialog/gr-confirm-rebase-dialog_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-confirm-rebase-dialog/gr-confirm-rebase-dialog_test.ts
@@ -24,55 +24,58 @@
test('render', async () => {
element.branch = 'test' as BranchName;
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `<gr-dialog
- confirm-label="Rebase"
- id="confirmDialog"
- role="dialog"
- >
- <div class="header" slot="header">Confirm rebase</div>
- <div class="main" slot="main">
- <div class="rebaseOption" hidden="" id="rebaseOnParent">
- <input id="rebaseOnParentInput" name="rebaseOptions" type="radio" />
- <label for="rebaseOnParentInput" id="rebaseOnParentLabel">
- Rebase on parent change
- </label>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `<gr-dialog
+ confirm-label="Rebase"
+ id="confirmDialog"
+ role="dialog"
+ >
+ <div class="header" slot="header">Confirm rebase</div>
+ <div class="main" slot="main">
+ <div class="rebaseOption" hidden="" id="rebaseOnParent">
+ <input id="rebaseOnParentInput" name="rebaseOptions" type="radio" />
+ <label for="rebaseOnParentInput" id="rebaseOnParentLabel">
+ Rebase on parent change
+ </label>
+ </div>
+ <div class="message" hidden="" id="parentUpToDateMsg">
+ This change is up to date with its parent.
+ </div>
+ <div class="rebaseOption" hidden="" id="rebaseOnTip">
+ <input
+ disabled=""
+ id="rebaseOnTipInput"
+ name="rebaseOptions"
+ type="radio"
+ />
+ <label for="rebaseOnTipInput" id="rebaseOnTipLabel">
+ Rebase on top of the test branch
+ <span hidden=""> (breaks relation chain) </span>
+ </label>
+ </div>
+ <div class="message" id="tipUpToDateMsg">
+ Change is up to date with the target branch already (test)
+ </div>
+ <div class="rebaseOption" id="rebaseOnOther">
+ <input id="rebaseOnOtherInput" name="rebaseOptions" type="radio" />
+ <label for="rebaseOnOtherInput" id="rebaseOnOtherLabel">
+ Rebase on a specific change, ref, or commit
+ <span hidden=""> (breaks relation chain) </span>
+ </label>
+ </div>
+ <div class="parentRevisionContainer">
+ <gr-autocomplete
+ allow-non-suggested-values=""
+ id="parentInput"
+ no-debounce=""
+ placeholder="Change number, ref, or commit hash"
+ >
+ </gr-autocomplete>
+ </div>
</div>
- <div class="message" hidden="" id="parentUpToDateMsg">
- This change is up to date with its parent.
- </div>
- <div class="rebaseOption" hidden="" id="rebaseOnTip">
- <input
- disabled=""
- id="rebaseOnTipInput"
- name="rebaseOptions"
- type="radio"
- />
- <label for="rebaseOnTipInput" id="rebaseOnTipLabel">
- Rebase on top of the test branch
- <span hidden=""> (breaks relation chain) </span>
- </label>
- </div>
- <div class="message" id="tipUpToDateMsg">
- Change is up to date with the target branch already (test)
- </div>
- <div class="rebaseOption" id="rebaseOnOther">
- <input id="rebaseOnOtherInput" name="rebaseOptions" type="radio" />
- <label for="rebaseOnOtherInput" id="rebaseOnOtherLabel">
- Rebase on a specific change, ref, or commit
- <span hidden=""> (breaks relation chain) </span>
- </label>
- </div>
- <div class="parentRevisionContainer">
- <gr-autocomplete
- allow-non-suggested-values=""
- id="parentInput"
- no-debounce=""
- placeholder="Change number, ref, or commit hash"
- >
- </gr-autocomplete>
- </div>
- </div>
- </gr-dialog> `);
+ </gr-dialog> `
+ );
});
test('controls with parent and rebase on current available', async () => {
diff --git a/polygerrit-ui/app/elements/change/gr-confirm-revert-dialog/gr-confirm-revert-dialog_test.ts b/polygerrit-ui/app/elements/change/gr-confirm-revert-dialog/gr-confirm-revert-dialog_test.ts
index 6cb9771..85ea4c6 100644
--- a/polygerrit-ui/app/elements/change/gr-confirm-revert-dialog/gr-confirm-revert-dialog_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-confirm-revert-dialog/gr-confirm-revert-dialog_test.ts
@@ -20,24 +20,27 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-dialog role="dialog">
- <div class="header" slot="header">Revert Merged Change</div>
- <div class="main" slot="main">
- <div class="error" hidden="">
- <span> A reason is required </span>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-dialog role="dialog">
+ <div class="header" slot="header">Revert Merged Change</div>
+ <div class="main" slot="main">
+ <div class="error" hidden="">
+ <span> A reason is required </span>
+ </div>
+ <gr-endpoint-decorator name="confirm-revert-change">
+ <label for="messageInput"> Revert Commit Message </label>
+ <iron-autogrow-textarea
+ id="messageInput"
+ class="message"
+ aria-disabled="false"
+ ></iron-autogrow-textarea>
+ </gr-endpoint-decorator>
</div>
- <gr-endpoint-decorator name="confirm-revert-change">
- <label for="messageInput"> Revert Commit Message </label>
- <iron-autogrow-textarea
- id="messageInput"
- class="message"
- aria-disabled="false"
- ></iron-autogrow-textarea>
- </gr-endpoint-decorator>
- </div>
- </gr-dialog>
- `);
+ </gr-dialog>
+ `
+ );
});
test('no match', () => {
diff --git a/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog_test.ts b/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog_test.ts
index 11a5c61..da048f6 100644
--- a/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog_test.ts
@@ -32,27 +32,30 @@
};
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-dialog
- confirm-label="Continue"
- confirm-on-enter=""
- id="dialog"
- role="dialog"
- >
- <div class="header" slot="header">my-label</div>
- <div class="main" slot="main">
- <gr-endpoint-decorator name="confirm-submit-change">
- <p>
- Ready to submit “
- <strong> my-subject </strong>
- ”?
- </p>
- <gr-endpoint-param name="change"> </gr-endpoint-param>
- <gr-endpoint-param name="action"> </gr-endpoint-param>
- </gr-endpoint-decorator>
- </div>
- </gr-dialog>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-dialog
+ confirm-label="Continue"
+ confirm-on-enter=""
+ id="dialog"
+ role="dialog"
+ >
+ <div class="header" slot="header">my-label</div>
+ <div class="main" slot="main">
+ <gr-endpoint-decorator name="confirm-submit-change">
+ <p>
+ Ready to submit “
+ <strong> my-subject </strong>
+ ”?
+ </p>
+ <gr-endpoint-param name="change"> </gr-endpoint-param>
+ <gr-endpoint-param name="action"> </gr-endpoint-param>
+ </gr-endpoint-decorator>
+ </div>
+ </gr-dialog>
+ `
+ );
});
test('computeUnresolvedCommentsWarning', () => {
diff --git a/polygerrit-ui/app/elements/change/gr-download-dialog/gr-download-dialog_test.ts b/polygerrit-ui/app/elements/change/gr-download-dialog/gr-download-dialog_test.ts
index 3ba7e62..52575b3 100644
--- a/polygerrit-ui/app/elements/change/gr-download-dialog/gr-download-dialog_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-download-dialog/gr-download-dialog_test.ts
@@ -104,8 +104,9 @@
test('render', () => {
// prettier and shadowDom string don't agree on the long text in the h3
- expect(element).shadowDom.to
- .equal(/* prettier-ignore */ /* HTML */ `
+ assert.shadowDom.equal(
+ element,
+ /* prettier-ignore */ /* HTML */ `
<section>
<h3 class="heading-3">
Patch set 1 of
@@ -148,7 +149,8 @@
</gr-button>
</span>
</section>
- `);
+ `
+ );
});
test('anchors use download attribute', () => {
diff --git a/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header_test.ts b/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header_test.ts
index e7b4a87..fa0bce2 100644
--- a/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header_test.ts
@@ -57,85 +57,88 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="patchInfo-header">
- <div class="patchInfo-left">
- <div class="patchInfoContent">
- <gr-patch-range-select id="rangeSelect"> </gr-patch-range-select>
- <span class="separator"> </span>
- <gr-commit-info> </gr-commit-info>
- <span class="container latestPatchContainer">
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="patchInfo-header">
+ <div class="patchInfo-left">
+ <div class="patchInfoContent">
+ <gr-patch-range-select id="rangeSelect"> </gr-patch-range-select>
<span class="separator"> </span>
- <a> Go to latest patch set </a>
- </span>
+ <gr-commit-info> </gr-commit-info>
+ <span class="container latestPatchContainer">
+ <span class="separator"> </span>
+ <a> Go to latest patch set </a>
+ </span>
+ </div>
</div>
- </div>
- <div class="rightControls">
- <div class="fileViewActions">
- <span class="fileViewActionsLabel"> Diff view: </span>
- <gr-diff-mode-selector id="modeSelect"> </gr-diff-mode-selector>
- <span class="hideOnEdit" hidden="" id="diffPrefsContainer">
- <gr-tooltip-content has-tooltip="" title="Diff preferences">
+ <div class="rightControls">
+ <div class="fileViewActions">
+ <span class="fileViewActionsLabel"> Diff view: </span>
+ <gr-diff-mode-selector id="modeSelect"> </gr-diff-mode-selector>
+ <span class="hideOnEdit" hidden="" id="diffPrefsContainer">
+ <gr-tooltip-content has-tooltip="" title="Diff preferences">
+ <gr-button
+ aria-disabled="false"
+ class="desktop prefsButton"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ <gr-icon filled icon="settings"></gr-icon>
+ </gr-button>
+ </gr-tooltip-content>
+ </span>
+ <span class="separator"> </span>
+ </div>
+ <span class="desktop downloadContainer">
+ <gr-tooltip-content
+ has-tooltip=""
+ title="Open download overlay (shortcut: d)"
+ >
<gr-button
aria-disabled="false"
- class="desktop prefsButton"
+ class="download"
link=""
role="button"
tabindex="0"
>
- <gr-icon filled icon="settings"></gr-icon>
+ Download
</gr-button>
</gr-tooltip-content>
</span>
- <span class="separator"> </span>
- </div>
- <span class="desktop downloadContainer">
<gr-tooltip-content
has-tooltip=""
- title="Open download overlay (shortcut: d)"
+ title="Show/hide all inline diffs (shortcut: I)"
>
<gr-button
aria-disabled="false"
- class="download"
+ id="expandBtn"
link=""
role="button"
tabindex="0"
>
- Download
+ Expand All
</gr-button>
</gr-tooltip-content>
- </span>
- <gr-tooltip-content
- has-tooltip=""
- title="Show/hide all inline diffs (shortcut: I)"
- >
- <gr-button
- aria-disabled="false"
- id="expandBtn"
- link=""
- role="button"
- tabindex="0"
+ <gr-tooltip-content
+ has-tooltip=""
+ title="Show/hide all inline diffs (shortcut: I)"
>
- Expand All
- </gr-button>
- </gr-tooltip-content>
- <gr-tooltip-content
- has-tooltip=""
- title="Show/hide all inline diffs (shortcut: I)"
- >
- <gr-button
- aria-disabled="false"
- id="collapseBtn"
- link=""
- role="button"
- tabindex="0"
- >
- Collapse All
- </gr-button>
- </gr-tooltip-content>
+ <gr-button
+ aria-disabled="false"
+ id="collapseBtn"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Collapse All
+ </gr-button>
+ </gr-tooltip-content>
+ </div>
</div>
- </div>
- `);
+ `
+ );
});
test('Diff preferences hidden when no prefs', async () => {
diff --git a/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list_test.ts b/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list_test.ts
index 600d4f1..cee44d6 100644
--- a/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list_test.ts
@@ -116,144 +116,146 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `<h3
- class="assistive-tech-only"
- >
- File list
- </h3>
- <div aria-label="Files list" id="container" role="grid">
- <div class="header-row row" role="row">
- <div class="status" role="gridcell"></div>
- <div class="path" role="columnheader">File</div>
- <div class="comments desktop" role="columnheader">Comments</div>
- <div class="comments mobile" role="columnheader" title="Comments">
- C
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `<h3 class="assistive-tech-only">File list</h3>
+ <div aria-label="Files list" id="container" role="grid">
+ <div class="header-row row" role="row">
+ <div class="status" role="gridcell"></div>
+ <div class="path" role="columnheader">File</div>
+ <div class="comments desktop" role="columnheader">Comments</div>
+ <div class="comments mobile" role="columnheader" title="Comments">
+ C
+ </div>
+ <div class="desktop sizeBars" role="columnheader">Size</div>
+ <div class="header-stats" role="columnheader">Delta</div>
+ <div aria-hidden="true" class="hideOnEdit reviewed"></div>
+ <div aria-hidden="true" class="editFileControls showOnEdit"></div>
+ <div aria-hidden="true" class="show-hide"></div>
</div>
- <div class="desktop sizeBars" role="columnheader">Size</div>
- <div class="header-stats" role="columnheader">Delta</div>
- <div aria-hidden="true" class="hideOnEdit reviewed"></div>
- <div aria-hidden="true" class="editFileControls showOnEdit"></div>
- <div aria-hidden="true" class="show-hide"></div>
</div>
- </div>
- <div class="controlRow invisible row">
- <gr-button
- aria-disabled="false"
- class="fileListButton"
- id="incrementButton"
- link=""
- role="button"
- tabindex="0"
- >
- Show -200 more
- </gr-button>
- <gr-tooltip-content title="">
+ <div class="controlRow invisible row">
<gr-button
aria-disabled="false"
class="fileListButton"
- id="showAllButton"
+ id="incrementButton"
link=""
role="button"
tabindex="0"
>
- Show all 0 files
+ Show -200 more
</gr-button>
- </gr-tooltip-content>
- </div>
- <gr-diff-preferences-dialog
- id="diffPreferencesDialog"
- ></gr-diff-preferences-dialog>`);
+ <gr-tooltip-content title="">
+ <gr-button
+ aria-disabled="false"
+ class="fileListButton"
+ id="showAllButton"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Show all 0 files
+ </gr-button>
+ </gr-tooltip-content>
+ </div>
+ <gr-diff-preferences-dialog
+ id="diffPreferencesDialog"
+ ></gr-diff-preferences-dialog>`
+ );
});
test('renders file row', async () => {
element.files = createFiles(1, {lines_inserted: 9});
await element.updateComplete;
const fileRows = queryAll<HTMLDivElement>(element, '.file-row');
- expect(fileRows?.[0]).dom.equal(/* HTML */ `<div
- class="file-row row"
- data-file='{"path":"'/file0"}'
- role="row"
- tabindex="-1"
- >
- <div class="status" role="gridcell">
- <gr-file-status></gr-file-status>
- </div>
- <span class="path" role="gridcell">
- <a class="pathLink">
- <span class="fullFileName" title="'/file0"> '/file0 </span>
- <span class="truncatedFileName" title="'/file0"> …/file0 </span>
- <gr-copy-clipboard hideinput=""> </gr-copy-clipboard>
- </a>
- </span>
- <div role="gridcell">
- <div class="comments desktop">
- <span class="drafts"> </span> <span> </span>
- <span class="noCommentsScreenReaderText"> No comments </span>
+ assert.dom.equal(
+ fileRows?.[0],
+ /* HTML */ `<div
+ class="file-row row"
+ data-file='{"path":"'/file0"}'
+ role="row"
+ tabindex="-1"
+ >
+ <div class="status" role="gridcell">
+ <gr-file-status></gr-file-status>
</div>
- <div class="comments mobile">
- <span class="drafts"> </span> <span> </span>
- <span class="noCommentsScreenReaderText"> No comments </span>
+ <span class="path" role="gridcell">
+ <a class="pathLink">
+ <span class="fullFileName" title="'/file0"> '/file0 </span>
+ <span class="truncatedFileName" title="'/file0"> …/file0 </span>
+ <gr-copy-clipboard hideinput=""> </gr-copy-clipboard>
+ </a>
+ </span>
+ <div role="gridcell">
+ <div class="comments desktop">
+ <span class="drafts"> </span> <span> </span>
+ <span class="noCommentsScreenReaderText"> No comments </span>
+ </div>
+ <div class="comments mobile">
+ <span class="drafts"> </span> <span> </span>
+ <span class="noCommentsScreenReaderText"> No comments </span>
+ </div>
</div>
- </div>
- <div class="desktop" role="gridcell">
- <div
- aria-label="A bar that represents the addition and deletion ratio for the current file"
- class="hide sizeBars"
- ></div>
- </div>
- <div class="stats" role="gridcell">
- <div>
- <span aria-label="9 lines added" class="added" tabindex="0">
- +9
- </span>
- <span aria-label="0 lines removed" class="removed" tabindex="0">
- -0
- </span>
- <span hidden=""> +/-0 B </span>
+ <div class="desktop" role="gridcell">
+ <div
+ aria-label="A bar that represents the addition and deletion ratio for the current file"
+ class="hide sizeBars"
+ ></div>
</div>
- </div>
- <div class="hideOnEdit reviewed" role="gridcell">
- <span aria-hidden="true" class="reviewedLabel"> Reviewed </span>
- <span
- aria-checked="false"
- aria-label="Reviewed"
- class="reviewedSwitch"
- role="switch"
- tabindex="0"
- >
+ <div class="stats" role="gridcell">
+ <div>
+ <span aria-label="9 lines added" class="added" tabindex="0">
+ +9
+ </span>
+ <span aria-label="0 lines removed" class="removed" tabindex="0">
+ -0
+ </span>
+ <span hidden=""> +/-0 B </span>
+ </div>
+ </div>
+ <div class="hideOnEdit reviewed" role="gridcell">
+ <span aria-hidden="true" class="reviewedLabel"> Reviewed </span>
<span
- class="markReviewed"
- tabindex="-1"
- title="Mark as reviewed (shortcut: r)"
+ aria-checked="false"
+ aria-label="Reviewed"
+ class="reviewedSwitch"
+ role="switch"
+ tabindex="0"
>
- MARK REVIEWED
+ <span
+ class="markReviewed"
+ tabindex="-1"
+ title="Mark as reviewed (shortcut: r)"
+ >
+ MARK REVIEWED
+ </span>
</span>
- </span>
- </div>
- <div
- aria-hidden="true"
- class="editFileControls showOnEdit"
- role="gridcell"
- ></div>
- <div class="show-hide" role="gridcell">
- <span
- aria-checked="false"
- aria-label="Expand file"
- class="show-hide"
- data-expand="true"
- data-path="'/file0"
- role="switch"
- tabindex="0"
- >
- <gr-icon
- icon="expand_more"
- class="show-hide-icon"
- id="icon"
- tabindex="-1"
- ></gr-icon>
- </span>
- </div>
- </div>`);
+ </div>
+ <div
+ aria-hidden="true"
+ class="editFileControls showOnEdit"
+ role="gridcell"
+ ></div>
+ <div class="show-hide" role="gridcell">
+ <span
+ aria-checked="false"
+ aria-label="Expand file"
+ class="show-hide"
+ data-expand="true"
+ data-path="'/file0"
+ role="switch"
+ tabindex="0"
+ >
+ <gr-icon
+ icon="expand_more"
+ class="show-hide-icon"
+ id="icon"
+ tabindex="-1"
+ ></gr-icon>
+ </span>
+ </div>
+ </div>`
+ );
});
test('renders file status column', async () => {
@@ -262,13 +264,16 @@
await element.updateComplete;
const fileRows = queryAll<HTMLDivElement>(element, '.file-row');
const statusCol = queryAndAssert(fileRows?.[0], '.status');
- expect(statusCol).dom.equal(/* HTML */ `
- <div class="extended status" role="gridcell">
- <gr-file-status></gr-file-status>
- <gr-icon class="file-status-arrow" icon="arrow_right_alt"></gr-icon>
- <gr-file-status></gr-file-status>
- </div>
- `);
+ assert.dom.equal(
+ statusCol,
+ /* HTML */ `
+ <div class="extended status" role="gridcell">
+ <gr-file-status></gr-file-status>
+ <gr-icon class="file-status-arrow" icon="arrow_right_alt"></gr-icon>
+ <gr-file-status></gr-file-status>
+ </div>
+ `
+ );
});
test('renders file status column header', async () => {
@@ -278,17 +283,20 @@
await element.updateComplete;
const fileRows = queryAll<HTMLDivElement>(element, '.header-row');
const statusCol = queryAndAssert(fileRows?.[0], '.status');
- expect(statusCol).dom.equal(/* HTML */ `
- <div class="extended status" role="gridcell">
- <gr-tooltip-content has-tooltip="" title="Patchset 1">
- <div class="content">1</div>
- </gr-tooltip-content>
- <gr-icon class="file-status-arrow" icon="arrow_right_alt"></gr-icon>
- <gr-tooltip-content has-tooltip="" title="Patchset 2">
- <div class="content">2</div>
- </gr-tooltip-content>
- </div>
- `);
+ assert.dom.equal(
+ statusCol,
+ /* HTML */ `
+ <div class="extended status" role="gridcell">
+ <gr-tooltip-content has-tooltip="" title="Patchset 1">
+ <div class="content">1</div>
+ </gr-tooltip-content>
+ <gr-icon class="file-status-arrow" icon="arrow_right_alt"></gr-icon>
+ <gr-tooltip-content has-tooltip="" title="Patchset 2">
+ <div class="content">2</div>
+ </gr-tooltip-content>
+ </div>
+ `
+ );
});
test('correct number of files are shown', async () => {
diff --git a/polygerrit-ui/app/elements/change/gr-included-in-dialog/gr-included-in-dialog_test.ts b/polygerrit-ui/app/elements/change/gr-included-in-dialog/gr-included-in-dialog_test.ts
index f9f3d16..2a43e53 100644
--- a/polygerrit-ui/app/elements/change/gr-included-in-dialog/gr-included-in-dialog_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-included-in-dialog/gr-included-in-dialog_test.ts
@@ -21,26 +21,29 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <header>
- <h1 class="heading-1" id="title">Included In:</h1>
- <span class="closeButtonContainer">
- <gr-button
- aria-disabled="false"
- id="closeButton"
- link=""
- role="button"
- tabindex="0"
- >
- Close
- </gr-button>
- </span>
- <iron-input id="filterInput">
- <input placeholder="Filter" />
- </iron-input>
- </header>
- <div>Loading...</div>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <header>
+ <h1 class="heading-1" id="title">Included In:</h1>
+ <span class="closeButtonContainer">
+ <gr-button
+ aria-disabled="false"
+ id="closeButton"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Close
+ </gr-button>
+ </span>
+ <iron-input id="filterInput">
+ <input placeholder="Filter" />
+ </iron-input>
+ </header>
+ <div>Loading...</div>
+ `
+ );
});
test('computeGroups', () => {
diff --git a/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row_test.ts b/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row_test.ts
index 7af2831..e6a6f89 100644
--- a/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row_test.ts
@@ -300,73 +300,76 @@
});
test('shadowDom test', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <span class="labelNameCell" id="labelName" aria-hidden="true">
- Verified
- </span>
- <div class="buttonsCell">
- <span class="placeholder" data-label="Verified"></span>
- <iron-selector
- aria-labelledby="labelName"
- id="labelSelector"
- role="radiogroup"
- selected="+1"
- >
- <gr-button
- aria-disabled="false"
- aria-label="-1"
- data-name="Verified"
- data-value="-1"
- role="button"
- tabindex="0"
- title="bad"
- data-vote="min"
- votechip=""
- flatten=""
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <span class="labelNameCell" id="labelName" aria-hidden="true">
+ Verified
+ </span>
+ <div class="buttonsCell">
+ <span class="placeholder" data-label="Verified"></span>
+ <iron-selector
+ aria-labelledby="labelName"
+ id="labelSelector"
+ role="radiogroup"
+ selected="+1"
>
- <gr-tooltip-content light-tooltip="" has-tooltip="" title="bad">
- -1
- </gr-tooltip-content>
- </gr-button>
- <gr-button
- aria-disabled="false"
- aria-label=" 0"
- data-name="Verified"
- data-value=" 0"
- role="button"
- tabindex="0"
- data-vote="neutral"
- votechip=""
- flatten=""
- >
- <gr-tooltip-content light-tooltip="" has-tooltip="">
- 0
- </gr-tooltip-content>
- </gr-button>
- <gr-button
- aria-checked="true"
- aria-disabled="false"
- aria-label="+1"
- class="iron-selected"
- data-name="Verified"
- data-value="+1"
- role="button"
- tabindex="0"
- title="good"
- data-vote="max"
- votechip=""
- flatten=""
- >
- <gr-tooltip-content light-tooltip="" has-tooltip="" title="good">
- +1
- </gr-tooltip-content>
- </gr-button>
- </iron-selector>
- <span class="placeholder" data-label="Verified"></span>
- </div>
- <div class="selectedValueCell ">
- <span id="selectedValueLabel">good</span>
- </div>
- `);
+ <gr-button
+ aria-disabled="false"
+ aria-label="-1"
+ data-name="Verified"
+ data-value="-1"
+ role="button"
+ tabindex="0"
+ title="bad"
+ data-vote="min"
+ votechip=""
+ flatten=""
+ >
+ <gr-tooltip-content light-tooltip="" has-tooltip="" title="bad">
+ -1
+ </gr-tooltip-content>
+ </gr-button>
+ <gr-button
+ aria-disabled="false"
+ aria-label=" 0"
+ data-name="Verified"
+ data-value=" 0"
+ role="button"
+ tabindex="0"
+ data-vote="neutral"
+ votechip=""
+ flatten=""
+ >
+ <gr-tooltip-content light-tooltip="" has-tooltip="">
+ 0
+ </gr-tooltip-content>
+ </gr-button>
+ <gr-button
+ aria-checked="true"
+ aria-disabled="false"
+ aria-label="+1"
+ class="iron-selected"
+ data-name="Verified"
+ data-value="+1"
+ role="button"
+ tabindex="0"
+ title="good"
+ data-vote="max"
+ votechip=""
+ flatten=""
+ >
+ <gr-tooltip-content light-tooltip="" has-tooltip="" title="good">
+ +1
+ </gr-tooltip-content>
+ </gr-button>
+ </iron-selector>
+ <span class="placeholder" data-label="Verified"></span>
+ </div>
+ <div class="selectedValueCell ">
+ <span id="selectedValueLabel">good</span>
+ </div>
+ `
+ );
});
});
diff --git a/polygerrit-ui/app/elements/change/gr-label-scores/gr-label-scores_test.ts b/polygerrit-ui/app/elements/change/gr-label-scores/gr-label-scores_test.ts
index 9306364..661791f 100644
--- a/polygerrit-ui/app/elements/change/gr-label-scores/gr-label-scores_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-label-scores/gr-label-scores_test.ts
@@ -75,19 +75,22 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <h3 class="heading-4">Trigger Votes</h3>
- <div class="scoresTable">
- <gr-label-score-row name="Code-Review"> </gr-label-score-row>
- <gr-label-score-row name="Verified"> </gr-label-score-row>
- </div>
- <div class="mergedMessage" hidden="">
- Because this change has been merged, votes may not be decreased.
- </div>
- <div class="abandonedMessage" hidden="">
- Because this change has been abandoned, you cannot vote.
- </div>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <h3 class="heading-4">Trigger Votes</h3>
+ <div class="scoresTable">
+ <gr-label-score-row name="Code-Review"> </gr-label-score-row>
+ <gr-label-score-row name="Verified"> </gr-label-score-row>
+ </div>
+ <div class="mergedMessage" hidden="">
+ Because this change has been merged, votes may not be decreased.
+ </div>
+ <div class="abandonedMessage" hidden="">
+ Because this change has been abandoned, you cannot vote.
+ </div>
+ `
+ );
});
test('get and set label scores', async () => {
diff --git a/polygerrit-ui/app/elements/change/gr-message-scores/gr-message-scores_test.ts b/polygerrit-ui/app/elements/change/gr-message-scores/gr-message-scores_test.ts
index dd7d55a..8ef7ff0 100644
--- a/polygerrit-ui/app/elements/change/gr-message-scores/gr-message-scores_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-message-scores/gr-message-scores_test.ts
@@ -37,11 +37,14 @@
};
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <span class="max positive score"> Verified +1 </span>
- <span class="min negative score"> Code-Review -2 </span>
- <span class="positive score"> Trybot-Label3 +1 </span>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <span class="max positive score"> Verified +1 </span>
+ <span class="min negative score"> Code-Review -2 </span>
+ <span class="positive score"> Trybot-Label3 +1 </span>
+ `
+ );
});
test('votes', async () => {
@@ -172,17 +175,23 @@
element.shadowRoot?.querySelectorAll('gr-trigger-vote');
assert.equal(triggerChips?.length, 1);
const triggerChip = triggerChips?.[0];
- expect(triggerChip).shadowDom.equal(`<div class="container">
+ assert.shadowDom.equal(
+ triggerChip,
+ `<div class="container">
<span class="label">Auto-Submit</span>
<gr-vote-chip></gr-vote-chip>
- </div>`);
+ </div>`
+ );
const voteChips = triggerChip?.shadowRoot?.querySelectorAll('gr-vote-chip');
assert.equal(voteChips?.length, 1);
- expect(voteChips?.[0]).shadowDom.equal('');
+ assert.shadowDom.equal(voteChips?.[0], '');
const scoreChips = element.shadowRoot?.querySelectorAll('.score');
assert.equal(scoreChips?.length, 1);
- expect(scoreChips?.[0]).dom.equal(`<span class="removed score">
- Commit-Queue 0 (vote reset)
- </span>`);
+ assert.dom.equal(
+ scoreChips?.[0],
+ /* HTML */ `
+ <span class="removed score"> Commit-Queue 0 (vote reset) </span>
+ `
+ );
});
});
diff --git a/polygerrit-ui/app/elements/change/gr-message/gr-message_test.ts b/polygerrit-ui/app/elements/change/gr-message/gr-message_test.ts
index cd44925..6492fb6 100644
--- a/polygerrit-ui/app/elements/change/gr-message/gr-message_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-message/gr-message_test.ts
@@ -142,35 +142,38 @@
await element.updateComplete;
assert.isTrue(element.computeIsAutomated());
- expect(element).shadowDom.to.equal(/* HTML */ `<div class="collapsed">
- <div class="contentContainer">
- <div class="author">
- <gr-account-label class="authorLabel"> </gr-account-label>
- <gr-message-scores> </gr-message-scores>
- </div>
- <div class="content messageContent">
- <div class="hideOnOpen message">
- This is a message with id cm_id_1
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `<div class="collapsed">
+ <div class="contentContainer">
+ <div class="author">
+ <gr-account-label class="authorLabel"> </gr-account-label>
+ <gr-message-scores> </gr-message-scores>
</div>
- </div>
- <span class="dateContainer">
- <span class="date">
- <gr-date-formatter showdateandtime="" withtooltip="">
- </gr-date-formatter>
+ <div class="content messageContent">
+ <div class="hideOnOpen message">
+ This is a message with id cm_id_1
+ </div>
+ </div>
+ <span class="dateContainer">
+ <span class="date">
+ <gr-date-formatter showdateandtime="" withtooltip="">
+ </gr-date-formatter>
+ </span>
+ <gr-icon
+ icon="expand_more"
+ id="expandToggle"
+ title="Toggle expanded state"
+ ></gr-icon>
</span>
- <gr-icon
- icon="expand_more"
- id="expandToggle"
- title="Toggle expanded state"
- ></gr-icon>
- </span>
- </div>
- </div>`);
+ </div>
+ </div>`
+ );
element.hideAutomated = true;
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ '');
+ assert.shadowDom.equal(element, /* HTML */ '');
});
test('reviewer message treated as autogenerated', async () => {
@@ -183,35 +186,38 @@
await element.updateComplete;
assert.isTrue(element.computeIsAutomated());
- expect(element).shadowDom.to.equal(/* HTML */ `<div class="collapsed">
- <div class="contentContainer">
- <div class="author">
- <gr-account-label class="authorLabel"> </gr-account-label>
- <gr-message-scores> </gr-message-scores>
- </div>
- <div class="content messageContent">
- <div class="hideOnOpen message">
- This is a message with id cm_id_1
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `<div class="collapsed">
+ <div class="contentContainer">
+ <div class="author">
+ <gr-account-label class="authorLabel"> </gr-account-label>
+ <gr-message-scores> </gr-message-scores>
</div>
- </div>
- <span class="dateContainer">
- <span class="date">
- <gr-date-formatter showdateandtime="" withtooltip="">
- </gr-date-formatter>
+ <div class="content messageContent">
+ <div class="hideOnOpen message">
+ This is a message with id cm_id_1
+ </div>
+ </div>
+ <span class="dateContainer">
+ <span class="date">
+ <gr-date-formatter showdateandtime="" withtooltip="">
+ </gr-date-formatter>
+ </span>
+ <gr-icon
+ icon="expand_more"
+ id="expandToggle"
+ title="Toggle expanded state"
+ ></gr-icon>
</span>
- <gr-icon
- icon="expand_more"
- id="expandToggle"
- title="Toggle expanded state"
- ></gr-icon>
- </span>
- </div>
- </div>`);
+ </div>
+ </div>`
+ );
element.hideAutomated = true;
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ '');
+ assert.shadowDom.equal(element, /* HTML */ '');
});
test('batch reviewer message treated as autogenerated', async () => {
@@ -225,36 +231,39 @@
await element.updateComplete;
assert.isTrue(element.computeIsAutomated());
- expect(element).shadowDom.to.equal(/* HTML */ `<div class="collapsed">
- <div class="contentContainer">
- <div class="author">
- <gr-account-label class="authorLabel"> </gr-account-label>
- <gr-message-scores> </gr-message-scores>
- </div>
- <div class="content messageContent">
- <div class="hideOnOpen message">
- This is a message with id cm_id_1
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `<div class="collapsed">
+ <div class="contentContainer">
+ <div class="author">
+ <gr-account-label class="authorLabel"> </gr-account-label>
+ <gr-message-scores> </gr-message-scores>
</div>
- </div>
- <div class="content"></div>
- <span class="dateContainer">
- <span class="date">
- <gr-date-formatter showdateandtime="" withtooltip="">
- </gr-date-formatter>
+ <div class="content messageContent">
+ <div class="hideOnOpen message">
+ This is a message with id cm_id_1
+ </div>
+ </div>
+ <div class="content"></div>
+ <span class="dateContainer">
+ <span class="date">
+ <gr-date-formatter showdateandtime="" withtooltip="">
+ </gr-date-formatter>
+ </span>
+ <gr-icon
+ icon="expand_more"
+ id="expandToggle"
+ title="Toggle expanded state"
+ ></gr-icon>
</span>
- <gr-icon
- icon="expand_more"
- id="expandToggle"
- title="Toggle expanded state"
- ></gr-icon>
- </span>
- </div>
- </div>`);
+ </div>
+ </div>`
+ );
element.hideAutomated = true;
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ '');
+ assert.shadowDom.equal(element, /* HTML */ '');
});
test('tag that is not autogenerated prefix does not hide', async () => {
@@ -290,13 +299,13 @@
</span>
</div>
</div>`;
- expect(element).shadowDom.to.equal(rendered);
+ assert.shadowDom.equal(element, rendered);
element.hideAutomated = true;
await element.updateComplete;
console.error(element.computeIsAutomated());
- expect(element).shadowDom.to.equal(rendered);
+ assert.shadowDom.equal(element, rendered);
});
test('reply button hidden unless logged in', () => {
diff --git a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list_test.ts b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list_test.ts
index ff9770a..23e1995 100644
--- a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list_test.ts
@@ -141,24 +141,27 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="header">
- <div class="container" id="showAllActivityToggleContainer"></div>
- <gr-button
- aria-disabled="false"
- id="collapse-messages"
- link=""
- role="button"
- tabindex="0"
- title="Expand all messages (shortcut: x)"
- >
- Expand All
- </gr-button>
- </div>
- <gr-message data-message-id="${messages[0].id}"> </gr-message>
- <gr-message data-message-id="${messages[1].id}"> </gr-message>
- <gr-message data-message-id="${messages[2].id}"> </gr-message>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="header">
+ <div class="container" id="showAllActivityToggleContainer"></div>
+ <gr-button
+ aria-disabled="false"
+ id="collapse-messages"
+ link=""
+ role="button"
+ tabindex="0"
+ title="Expand all messages (shortcut: x)"
+ >
+ Expand All
+ </gr-button>
+ </div>
+ <gr-message data-message-id="${messages[0].id}"> </gr-message>
+ <gr-message data-message-id="${messages[1].id}"> </gr-message>
+ <gr-message data-message-id="${messages[2].id}"> </gr-message>
+ `
+ );
});
test('expand/collapse all', async () => {
diff --git a/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list_test.ts b/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list_test.ts
index 5b8259f..914d91c 100644
--- a/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list_test.ts
@@ -198,26 +198,29 @@
);
await element.reload();
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-endpoint-decorator name="related-changes-section">
- <gr-endpoint-param name="change"> </gr-endpoint-param>
- <gr-endpoint-slot name="top"> </gr-endpoint-slot>
- <section id="relatedChanges">
- <gr-related-collapse class="first" title="Relation chain">
- <div class="relatedChangeLine show-when-collapsed">
- <span class="marker space"> </span>
- <gr-related-change
- show-change-status=""
- show-submittable-check=""
- >
- Test commit subject
- </gr-related-change>
- </div>
- </gr-related-collapse>
- </section>
- <gr-endpoint-slot name="bottom"> </gr-endpoint-slot>
- </gr-endpoint-decorator>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-endpoint-decorator name="related-changes-section">
+ <gr-endpoint-param name="change"> </gr-endpoint-param>
+ <gr-endpoint-slot name="top"> </gr-endpoint-slot>
+ <section id="relatedChanges">
+ <gr-related-collapse class="first" title="Relation chain">
+ <div class="relatedChangeLine show-when-collapsed">
+ <span class="marker space"> </span>
+ <gr-related-change
+ show-change-status=""
+ show-submittable-check=""
+ >
+ Test commit subject
+ </gr-related-change>
+ </div>
+ </gr-related-collapse>
+ </section>
+ <gr-endpoint-slot name="bottom"> </gr-endpoint-slot>
+ </gr-endpoint-decorator>
+ `
+ );
});
test('first list', async () => {
diff --git a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog_test.ts b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog_test.ts
index 8674f5f..be757a2 100644
--- a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog_test.ts
@@ -53,6 +53,7 @@
RevisionPatchSetNum,
Suggestion,
UrlEncodedCommentId,
+ UserId,
} from '../../../types/common';
import {CommentThread} from '../../../utils/comment-util';
import {GrAccountList} from '../../shared/gr-account-list/gr-account-list';
@@ -189,152 +190,155 @@
}
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div tabindex="-1">
- <section class="peopleContainer">
- <gr-endpoint-decorator name="reply-reviewers">
- <gr-endpoint-param name="change"> </gr-endpoint-param>
- <gr-endpoint-param name="reviewers"> </gr-endpoint-param>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div tabindex="-1">
+ <section class="peopleContainer">
+ <gr-endpoint-decorator name="reply-reviewers">
+ <gr-endpoint-param name="change"> </gr-endpoint-param>
+ <gr-endpoint-param name="reviewers"> </gr-endpoint-param>
+ <div class="peopleList">
+ <div class="peopleListLabel">Reviewers</div>
+ <gr-account-list id="reviewers"> </gr-account-list>
+ <gr-endpoint-slot name="right"> </gr-endpoint-slot>
+ </div>
+ <gr-endpoint-slot name="below"> </gr-endpoint-slot>
+ </gr-endpoint-decorator>
<div class="peopleList">
- <div class="peopleListLabel">Reviewers</div>
- <gr-account-list id="reviewers"> </gr-account-list>
- <gr-endpoint-slot name="right"> </gr-endpoint-slot>
+ <div class="peopleListLabel">CC</div>
+ <gr-account-list allow-any-input="" id="ccs"> </gr-account-list>
</div>
- <gr-endpoint-slot name="below"> </gr-endpoint-slot>
- </gr-endpoint-decorator>
- <div class="peopleList">
- <div class="peopleListLabel">CC</div>
- <gr-account-list allow-any-input="" id="ccs"> </gr-account-list>
- </div>
- <gr-overlay
- aria-hidden="true"
- id="reviewerConfirmationOverlay"
- style="outline: none; display: none;"
- >
- <div class="reviewerConfirmation">
- Group
- <span class="groupName"> </span>
- has
- <span class="groupSize"> </span>
- members.
- <br />
- Are you sure you want to add them all?
- </div>
- <div class="reviewerConfirmationButtons">
- <gr-button aria-disabled="false" role="button" tabindex="0">
- Yes
- </gr-button>
- <gr-button aria-disabled="false" role="button" tabindex="0">
- No
- </gr-button>
- </div>
- </gr-overlay>
- </section>
- <section class="labelsContainer">
- <gr-endpoint-decorator name="reply-label-scores">
- <gr-label-scores id="labelScores"> </gr-label-scores>
- <gr-endpoint-param name="change"> </gr-endpoint-param>
- </gr-endpoint-decorator>
- <div id="pluginMessage"></div>
- </section>
- <section class="newReplyDialog textareaContainer">
- <div class="patchsetLevelContainer resolved">
- <gr-endpoint-decorator name="reply-text">
- <gr-textarea
- class="message monospace newReplyDialog"
- id="textarea"
- monospace=""
- >
- </gr-textarea>
+ <gr-overlay
+ aria-hidden="true"
+ id="reviewerConfirmationOverlay"
+ style="outline: none; display: none;"
+ >
+ <div class="reviewerConfirmation">
+ Group
+ <span class="groupName"> </span>
+ has
+ <span class="groupSize"> </span>
+ members.
+ <br />
+ Are you sure you want to add them all?
+ </div>
+ <div class="reviewerConfirmationButtons">
+ <gr-button aria-disabled="false" role="button" tabindex="0">
+ Yes
+ </gr-button>
+ <gr-button aria-disabled="false" role="button" tabindex="0">
+ No
+ </gr-button>
+ </div>
+ </gr-overlay>
+ </section>
+ <section class="labelsContainer">
+ <gr-endpoint-decorator name="reply-label-scores">
+ <gr-label-scores id="labelScores"> </gr-label-scores>
<gr-endpoint-param name="change"> </gr-endpoint-param>
</gr-endpoint-decorator>
- <div class="labelContainer">
- <label>
- <input
- checked=""
- id="resolvedPatchsetLevelCommentCheckbox"
- type="checkbox"
- />
- Resolved
- </label>
- <label class="preview-formatting">
- <input type="checkbox" />
- Preview formatting
- </label>
- </div>
- </div>
- </section>
- <div class="newReplyDialog stickyBottom">
- <gr-endpoint-decorator name="reply-bottom">
- <gr-endpoint-param name="change"> </gr-endpoint-param>
- <section class="attention">
- <div class="attentionSummary">
- <div>
- <span> No changes to the attention set. </span>
- <gr-tooltip-content
- has-tooltip=""
- title="Edit attention set changes"
- >
- <gr-button
- aria-disabled="false"
- class="edit-attention-button"
- data-action-key="edit"
- data-action-type="change"
- data-label="Edit"
- link=""
- position-below=""
- role="button"
- tabindex="0"
- >
- <div>
- <gr-icon icon="edit" filled small></gr-icon>
- <span>Modify</span>
- </div>
- </gr-button>
- </gr-tooltip-content>
- </div>
- <div>
- <a
- href="https://gerrit-review.googlesource.com/Documentation/user-attention-set.html"
- target="_blank"
- >
- <gr-icon icon="help" title="read documentation"></gr-icon>
- </a>
- </div>
- </div>
- </section>
- <gr-endpoint-slot name="above-actions"> </gr-endpoint-slot>
- <section class="actions">
- <div class="left"></div>
- <div class="right">
- <gr-button
- aria-disabled="false"
- class="action cancel"
- id="cancelButton"
- link=""
- role="button"
- tabindex="0"
+ <div id="pluginMessage"></div>
+ </section>
+ <section class="newReplyDialog textareaContainer">
+ <div class="patchsetLevelContainer resolved">
+ <gr-endpoint-decorator name="reply-text">
+ <gr-textarea
+ class="message monospace newReplyDialog"
+ id="textarea"
+ monospace=""
>
- Cancel
- </gr-button>
- <gr-tooltip-content has-tooltip="" title="Send reply">
+ </gr-textarea>
+ <gr-endpoint-param name="change"> </gr-endpoint-param>
+ </gr-endpoint-decorator>
+ <div class="labelContainer">
+ <label>
+ <input
+ checked=""
+ id="resolvedPatchsetLevelCommentCheckbox"
+ type="checkbox"
+ />
+ Resolved
+ </label>
+ <label class="preview-formatting">
+ <input type="checkbox" />
+ Preview formatting
+ </label>
+ </div>
+ </div>
+ </section>
+ <div class="newReplyDialog stickyBottom">
+ <gr-endpoint-decorator name="reply-bottom">
+ <gr-endpoint-param name="change"> </gr-endpoint-param>
+ <section class="attention">
+ <div class="attentionSummary">
+ <div>
+ <span> No changes to the attention set. </span>
+ <gr-tooltip-content
+ has-tooltip=""
+ title="Edit attention set changes"
+ >
+ <gr-button
+ aria-disabled="false"
+ class="edit-attention-button"
+ data-action-key="edit"
+ data-action-type="change"
+ data-label="Edit"
+ link=""
+ position-below=""
+ role="button"
+ tabindex="0"
+ >
+ <div>
+ <gr-icon icon="edit" filled small></gr-icon>
+ <span>Modify</span>
+ </div>
+ </gr-button>
+ </gr-tooltip-content>
+ </div>
+ <div>
+ <a
+ href="https://gerrit-review.googlesource.com/Documentation/user-attention-set.html"
+ target="_blank"
+ >
+ <gr-icon icon="help" title="read documentation"></gr-icon>
+ </a>
+ </div>
+ </div>
+ </section>
+ <gr-endpoint-slot name="above-actions"> </gr-endpoint-slot>
+ <section class="actions">
+ <div class="left"></div>
+ <div class="right">
<gr-button
aria-disabled="false"
- class="action send"
- id="sendButton"
- primary=""
+ class="action cancel"
+ id="cancelButton"
+ link=""
role="button"
tabindex="0"
>
- Send
+ Cancel
</gr-button>
- </gr-tooltip-content>
- </div>
- </section>
- </gr-endpoint-decorator>
+ <gr-tooltip-content has-tooltip="" title="Send reply">
+ <gr-button
+ aria-disabled="false"
+ class="action send"
+ id="sendButton"
+ primary=""
+ role="button"
+ tabindex="0"
+ >
+ Send
+ </gr-button>
+ </gr-tooltip-content>
+ </div>
+ </section>
+ </gr-endpoint-decorator>
+ </div>
</div>
- </div>
- `);
+ `
+ );
});
test('default to publishing draft comments with reply', async () => {
@@ -1975,22 +1979,14 @@
await element.updateComplete;
assert.equal(mutations.length, 5);
- expect(mutations[0]).to.deep.equal(
- mapReviewer(cc1, ReviewerState.REVIEWER)
- );
- expect(mutations[1]).to.deep.equal(
- mapReviewer(cc2, ReviewerState.REVIEWER)
- );
- expect(mutations[2]).to.deep.equal(
- mapReviewer(reviewer1, ReviewerState.CC)
- );
- expect(mutations[3]).to.deep.equal(
- mapReviewer(reviewer2, ReviewerState.CC)
- );
+ assert.deepEqual(mutations[0], mapReviewer(cc1, ReviewerState.REVIEWER));
+ assert.deepEqual(mutations[1], mapReviewer(cc2, ReviewerState.REVIEWER));
+ assert.deepEqual(mutations[2], mapReviewer(reviewer1, ReviewerState.CC));
+ assert.deepEqual(mutations[3], mapReviewer(reviewer2, ReviewerState.CC));
// Only 1 account was initially part of the change
- expect(mutations[4]).to.deep.equal({
- reviewer: 33,
+ assert.deepEqual(mutations[4], {
+ reviewer: 33 as UserId,
state: ReviewerState.REMOVED,
});
});
@@ -2033,9 +2029,9 @@
);
await element.send(false, false);
- expect(mutations).to.have.lengthOf(1);
+ assert.lengthOf(mutations, 1);
// Only 1 account was initially part of the change
- expect(mutations[0]).to.deep.equal({
+ assert.deepEqual(mutations[0], {
reviewer: reviewer1._account_id,
state: ReviewerState.CC,
});
@@ -2062,7 +2058,7 @@
});
await element.send(false, false);
- expect(mutations).to.have.lengthOf(0);
+ assert.lengthOf(mutations, 0);
});
test('emits cancel on esc key', async () => {
diff --git a/polygerrit-ui/app/elements/change/gr-reviewer-list/gr-reviewer-list_test.ts b/polygerrit-ui/app/elements/change/gr-reviewer-list/gr-reviewer-list_test.ts
index 9f8aada..8ddc4ee 100644
--- a/polygerrit-ui/app/elements/change/gr-reviewer-list/gr-reviewer-list_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-reviewer-list/gr-reviewer-list_test.ts
@@ -26,37 +26,40 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="container">
- <div>
- <div class="controlsContainer" hidden="">
- <gr-button
- aria-disabled="false"
- class="addReviewer"
- id="addReviewer"
- link=""
- role="button"
- tabindex="0"
- title="Add reviewer"
- >
- <div>
- <gr-icon icon="edit" filled small></gr-icon>
- </div>
- </gr-button>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="container">
+ <div>
+ <div class="controlsContainer" hidden="">
+ <gr-button
+ aria-disabled="false"
+ class="addReviewer"
+ id="addReviewer"
+ link=""
+ role="button"
+ tabindex="0"
+ title="Add reviewer"
+ >
+ <div>
+ <gr-icon icon="edit" filled small></gr-icon>
+ </div>
+ </gr-button>
+ </div>
</div>
+ <gr-button
+ aria-disabled="false"
+ class="hiddenReviewers"
+ hidden=""
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ and 0 more
+ </gr-button>
</div>
- <gr-button
- aria-disabled="false"
- class="hiddenReviewers"
- hidden=""
- link=""
- role="button"
- tabindex="0"
- >
- and 0 more
- </gr-button>
- </div>
- `);
+ `
+ );
});
test('controls hidden on immutable element', async () => {
diff --git a/polygerrit-ui/app/elements/change/gr-submit-requirement-dashboard-hovercard/gr-submit-requirement-dashboard-hovercard_test.ts b/polygerrit-ui/app/elements/change/gr-submit-requirement-dashboard-hovercard/gr-submit-requirement-dashboard-hovercard_test.ts
index ca78640..c0cf927 100644
--- a/polygerrit-ui/app/elements/change/gr-submit-requirement-dashboard-hovercard/gr-submit-requirement-dashboard-hovercard_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-submit-requirement-dashboard-hovercard/gr-submit-requirement-dashboard-hovercard_test.ts
@@ -22,15 +22,18 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div id="container" role="tooltip" tabindex="-1">
- <gr-submit-requirements
- disable-endpoints=""
- disable-hovercards=""
- suppress-title=""
- >
- </gr-submit-requirements>
- </div>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div id="container" role="tooltip" tabindex="-1">
+ <gr-submit-requirements
+ disable-endpoints=""
+ disable-hovercards=""
+ suppress-title=""
+ >
+ </gr-submit-requirements>
+ </div>
+ `
+ );
});
});
diff --git a/polygerrit-ui/app/elements/change/gr-submit-requirement-hovercard/gr-submit-requirement-hovercard_test.ts b/polygerrit-ui/app/elements/change/gr-submit-requirement-hovercard/gr-submit-requirement-hovercard_test.ts
index 1a44caa..3d57c6c 100644
--- a/polygerrit-ui/app/elements/change/gr-submit-requirement-hovercard/gr-submit-requirement-hovercard_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-submit-requirement-hovercard/gr-submit-requirement-hovercard_test.ts
@@ -36,109 +36,115 @@
});
test('renders', async () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div id="container" role="tooltip" tabindex="-1">
- <div class="section">
- <div class="sectionIcon">
- <gr-icon
- aria-label="satisfied"
- role="img"
- class="check_circle"
- filled
- icon="check_circle"
- >
- </gr-icon>
- </div>
- <div class="sectionContent">
- <h3 class="heading-3 name">
- <span> Verified </span>
- </h3>
- </div>
- </div>
- <div class="section">
- <div class="sectionIcon">
- <gr-icon class="small" icon="info"></gr-icon>
- </div>
- <div class="sectionContent">
- <div class="row">
- <div class="title">Status</div>
- <div>SATISFIED</div>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div id="container" role="tooltip" tabindex="-1">
+ <div class="section">
+ <div class="sectionIcon">
+ <gr-icon
+ aria-label="satisfied"
+ role="img"
+ class="check_circle"
+ filled
+ icon="check_circle"
+ >
+ </gr-icon>
+ </div>
+ <div class="sectionContent">
+ <h3 class="heading-3 name">
+ <span> Verified </span>
+ </h3>
</div>
</div>
+ <div class="section">
+ <div class="sectionIcon">
+ <gr-icon class="small" icon="info"></gr-icon>
+ </div>
+ <div class="sectionContent">
+ <div class="row">
+ <div class="title">Status</div>
+ <div>SATISFIED</div>
+ </div>
+ </div>
+ </div>
+ <div class="button">
+ <gr-button
+ aria-disabled="false"
+ id="toggleConditionsButton"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ View conditions
+ <gr-icon icon="expand_more"></gr-icon>
+ </gr-button>
+ </div>
</div>
- <div class="button">
- <gr-button
- aria-disabled="false"
- id="toggleConditionsButton"
- link=""
- role="button"
- tabindex="0"
- >
- View conditions
- <gr-icon icon="expand_more"></gr-icon>
- </gr-button>
- </div>
- </div>
- `);
+ `
+ );
});
test('renders conditions after click', async () => {
const button = queryAndAssert<GrButton>(element, '#toggleConditionsButton');
button.click();
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div id="container" role="tooltip" tabindex="-1">
- <div class="section">
- <div class="sectionIcon">
- <gr-icon
- aria-label="satisfied"
- role="img"
- class="check_circle"
- filled
- icon="check_circle"
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div id="container" role="tooltip" tabindex="-1">
+ <div class="section">
+ <div class="sectionIcon">
+ <gr-icon
+ aria-label="satisfied"
+ role="img"
+ class="check_circle"
+ filled
+ icon="check_circle"
+ >
+ </gr-icon>
+ </div>
+ <div class="sectionContent">
+ <h3 class="heading-3 name">
+ <span> Verified </span>
+ </h3>
+ </div>
+ </div>
+ <div class="section">
+ <div class="sectionIcon">
+ <gr-icon class="small" icon="info"></gr-icon>
+ </div>
+ <div class="sectionContent">
+ <div class="row">
+ <div class="title">Status</div>
+ <div>SATISFIED</div>
+ </div>
+ </div>
+ </div>
+ <div class="button">
+ <gr-button
+ aria-disabled="false"
+ id="toggleConditionsButton"
+ link=""
+ role="button"
+ tabindex="0"
>
- </gr-icon>
+ Hide conditions
+ <gr-icon icon="expand_less"></gr-icon>
+ </gr-button>
</div>
- <div class="sectionContent">
- <h3 class="heading-3 name">
- <span> Verified </span>
- </h3>
- </div>
- </div>
- <div class="section">
- <div class="sectionIcon">
- <gr-icon class="small" icon="info"></gr-icon>
- </div>
- <div class="sectionContent">
- <div class="row">
- <div class="title">Status</div>
- <div>SATISFIED</div>
+ <div class="section condition">
+ <div class="sectionContent">
+ Submit condition:
+ <br />
+ <span class="expression">
+ label:Verified=MAX -label:Verified=MIN
+ </span>
</div>
</div>
</div>
- <div class="button">
- <gr-button
- aria-disabled="false"
- id="toggleConditionsButton"
- link=""
- role="button"
- tabindex="0"
- >
- Hide conditions
- <gr-icon icon="expand_less"></gr-icon>
- </gr-button>
- </div>
- <div class="section condition">
- <div class="sectionContent">
- Submit condition:
- <br />
- <span class="expression">
- label:Verified=MAX -label:Verified=MIN
- </span>
- </div>
- </div>
- </div>
- `);
+ `
+ );
});
test('renders label', async () => {
@@ -168,65 +174,68 @@
.account=${createAccountWithId()}
></gr-submit-requirement-hovercard>`
);
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div id="container" role="tooltip" tabindex="-1">
- <div class="section">
- <div class="sectionIcon">
- <gr-icon
- aria-label="satisfied"
- role="img"
- class="check_circle"
- filled
- icon="check_circle"
- ></gr-icon>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div id="container" role="tooltip" tabindex="-1">
+ <div class="section">
+ <div class="sectionIcon">
+ <gr-icon
+ aria-label="satisfied"
+ role="img"
+ class="check_circle"
+ filled
+ icon="check_circle"
+ ></gr-icon>
+ </div>
+ <div class="sectionContent">
+ <h3 class="heading-3 name">
+ <span> Verified </span>
+ </h3>
+ </div>
</div>
- <div class="sectionContent">
- <h3 class="heading-3 name">
- <span> Verified </span>
- </h3>
+ <div class="section">
+ <div class="sectionIcon">
+ <gr-icon class="small" icon="info"></gr-icon>
+ </div>
+ <div class="sectionContent">
+ <div class="row">
+ <div class="title">Status</div>
+ <div>SATISFIED</div>
+ </div>
+ </div>
</div>
- </div>
- <div class="section">
- <div class="sectionIcon">
- <gr-icon class="small" icon="info"></gr-icon>
- </div>
- <div class="sectionContent">
+ <div class="section">
+ <div class="sectionIcon"></div>
<div class="row">
- <div class="title">Status</div>
- <div>SATISFIED</div>
+ <div>
+ <gr-label-info> </gr-label-info>
+ </div>
</div>
</div>
- </div>
- <div class="section">
- <div class="sectionIcon"></div>
- <div class="row">
- <div>
- <gr-label-info> </gr-label-info>
+ <div class="section description">
+ <div class="sectionIcon">
+ <gr-icon icon="description"></gr-icon>
+ </div>
+ <div class="sectionContent">
+ <gr-formatted-text notrailingmargin=""></gr-formatted-text>
</div>
</div>
- </div>
- <div class="section description">
- <div class="sectionIcon">
- <gr-icon icon="description"></gr-icon>
- </div>
- <div class="sectionContent">
- <gr-formatted-text notrailingmargin=""></gr-formatted-text>
+ <div class="button">
+ <gr-button
+ aria-disabled="false"
+ id="toggleConditionsButton"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ View conditions
+ <gr-icon icon="expand_more"></gr-icon>
+ </gr-button>
</div>
</div>
- <div class="button">
- <gr-button
- aria-disabled="false"
- id="toggleConditionsButton"
- link=""
- role="button"
- tabindex="0"
- >
- View conditions
- <gr-icon icon="expand_more"></gr-icon>
- </gr-button>
- </div>
- </div>
- `);
+ `
+ );
});
suite('quick approve label', () => {
@@ -264,13 +273,16 @@
></gr-submit-requirement-hovercard>`
);
const quickApprove = queryAndAssert(element, '.quickApprove');
- expect(quickApprove).dom.to.equal(/* HTML */ `
- <div class="button quickApprove">
- <gr-button aria-disabled="false" link="" role="button" tabindex="0">
- Vote Verified +2
- </gr-button>
- </div>
- `);
+ assert.dom.equal(
+ quickApprove,
+ /* HTML */ `
+ <div class="button quickApprove">
+ <gr-button aria-disabled="false" link="" role="button" tabindex="0">
+ Vote Verified +2
+ </gr-button>
+ </div>
+ `
+ );
});
test("doesn't render when already voted max vote", async () => {
@@ -342,13 +354,16 @@
></gr-submit-requirement-hovercard>`
);
const quickApprove = queryAndAssert(element, '.quickApprove');
- expect(quickApprove).dom.to.equal(/* HTML */ `
- <div class="button quickApprove">
- <gr-button aria-disabled="false" link="" role="button" tabindex="0"
- >Override (Build-Cop)
- </gr-button>
- </div>
- `);
+ assert.dom.equal(
+ quickApprove,
+ /* HTML */ `
+ <div class="button quickApprove">
+ <gr-button aria-disabled="false" link="" role="button" tabindex="0"
+ >Override (Build-Cop)
+ </gr-button>
+ </div>
+ `
+ );
});
});
});
diff --git a/polygerrit-ui/app/elements/change/gr-submit-requirements/gr-submit-requirements_test.ts b/polygerrit-ui/app/elements/change/gr-submit-requirements/gr-submit-requirements_test.ts
index f380159..50eeb6f 100644
--- a/polygerrit-ui/app/elements/change/gr-submit-requirements/gr-submit-requirements_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-submit-requirements/gr-submit-requirements_test.ts
@@ -63,49 +63,55 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <h3 class="heading-3 metadata-title" id="submit-requirements-caption">
- Submit Requirements
- </h3>
- <table aria-labelledby="submit-requirements-caption" class="requirements">
- <thead hidden="">
- <tr>
- <th>Status</th>
- <th>Name</th>
- <th>Votes</th>
- </tr>
- </thead>
- <tbody>
- <tr id="requirement-0-Verified" role="button" tabindex="0">
- <td>
- <gr-icon
- aria-label="satisfied"
- role="img"
- class="check_circle"
- filled
- icon="check_circle"
- >
- </gr-icon>
- </td>
- <td class="name">
- <gr-limited-text class="name"></gr-limited-text>
- </td>
- <td>
- <gr-endpoint-decorator
- class="votes-cell"
- name="submit-requirement-verified"
- >
- <gr-endpoint-param name="change"></gr-endpoint-param>
- <gr-endpoint-param name="requirement"></gr-endpoint-param>
- <gr-vote-chip></gr-vote-chip>
- </gr-endpoint-decorator>
- </td>
- </tr>
- </tbody>
- </table>
- <gr-submit-requirement-hovercard for="requirement-0-Verified">
- </gr-submit-requirement-hovercard>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <h3 class="heading-3 metadata-title" id="submit-requirements-caption">
+ Submit Requirements
+ </h3>
+ <table
+ aria-labelledby="submit-requirements-caption"
+ class="requirements"
+ >
+ <thead hidden="">
+ <tr>
+ <th>Status</th>
+ <th>Name</th>
+ <th>Votes</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr id="requirement-0-Verified" role="button" tabindex="0">
+ <td>
+ <gr-icon
+ aria-label="satisfied"
+ role="img"
+ class="check_circle"
+ filled
+ icon="check_circle"
+ >
+ </gr-icon>
+ </td>
+ <td class="name">
+ <gr-limited-text class="name"></gr-limited-text>
+ </td>
+ <td>
+ <gr-endpoint-decorator
+ class="votes-cell"
+ name="submit-requirement-verified"
+ >
+ <gr-endpoint-param name="change"></gr-endpoint-param>
+ <gr-endpoint-param name="requirement"></gr-endpoint-param>
+ <gr-vote-chip></gr-vote-chip>
+ </gr-endpoint-decorator>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <gr-submit-requirement-hovercard for="requirement-0-Verified">
+ </gr-submit-requirement-hovercard>
+ `
+ );
});
suite('votes-cell', () => {
@@ -115,11 +121,14 @@
});
test('with vote', () => {
const votesCell = element.shadowRoot?.querySelectorAll('.votes-cell');
- expect(votesCell?.[0]).dom.equal(/* HTML */ `
- <div class="votes-cell">
- <gr-vote-chip> </gr-vote-chip>
- </div>
- `);
+ assert.dom.equal(
+ votesCell?.[0],
+ /* HTML */ `
+ <div class="votes-cell">
+ <gr-vote-chip> </gr-vote-chip>
+ </div>
+ `
+ );
});
test('no votes', async () => {
@@ -132,9 +141,10 @@
element.change = modifiedChange;
await element.updateComplete;
const votesCell = element.shadowRoot?.querySelectorAll('.votes-cell');
- expect(votesCell?.[0]).dom.equal(/* HTML */ `
- <div class="votes-cell">No votes</div>
- `);
+ assert.dom.equal(
+ votesCell?.[0],
+ /* HTML */ ' <div class="votes-cell">No votes</div> '
+ );
});
test('without label to vote on', async () => {
@@ -144,9 +154,10 @@
element.change = modifiedChange;
await element.updateComplete;
const votesCell = element.shadowRoot?.querySelectorAll('.votes-cell');
- expect(votesCell?.[0]).dom.equal(/* HTML */ `
- <div class="votes-cell">Satisfied</div>
- `);
+ assert.dom.equal(
+ votesCell?.[0],
+ /* HTML */ ' <div class="votes-cell">Satisfied</div> '
+ );
});
test('checks', async () => {
@@ -159,12 +170,15 @@
];
await element.updateComplete;
const votesCell = element.shadowRoot?.querySelectorAll('.votes-cell');
- expect(votesCell?.[0]).dom.equal(/* HTML */ `
- <div class="votes-cell">
- <gr-vote-chip></gr-vote-chip>
- <gr-checks-chip></gr-checks-chip>
- </div>
- `);
+ assert.dom.equal(
+ votesCell?.[0],
+ /* HTML */ `
+ <div class="votes-cell">
+ <gr-vote-chip></gr-vote-chip>
+ <gr-checks-chip></gr-checks-chip>
+ </div>
+ `
+ );
});
test('running checks', async () => {
@@ -178,12 +192,15 @@
];
await element.updateComplete;
const votesCell = element.shadowRoot?.querySelectorAll('.votes-cell');
- expect(votesCell?.[0]).dom.equal(/* HTML */ `
- <div class="votes-cell">
- <gr-vote-chip></gr-vote-chip>
- <gr-checks-chip></gr-checks-chip>
- </div>
- `);
+ assert.dom.equal(
+ votesCell?.[0],
+ /* HTML */ `
+ <div class="votes-cell">
+ <gr-vote-chip></gr-vote-chip>
+ <gr-checks-chip></gr-checks-chip>
+ </div>
+ `
+ );
});
test('with override label', async () => {
@@ -211,10 +228,13 @@
element.change = modifiedChange;
await element.updateComplete;
const votesCell = element.shadowRoot?.querySelectorAll('.votes-cell');
- expect(votesCell?.[0]).dom.equal(/* HTML */ `<div class="votes-cell">
- <gr-vote-chip> </gr-vote-chip>
- <span class="overrideLabel"> Override </span>
- </div>`);
+ assert.dom.equal(
+ votesCell?.[0],
+ /* HTML */ `<div class="votes-cell">
+ <gr-vote-chip> </gr-vote-chip>
+ <span class="overrideLabel"> Override </span>
+ </div>`
+ );
});
test('with override with 2 labels', async () => {
@@ -251,13 +271,16 @@
element.change = modifiedChange;
await element.updateComplete;
const votesCell = element.shadowRoot?.querySelectorAll('.votes-cell');
- expect(votesCell?.[0]).dom.equal(/* HTML */ `<div class="votes-cell">
- <gr-vote-chip> </gr-vote-chip>
- <span class="overrideLabel"> Override </span>
- <span class="separator"></span>
- <gr-vote-chip> </gr-vote-chip>
- <span class="overrideLabel"> Override2 </span>
- </div>`);
+ assert.dom.equal(
+ votesCell?.[0],
+ /* HTML */ `<div class="votes-cell">
+ <gr-vote-chip> </gr-vote-chip>
+ <span class="overrideLabel"> Override </span>
+ <span class="separator"></span>
+ <gr-vote-chip> </gr-vote-chip>
+ <span class="overrideLabel"> Override2 </span>
+ </div>`
+ );
});
});
diff --git a/polygerrit-ui/app/elements/change/gr-thread-list/gr-thread-list_test.ts b/polygerrit-ui/app/elements/change/gr-thread-list/gr-thread-list_test.ts
index 29ed322..e3cc88a 100644
--- a/polygerrit-ui/app/elements/change/gr-thread-list/gr-thread-list_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-thread-list/gr-thread-list_test.ts
@@ -306,83 +306,89 @@
test('renders', async () => {
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="header">
- <span class="sort-text">Sort By:</span>
- <gr-dropdown-list id="sortDropdown"></gr-dropdown-list>
- <span class="separator"></span>
- <span class="filter-text">Filter By:</span>
- <gr-dropdown-list id="filterDropdown"></gr-dropdown-list>
- <span class="author-text">From:</span>
- <gr-account-label
- deselected=""
- selectionchipstyle=""
- nostatusicons=""
- ></gr-account-label>
- <gr-account-label
- deselected=""
- selectionchipstyle=""
- nostatusicons=""
- ></gr-account-label>
- <gr-account-label
- deselected=""
- selectionchipstyle=""
- nostatusicons=""
- ></gr-account-label>
- <gr-account-label
- deselected=""
- selectionchipstyle=""
- nostatusicons=""
- ></gr-account-label>
- <gr-account-label
- deselected=""
- selectionchipstyle=""
- nostatusicons=""
- ></gr-account-label>
- </div>
- <div id="threads" part="threads">
- <gr-comment-thread
- show-file-name=""
- show-file-path=""
- ></gr-comment-thread>
- <gr-comment-thread show-file-path=""></gr-comment-thread>
- <div class="thread-separator"></div>
- <gr-comment-thread
- show-file-name=""
- show-file-path=""
- ></gr-comment-thread>
- <gr-comment-thread show-file-path=""></gr-comment-thread>
- <div class="thread-separator"></div>
- <gr-comment-thread
- has-draft=""
- show-file-name=""
- show-file-path=""
- ></gr-comment-thread>
- <gr-comment-thread show-file-path=""></gr-comment-thread>
- <gr-comment-thread show-file-path=""></gr-comment-thread>
- <div class="thread-separator"></div>
- <gr-comment-thread
- show-file-name=""
- show-file-path=""
- ></gr-comment-thread>
- <div class="thread-separator"></div>
- <gr-comment-thread
- has-draft=""
- show-file-name=""
- show-file-path=""
- ></gr-comment-thread>
- </div>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="header">
+ <span class="sort-text">Sort By:</span>
+ <gr-dropdown-list id="sortDropdown"></gr-dropdown-list>
+ <span class="separator"></span>
+ <span class="filter-text">Filter By:</span>
+ <gr-dropdown-list id="filterDropdown"></gr-dropdown-list>
+ <span class="author-text">From:</span>
+ <gr-account-label
+ deselected=""
+ selectionchipstyle=""
+ nostatusicons=""
+ ></gr-account-label>
+ <gr-account-label
+ deselected=""
+ selectionchipstyle=""
+ nostatusicons=""
+ ></gr-account-label>
+ <gr-account-label
+ deselected=""
+ selectionchipstyle=""
+ nostatusicons=""
+ ></gr-account-label>
+ <gr-account-label
+ deselected=""
+ selectionchipstyle=""
+ nostatusicons=""
+ ></gr-account-label>
+ <gr-account-label
+ deselected=""
+ selectionchipstyle=""
+ nostatusicons=""
+ ></gr-account-label>
+ </div>
+ <div id="threads" part="threads">
+ <gr-comment-thread
+ show-file-name=""
+ show-file-path=""
+ ></gr-comment-thread>
+ <gr-comment-thread show-file-path=""></gr-comment-thread>
+ <div class="thread-separator"></div>
+ <gr-comment-thread
+ show-file-name=""
+ show-file-path=""
+ ></gr-comment-thread>
+ <gr-comment-thread show-file-path=""></gr-comment-thread>
+ <div class="thread-separator"></div>
+ <gr-comment-thread
+ has-draft=""
+ show-file-name=""
+ show-file-path=""
+ ></gr-comment-thread>
+ <gr-comment-thread show-file-path=""></gr-comment-thread>
+ <gr-comment-thread show-file-path=""></gr-comment-thread>
+ <div class="thread-separator"></div>
+ <gr-comment-thread
+ show-file-name=""
+ show-file-path=""
+ ></gr-comment-thread>
+ <div class="thread-separator"></div>
+ <gr-comment-thread
+ has-draft=""
+ show-file-name=""
+ show-file-path=""
+ ></gr-comment-thread>
+ </div>
+ `
+ );
});
test('renders empty', async () => {
element.threads = [];
await element.updateComplete;
- expect(queryAndAssert(element, 'div#threads')).dom.to.equal(/* HTML */ `
- <div id="threads" part="threads">
- <div><span>No comments</span></div>
- </div>
- `);
+ assert.dom.equal(
+ queryAndAssert(element, 'div#threads'),
+ /* HTML */ `
+ <div id="threads" part="threads">
+ <div><span>No comments</span></div>
+ </div>
+ `
+ );
});
test('tapping single author chips', async () => {
diff --git a/polygerrit-ui/app/elements/change/gr-trigger-vote-hovercard/gr-trigger-vote-hovercard_test.ts b/polygerrit-ui/app/elements/change/gr-trigger-vote-hovercard/gr-trigger-vote-hovercard_test.ts
index 8a67ea3..a1c4a36 100644
--- a/polygerrit-ui/app/elements/change/gr-trigger-vote-hovercard/gr-trigger-vote-hovercard_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-trigger-vote-hovercard/gr-trigger-vote-hovercard_test.ts
@@ -22,29 +22,32 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div id="container" role="tooltip" tabindex="-1">
- <div class="section">
- <div class="sectionContent">
- <h3 class="heading-3 name">
- <span> Foo </span>
- </h3>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div id="container" role="tooltip" tabindex="-1">
+ <div class="section">
+ <div class="sectionContent">
+ <h3 class="heading-3 name">
+ <span> Foo </span>
+ </h3>
+ </div>
</div>
- </div>
- <div class="section">
- <div class="sectionIcon">
- <gr-icon icon="info" class=" small"></gr-icon>
- </div>
- <div class="sectionContent">
- <div class="row">
- <div class="title">Status</div>
- <div>
- <slot name="label-info"> </slot>
+ <div class="section">
+ <div class="sectionIcon">
+ <gr-icon icon="info" class=" small"></gr-icon>
+ </div>
+ <div class="sectionContent">
+ <div class="row">
+ <div class="title">Status</div>
+ <div>
+ <slot name="label-info"> </slot>
+ </div>
</div>
</div>
</div>
</div>
- </div>
- `);
+ `
+ );
});
});
diff --git a/polygerrit-ui/app/elements/change/gr-trigger-vote/gr-trigger-vote_test.ts b/polygerrit-ui/app/elements/change/gr-trigger-vote/gr-trigger-vote_test.ts
index c9862b4..10e8f86 100644
--- a/polygerrit-ui/app/elements/change/gr-trigger-vote/gr-trigger-vote_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-trigger-vote/gr-trigger-vote_test.ts
@@ -61,12 +61,15 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ ` <div class="container">
- <gr-trigger-vote-hovercard>
- <gr-label-info slot="label-info"></gr-label-info>
- </gr-trigger-vote-hovercard>
- <span class="label"> Verified </span>
- <gr-vote-chip> </gr-vote-chip>
- </div>`);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ ` <div class="container">
+ <gr-trigger-vote-hovercard>
+ <gr-label-info slot="label-info"></gr-label-info>
+ </gr-trigger-vote-hovercard>
+ <span class="label"> Verified </span>
+ <gr-vote-chip> </gr-vote-chip>
+ </div>`
+ );
});
});
diff --git a/polygerrit-ui/app/elements/checks/gr-checks-results_test.ts b/polygerrit-ui/app/elements/checks/gr-checks-results_test.ts
index d47df32..558b376 100644
--- a/polygerrit-ui/app/elements/checks/gr-checks-results_test.ts
+++ b/polygerrit-ui/app/elements/checks/gr-checks-results_test.ts
@@ -39,24 +39,29 @@
element.latestPatchNum = 1 as PatchSetNumber;
await element.updateComplete;
labelDiv = queryAndAssert(element, '.label');
- expect(labelDiv).dom.to.equal(/* HTML */ `
- <div class="approved label">
- <span> test-label +1 </span>
- <paper-tooltip
- fittovisiblebounds=""
- offset="5"
- role="tooltip"
- tabindex="-1"
- >
- The check result has (probably) influenced this label vote.
- </paper-tooltip>
- </div>
- `);
+ assert.dom.equal(
+ labelDiv,
+ /* HTML */ `
+ <div class="approved label">
+ <span> test-label +1 </span>
+ <paper-tooltip
+ fittovisiblebounds=""
+ offset="5"
+ role="tooltip"
+ tabindex="-1"
+ >
+ The check result has (probably) influenced this label vote.
+ </paper-tooltip>
+ </div>
+ `
+ );
});
test('renders', async () => {
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
<div class="flex">
<gr-hovercard-run> </gr-hovercard-run>
<div class="name" role="button" tabindex="0">
@@ -118,7 +123,8 @@
<gr-icon icon="expand_more"></gr-icon>
</div>
</div>
- `);
+ `
+ );
});
});
@@ -135,7 +141,8 @@
test('renders', async () => {
await element.updateComplete;
- expect(element).shadowDom.to.equal(
+ assert.shadowDom.equal(
+ element,
/* HTML */ `
<div class="header">
<div class="headerTopRow">
diff --git a/polygerrit-ui/app/elements/checks/gr-checks-runs_test.ts b/polygerrit-ui/app/elements/checks/gr-checks-runs_test.ts
index ba14e65..e062b21 100644
--- a/polygerrit-ui/app/elements/checks/gr-checks-runs_test.ts
+++ b/polygerrit-ui/app/elements/checks/gr-checks-runs_test.ts
@@ -32,7 +32,8 @@
test('renders', async () => {
await element.updateComplete;
assert.equal(element.runs.length, 44);
- expect(element).shadowDom.to.equal(
+ assert.shadowDom.equal(
+ element,
/* HTML */ `
<h2 class="title">
<div class="heading-2">Runs</div>
@@ -95,7 +96,8 @@
element.collapsed = true;
await element.updateComplete;
assert.equal(element.runs.length, 44);
- expect(element).shadowDom.to.equal(
+ assert.shadowDom.equal(
+ element,
/* HTML */ `
<h2 class="title">
<div class="heading-2">Runs</div>
diff --git a/polygerrit-ui/app/elements/checks/gr-checks-tab_test.ts b/polygerrit-ui/app/elements/checks/gr-checks-tab_test.ts
index 8b2c916..fb1cc97 100644
--- a/polygerrit-ui/app/elements/checks/gr-checks-tab_test.ts
+++ b/polygerrit-ui/app/elements/checks/gr-checks-tab_test.ts
@@ -25,12 +25,15 @@
test('renders', async () => {
await element.updateComplete;
assert.equal(element.runs.length, 44);
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="container">
- <gr-checks-runs class="runs" collapsed=""> </gr-checks-runs>
- <gr-checks-results class="results"> </gr-checks-results>
- </div>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="container">
+ <gr-checks-runs class="runs" collapsed=""> </gr-checks-runs>
+ <gr-checks-results class="results"> </gr-checks-results>
+ </div>
+ `
+ );
});
test('select from tab state', async () => {
diff --git a/polygerrit-ui/app/elements/checks/gr-diff-check-result_test.ts b/polygerrit-ui/app/elements/checks/gr-diff-check-result_test.ts
index e863f14..994f42e 100644
--- a/polygerrit-ui/app/elements/checks/gr-diff-check-result_test.ts
+++ b/polygerrit-ui/app/elements/checks/gr-diff-check-result_test.ts
@@ -26,7 +26,9 @@
element.result = {...fakeRun1, ...fakeRun1.results?.[0]} as RunResult;
await element.updateComplete;
// cannot use /* HTML */ because formatted long message will not match.
- expect(element).shadowDom.to.equal(`
+ assert.shadowDom.equal(
+ element,
+ `
<div class="container font-normal warning">
<div class="header">
<div class="icon">
@@ -44,6 +46,7 @@
</div>
<div class="details"></div>
</div>
- `);
+ `
+ );
});
});
diff --git a/polygerrit-ui/app/elements/checks/gr-hovercard-run_test.ts b/polygerrit-ui/app/elements/checks/gr-hovercard-run_test.ts
index 4a9f69d..d8acc01 100644
--- a/polygerrit-ui/app/elements/checks/gr-hovercard-run_test.ts
+++ b/polygerrit-ui/app/elements/checks/gr-hovercard-run_test.ts
@@ -23,30 +23,33 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div id="container" role="tooltip" tabindex="-1">
- <div class="section">
- <div class="chipRow">
- <div class="chip">
- <gr-icon icon="check"></gr-icon>
- <span> COMPLETED </span>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div id="container" role="tooltip" tabindex="-1">
+ <div class="section">
+ <div class="chipRow">
+ <div class="chip">
+ <gr-icon icon="check"></gr-icon>
+ <span> COMPLETED </span>
+ </div>
+ </div>
+ </div>
+ <div class="section">
+ <div class="sectionIcon">
+ <gr-icon icon="error" filled class="error"></gr-icon>
+ </div>
+ <div class="sectionContent">
+ <h3 class="heading-3 name">
+ <span>
+ FAKE Error Finder Finder Finder Finder Finder Finder Finder
+ </span>
+ </h3>
</div>
</div>
</div>
- <div class="section">
- <div class="sectionIcon">
- <gr-icon icon="error" filled class="error"></gr-icon>
- </div>
- <div class="sectionContent">
- <h3 class="heading-3 name">
- <span>
- FAKE Error Finder Finder Finder Finder Finder Finder Finder
- </span>
- </h3>
- </div>
- </div>
- </div>
- `);
+ `
+ );
});
test('hovercard is shown with error icon', () => {
diff --git a/polygerrit-ui/app/elements/core/gr-account-dropdown/gr-account-dropdown_test.ts b/polygerrit-ui/app/elements/core/gr-account-dropdown/gr-account-dropdown_test.ts
index b9d621d..199337c 100644
--- a/polygerrit-ui/app/elements/core/gr-account-dropdown/gr-account-dropdown_test.ts
+++ b/polygerrit-ui/app/elements/core/gr-account-dropdown/gr-account-dropdown_test.ts
@@ -21,12 +21,15 @@
element.account = {name: 'John Doe', email: 'john@doe.com'} as AccountInfo;
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-dropdown link="">
- <span>John Doe</span>
- <gr-avatar aria-label="Account avatar" hidden=""> </gr-avatar>
- </gr-dropdown>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-dropdown link="">
+ <span>John Doe</span>
+ <gr-avatar aria-label="Account avatar" hidden=""> </gr-avatar>
+ </gr-dropdown>
+ `
+ );
});
test('account information', () => {
diff --git a/polygerrit-ui/app/elements/core/gr-error-dialog/gr-error-dialog_test.ts b/polygerrit-ui/app/elements/core/gr-error-dialog/gr-error-dialog_test.ts
index 19db752..d0a17c6 100644
--- a/polygerrit-ui/app/elements/core/gr-error-dialog/gr-error-dialog_test.ts
+++ b/polygerrit-ui/app/elements/core/gr-error-dialog/gr-error-dialog_test.ts
@@ -19,18 +19,21 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-dialog
- cancel-label=""
- confirm-label="Dismiss"
- confirm-on-enter=""
- id="dialog"
- role="dialog"
- >
- <div class="header" slot="header">An error occurred</div>
- <div class="main" slot="main"></div>
- </gr-dialog>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-dialog
+ cancel-label=""
+ confirm-label="Dismiss"
+ confirm-on-enter=""
+ id="dialog"
+ role="dialog"
+ >
+ <div class="header" slot="header">An error occurred</div>
+ <div class="main" slot="main"></div>
+ </gr-dialog>
+ `
+ );
});
test('dismiss tap fires event', async () => {
diff --git a/polygerrit-ui/app/elements/core/gr-error-manager/gr-error-manager_test.ts b/polygerrit-ui/app/elements/core/gr-error-manager/gr-error-manager_test.ts
index a4f1893..613d926 100644
--- a/polygerrit-ui/app/elements/core/gr-error-manager/gr-error-manager_test.ts
+++ b/polygerrit-ui/app/elements/core/gr-error-manager/gr-error-manager_test.ts
@@ -57,28 +57,31 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-overlay
- aria-hidden="true"
- id="errorOverlay"
- style="outline: none; display: none;"
- tabindex="-1"
- with-backdrop=""
- >
- <gr-error-dialog id="errorDialog"> </gr-error-dialog>
- </gr-overlay>
- <gr-overlay
- always-on-top=""
- aria-hidden="true"
- id="noInteractionOverlay"
- no-cancel-on-esc-key=""
- no-cancel-on-outside-click=""
- style="outline: none; display: none;"
- tabindex="-1"
- with-backdrop=""
- >
- </gr-overlay>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-overlay
+ aria-hidden="true"
+ id="errorOverlay"
+ style="outline: none; display: none;"
+ tabindex="-1"
+ with-backdrop=""
+ >
+ <gr-error-dialog id="errorDialog"> </gr-error-dialog>
+ </gr-overlay>
+ <gr-overlay
+ always-on-top=""
+ aria-hidden="true"
+ id="noInteractionOverlay"
+ no-cancel-on-esc-key=""
+ no-cancel-on-outside-click=""
+ style="outline: none; display: none;"
+ tabindex="-1"
+ with-backdrop=""
+ >
+ </gr-overlay>
+ `
+ );
});
test('does not show auth error on 403 by default', async () => {
diff --git a/polygerrit-ui/app/elements/core/gr-key-binding-display/gr-key-binding-display_test.ts b/polygerrit-ui/app/elements/core/gr-key-binding-display/gr-key-binding-display_test.ts
index 5d12c72..e1e6156 100644
--- a/polygerrit-ui/app/elements/core/gr-key-binding-display/gr-key-binding-display_test.ts
+++ b/polygerrit-ui/app/elements/core/gr-key-binding-display/gr-key-binding-display_test.ts
@@ -24,16 +24,19 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <span class="key"> x </span>
- or
- <span class="key modifier"> Ctrl </span>
- <span class="key"> x </span>
- or
- <span class="key modifier"> Shift </span>
- <span class="key modifier"> Meta </span>
- <span class="key"> x </span>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <span class="key"> x </span>
+ or
+ <span class="key modifier"> Ctrl </span>
+ <span class="key"> x </span>
+ or
+ <span class="key modifier"> Shift </span>
+ <span class="key modifier"> Meta </span>
+ <span class="key"> x </span>
+ `
+ );
});
suite('_computeKey', () => {
diff --git a/polygerrit-ui/app/elements/core/gr-keyboard-shortcuts-dialog/gr-keyboard-shortcuts-dialog_test.ts b/polygerrit-ui/app/elements/core/gr-keyboard-shortcuts-dialog/gr-keyboard-shortcuts-dialog_test.ts
index bed46ef..ad760b3 100644
--- a/polygerrit-ui/app/elements/core/gr-keyboard-shortcuts-dialog/gr-keyboard-shortcuts-dialog_test.ts
+++ b/polygerrit-ui/app/elements/core/gr-keyboard-shortcuts-dialog/gr-keyboard-shortcuts-dialog_test.ts
@@ -44,67 +44,70 @@
update(directory);
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <header>
- <h3 class="heading-2">Keyboard shortcuts</h3>
- <gr-button aria-disabled="false" link="" role="button" tabindex="0">
- Close
- </gr-button>
- </header>
- <main>
- <div class="column">
- <table>
- <caption class="heading-3">
- Navigation
- </caption>
- <thead>
- <tr>
- <th>
- <strong> Action </strong>
- </th>
- <th>
- <strong> Key </strong>
- </th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>navigation shortcuts</td>
- <td>
- <gr-key-binding-display> </gr-key-binding-display>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="column">
- <table>
- <caption class="heading-3">
- Actions
- </caption>
- <thead>
- <tr>
- <th>
- <strong> Action </strong>
- </th>
- <th>
- <strong> Key </strong>
- </th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>navigation shortcuts</td>
- <td>
- <gr-key-binding-display> </gr-key-binding-display>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </main>
- <footer></footer>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <header>
+ <h3 class="heading-2">Keyboard shortcuts</h3>
+ <gr-button aria-disabled="false" link="" role="button" tabindex="0">
+ Close
+ </gr-button>
+ </header>
+ <main>
+ <div class="column">
+ <table>
+ <caption class="heading-3">
+ Navigation
+ </caption>
+ <thead>
+ <tr>
+ <th>
+ <strong> Action </strong>
+ </th>
+ <th>
+ <strong> Key </strong>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>navigation shortcuts</td>
+ <td>
+ <gr-key-binding-display> </gr-key-binding-display>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div class="column">
+ <table>
+ <caption class="heading-3">
+ Actions
+ </caption>
+ <thead>
+ <tr>
+ <th>
+ <strong> Action </strong>
+ </th>
+ <th>
+ <strong> Key </strong>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>navigation shortcuts</td>
+ <td>
+ <gr-key-binding-display> </gr-key-binding-display>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </main>
+ <footer></footer>
+ `
+ );
});
suite('left and right contents', () => {
diff --git a/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header_test.ts b/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header_test.ts
index 4f47f7a..f66fd9b 100644
--- a/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header_test.ts
+++ b/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header_test.ts
@@ -29,62 +29,68 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <nav>
- <a class="bigTitle" href="//localhost:9876/">
- <gr-endpoint-decorator name="header-title">
- <span class="titleText"> </span>
- </gr-endpoint-decorator>
- </a>
- <ul class="links">
- <li>
- <gr-dropdown down-arrow="" horizontal-align="left" link="">
- <span class="linksTitle" id="Changes"> Changes </span>
- </gr-dropdown>
- </li>
- <li>
- <gr-dropdown down-arrow="" horizontal-align="left" link="">
- <span class="linksTitle" id="Browse"> Browse </span>
- </gr-dropdown>
- </li>
- </ul>
- <div class="rightItems">
- <gr-endpoint-decorator
- class="hideOnMobile"
- name="header-small-banner"
- >
- </gr-endpoint-decorator>
- <gr-smart-search id="search" label="Search for changes">
- </gr-smart-search>
- <gr-endpoint-decorator
- class="hideOnMobile"
- name="header-browse-source"
- >
- </gr-endpoint-decorator>
- <gr-endpoint-decorator class="feedbackButton" name="header-feedback">
- </gr-endpoint-decorator>
- </div>
- <div class="accountContainer" id="accountContainer">
- <gr-icon
- aria-label="Hide Searchbar"
- icon="search"
- id="mobileSearch"
- role="button"
- >
- </gr-icon>
- <a class="loginButton" href="/login"> Sign in </a>
- <a
- aria-label="Settings"
- class="settingsButton"
- href="/settings/"
- role="button"
- title="Settings"
- >
- <gr-icon icon="settings" filled></gr-icon>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <nav>
+ <a class="bigTitle" href="//localhost:9876/">
+ <gr-endpoint-decorator name="header-title">
+ <span class="titleText"> </span>
+ </gr-endpoint-decorator>
</a>
- </div>
- </nav>
- `);
+ <ul class="links">
+ <li>
+ <gr-dropdown down-arrow="" horizontal-align="left" link="">
+ <span class="linksTitle" id="Changes"> Changes </span>
+ </gr-dropdown>
+ </li>
+ <li>
+ <gr-dropdown down-arrow="" horizontal-align="left" link="">
+ <span class="linksTitle" id="Browse"> Browse </span>
+ </gr-dropdown>
+ </li>
+ </ul>
+ <div class="rightItems">
+ <gr-endpoint-decorator
+ class="hideOnMobile"
+ name="header-small-banner"
+ >
+ </gr-endpoint-decorator>
+ <gr-smart-search id="search" label="Search for changes">
+ </gr-smart-search>
+ <gr-endpoint-decorator
+ class="hideOnMobile"
+ name="header-browse-source"
+ >
+ </gr-endpoint-decorator>
+ <gr-endpoint-decorator
+ class="feedbackButton"
+ name="header-feedback"
+ >
+ </gr-endpoint-decorator>
+ </div>
+ <div class="accountContainer" id="accountContainer">
+ <gr-icon
+ aria-label="Hide Searchbar"
+ icon="search"
+ id="mobileSearch"
+ role="button"
+ >
+ </gr-icon>
+ <a class="loginButton" href="/login"> Sign in </a>
+ <a
+ aria-label="Settings"
+ class="settingsButton"
+ href="/settings/"
+ role="button"
+ title="Settings"
+ >
+ <gr-icon icon="settings" filled></gr-icon>
+ </a>
+ </div>
+ </nav>
+ `
+ );
});
test('link visibility', async () => {
diff --git a/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar_test.ts b/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar_test.ts
index cef4081..2b1f3d1 100644
--- a/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar_test.ts
+++ b/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar_test.ts
@@ -29,27 +29,30 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <form>
- <gr-autocomplete
- allow-non-suggested-values=""
- id="searchInput"
- multi=""
- show-search-icon=""
- tab-complete=""
- >
- <a
- class="help"
- href="https://gerrit-review.googlesource.com/documentation/user-search.html"
- slot="suffix"
- tabindex="-1"
- target="_blank"
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <form>
+ <gr-autocomplete
+ allow-non-suggested-values=""
+ id="searchInput"
+ multi=""
+ show-search-icon=""
+ tab-complete=""
>
- <gr-icon icon="help" title="read documentation"></gr-icon>
- </a>
- </gr-autocomplete>
- </form>
- `);
+ <a
+ class="help"
+ href="https://gerrit-review.googlesource.com/documentation/user-search.html"
+ slot="suffix"
+ tabindex="-1"
+ target="_blank"
+ >
+ <gr-icon icon="help" title="read documentation"></gr-icon>
+ </a>
+ </gr-autocomplete>
+ </form>
+ `
+ );
});
test('value is propagated to inputVal', async () => {
diff --git a/polygerrit-ui/app/elements/core/gr-smart-search/gr-smart-search_test.ts b/polygerrit-ui/app/elements/core/gr-smart-search/gr-smart-search_test.ts
index f269200..aa0071e 100644
--- a/polygerrit-ui/app/elements/core/gr-smart-search/gr-smart-search_test.ts
+++ b/polygerrit-ui/app/elements/core/gr-smart-search/gr-smart-search_test.ts
@@ -20,9 +20,10 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-search-bar id="search"> </gr-search-bar>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ ' <gr-search-bar id="search"> </gr-search-bar> '
+ );
});
test('Autocompletes accounts', () => {
diff --git a/polygerrit-ui/app/elements/diff/gr-apply-fix-dialog/gr-apply-fix-dialog_test.ts b/polygerrit-ui/app/elements/diff/gr-apply-fix-dialog/gr-apply-fix-dialog_test.ts
index 30b5086..a61d7b5 100644
--- a/polygerrit-ui/app/elements/diff/gr-apply-fix-dialog/gr-apply-fix-dialog_test.ts
+++ b/polygerrit-ui/app/elements/diff/gr-apply-fix-dialog/gr-apply-fix-dialog_test.ts
@@ -176,7 +176,8 @@
test('renders', async () => {
await open(TWO_FIXES);
- expect(element).shadowDom.to.equal(
+ assert.shadowDom.equal(
+ element,
/* HTML */ `
<gr-overlay id="applyFixOverlay" tabindex="-1" with-backdrop="">
<gr-dialog id="applyFixDialog" role="dialog">
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view_test.ts b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view_test.ts
index 54e1f6d..0f0586f 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view_test.ts
+++ b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view_test.ts
@@ -475,146 +475,154 @@
element.path = 'glados.txt';
element.loggedIn = true;
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="stickyHeader">
- <h1 class="assistive-tech-only">Diff of glados.txt</h1>
- <header>
- <div>
- <a href=""> 42 </a>
- <span class="changeNumberColon"> : </span>
- <span class="headerSubject"> Test subject </span>
- <input
- aria-label="file reviewed"
- class="hideOnEdit reviewed"
- id="reviewed"
- title="Toggle reviewed status of file"
- type="checkbox"
- />
- <div class="jumpToFileContainer">
- <gr-dropdown-list id="dropdown" show-copy-for-trigger-text="">
- </gr-dropdown-list>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="stickyHeader">
+ <h1 class="assistive-tech-only">Diff of glados.txt</h1>
+ <header>
+ <div>
+ <a href=""> 42 </a>
+ <span class="changeNumberColon"> : </span>
+ <span class="headerSubject"> Test subject </span>
+ <input
+ aria-label="file reviewed"
+ class="hideOnEdit reviewed"
+ id="reviewed"
+ title="Toggle reviewed status of file"
+ type="checkbox"
+ />
+ <div class="jumpToFileContainer">
+ <gr-dropdown-list id="dropdown" show-copy-for-trigger-text="">
+ </gr-dropdown-list>
+ </div>
</div>
- </div>
- <div class="desktop navLinks">
- <span class="fileNum show">
- File 2 of 3
- <span class="separator"> </span>
- </span>
- <a
- class="navLink"
- href=""
- title="Go to previous file (shortcut: [)"
- >
- Prev
- </a>
- <span class="separator"> </span>
- <a class="navLink" href="" title="Up to change (shortcut: u)">
- Up
- </a>
- <span class="separator"> </span>
- <a class="navLink" href="" title="Go to next file (shortcut: ])">
- Next
- </a>
- </div>
- </header>
- <div class="subHeader">
- <div class="patchRangeLeft">
- <gr-patch-range-select id="rangeSelect"> </gr-patch-range-select>
- <span class="desktop download">
- <span class="separator"> </span>
- <gr-dropdown down-arrow="" horizontal-align="left" link="">
- <span class="downloadTitle"> Download </span>
- </gr-dropdown>
- </span>
- </div>
- <div class="rightControls">
- <span class="blameLoader show">
- <gr-button
- aria-disabled="false"
- id="toggleBlame"
- link=""
- role="button"
- tabindex="0"
- title="Toggle blame (shortcut: b)"
+ <div class="desktop navLinks">
+ <span class="fileNum show">
+ File 2 of 3
+ <span class="separator"> </span>
+ </span>
+ <a
+ class="navLink"
+ href=""
+ title="Go to previous file (shortcut: [)"
>
- Show blame
- </gr-button>
- </span>
- <span class="separator"> </span>
- <span class="editButton">
- <gr-button
- aria-disabled="false"
- link=""
- role="button"
- tabindex="0"
- title="Edit current file"
+ Prev
+ </a>
+ <span class="separator"> </span>
+ <a class="navLink" href="" title="Up to change (shortcut: u)">
+ Up
+ </a>
+ <span class="separator"> </span>
+ <a
+ class="navLink"
+ href=""
+ title="Go to next file (shortcut: ])"
>
- edit
- </gr-button>
- </span>
- <span class="separator"> </span>
- <div class="diffModeSelector">
- <span> Diff view: </span>
- <gr-diff-mode-selector id="modeSelect" show-tooltip-below="">
- </gr-diff-mode-selector>
+ Next
+ </a>
</div>
- <span id="diffPrefsContainer">
- <span class="desktop preferences">
- <gr-tooltip-content
- has-tooltip=""
- position-below=""
- title="Diff preferences"
+ </header>
+ <div class="subHeader">
+ <div class="patchRangeLeft">
+ <gr-patch-range-select id="rangeSelect">
+ </gr-patch-range-select>
+ <span class="desktop download">
+ <span class="separator"> </span>
+ <gr-dropdown down-arrow="" horizontal-align="left" link="">
+ <span class="downloadTitle"> Download </span>
+ </gr-dropdown>
+ </span>
+ </div>
+ <div class="rightControls">
+ <span class="blameLoader show">
+ <gr-button
+ aria-disabled="false"
+ id="toggleBlame"
+ link=""
+ role="button"
+ tabindex="0"
+ title="Toggle blame (shortcut: b)"
>
- <gr-button
- aria-disabled="false"
- class="prefsButton"
- link=""
- role="button"
- tabindex="0"
+ Show blame
+ </gr-button>
+ </span>
+ <span class="separator"> </span>
+ <span class="editButton">
+ <gr-button
+ aria-disabled="false"
+ link=""
+ role="button"
+ tabindex="0"
+ title="Edit current file"
+ >
+ edit
+ </gr-button>
+ </span>
+ <span class="separator"> </span>
+ <div class="diffModeSelector">
+ <span> Diff view: </span>
+ <gr-diff-mode-selector id="modeSelect" show-tooltip-below="">
+ </gr-diff-mode-selector>
+ </div>
+ <span id="diffPrefsContainer">
+ <span class="desktop preferences">
+ <gr-tooltip-content
+ has-tooltip=""
+ position-below=""
+ title="Diff preferences"
>
- <gr-icon icon="settings" filled></gr-icon>
- </gr-button>
- </gr-tooltip-content>
+ <gr-button
+ aria-disabled="false"
+ class="prefsButton"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ <gr-icon icon="settings" filled></gr-icon>
+ </gr-button>
+ </gr-tooltip-content>
+ </span>
</span>
- </span>
- <gr-endpoint-decorator name="annotation-toggler">
- <span hidden="" id="annotation-span">
- <label for="annotation-checkbox" id="annotation-label">
- </label>
- <iron-input>
- <input
- disabled=""
- id="annotation-checkbox"
- is="iron-input"
- type="checkbox"
- value=""
- />
- </iron-input>
- </span>
- </gr-endpoint-decorator>
+ <gr-endpoint-decorator name="annotation-toggler">
+ <span hidden="" id="annotation-span">
+ <label for="annotation-checkbox" id="annotation-label">
+ </label>
+ <iron-input>
+ <input
+ disabled=""
+ id="annotation-checkbox"
+ is="iron-input"
+ type="checkbox"
+ value=""
+ />
+ </iron-input>
+ </span>
+ </gr-endpoint-decorator>
+ </div>
+ </div>
+ <div class="fileNav mobile">
+ <a class="mobileNavLink" href=""> < </a>
+ <div class="fullFileName mobile">glados.txt</div>
+ <a class="mobileNavLink" href=""> > </a>
</div>
</div>
- <div class="fileNav mobile">
- <a class="mobileNavLink" href=""> < </a>
- <div class="fullFileName mobile">glados.txt</div>
- <a class="mobileNavLink" href=""> > </a>
- </div>
- </div>
- <div class="loading">Loading...</div>
- <h2 class="assistive-tech-only">Diff view</h2>
- <gr-diff-host hidden="" id="diffHost"> </gr-diff-host>
- <gr-apply-fix-dialog id="applyFixDialog"> </gr-apply-fix-dialog>
- <gr-diff-preferences-dialog id="diffPreferencesDialog">
- </gr-diff-preferences-dialog>
- <gr-overlay
- aria-hidden="true"
- id="downloadOverlay"
- style="outline: none; display: none;"
- >
- <gr-download-dialog id="downloadDialog" role="dialog">
- </gr-download-dialog>
- </gr-overlay>
- `);
+ <div class="loading">Loading...</div>
+ <h2 class="assistive-tech-only">Diff view</h2>
+ <gr-diff-host hidden="" id="diffHost"> </gr-diff-host>
+ <gr-apply-fix-dialog id="applyFixDialog"> </gr-apply-fix-dialog>
+ <gr-diff-preferences-dialog id="diffPreferencesDialog">
+ </gr-diff-preferences-dialog>
+ <gr-overlay
+ aria-hidden="true"
+ id="downloadOverlay"
+ style="outline: none; display: none;"
+ >
+ <gr-download-dialog id="downloadDialog" role="dialog">
+ </gr-download-dialog>
+ </gr-overlay>
+ `
+ );
});
test('keyboard shortcuts', async () => {
diff --git a/polygerrit-ui/app/elements/documentation/gr-documentation-search/gr-documentation-search_test.ts b/polygerrit-ui/app/elements/documentation/gr-documentation-search/gr-documentation-search_test.ts
index a902dc4..b53dbd6 100644
--- a/polygerrit-ui/app/elements/documentation/gr-documentation-search/gr-documentation-search_test.ts
+++ b/polygerrit-ui/app/elements/documentation/gr-documentation-search/gr-documentation-search_test.ts
@@ -59,258 +59,261 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-list-view>
- <table class="genericList" id="list">
- <tbody>
- <tr class="headerRow">
- <th class="name topHeader">Name</th>
- <th class="name topHeader"></th>
- <th class="name topHeader"></th>
- </tr>
- <tr class="loadingMsg" id="loading">
- <td>Loading...</td>
- </tr>
- </tbody>
- <tbody>
- <tr class="table">
- <td class="name">
- <a href="/Documentation/dev-rest-api.html">
- Gerrit Code Review - REST API Developers Notes0
- </a>
- </td>
- <td></td>
- <td></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/Documentation/dev-rest-api.html">
- Gerrit Code Review - REST API Developers Notes1
- </a>
- </td>
- <td></td>
- <td></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/Documentation/dev-rest-api.html">
- Gerrit Code Review - REST API Developers Notes2
- </a>
- </td>
- <td></td>
- <td></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/Documentation/dev-rest-api.html">
- Gerrit Code Review - REST API Developers Notes3
- </a>
- </td>
- <td></td>
- <td></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/Documentation/dev-rest-api.html">
- Gerrit Code Review - REST API Developers Notes4
- </a>
- </td>
- <td></td>
- <td></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/Documentation/dev-rest-api.html">
- Gerrit Code Review - REST API Developers Notes5
- </a>
- </td>
- <td></td>
- <td></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/Documentation/dev-rest-api.html">
- Gerrit Code Review - REST API Developers Notes6
- </a>
- </td>
- <td></td>
- <td></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/Documentation/dev-rest-api.html">
- Gerrit Code Review - REST API Developers Notes7
- </a>
- </td>
- <td></td>
- <td></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/Documentation/dev-rest-api.html">
- Gerrit Code Review - REST API Developers Notes8
- </a>
- </td>
- <td></td>
- <td></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/Documentation/dev-rest-api.html">
- Gerrit Code Review - REST API Developers Notes9
- </a>
- </td>
- <td></td>
- <td></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/Documentation/dev-rest-api.html">
- Gerrit Code Review - REST API Developers Notes10
- </a>
- </td>
- <td></td>
- <td></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/Documentation/dev-rest-api.html">
- Gerrit Code Review - REST API Developers Notes11
- </a>
- </td>
- <td></td>
- <td></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/Documentation/dev-rest-api.html">
- Gerrit Code Review - REST API Developers Notes12
- </a>
- </td>
- <td></td>
- <td></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/Documentation/dev-rest-api.html">
- Gerrit Code Review - REST API Developers Notes13
- </a>
- </td>
- <td></td>
- <td></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/Documentation/dev-rest-api.html">
- Gerrit Code Review - REST API Developers Notes14
- </a>
- </td>
- <td></td>
- <td></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/Documentation/dev-rest-api.html">
- Gerrit Code Review - REST API Developers Notes15
- </a>
- </td>
- <td></td>
- <td></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/Documentation/dev-rest-api.html">
- Gerrit Code Review - REST API Developers Notes16
- </a>
- </td>
- <td></td>
- <td></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/Documentation/dev-rest-api.html">
- Gerrit Code Review - REST API Developers Notes17
- </a>
- </td>
- <td></td>
- <td></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/Documentation/dev-rest-api.html">
- Gerrit Code Review - REST API Developers Notes18
- </a>
- </td>
- <td></td>
- <td></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/Documentation/dev-rest-api.html">
- Gerrit Code Review - REST API Developers Notes19
- </a>
- </td>
- <td></td>
- <td></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/Documentation/dev-rest-api.html">
- Gerrit Code Review - REST API Developers Notes20
- </a>
- </td>
- <td></td>
- <td></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/Documentation/dev-rest-api.html">
- Gerrit Code Review - REST API Developers Notes21
- </a>
- </td>
- <td></td>
- <td></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/Documentation/dev-rest-api.html">
- Gerrit Code Review - REST API Developers Notes22
- </a>
- </td>
- <td></td>
- <td></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/Documentation/dev-rest-api.html">
- Gerrit Code Review - REST API Developers Notes23
- </a>
- </td>
- <td></td>
- <td></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/Documentation/dev-rest-api.html">
- Gerrit Code Review - REST API Developers Notes24
- </a>
- </td>
- <td></td>
- <td></td>
- </tr>
- <tr class="table">
- <td class="name">
- <a href="/Documentation/dev-rest-api.html">
- Gerrit Code Review - REST API Developers Notes25
- </a>
- </td>
- <td></td>
- <td></td>
- </tr>
- </tbody>
- </table>
- </gr-list-view>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-list-view>
+ <table class="genericList" id="list">
+ <tbody>
+ <tr class="headerRow">
+ <th class="name topHeader">Name</th>
+ <th class="name topHeader"></th>
+ <th class="name topHeader"></th>
+ </tr>
+ <tr class="loadingMsg" id="loading">
+ <td>Loading...</td>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr class="table">
+ <td class="name">
+ <a href="/Documentation/dev-rest-api.html">
+ Gerrit Code Review - REST API Developers Notes0
+ </a>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/Documentation/dev-rest-api.html">
+ Gerrit Code Review - REST API Developers Notes1
+ </a>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/Documentation/dev-rest-api.html">
+ Gerrit Code Review - REST API Developers Notes2
+ </a>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/Documentation/dev-rest-api.html">
+ Gerrit Code Review - REST API Developers Notes3
+ </a>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/Documentation/dev-rest-api.html">
+ Gerrit Code Review - REST API Developers Notes4
+ </a>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/Documentation/dev-rest-api.html">
+ Gerrit Code Review - REST API Developers Notes5
+ </a>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/Documentation/dev-rest-api.html">
+ Gerrit Code Review - REST API Developers Notes6
+ </a>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/Documentation/dev-rest-api.html">
+ Gerrit Code Review - REST API Developers Notes7
+ </a>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/Documentation/dev-rest-api.html">
+ Gerrit Code Review - REST API Developers Notes8
+ </a>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/Documentation/dev-rest-api.html">
+ Gerrit Code Review - REST API Developers Notes9
+ </a>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/Documentation/dev-rest-api.html">
+ Gerrit Code Review - REST API Developers Notes10
+ </a>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/Documentation/dev-rest-api.html">
+ Gerrit Code Review - REST API Developers Notes11
+ </a>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/Documentation/dev-rest-api.html">
+ Gerrit Code Review - REST API Developers Notes12
+ </a>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/Documentation/dev-rest-api.html">
+ Gerrit Code Review - REST API Developers Notes13
+ </a>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/Documentation/dev-rest-api.html">
+ Gerrit Code Review - REST API Developers Notes14
+ </a>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/Documentation/dev-rest-api.html">
+ Gerrit Code Review - REST API Developers Notes15
+ </a>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/Documentation/dev-rest-api.html">
+ Gerrit Code Review - REST API Developers Notes16
+ </a>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/Documentation/dev-rest-api.html">
+ Gerrit Code Review - REST API Developers Notes17
+ </a>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/Documentation/dev-rest-api.html">
+ Gerrit Code Review - REST API Developers Notes18
+ </a>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/Documentation/dev-rest-api.html">
+ Gerrit Code Review - REST API Developers Notes19
+ </a>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/Documentation/dev-rest-api.html">
+ Gerrit Code Review - REST API Developers Notes20
+ </a>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/Documentation/dev-rest-api.html">
+ Gerrit Code Review - REST API Developers Notes21
+ </a>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/Documentation/dev-rest-api.html">
+ Gerrit Code Review - REST API Developers Notes22
+ </a>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/Documentation/dev-rest-api.html">
+ Gerrit Code Review - REST API Developers Notes23
+ </a>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/Documentation/dev-rest-api.html">
+ Gerrit Code Review - REST API Developers Notes24
+ </a>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr class="table">
+ <td class="name">
+ <a href="/Documentation/dev-rest-api.html">
+ Gerrit Code Review - REST API Developers Notes25
+ </a>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ </tbody>
+ </table>
+ </gr-list-view>
+ `
+ );
});
});
diff --git a/polygerrit-ui/app/elements/edit/gr-default-editor/gr-default-editor_test.ts b/polygerrit-ui/app/elements/edit/gr-default-editor/gr-default-editor_test.ts
index bd69c7f..bc7d822 100644
--- a/polygerrit-ui/app/elements/edit/gr-default-editor/gr-default-editor_test.ts
+++ b/polygerrit-ui/app/elements/edit/gr-default-editor/gr-default-editor_test.ts
@@ -20,9 +20,10 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <textarea id="textarea"></textarea>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ ' <textarea id="textarea"></textarea> '
+ );
});
test('fires content-change event', async () => {
diff --git a/polygerrit-ui/app/elements/edit/gr-edit-controls/gr-edit-controls_test.ts b/polygerrit-ui/app/elements/edit/gr-edit-controls/gr-edit-controls_test.ts
index 7c1a0ab..c2904f3 100644
--- a/polygerrit-ui/app/elements/edit/gr-edit-controls/gr-edit-controls_test.ts
+++ b/polygerrit-ui/app/elements/edit/gr-edit-controls/gr-edit-controls_test.ts
@@ -45,140 +45,143 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-button
- aria-disabled="false"
- id="open"
- link=""
- role="button"
- tabindex="0"
- >
- Add/Open/Upload
- </gr-button>
- <gr-button
- aria-disabled="false"
- id="delete"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- <gr-button
- aria-disabled="false"
- id="rename"
- link=""
- role="button"
- tabindex="0"
- >
- Rename
- </gr-button>
- <gr-button
- aria-disabled="false"
- class="invisible"
- id="restore"
- link=""
- role="button"
- tabindex="0"
- >
- Restore
- </gr-button>
- <gr-overlay
- aria-hidden="true"
- id="overlay"
- style="outline: none; display: none;"
- tabindex="-1"
- with-backdrop=""
- >
- <gr-dialog
- class="dialog invisible"
- confirm-label="Confirm"
- confirm-on-enter=""
- disabled=""
- id="openDialog"
- role="dialog"
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-button
+ aria-disabled="false"
+ id="open"
+ link=""
+ role="button"
+ tabindex="0"
>
- <div class="header" slot="header">
- Add a new file or open an existing file
- </div>
- <div class="main" slot="main">
- <gr-autocomplete
- placeholder="Enter an existing or new full file path."
- >
- </gr-autocomplete>
- <div contenteditable="true" id="dragDropArea">
- <p>Drag and drop a file here</p>
- <p>or</p>
- <p>
- <iron-input>
- <input
- hidden=""
- id="fileUploadInput"
- multiple=""
- type="file"
- />
- </iron-input>
- <label for="fileUploadInput">
- <gr-button
- aria-disabled="false"
- id="fileUploadBrowse"
- role="button"
- tabindex="0"
- >
- Browse
- </gr-button>
- </label>
- </p>
+ Add/Open/Upload
+ </gr-button>
+ <gr-button
+ aria-disabled="false"
+ id="delete"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Delete
+ </gr-button>
+ <gr-button
+ aria-disabled="false"
+ id="rename"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Rename
+ </gr-button>
+ <gr-button
+ aria-disabled="false"
+ class="invisible"
+ id="restore"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Restore
+ </gr-button>
+ <gr-overlay
+ aria-hidden="true"
+ id="overlay"
+ style="outline: none; display: none;"
+ tabindex="-1"
+ with-backdrop=""
+ >
+ <gr-dialog
+ class="dialog invisible"
+ confirm-label="Confirm"
+ confirm-on-enter=""
+ disabled=""
+ id="openDialog"
+ role="dialog"
+ >
+ <div class="header" slot="header">
+ Add a new file or open an existing file
</div>
- </div>
- </gr-dialog>
- <gr-dialog
- class="dialog invisible"
- confirm-label="Delete"
- confirm-on-enter=""
- disabled=""
- id="deleteDialog"
- role="dialog"
- >
- <div class="header" slot="header">Delete a file from the repo</div>
- <div class="main" slot="main">
- <gr-autocomplete placeholder="Enter an existing full file path.">
- </gr-autocomplete>
- </div>
- </gr-dialog>
- <gr-dialog
- class="dialog invisible"
- confirm-label="Rename"
- confirm-on-enter=""
- disabled=""
- id="renameDialog"
- role="dialog"
- >
- <div class="header" slot="header">Rename a file in the repo</div>
- <div class="main" slot="main">
- <gr-autocomplete placeholder="Enter an existing full file path.">
- </gr-autocomplete>
- <iron-input id="newPathIronInput">
- <input id="newPathInput" placeholder="Enter the new path." />
- </iron-input>
- </div>
- </gr-dialog>
- <gr-dialog
- class="dialog invisible"
- confirm-label="Restore"
- confirm-on-enter=""
- id="restoreDialog"
- role="dialog"
- >
- <div class="header" slot="header">Restore this file?</div>
- <div class="main" slot="main">
- <iron-input>
- <input />
- </iron-input>
- </div>
- </gr-dialog>
- </gr-overlay>
- `);
+ <div class="main" slot="main">
+ <gr-autocomplete
+ placeholder="Enter an existing or new full file path."
+ >
+ </gr-autocomplete>
+ <div contenteditable="true" id="dragDropArea">
+ <p>Drag and drop a file here</p>
+ <p>or</p>
+ <p>
+ <iron-input>
+ <input
+ hidden=""
+ id="fileUploadInput"
+ multiple=""
+ type="file"
+ />
+ </iron-input>
+ <label for="fileUploadInput">
+ <gr-button
+ aria-disabled="false"
+ id="fileUploadBrowse"
+ role="button"
+ tabindex="0"
+ >
+ Browse
+ </gr-button>
+ </label>
+ </p>
+ </div>
+ </div>
+ </gr-dialog>
+ <gr-dialog
+ class="dialog invisible"
+ confirm-label="Delete"
+ confirm-on-enter=""
+ disabled=""
+ id="deleteDialog"
+ role="dialog"
+ >
+ <div class="header" slot="header">Delete a file from the repo</div>
+ <div class="main" slot="main">
+ <gr-autocomplete placeholder="Enter an existing full file path.">
+ </gr-autocomplete>
+ </div>
+ </gr-dialog>
+ <gr-dialog
+ class="dialog invisible"
+ confirm-label="Rename"
+ confirm-on-enter=""
+ disabled=""
+ id="renameDialog"
+ role="dialog"
+ >
+ <div class="header" slot="header">Rename a file in the repo</div>
+ <div class="main" slot="main">
+ <gr-autocomplete placeholder="Enter an existing full file path.">
+ </gr-autocomplete>
+ <iron-input id="newPathIronInput">
+ <input id="newPathInput" placeholder="Enter the new path." />
+ </iron-input>
+ </div>
+ </gr-dialog>
+ <gr-dialog
+ class="dialog invisible"
+ confirm-label="Restore"
+ confirm-on-enter=""
+ id="restoreDialog"
+ role="dialog"
+ >
+ <div class="header" slot="header">Restore this file?</div>
+ <div class="main" slot="main">
+ <iron-input>
+ <input />
+ </iron-input>
+ </div>
+ </gr-dialog>
+ </gr-overlay>
+ `
+ );
});
test('all actions exist', () => {
diff --git a/polygerrit-ui/app/elements/edit/gr-edit-file-controls/gr-edit-file-controls_test.ts b/polygerrit-ui/app/elements/edit/gr-edit-file-controls/gr-edit-file-controls_test.ts
index c6d7117..1494a3e 100644
--- a/polygerrit-ui/app/elements/edit/gr-edit-file-controls/gr-edit-file-controls_test.ts
+++ b/polygerrit-ui/app/elements/edit/gr-edit-file-controls/gr-edit-file-controls_test.ts
@@ -26,11 +26,14 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-dropdown down-arrow="" id="actions" link="" vertical-offset="20">
- Actions
- </gr-dropdown>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-dropdown down-arrow="" id="actions" link="" vertical-offset="20">
+ Actions
+ </gr-dropdown>
+ `
+ );
});
test('open tap emits event', async () => {
diff --git a/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view_test.ts b/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view_test.ts
index 48ce5ed8..a651f12 100644
--- a/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view_test.ts
+++ b/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view_test.ts
@@ -44,68 +44,71 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="stickyHeader">
- <header>
- <span class="controlGroup">
- <span> Edit mode </span>
- <span class="separator"> </span>
- <gr-editable-label
- id="global"
- labeltext="File path"
- placeholder="File path..."
- tabindex="0"
- title="File path..."
- >
- </gr-editable-label>
- </span>
- <span class="controlGroup rightControls">
- <gr-button
- aria-disabled="false"
- id="close"
- link=""
- role="button"
- tabindex="0"
- >
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="true"
- disabled=""
- id="save"
- link=""
- primary=""
- role="button"
- tabindex="-1"
- title="Save and Close the file"
- >
- Save
- </gr-button>
- <gr-button
- aria-disabled="true"
- disabled=""
- id="publish"
- link=""
- primary=""
- role="button"
- tabindex="-1"
- title="Publish your edit. A new patchset will be created."
- >
- Save & Publish
- </gr-button>
- </span>
- </header>
- </div>
- <div class="textareaWrapper">
- <gr-endpoint-decorator id="editorEndpoint" name="editor">
- <gr-endpoint-param name="fileContent"> </gr-endpoint-param>
- <gr-endpoint-param name="prefs"> </gr-endpoint-param>
- <gr-endpoint-param name="fileType"> </gr-endpoint-param>
- <gr-endpoint-param name="lineNum"> </gr-endpoint-param>
- <gr-default-editor id="file"> </gr-default-editor>
- </gr-endpoint-decorator>
- </div>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="stickyHeader">
+ <header>
+ <span class="controlGroup">
+ <span> Edit mode </span>
+ <span class="separator"> </span>
+ <gr-editable-label
+ id="global"
+ labeltext="File path"
+ placeholder="File path..."
+ tabindex="0"
+ title="File path..."
+ >
+ </gr-editable-label>
+ </span>
+ <span class="controlGroup rightControls">
+ <gr-button
+ aria-disabled="false"
+ id="close"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="true"
+ disabled=""
+ id="save"
+ link=""
+ primary=""
+ role="button"
+ tabindex="-1"
+ title="Save and Close the file"
+ >
+ Save
+ </gr-button>
+ <gr-button
+ aria-disabled="true"
+ disabled=""
+ id="publish"
+ link=""
+ primary=""
+ role="button"
+ tabindex="-1"
+ title="Publish your edit. A new patchset will be created."
+ >
+ Save & Publish
+ </gr-button>
+ </span>
+ </header>
+ </div>
+ <div class="textareaWrapper">
+ <gr-endpoint-decorator id="editorEndpoint" name="editor">
+ <gr-endpoint-param name="fileContent"> </gr-endpoint-param>
+ <gr-endpoint-param name="prefs"> </gr-endpoint-param>
+ <gr-endpoint-param name="fileType"> </gr-endpoint-param>
+ <gr-endpoint-param name="lineNum"> </gr-endpoint-param>
+ <gr-default-editor id="file"> </gr-default-editor>
+ </gr-endpoint-decorator>
+ </div>
+ `
+ );
});
suite('paramsChanged', () => {
diff --git a/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info_test.ts b/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info_test.ts
index 745e3de..0e055b9 100644
--- a/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info_test.ts
+++ b/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info_test.ts
@@ -60,56 +60,59 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="gr-form-styles">
- <section>
- <span class="title"></span>
- <span class="value">
- <gr-avatar hidden="" imagesize="120"></gr-avatar>
- </span>
- </section>
- <section>
- <span class="title">ID</span>
- <span class="value">123</span>
- </section>
- <section>
- <span class="title">Email</span>
- <span class="value">user-123@</span>
- </section>
- <section>
- <span class="title">Registered</span>
- <span class="value">
- <gr-date-formatter withtooltip=""></gr-date-formatter>
- </span>
- </section>
- <section id="usernameSection">
- <span class="title">Username</span>
- <span class="value"></span>
- </section>
- <section id="nameSection">
- <label class="title" for="nameInput">Full name</label>
- <span class="value">User-123</span>
- </section>
- <section>
- <label class="title" for="displayNameInput">Display name</label>
- <span class="value">
- <iron-input>
- <input id="displayNameInput" />
- </iron-input>
- </span>
- </section>
- <section>
- <label class="title" for="statusInput">
- About me (e.g. employer)
- </label>
- <span class="value">
- <iron-input id="statusIronInput">
- <input id="statusInput" />
- </iron-input>
- </span>
- </section>
- </div>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="gr-form-styles">
+ <section>
+ <span class="title"></span>
+ <span class="value">
+ <gr-avatar hidden="" imagesize="120"></gr-avatar>
+ </span>
+ </section>
+ <section>
+ <span class="title">ID</span>
+ <span class="value">123</span>
+ </section>
+ <section>
+ <span class="title">Email</span>
+ <span class="value">user-123@</span>
+ </section>
+ <section>
+ <span class="title">Registered</span>
+ <span class="value">
+ <gr-date-formatter withtooltip=""></gr-date-formatter>
+ </span>
+ </section>
+ <section id="usernameSection">
+ <span class="title">Username</span>
+ <span class="value"></span>
+ </section>
+ <section id="nameSection">
+ <label class="title" for="nameInput">Full name</label>
+ <span class="value">User-123</span>
+ </section>
+ <section>
+ <label class="title" for="displayNameInput">Display name</label>
+ <span class="value">
+ <iron-input>
+ <input id="displayNameInput" />
+ </iron-input>
+ </span>
+ </section>
+ <section>
+ <label class="title" for="statusInput">
+ About me (e.g. employer)
+ </label>
+ <span class="value">
+ <iron-input id="statusIronInput">
+ <input id="statusInput" />
+ </iron-input>
+ </span>
+ </section>
+ </div>
+ `
+ );
});
test('basic account info render', () => {
diff --git a/polygerrit-ui/app/elements/settings/gr-agreements-list/gr-agreements-list_test.ts b/polygerrit-ui/app/elements/settings/gr-agreements-list/gr-agreements-list_test.ts
index 604bde4..6ea54f3 100644
--- a/polygerrit-ui/app/elements/settings/gr-agreements-list/gr-agreements-list_test.ts
+++ b/polygerrit-ui/app/elements/settings/gr-agreements-list/gr-agreements-list_test.ts
@@ -32,26 +32,29 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="gr-form-styles">
- <table id="agreements">
- <thead>
- <tr>
- <th class="nameColumn">Name</th>
- <th class="descriptionColumn">Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="nameColumn">
- <a href="/some url" rel="external"> Agreements 1 </a>
- </td>
- <td class="descriptionColumn">Agreements 1 description</td>
- </tr>
- </tbody>
- </table>
- <a href="/settings/new-agreement"> New Contributor Agreement </a>
- </div>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="gr-form-styles">
+ <table id="agreements">
+ <thead>
+ <tr>
+ <th class="nameColumn">Name</th>
+ <th class="descriptionColumn">Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="nameColumn">
+ <a href="/some url" rel="external"> Agreements 1 </a>
+ </td>
+ <td class="descriptionColumn">Agreements 1 description</td>
+ </tr>
+ </tbody>
+ </table>
+ <a href="/settings/new-agreement"> New Contributor Agreement </a>
+ </div>
+ `
+ );
});
});
diff --git a/polygerrit-ui/app/elements/settings/gr-change-table-editor/gr-change-table-editor_test.ts b/polygerrit-ui/app/elements/settings/gr-change-table-editor/gr-change-table-editor_test.ts
index 21778f7..a51e7bd 100644
--- a/polygerrit-ui/app/elements/settings/gr-change-table-editor/gr-change-table-editor_test.ts
+++ b/polygerrit-ui/app/elements/settings/gr-change-table-editor/gr-change-table-editor_test.ts
@@ -38,77 +38,80 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ ` <div class="gr-form-styles">
- <table id="changeCols">
- <thead>
- <tr>
- <th class="nameHeader">Column</th>
- <th class="visibleHeader">Visible</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><label for="numberCheckbox"> Number </label></td>
- <td class="checkboxContainer">
- <input id="numberCheckbox" name="number" type="checkbox" />
- </td>
- </tr>
- <tr>
- <td><label for="Subject"> Subject </label></td>
- <td class="checkboxContainer">
- <input checked="" id="Subject" name="Subject" type="checkbox" />
- </td>
- </tr>
- <tr>
- <td><label for="Owner"> Owner </label></td>
- <td class="checkboxContainer">
- <input checked="" id="Owner" name="Owner" type="checkbox" />
- </td>
- </tr>
- <tr>
- <td><label for="Reviewers"> Reviewers </label></td>
- <td class="checkboxContainer">
- <input
- checked=""
- id="Reviewers"
- name="Reviewers"
- type="checkbox"
- />
- </td>
- </tr>
- <tr>
- <td><label for="Repo"> Repo </label></td>
- <td class="checkboxContainer">
- <input checked="" id="Repo" name="Repo" type="checkbox" />
- </td>
- </tr>
- <tr>
- <td><label for="Branch"> Branch </label></td>
- <td class="checkboxContainer">
- <input checked="" id="Branch" name="Branch" type="checkbox" />
- </td>
- </tr>
- <tr>
- <td><label for="Updated"> Updated </label></td>
- <td class="checkboxContainer">
- <input checked="" id="Updated" name="Updated" type="checkbox" />
- </td>
- </tr>
- <tr>
- <td><label for="Size"> Size </label></td>
- <td class="checkboxContainer">
- <input id="Size" name="Size" type="checkbox" />
- </td>
- </tr>
- <tr>
- <td><label for=" Status "> Status </label></td>
- <td class="checkboxContainer">
- <input id=" Status " name=" Status " type="checkbox" />
- </td>
- </tr>
- </tbody>
- </table>
- </div>`);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ ` <div class="gr-form-styles">
+ <table id="changeCols">
+ <thead>
+ <tr>
+ <th class="nameHeader">Column</th>
+ <th class="visibleHeader">Visible</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><label for="numberCheckbox"> Number </label></td>
+ <td class="checkboxContainer">
+ <input id="numberCheckbox" name="number" type="checkbox" />
+ </td>
+ </tr>
+ <tr>
+ <td><label for="Subject"> Subject </label></td>
+ <td class="checkboxContainer">
+ <input checked="" id="Subject" name="Subject" type="checkbox" />
+ </td>
+ </tr>
+ <tr>
+ <td><label for="Owner"> Owner </label></td>
+ <td class="checkboxContainer">
+ <input checked="" id="Owner" name="Owner" type="checkbox" />
+ </td>
+ </tr>
+ <tr>
+ <td><label for="Reviewers"> Reviewers </label></td>
+ <td class="checkboxContainer">
+ <input
+ checked=""
+ id="Reviewers"
+ name="Reviewers"
+ type="checkbox"
+ />
+ </td>
+ </tr>
+ <tr>
+ <td><label for="Repo"> Repo </label></td>
+ <td class="checkboxContainer">
+ <input checked="" id="Repo" name="Repo" type="checkbox" />
+ </td>
+ </tr>
+ <tr>
+ <td><label for="Branch"> Branch </label></td>
+ <td class="checkboxContainer">
+ <input checked="" id="Branch" name="Branch" type="checkbox" />
+ </td>
+ </tr>
+ <tr>
+ <td><label for="Updated"> Updated </label></td>
+ <td class="checkboxContainer">
+ <input checked="" id="Updated" name="Updated" type="checkbox" />
+ </td>
+ </tr>
+ <tr>
+ <td><label for="Size"> Size </label></td>
+ <td class="checkboxContainer">
+ <input id="Size" name="Size" type="checkbox" />
+ </td>
+ </tr>
+ <tr>
+ <td><label for=" Status "> Status </label></td>
+ <td class="checkboxContainer">
+ <input id=" Status " name=" Status " type="checkbox" />
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>`
+ );
});
test('renders', () => {
diff --git a/polygerrit-ui/app/elements/settings/gr-cla-view/gr-cla-view_test.ts b/polygerrit-ui/app/elements/settings/gr-cla-view/gr-cla-view_test.ts
index 51b38ae..8e2338c 100644
--- a/polygerrit-ui/app/elements/settings/gr-cla-view/gr-cla-view_test.ts
+++ b/polygerrit-ui/app/elements/settings/gr-cla-view/gr-cla-view_test.ts
@@ -125,36 +125,39 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <main>
- <h1 class="heading-1">New Contributor Agreement</h1>
- <h3 class="heading-3">Select an agreement type:</h3>
- <span class="contributorAgreementButton">
- <input
- data-name="Individual"
- data-url="static/cla_individual.html"
- id="claNewAgreementsInputIndividual"
- name="claNewAgreementsRadio"
- type="radio"
- />
- <label id="claNewAgreementsLabel"> Individual </label>
- </span>
- <div class="agreementsUrl">test-description</div>
- <span class="contributorAgreementButton">
- <input
- data-name="CLA"
- data-url="static/cla.html"
- disabled=""
- id="claNewAgreementsInputCLA"
- name="claNewAgreementsRadio"
- type="radio"
- />
- <label id="claNewAgreementsLabel"> CLA </label>
- </span>
- <div class="alreadySubmittedText">Agreement already submitted.</div>
- <div class="agreementsUrl">Contributor License Agreement</div>
- </main>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <main>
+ <h1 class="heading-1">New Contributor Agreement</h1>
+ <h3 class="heading-3">Select an agreement type:</h3>
+ <span class="contributorAgreementButton">
+ <input
+ data-name="Individual"
+ data-url="static/cla_individual.html"
+ id="claNewAgreementsInputIndividual"
+ name="claNewAgreementsRadio"
+ type="radio"
+ />
+ <label id="claNewAgreementsLabel"> Individual </label>
+ </span>
+ <div class="agreementsUrl">test-description</div>
+ <span class="contributorAgreementButton">
+ <input
+ data-name="CLA"
+ data-url="static/cla.html"
+ disabled=""
+ id="claNewAgreementsInputCLA"
+ name="claNewAgreementsRadio"
+ type="radio"
+ />
+ <label id="claNewAgreementsLabel"> CLA </label>
+ </span>
+ <div class="alreadySubmittedText">Agreement already submitted.</div>
+ <div class="agreementsUrl">Contributor License Agreement</div>
+ </main>
+ `
+ );
});
test('disableAgreements', () => {
diff --git a/polygerrit-ui/app/elements/settings/gr-edit-preferences/gr-edit-preferences_test.ts b/polygerrit-ui/app/elements/settings/gr-edit-preferences/gr-edit-preferences_test.ts
index 9e969dd..cf197f4 100644
--- a/polygerrit-ui/app/elements/settings/gr-edit-preferences/gr-edit-preferences_test.ts
+++ b/polygerrit-ui/app/elements/settings/gr-edit-preferences/gr-edit-preferences_test.ts
@@ -41,104 +41,107 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <h2 id="EditPreferences">Edit Preferences</h2>
- <fieldset id="editPreferences">
- <div class="gr-form-styles" id="editPreferences">
- <section>
- <label class="title" for="editTabWidth"> Tab width </label>
- <span class="value">
- <iron-input>
- <input id="editTabWidth" type="number" />
- </iron-input>
- </span>
- </section>
- <section>
- <label class="title" for="editColumns"> Columns </label>
- <span class="value">
- <iron-input>
- <input id="editColumns" type="number" />
- </iron-input>
- </span>
- </section>
- <section>
- <label class="title" for="editIndentUnit"> Indent unit </label>
- <span class="value">
- <iron-input>
- <input id="editIndentUnit" type="number" />
- </iron-input>
- </span>
- </section>
- <section>
- <label class="title" for="editSyntaxHighlighting">
- Syntax highlighting
- </label>
- <span class="value">
- <input checked="" id="editSyntaxHighlighting" type="checkbox" />
- </span>
- </section>
- <section>
- <label class="title" for="editShowTabs"> Show tabs </label>
- <span class="value">
- <input checked="" id="editShowTabs" type="checkbox" />
- </span>
- </section>
- <section>
- <label class="title" for="showTrailingWhitespaceInput">
- Show trailing whitespace
- </label>
- <span class="value">
- <input
- checked=""
- id="editShowTrailingWhitespaceInput"
- type="checkbox"
- />
- </span>
- </section>
- <section>
- <label class="title" for="showMatchBrackets">
- Match brackets
- </label>
- <span class="value">
- <input checked="" id="showMatchBrackets" type="checkbox" />
- </span>
- </section>
- <section>
- <label class="title" for="editShowLineWrapping">
- Line wrapping
- </label>
- <span class="value">
- <input id="editShowLineWrapping" type="checkbox" />
- </span>
- </section>
- <section>
- <label class="title" for="showIndentWithTabs">
- Indent with tabs
- </label>
- <span class="value">
- <input id="showIndentWithTabs" type="checkbox" />
- </span>
- </section>
- <section>
- <label class="title" for="showAutoCloseBrackets">
- Auto close brackets
- </label>
- <span class="value">
- <input id="showAutoCloseBrackets" type="checkbox" />
- </span>
- </section>
- </div>
- <gr-button
- aria-disabled="true"
- disabled=""
- id="saveEditPrefs"
- role="button"
- tabindex="-1"
- >
- Save changes
- </gr-button>
- </fieldset>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <h2 id="EditPreferences">Edit Preferences</h2>
+ <fieldset id="editPreferences">
+ <div class="gr-form-styles" id="editPreferences">
+ <section>
+ <label class="title" for="editTabWidth"> Tab width </label>
+ <span class="value">
+ <iron-input>
+ <input id="editTabWidth" type="number" />
+ </iron-input>
+ </span>
+ </section>
+ <section>
+ <label class="title" for="editColumns"> Columns </label>
+ <span class="value">
+ <iron-input>
+ <input id="editColumns" type="number" />
+ </iron-input>
+ </span>
+ </section>
+ <section>
+ <label class="title" for="editIndentUnit"> Indent unit </label>
+ <span class="value">
+ <iron-input>
+ <input id="editIndentUnit" type="number" />
+ </iron-input>
+ </span>
+ </section>
+ <section>
+ <label class="title" for="editSyntaxHighlighting">
+ Syntax highlighting
+ </label>
+ <span class="value">
+ <input checked="" id="editSyntaxHighlighting" type="checkbox" />
+ </span>
+ </section>
+ <section>
+ <label class="title" for="editShowTabs"> Show tabs </label>
+ <span class="value">
+ <input checked="" id="editShowTabs" type="checkbox" />
+ </span>
+ </section>
+ <section>
+ <label class="title" for="showTrailingWhitespaceInput">
+ Show trailing whitespace
+ </label>
+ <span class="value">
+ <input
+ checked=""
+ id="editShowTrailingWhitespaceInput"
+ type="checkbox"
+ />
+ </span>
+ </section>
+ <section>
+ <label class="title" for="showMatchBrackets">
+ Match brackets
+ </label>
+ <span class="value">
+ <input checked="" id="showMatchBrackets" type="checkbox" />
+ </span>
+ </section>
+ <section>
+ <label class="title" for="editShowLineWrapping">
+ Line wrapping
+ </label>
+ <span class="value">
+ <input id="editShowLineWrapping" type="checkbox" />
+ </span>
+ </section>
+ <section>
+ <label class="title" for="showIndentWithTabs">
+ Indent with tabs
+ </label>
+ <span class="value">
+ <input id="showIndentWithTabs" type="checkbox" />
+ </span>
+ </section>
+ <section>
+ <label class="title" for="showAutoCloseBrackets">
+ Auto close brackets
+ </label>
+ <span class="value">
+ <input id="showAutoCloseBrackets" type="checkbox" />
+ </span>
+ </section>
+ </div>
+ <gr-button
+ aria-disabled="true"
+ disabled=""
+ id="saveEditPrefs"
+ role="button"
+ tabindex="-1"
+ >
+ Save changes
+ </gr-button>
+ </fieldset>
+ `
+ );
});
test('input values match preferences', () => {
diff --git a/polygerrit-ui/app/elements/settings/gr-email-editor/gr-email-editor_test.ts b/polygerrit-ui/app/elements/settings/gr-email-editor/gr-email-editor_test.ts
index b9322cd..f5c8bfd 100644
--- a/polygerrit-ui/app/elements/settings/gr-email-editor/gr-email-editor_test.ts
+++ b/polygerrit-ui/app/elements/settings/gr-email-editor/gr-email-editor_test.ts
@@ -30,93 +30,96 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `<div class="gr-form-styles">
- <table id="emailTable">
- <thead>
- <tr>
- <th class="emailColumn">Email</th>
- <th class="preferredHeader">Preferred</th>
- <th></th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="emailColumn">email@one.com</td>
- <td class="preferredControl">
- <iron-input class="preferredRadio">
- <input
- class="preferredRadio"
- name="preferred"
- type="radio"
- value="email@one.com"
- />
- </iron-input>
- </td>
- <td>
- <gr-button
- aria-disabled="false"
- class="remove-button"
- data-index="0"
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr>
- <td class="emailColumn">email@two.com</td>
- <td class="preferredControl">
- <iron-input class="preferredRadio">
- <input
- checked=""
- class="preferredRadio"
- name="preferred"
- type="radio"
- value="email@two.com"
- />
- </iron-input>
- </td>
- <td>
- <gr-button
- aria-disabled="true"
- class="remove-button"
- data-index="1"
- disabled=""
- role="button"
- tabindex="-1"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr>
- <td class="emailColumn">email@three.com</td>
- <td class="preferredControl">
- <iron-input class="preferredRadio">
- <input
- class="preferredRadio"
- name="preferred"
- type="radio"
- value="email@three.com"
- />
- </iron-input>
- </td>
- <td>
- <gr-button
- aria-disabled="false"
- class="remove-button"
- data-index="2"
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- </tbody>
- </table>
- </div>`);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `<div class="gr-form-styles">
+ <table id="emailTable">
+ <thead>
+ <tr>
+ <th class="emailColumn">Email</th>
+ <th class="preferredHeader">Preferred</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="emailColumn">email@one.com</td>
+ <td class="preferredControl">
+ <iron-input class="preferredRadio">
+ <input
+ class="preferredRadio"
+ name="preferred"
+ type="radio"
+ value="email@one.com"
+ />
+ </iron-input>
+ </td>
+ <td>
+ <gr-button
+ aria-disabled="false"
+ class="remove-button"
+ data-index="0"
+ role="button"
+ tabindex="0"
+ >
+ Delete
+ </gr-button>
+ </td>
+ </tr>
+ <tr>
+ <td class="emailColumn">email@two.com</td>
+ <td class="preferredControl">
+ <iron-input class="preferredRadio">
+ <input
+ checked=""
+ class="preferredRadio"
+ name="preferred"
+ type="radio"
+ value="email@two.com"
+ />
+ </iron-input>
+ </td>
+ <td>
+ <gr-button
+ aria-disabled="true"
+ class="remove-button"
+ data-index="1"
+ disabled=""
+ role="button"
+ tabindex="-1"
+ >
+ Delete
+ </gr-button>
+ </td>
+ </tr>
+ <tr>
+ <td class="emailColumn">email@three.com</td>
+ <td class="preferredControl">
+ <iron-input class="preferredRadio">
+ <input
+ class="preferredRadio"
+ name="preferred"
+ type="radio"
+ value="email@three.com"
+ />
+ </iron-input>
+ </td>
+ <td>
+ <gr-button
+ aria-disabled="false"
+ class="remove-button"
+ data-index="2"
+ role="button"
+ tabindex="0"
+ >
+ Delete
+ </gr-button>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>`
+ );
});
test('renders', () => {
diff --git a/polygerrit-ui/app/elements/settings/gr-gpg-editor/gr-gpg-editor_test.ts b/polygerrit-ui/app/elements/settings/gr-gpg-editor/gr-gpg-editor_test.ts
index 2cbc75d..3a21c0a 100644
--- a/polygerrit-ui/app/elements/settings/gr-gpg-editor/gr-gpg-editor_test.ts
+++ b/polygerrit-ui/app/elements/settings/gr-gpg-editor/gr-gpg-editor_test.ts
@@ -61,134 +61,142 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `<div class="gr-form-styles">
- <fieldset id="existing">
- <table>
- <thead>
- <tr>
- <th class="idColumn">ID</th>
- <th class="fingerPrintColumn">Fingerprint</th>
- <th class="userIdHeader">User IDs</th>
- <th class="keyHeader">Public Key</th>
- <th></th>
- <th></th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="idColumn">AFC8A49B</td>
- <td class="fingerPrintColumn">
- 0192 723D 42D1 0C5B 32A6 E1E0 9350 9E4B AFC8 A49B
- </td>
- <td class="userIdHeader">John Doe john.doe@example.com</td>
- <td class="keyHeader">
- <gr-button
- aria-disabled="false"
- link=""
- role="button"
- tabindex="0"
- >
- Click to View
- </gr-button>
- </td>
- <td>
- <gr-copy-clipboard
- buttontitle="Copy GPG public key to clipboard"
- hastooltip=""
- hideinput=""
- >
- </gr-copy-clipboard>
- </td>
- <td>
- <gr-button aria-disabled="false" role="button" tabindex="0">
- Delete
- </gr-button>
- </td>
- </tr>
- <tr>
- <td class="idColumn">AED9B59C</td>
- <td class="fingerPrintColumn">
- 0196 723D 42D1 0C5B 32A6 E1E0 9350 9E4B AFC8 A49B
- </td>
- <td class="userIdHeader">Gerrit gerrit@example.com</td>
- <td class="keyHeader">
- <gr-button
- aria-disabled="false"
- link=""
- role="button"
- tabindex="0"
- >
- Click to View
- </gr-button>
- </td>
- <td>
- <gr-copy-clipboard
- buttontitle="Copy GPG public key to clipboard"
- hastooltip=""
- hideinput=""
- >
- </gr-copy-clipboard>
- </td>
- <td>
- <gr-button aria-disabled="false" role="button" tabindex="0">
- Delete
- </gr-button>
- </td>
- </tr>
- </tbody>
- </table>
- <gr-overlay
- aria-hidden="true"
- id="viewKeyOverlay"
- style="outline: none; display: none;"
- tabindex="-1"
- with-backdrop=""
- >
- <fieldset>
- <section>
- <span class="title"> Status </span> <span class="value"> </span>
- </section>
- <section>
- <span class="title"> Key </span> <span class="value"> </span>
- </section>
- </fieldset>
- <gr-button
- aria-disabled="false"
- class="closeButton"
- role="button"
- tabindex="0"
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `<div class="gr-form-styles">
+ <fieldset id="existing">
+ <table>
+ <thead>
+ <tr>
+ <th class="idColumn">ID</th>
+ <th class="fingerPrintColumn">Fingerprint</th>
+ <th class="userIdHeader">User IDs</th>
+ <th class="keyHeader">Public Key</th>
+ <th></th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="idColumn">AFC8A49B</td>
+ <td class="fingerPrintColumn">
+ 0192 723D 42D1 0C5B 32A6 E1E0 9350 9E4B AFC8 A49B
+ </td>
+ <td class="userIdHeader">John Doe john.doe@example.com</td>
+ <td class="keyHeader">
+ <gr-button
+ aria-disabled="false"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Click to View
+ </gr-button>
+ </td>
+ <td>
+ <gr-copy-clipboard
+ buttontitle="Copy GPG public key to clipboard"
+ hastooltip=""
+ hideinput=""
+ >
+ </gr-copy-clipboard>
+ </td>
+ <td>
+ <gr-button aria-disabled="false" role="button" tabindex="0">
+ Delete
+ </gr-button>
+ </td>
+ </tr>
+ <tr>
+ <td class="idColumn">AED9B59C</td>
+ <td class="fingerPrintColumn">
+ 0196 723D 42D1 0C5B 32A6 E1E0 9350 9E4B AFC8 A49B
+ </td>
+ <td class="userIdHeader">Gerrit gerrit@example.com</td>
+ <td class="keyHeader">
+ <gr-button
+ aria-disabled="false"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Click to View
+ </gr-button>
+ </td>
+ <td>
+ <gr-copy-clipboard
+ buttontitle="Copy GPG public key to clipboard"
+ hastooltip=""
+ hideinput=""
+ >
+ </gr-copy-clipboard>
+ </td>
+ <td>
+ <gr-button aria-disabled="false" role="button" tabindex="0">
+ Delete
+ </gr-button>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <gr-overlay
+ aria-hidden="true"
+ id="viewKeyOverlay"
+ style="outline: none; display: none;"
+ tabindex="-1"
+ with-backdrop=""
>
- Close
- </gr-button>
- </gr-overlay>
- <gr-button aria-disabled="true" disabled="" role="button" tabindex="-1">
- Save changes
- </gr-button>
- </fieldset>
- <fieldset>
- <section>
- <span class="title"> New GPG key </span>
- <span class="value">
- <iron-autogrow-textarea
+ <fieldset>
+ <section>
+ <span class="title"> Status </span> <span class="value"> </span>
+ </section>
+ <section>
+ <span class="title"> Key </span> <span class="value"> </span>
+ </section>
+ </fieldset>
+ <gr-button
aria-disabled="false"
- autocomplete="on"
- id="newKey"
- placeholder="New GPG Key"
+ class="closeButton"
+ role="button"
+ tabindex="0"
>
- </iron-autogrow-textarea>
- </span>
- </section>
- <gr-button
- aria-disabled="true"
- disabled=""
- id="addButton"
- role="button"
- tabindex="-1"
- >
- Add new GPG key
- </gr-button>
- </fieldset>
- </div> `);
+ Close
+ </gr-button>
+ </gr-overlay>
+ <gr-button
+ aria-disabled="true"
+ disabled=""
+ role="button"
+ tabindex="-1"
+ >
+ Save changes
+ </gr-button>
+ </fieldset>
+ <fieldset>
+ <section>
+ <span class="title"> New GPG key </span>
+ <span class="value">
+ <iron-autogrow-textarea
+ aria-disabled="false"
+ autocomplete="on"
+ id="newKey"
+ placeholder="New GPG Key"
+ >
+ </iron-autogrow-textarea>
+ </span>
+ </section>
+ <gr-button
+ aria-disabled="true"
+ disabled=""
+ id="addButton"
+ role="button"
+ tabindex="-1"
+ >
+ Add new GPG key
+ </gr-button>
+ </fieldset>
+ </div> `
+ );
});
test('renders', () => {
diff --git a/polygerrit-ui/app/elements/settings/gr-group-list/gr-group-list_test.ts b/polygerrit-ui/app/elements/settings/gr-group-list/gr-group-list_test.ts
index 0b1b294..084f425b 100644
--- a/polygerrit-ui/app/elements/settings/gr-group-list/gr-group-list_test.ts
+++ b/polygerrit-ui/app/elements/settings/gr-group-list/gr-group-list_test.ts
@@ -51,42 +51,45 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="gr-form-styles">
- <table id="groups">
- <thead>
- <tr>
- <th class="nameHeader">Name</th>
- <th class="descriptionHeader">Description</th>
- <th class="visibleCell">Visible to all</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="nameColumn">
- <a href=""> Group 1 </a>
- </td>
- <td>Group 1 description</td>
- <td class="visibleCell">No</td>
- </tr>
- <tr>
- <td class="nameColumn">
- <a href=""> Group 2 </a>
- </td>
- <td></td>
- <td class="visibleCell">Yes</td>
- </tr>
- <tr>
- <td class="nameColumn">
- <a href=""> Group 3 </a>
- </td>
- <td></td>
- <td class="visibleCell">No</td>
- </tr>
- </tbody>
- </table>
- </div>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="gr-form-styles">
+ <table id="groups">
+ <thead>
+ <tr>
+ <th class="nameHeader">Name</th>
+ <th class="descriptionHeader">Description</th>
+ <th class="visibleCell">Visible to all</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="nameColumn">
+ <a href=""> Group 1 </a>
+ </td>
+ <td>Group 1 description</td>
+ <td class="visibleCell">No</td>
+ </tr>
+ <tr>
+ <td class="nameColumn">
+ <a href=""> Group 2 </a>
+ </td>
+ <td></td>
+ <td class="visibleCell">Yes</td>
+ </tr>
+ <tr>
+ <td class="nameColumn">
+ <a href=""> Group 3 </a>
+ </td>
+ <td></td>
+ <td class="visibleCell">No</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ `
+ );
});
test('_computeGroupPath', () => {
diff --git a/polygerrit-ui/app/elements/settings/gr-http-password/gr-http-password_test.ts b/polygerrit-ui/app/elements/settings/gr-http-password/gr-http-password_test.ts
index 1a097ac..452bd62 100644
--- a/polygerrit-ui/app/elements/settings/gr-http-password/gr-http-password_test.ts
+++ b/polygerrit-ui/app/elements/settings/gr-http-password/gr-http-password_test.ts
@@ -36,62 +36,65 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="gr-form-styles">
- <div>
- <section>
- <span class="title"> Username </span>
- <span class="value"> user name </span>
- </section>
- <gr-button
- aria-disabled="false"
- id="generateButton"
- role="button"
- tabindex="0"
- >
- Generate new password
- </gr-button>
- </div>
- <span hidden="">
- <a href="" rel="noopener" target="_blank"> Obtain password </a>
- (opens in a new tab)
- </span>
- </div>
- <gr-overlay
- aria-hidden="true"
- id="generatedPasswordOverlay"
- style="outline: none; display: none;"
- tabindex="-1"
- with-backdrop=""
- >
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
<div class="gr-form-styles">
- <section id="generatedPasswordDisplay">
- <span class="title"> New Password: </span>
- <span class="value"> </span>
- <gr-copy-clipboard
- buttontitle="Copy password to clipboard"
- hastooltip=""
- hideinput=""
+ <div>
+ <section>
+ <span class="title"> Username </span>
+ <span class="value"> user name </span>
+ </section>
+ <gr-button
+ aria-disabled="false"
+ id="generateButton"
+ role="button"
+ tabindex="0"
>
- </gr-copy-clipboard>
- </section>
- <section id="passwordWarning">
- This password will not be displayed again.
- <br />
- If you lose it, you will need to generate a new one.
- </section>
- <gr-button
- aria-disabled="false"
- class="closeButton"
- link=""
- role="button"
- tabindex="0"
- >
- Close
- </gr-button>
+ Generate new password
+ </gr-button>
+ </div>
+ <span hidden="">
+ <a href="" rel="noopener" target="_blank"> Obtain password </a>
+ (opens in a new tab)
+ </span>
</div>
- </gr-overlay>
- `);
+ <gr-overlay
+ aria-hidden="true"
+ id="generatedPasswordOverlay"
+ style="outline: none; display: none;"
+ tabindex="-1"
+ with-backdrop=""
+ >
+ <div class="gr-form-styles">
+ <section id="generatedPasswordDisplay">
+ <span class="title"> New Password: </span>
+ <span class="value"> </span>
+ <gr-copy-clipboard
+ buttontitle="Copy password to clipboard"
+ hastooltip=""
+ hideinput=""
+ >
+ </gr-copy-clipboard>
+ </section>
+ <section id="passwordWarning">
+ This password will not be displayed again.
+ <br />
+ If you lose it, you will need to generate a new one.
+ </section>
+ <gr-button
+ aria-disabled="false"
+ class="closeButton"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Close
+ </gr-button>
+ </div>
+ </gr-overlay>
+ `
+ );
});
test('generate password', () => {
diff --git a/polygerrit-ui/app/elements/settings/gr-identities/gr-identities_test.ts b/polygerrit-ui/app/elements/settings/gr-identities/gr-identities_test.ts
index b4e4d8e..fff4cd3 100644
--- a/polygerrit-ui/app/elements/settings/gr-identities/gr-identities_test.ts
+++ b/polygerrit-ui/app/elements/settings/gr-identities/gr-identities_test.ts
@@ -46,64 +46,70 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `<div class="gr-form-styles">
- <fieldset class="space">
- <table>
- <thead>
- <tr>
- <th class="statusHeader">Status</th>
- <th class="emailAddressHeader">Email Address</th>
- <th class="identityHeader">Identity</th>
- <th class="deleteHeader"></th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="statusColumn">Untrusted</td>
- <td class="emailAddressColumn">gerrit@example.com</td>
- <td class="identityColumn">gerrit:gerrit</td>
- <td class="deleteColumn">
- <gr-button
- aria-disabled="false"
- class="deleteButton"
- data-index="0"
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr>
- <td class="statusColumn"></td>
- <td class="emailAddressColumn">gerrit2@example.com</td>
- <td class="identityColumn"></td>
- <td class="deleteColumn">
- <gr-button
- aria-disabled="false"
- class="deleteButton show"
- data-index="1"
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- </tbody>
- </table>
- </fieldset>
- </div>
- <gr-overlay
- aria-hidden="true"
- id="overlay"
- style="outline: none; display: none;"
- tabindex="-1"
- with-backdrop=""
- >
- <gr-confirm-delete-item-dialog class="confirmDialog" itemtypename="ID">
- </gr-confirm-delete-item-dialog
- ></gr-overlay>`);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `<div class="gr-form-styles">
+ <fieldset class="space">
+ <table>
+ <thead>
+ <tr>
+ <th class="statusHeader">Status</th>
+ <th class="emailAddressHeader">Email Address</th>
+ <th class="identityHeader">Identity</th>
+ <th class="deleteHeader"></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="statusColumn">Untrusted</td>
+ <td class="emailAddressColumn">gerrit@example.com</td>
+ <td class="identityColumn">gerrit:gerrit</td>
+ <td class="deleteColumn">
+ <gr-button
+ aria-disabled="false"
+ class="deleteButton"
+ data-index="0"
+ role="button"
+ tabindex="0"
+ >
+ Delete
+ </gr-button>
+ </td>
+ </tr>
+ <tr>
+ <td class="statusColumn"></td>
+ <td class="emailAddressColumn">gerrit2@example.com</td>
+ <td class="identityColumn"></td>
+ <td class="deleteColumn">
+ <gr-button
+ aria-disabled="false"
+ class="deleteButton show"
+ data-index="1"
+ role="button"
+ tabindex="0"
+ >
+ Delete
+ </gr-button>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </fieldset>
+ </div>
+ <gr-overlay
+ aria-hidden="true"
+ id="overlay"
+ style="outline: none; display: none;"
+ tabindex="-1"
+ with-backdrop=""
+ >
+ <gr-confirm-delete-item-dialog
+ class="confirmDialog"
+ itemtypename="ID"
+ >
+ </gr-confirm-delete-item-dialog
+ ></gr-overlay>`
+ );
});
test('renders', () => {
diff --git a/polygerrit-ui/app/elements/settings/gr-menu-editor/gr-menu-editor_test.ts b/polygerrit-ui/app/elements/settings/gr-menu-editor/gr-menu-editor_test.ts
index c6130df..95e072d 100644
--- a/polygerrit-ui/app/elements/settings/gr-menu-editor/gr-menu-editor_test.ts
+++ b/polygerrit-ui/app/elements/settings/gr-menu-editor/gr-menu-editor_test.ts
@@ -56,189 +56,192 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="gr-form-styles">
- <h2 class="heading-2" id="Menu">Menu</h2>
- <fieldset id="menu">
- <table>
- <thead>
- <tr>
- <th>Name</th>
- <th>URL</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>first name</td>
- <td class="urlCell">/first/url</td>
- <td class="buttonColumn">
- <gr-button
- aria-disabled="false"
- class="moveUpButton"
- data-index="0"
- link=""
- role="button"
- tabindex="0"
- >
- ↑
- </gr-button>
- </td>
- <td class="buttonColumn">
- <gr-button
- aria-disabled="false"
- class="moveDownButton"
- data-index="0"
- link=""
- role="button"
- tabindex="0"
- >
- ↓
- </gr-button>
- </td>
- <td>
- <gr-button
- aria-disabled="false"
- class="remove-button"
- data-index="0"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr>
- <td>second name</td>
- <td class="urlCell">/second/url</td>
- <td class="buttonColumn">
- <gr-button
- aria-disabled="false"
- class="moveUpButton"
- data-index="1"
- link=""
- role="button"
- tabindex="0"
- >
- ↑
- </gr-button>
- </td>
- <td class="buttonColumn">
- <gr-button
- aria-disabled="false"
- class="moveDownButton"
- data-index="1"
- link=""
- role="button"
- tabindex="0"
- >
- ↓
- </gr-button>
- </td>
- <td>
- <gr-button
- aria-disabled="false"
- class="remove-button"
- data-index="1"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr>
- <td>third name</td>
- <td class="urlCell">/third/url</td>
- <td class="buttonColumn">
- <gr-button
- aria-disabled="false"
- class="moveUpButton"
- data-index="2"
- link=""
- role="button"
- tabindex="0"
- >
- ↑
- </gr-button>
- </td>
- <td class="buttonColumn">
- <gr-button
- aria-disabled="false"
- class="moveDownButton"
- data-index="2"
- link=""
- role="button"
- tabindex="0"
- >
- ↓
- </gr-button>
- </td>
- <td>
- <gr-button
- aria-disabled="false"
- class="remove-button"
- data-index="2"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- </tbody>
- <tfoot>
- <tr>
- <th>
- <iron-input>
- <input is="iron-input" placeholder="New Title" />
- </iron-input>
- </th>
- <th>
- <iron-input>
- <input class="newUrlInput" placeholder="New URL" />
- </iron-input>
- </th>
- <th></th>
- <th></th>
- <th>
- <gr-button
- aria-disabled="true"
- disabled=""
- id="add"
- link=""
- role="button"
- tabindex="-1"
- >
- Add
- </gr-button>
- </th>
- </tr>
- </tfoot>
- </table>
- <gr-button
- aria-disabled="true"
- disabled=""
- id="save"
- role="button"
- tabindex="-1"
- >
- Save changes
- </gr-button>
- <gr-button
- aria-disabled="false"
- id="reset"
- link=""
- role="button"
- tabindex="0"
- >
- Reset
- </gr-button>
- </fieldset>
- </div>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="gr-form-styles">
+ <h2 class="heading-2" id="Menu">Menu</h2>
+ <fieldset id="menu">
+ <table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>URL</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>first name</td>
+ <td class="urlCell">/first/url</td>
+ <td class="buttonColumn">
+ <gr-button
+ aria-disabled="false"
+ class="moveUpButton"
+ data-index="0"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ ↑
+ </gr-button>
+ </td>
+ <td class="buttonColumn">
+ <gr-button
+ aria-disabled="false"
+ class="moveDownButton"
+ data-index="0"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ ↓
+ </gr-button>
+ </td>
+ <td>
+ <gr-button
+ aria-disabled="false"
+ class="remove-button"
+ data-index="0"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Delete
+ </gr-button>
+ </td>
+ </tr>
+ <tr>
+ <td>second name</td>
+ <td class="urlCell">/second/url</td>
+ <td class="buttonColumn">
+ <gr-button
+ aria-disabled="false"
+ class="moveUpButton"
+ data-index="1"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ ↑
+ </gr-button>
+ </td>
+ <td class="buttonColumn">
+ <gr-button
+ aria-disabled="false"
+ class="moveDownButton"
+ data-index="1"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ ↓
+ </gr-button>
+ </td>
+ <td>
+ <gr-button
+ aria-disabled="false"
+ class="remove-button"
+ data-index="1"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Delete
+ </gr-button>
+ </td>
+ </tr>
+ <tr>
+ <td>third name</td>
+ <td class="urlCell">/third/url</td>
+ <td class="buttonColumn">
+ <gr-button
+ aria-disabled="false"
+ class="moveUpButton"
+ data-index="2"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ ↑
+ </gr-button>
+ </td>
+ <td class="buttonColumn">
+ <gr-button
+ aria-disabled="false"
+ class="moveDownButton"
+ data-index="2"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ ↓
+ </gr-button>
+ </td>
+ <td>
+ <gr-button
+ aria-disabled="false"
+ class="remove-button"
+ data-index="2"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Delete
+ </gr-button>
+ </td>
+ </tr>
+ </tbody>
+ <tfoot>
+ <tr>
+ <th>
+ <iron-input>
+ <input is="iron-input" placeholder="New Title" />
+ </iron-input>
+ </th>
+ <th>
+ <iron-input>
+ <input class="newUrlInput" placeholder="New URL" />
+ </iron-input>
+ </th>
+ <th></th>
+ <th></th>
+ <th>
+ <gr-button
+ aria-disabled="true"
+ disabled=""
+ id="add"
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Add
+ </gr-button>
+ </th>
+ </tr>
+ </tfoot>
+ </table>
+ <gr-button
+ aria-disabled="true"
+ disabled=""
+ id="save"
+ role="button"
+ tabindex="-1"
+ >
+ Save changes
+ </gr-button>
+ <gr-button
+ aria-disabled="false"
+ id="reset"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Reset
+ </gr-button>
+ </fieldset>
+ </div>
+ `
+ );
});
test('add button disabled', async () => {
diff --git a/polygerrit-ui/app/elements/settings/gr-registration-dialog/gr-registration-dialog_test.ts b/polygerrit-ui/app/elements/settings/gr-registration-dialog/gr-registration-dialog_test.ts
index cb953d9..242aca4 100644
--- a/polygerrit-ui/app/elements/settings/gr-registration-dialog/gr-registration-dialog_test.ts
+++ b/polygerrit-ui/app/elements/settings/gr-registration-dialog/gr-registration-dialog_test.ts
@@ -102,7 +102,9 @@
test('renders', () => {
// cannot format with /* HTML */, because it breaks test
- expect(element).shadowDom.to.equal(/* HTML*/ `<div
+ assert.shadowDom.equal(
+ element,
+ /* HTML*/ `<div
class="container gr-form-styles"
>
<header>Please confirm your contact information</header>
@@ -164,7 +166,8 @@
Save
</gr-button>
</footer>
- </div>`);
+ </div>`
+ );
});
test('fires the close event on close', async () => {
diff --git a/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-view_test.ts b/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-view_test.ts
index d407de1..43997e5 100644
--- a/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-view_test.ts
+++ b/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-view_test.ts
@@ -125,7 +125,9 @@
element.docsBaseUrl = 'https://test.com';
await element.updateComplete;
// this cannot be formatted with /* HTML */, because it breaks test
- expect(element).shadowDom.to.equal(/* HTML*/ `<div
+ assert.shadowDom.equal(
+ element,
+ /* HTML*/ `<div
class="loading"
hidden=""
>
@@ -512,7 +514,8 @@
<gr-endpoint-decorator name="settings-screen">
</gr-endpoint-decorator>
</div>
- </div>`);
+ </div>`
+ );
});
test('theme changing', async () => {
diff --git a/polygerrit-ui/app/elements/settings/gr-ssh-editor/gr-ssh-editor_test.ts b/polygerrit-ui/app/elements/settings/gr-ssh-editor/gr-ssh-editor_test.ts
index 09e952c..d5302dc 100644
--- a/polygerrit-ui/app/elements/settings/gr-ssh-editor/gr-ssh-editor_test.ts
+++ b/polygerrit-ui/app/elements/settings/gr-ssh-editor/gr-ssh-editor_test.ts
@@ -46,147 +46,150 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="gr-form-styles">
- <fieldset id="existing">
- <table>
- <thead>
- <tr>
- <th class="commentColumn">Comment</th>
- <th class="statusHeader">Status</th>
- <th class="keyHeader">Public key</th>
- <th></th>
- <th></th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="commentColumn">comment-one@machine-one</td>
- <td>Valid</td>
- <td>
- <gr-button
- aria-disabled="false"
- data-index="0"
- link=""
- role="button"
- tabindex="0"
- >
- Click to View
- </gr-button>
- </td>
- <td>
- <gr-copy-clipboard hastooltip="" hideinput="">
- </gr-copy-clipboard>
- </td>
- <td>
- <gr-button
- aria-disabled="false"
- data-index="0"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr>
- <td class="commentColumn">comment-two@machine-two</td>
- <td>Valid</td>
- <td>
- <gr-button
- aria-disabled="false"
- data-index="1"
- link=""
- role="button"
- tabindex="0"
- >
- Click to View
- </gr-button>
- </td>
- <td>
- <gr-copy-clipboard hastooltip="" hideinput="">
- </gr-copy-clipboard>
- </td>
- <td>
- <gr-button
- aria-disabled="false"
- data-index="1"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- </tbody>
- </table>
- <gr-overlay
- aria-hidden="true"
- id="viewKeyOverlay"
- style="outline: none; display: none;"
- tabindex="-1"
- with-backdrop=""
- >
- <fieldset>
- <section>
- <span class="title"> Algorithm </span>
- <span class="value"> </span>
- </section>
- <section>
- <span class="title"> Public key </span>
- <span class="publicKey value"> </span>
- </section>
- <section>
- <span class="title"> Comment </span>
- <span class="value"> </span>
- </section>
- </fieldset>
- <gr-button
- aria-disabled="false"
- class="closeButton"
- role="button"
- tabindex="0"
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="gr-form-styles">
+ <fieldset id="existing">
+ <table>
+ <thead>
+ <tr>
+ <th class="commentColumn">Comment</th>
+ <th class="statusHeader">Status</th>
+ <th class="keyHeader">Public key</th>
+ <th></th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="commentColumn">comment-one@machine-one</td>
+ <td>Valid</td>
+ <td>
+ <gr-button
+ aria-disabled="false"
+ data-index="0"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Click to View
+ </gr-button>
+ </td>
+ <td>
+ <gr-copy-clipboard hastooltip="" hideinput="">
+ </gr-copy-clipboard>
+ </td>
+ <td>
+ <gr-button
+ aria-disabled="false"
+ data-index="0"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Delete
+ </gr-button>
+ </td>
+ </tr>
+ <tr>
+ <td class="commentColumn">comment-two@machine-two</td>
+ <td>Valid</td>
+ <td>
+ <gr-button
+ aria-disabled="false"
+ data-index="1"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Click to View
+ </gr-button>
+ </td>
+ <td>
+ <gr-copy-clipboard hastooltip="" hideinput="">
+ </gr-copy-clipboard>
+ </td>
+ <td>
+ <gr-button
+ aria-disabled="false"
+ data-index="1"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Delete
+ </gr-button>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <gr-overlay
+ aria-hidden="true"
+ id="viewKeyOverlay"
+ style="outline: none; display: none;"
+ tabindex="-1"
+ with-backdrop=""
>
- Close
- </gr-button>
- </gr-overlay>
- <gr-button
- aria-disabled="true"
- disabled=""
- role="button"
- tabindex="-1"
- >
- Save changes
- </gr-button>
- </fieldset>
- <fieldset>
- <section>
- <span class="title"> New SSH key </span>
- <span class="value">
- <iron-autogrow-textarea
+ <fieldset>
+ <section>
+ <span class="title"> Algorithm </span>
+ <span class="value"> </span>
+ </section>
+ <section>
+ <span class="title"> Public key </span>
+ <span class="publicKey value"> </span>
+ </section>
+ <section>
+ <span class="title"> Comment </span>
+ <span class="value"> </span>
+ </section>
+ </fieldset>
+ <gr-button
aria-disabled="false"
- autocomplete="on"
- id="newKey"
- placeholder="New SSH Key"
+ class="closeButton"
+ role="button"
+ tabindex="0"
>
- </iron-autogrow-textarea>
- </span>
- </section>
- <gr-button
- aria-disabled="true"
- disabled=""
- id="addButton"
- link=""
- role="button"
- tabindex="-1"
- >
- Add new SSH key
- </gr-button>
- </fieldset>
- </div>
- `);
+ Close
+ </gr-button>
+ </gr-overlay>
+ <gr-button
+ aria-disabled="true"
+ disabled=""
+ role="button"
+ tabindex="-1"
+ >
+ Save changes
+ </gr-button>
+ </fieldset>
+ <fieldset>
+ <section>
+ <span class="title"> New SSH key </span>
+ <span class="value">
+ <iron-autogrow-textarea
+ aria-disabled="false"
+ autocomplete="on"
+ id="newKey"
+ placeholder="New SSH Key"
+ >
+ </iron-autogrow-textarea>
+ </span>
+ </section>
+ <gr-button
+ aria-disabled="true"
+ disabled=""
+ id="addButton"
+ link=""
+ role="button"
+ tabindex="-1"
+ >
+ Add new SSH key
+ </gr-button>
+ </fieldset>
+ </div>
+ `
+ );
});
test('remove key', async () => {
diff --git a/polygerrit-ui/app/elements/settings/gr-watched-projects-editor/gr-watched-projects-editor_test.ts b/polygerrit-ui/app/elements/settings/gr-watched-projects-editor/gr-watched-projects-editor_test.ts
index 0c2c2ef..bf14488 100644
--- a/polygerrit-ui/app/elements/settings/gr-watched-projects-editor/gr-watched-projects-editor_test.ts
+++ b/polygerrit-ui/app/elements/settings/gr-watched-projects-editor/gr-watched-projects-editor_test.ts
@@ -64,201 +64,204 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="gr-form-styles">
- <table id="watchedProjects">
- <thead>
- <tr>
- <th>Repo</th>
- <th class="notifType">Changes</th>
- <th class="notifType">Patches</th>
- <th class="notifType">Comments</th>
- <th class="notifType">Submits</th>
- <th class="notifType">Abandons</th>
- <th></th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>project a</td>
- <td class="notifControl">
- <input data-key="notify_new_changes" type="checkbox" />
- </td>
- <td class="notifControl">
- <input data-key="notify_new_patch_sets" type="checkbox" />
- </td>
- <td class="notifControl">
- <input data-key="notify_all_comments" type="checkbox" />
- </td>
- <td class="notifControl">
- <input
- checked=""
- data-key="notify_submitted_changes"
- type="checkbox"
- />
- </td>
- <td class="notifControl">
- <input
- checked=""
- data-key="notify_abandoned_changes"
- type="checkbox"
- />
- </td>
- <td>
- <gr-button
- aria-disabled="false"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr>
- <td>
- project b
- <div class="projectFilter">filter 1</div>
- </td>
- <td class="notifControl">
- <input
- checked=""
- data-key="notify_new_changes"
- type="checkbox"
- />
- </td>
- <td class="notifControl">
- <input data-key="notify_new_patch_sets" type="checkbox" />
- </td>
- <td class="notifControl">
- <input data-key="notify_all_comments" type="checkbox" />
- </td>
- <td class="notifControl">
- <input data-key="notify_submitted_changes" type="checkbox" />
- </td>
- <td class="notifControl">
- <input data-key="notify_abandoned_changes" type="checkbox" />
- </td>
- <td>
- <gr-button
- aria-disabled="false"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr>
- <td>
- project b
- <div class="projectFilter">filter 2</div>
- </td>
- <td class="notifControl">
- <input data-key="notify_new_changes" type="checkbox" />
- </td>
- <td class="notifControl">
- <input data-key="notify_new_patch_sets" type="checkbox" />
- </td>
- <td class="notifControl">
- <input data-key="notify_all_comments" type="checkbox" />
- </td>
- <td class="notifControl">
- <input data-key="notify_submitted_changes" type="checkbox" />
- </td>
- <td class="notifControl">
- <input data-key="notify_abandoned_changes" type="checkbox" />
- </td>
- <td>
- <gr-button
- aria-disabled="false"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- <tr>
- <td>project c</td>
- <td class="notifControl">
- <input
- checked=""
- data-key="notify_new_changes"
- type="checkbox"
- />
- </td>
- <td class="notifControl">
- <input
- checked=""
- data-key="notify_new_patch_sets"
- type="checkbox"
- />
- </td>
- <td class="notifControl">
- <input
- checked=""
- data-key="notify_all_comments"
- type="checkbox"
- />
- </td>
- <td class="notifControl">
- <input data-key="notify_submitted_changes" type="checkbox" />
- </td>
- <td class="notifControl">
- <input data-key="notify_abandoned_changes" type="checkbox" />
- </td>
- <td>
- <gr-button
- aria-disabled="false"
- link=""
- role="button"
- tabindex="0"
- >
- Delete
- </gr-button>
- </td>
- </tr>
- </tbody>
- <tfoot>
- <tr>
- <th>
- <gr-autocomplete
- allow-non-suggested-values=""
- id="newProject"
- placeholder="Repo"
- query="input => this.getProjectSuggestions(input)"
- tab-complete=""
- threshold="1"
- >
- </gr-autocomplete>
- </th>
- <th colspan="5">
- <iron-input class="newFilterInput" id="newFilterInput">
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="gr-form-styles">
+ <table id="watchedProjects">
+ <thead>
+ <tr>
+ <th>Repo</th>
+ <th class="notifType">Changes</th>
+ <th class="notifType">Patches</th>
+ <th class="notifType">Comments</th>
+ <th class="notifType">Submits</th>
+ <th class="notifType">Abandons</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>project a</td>
+ <td class="notifControl">
+ <input data-key="notify_new_changes" type="checkbox" />
+ </td>
+ <td class="notifControl">
+ <input data-key="notify_new_patch_sets" type="checkbox" />
+ </td>
+ <td class="notifControl">
+ <input data-key="notify_all_comments" type="checkbox" />
+ </td>
+ <td class="notifControl">
<input
- class="newFilterInput"
- id="newFilter"
- placeholder="branch:name, or other search expression"
+ checked=""
+ data-key="notify_submitted_changes"
+ type="checkbox"
/>
- </iron-input>
- </th>
- <th>
- <gr-button
- aria-disabled="false"
- link=""
- role="button"
- tabindex="0"
- >
- Add
- </gr-button>
- </th>
- </tr>
- </tfoot>
- </table>
- </div>
- `);
+ </td>
+ <td class="notifControl">
+ <input
+ checked=""
+ data-key="notify_abandoned_changes"
+ type="checkbox"
+ />
+ </td>
+ <td>
+ <gr-button
+ aria-disabled="false"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Delete
+ </gr-button>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ project b
+ <div class="projectFilter">filter 1</div>
+ </td>
+ <td class="notifControl">
+ <input
+ checked=""
+ data-key="notify_new_changes"
+ type="checkbox"
+ />
+ </td>
+ <td class="notifControl">
+ <input data-key="notify_new_patch_sets" type="checkbox" />
+ </td>
+ <td class="notifControl">
+ <input data-key="notify_all_comments" type="checkbox" />
+ </td>
+ <td class="notifControl">
+ <input data-key="notify_submitted_changes" type="checkbox" />
+ </td>
+ <td class="notifControl">
+ <input data-key="notify_abandoned_changes" type="checkbox" />
+ </td>
+ <td>
+ <gr-button
+ aria-disabled="false"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Delete
+ </gr-button>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ project b
+ <div class="projectFilter">filter 2</div>
+ </td>
+ <td class="notifControl">
+ <input data-key="notify_new_changes" type="checkbox" />
+ </td>
+ <td class="notifControl">
+ <input data-key="notify_new_patch_sets" type="checkbox" />
+ </td>
+ <td class="notifControl">
+ <input data-key="notify_all_comments" type="checkbox" />
+ </td>
+ <td class="notifControl">
+ <input data-key="notify_submitted_changes" type="checkbox" />
+ </td>
+ <td class="notifControl">
+ <input data-key="notify_abandoned_changes" type="checkbox" />
+ </td>
+ <td>
+ <gr-button
+ aria-disabled="false"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Delete
+ </gr-button>
+ </td>
+ </tr>
+ <tr>
+ <td>project c</td>
+ <td class="notifControl">
+ <input
+ checked=""
+ data-key="notify_new_changes"
+ type="checkbox"
+ />
+ </td>
+ <td class="notifControl">
+ <input
+ checked=""
+ data-key="notify_new_patch_sets"
+ type="checkbox"
+ />
+ </td>
+ <td class="notifControl">
+ <input
+ checked=""
+ data-key="notify_all_comments"
+ type="checkbox"
+ />
+ </td>
+ <td class="notifControl">
+ <input data-key="notify_submitted_changes" type="checkbox" />
+ </td>
+ <td class="notifControl">
+ <input data-key="notify_abandoned_changes" type="checkbox" />
+ </td>
+ <td>
+ <gr-button
+ aria-disabled="false"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Delete
+ </gr-button>
+ </td>
+ </tr>
+ </tbody>
+ <tfoot>
+ <tr>
+ <th>
+ <gr-autocomplete
+ allow-non-suggested-values=""
+ id="newProject"
+ placeholder="Repo"
+ query="input => this.getProjectSuggestions(input)"
+ tab-complete=""
+ threshold="1"
+ >
+ </gr-autocomplete>
+ </th>
+ <th colspan="5">
+ <iron-input class="newFilterInput" id="newFilterInput">
+ <input
+ class="newFilterInput"
+ id="newFilter"
+ placeholder="branch:name, or other search expression"
+ />
+ </iron-input>
+ </th>
+ <th>
+ <gr-button
+ aria-disabled="false"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Add
+ </gr-button>
+ </th>
+ </tr>
+ </tfoot>
+ </table>
+ </div>
+ `
+ );
});
test('getProjectSuggestions empty', async () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-account-chip/gr-account-chip_test.ts b/polygerrit-ui/app/elements/shared/gr-account-chip/gr-account-chip_test.ts
index 408bb74..feb1061 100644
--- a/polygerrit-ui/app/elements/shared/gr-account-chip/gr-account-chip_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-account-chip/gr-account-chip_test.ts
@@ -25,25 +25,28 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="container">
- <div>
- <gr-account-label clickable="" deselected=""></gr-account-label>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="container">
+ <div>
+ <gr-account-label clickable="" deselected=""></gr-account-label>
+ </div>
+ <slot name="vote-chip"></slot>
+ <gr-button
+ aria-disabled="false"
+ aria-label="Remove"
+ class="remove"
+ hidden=""
+ id="remove"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ <gr-icon icon="close"></gr-icon>
+ </gr-button>
</div>
- <slot name="vote-chip"></slot>
- <gr-button
- aria-disabled="false"
- aria-label="Remove"
- class="remove"
- hidden=""
- id="remove"
- link=""
- role="button"
- tabindex="0"
- >
- <gr-icon icon="close"></gr-icon>
- </gr-button>
- </div>
- `);
+ `
+ );
});
});
diff --git a/polygerrit-ui/app/elements/shared/gr-account-entry/gr-account-entry_test.ts b/polygerrit-ui/app/elements/shared/gr-account-entry/gr-account-entry_test.ts
index 285380e..52d5bc2 100644
--- a/polygerrit-ui/app/elements/shared/gr-account-entry/gr-account-entry_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-account-entry/gr-account-entry_test.ts
@@ -22,15 +22,18 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-autocomplete
- allow-non-suggested-values="false"
- clear-on-commit=""
- id="input"
- warn-uncommitted=""
- >
- </gr-autocomplete>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-autocomplete
+ allow-non-suggested-values="false"
+ clear-on-commit=""
+ id="input"
+ warn-uncommitted=""
+ >
+ </gr-autocomplete>
+ `
+ );
});
test('account-text-changed fired when input text changed and allowAnyInput', async () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label_test.ts b/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label_test.ts
index 1eb8711..0395a5d 100644
--- a/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label_test.ts
@@ -52,40 +52,11 @@
test('renders', async () => {
element.account = kermit;
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="container">
- <gr-hovercard-account for="hovercardTarget"></gr-hovercard-account>
- <span class="hovercardTargetWrapper">
- <gr-avatar hidden="" imagesize="32"> </gr-avatar>
- <span
- class="name"
- id="hovercardTarget"
- part="gr-account-label-text"
- role="button"
- tabindex="0"
- >
- kermit
- </span>
- <gr-endpoint-decorator
- class="accountStatusDecorator"
- name="account-status-icon"
- >
- <gr-endpoint-param name="accountId"></gr-endpoint-param>
- <span class="rightSidePadding"></span>
- </gr-endpoint-decorator>
- </span>
- </div>
- `);
- });
-
- test('renders clickable', async () => {
- element.account = kermit;
- element.clickable = true;
- await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="container">
- <gr-hovercard-account for="hovercardTarget"></gr-hovercard-account>
- <a class="ownerLink" href="test" tabindex="-1">
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="container">
+ <gr-hovercard-account for="hovercardTarget"></gr-hovercard-account>
<span class="hovercardTargetWrapper">
<gr-avatar hidden="" imagesize="32"> </gr-avatar>
<span
@@ -105,9 +76,44 @@
<span class="rightSidePadding"></span>
</gr-endpoint-decorator>
</span>
- </a>
- </div>
- `);
+ </div>
+ `
+ );
+ });
+
+ test('renders clickable', async () => {
+ element.account = kermit;
+ element.clickable = true;
+ await element.updateComplete;
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="container">
+ <gr-hovercard-account for="hovercardTarget"></gr-hovercard-account>
+ <a class="ownerLink" href="test" tabindex="-1">
+ <span class="hovercardTargetWrapper">
+ <gr-avatar hidden="" imagesize="32"> </gr-avatar>
+ <span
+ class="name"
+ id="hovercardTarget"
+ part="gr-account-label-text"
+ role="button"
+ tabindex="0"
+ >
+ kermit
+ </span>
+ <gr-endpoint-decorator
+ class="accountStatusDecorator"
+ name="account-status-icon"
+ >
+ <gr-endpoint-param name="accountId"></gr-endpoint-param>
+ <span class="rightSidePadding"></span>
+ </gr-endpoint-decorator>
+ </span>
+ </a>
+ </div>
+ `
+ );
});
suite('_computeName', () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-account-list/gr-account-list_test.ts b/polygerrit-ui/app/elements/shared/gr-account-list/gr-account-list_test.ts
index 873b6cf..61100e6 100644
--- a/polygerrit-ui/app/elements/shared/gr-account-list/gr-account-list_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-account-list/gr-account-list_test.ts
@@ -104,7 +104,8 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(
+ assert.shadowDom.equal(
+ element,
/* HTML */
`<div class="list">
<gr-account-chip removable="" tabindex="-1"> </gr-account-chip>
diff --git a/polygerrit-ui/app/elements/shared/gr-alert/gr-alert_test.ts b/polygerrit-ui/app/elements/shared/gr-alert/gr-alert_test.ts
index 643d14c..173d154 100644
--- a/polygerrit-ui/app/elements/shared/gr-alert/gr-alert_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-alert/gr-alert_test.ts
@@ -27,20 +27,23 @@
element.show('Alert text');
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="content-wrapper">
- <span class="text"> Alert text </span>
- <gr-button
- aria-disabled="false"
- class="action"
- hidden=""
- link=""
- role="button"
- tabindex="0"
- >
- </gr-button>
- </div>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="content-wrapper">
+ <span class="text"> Alert text </span>
+ <gr-button
+ aria-disabled="false"
+ class="action"
+ hidden=""
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ </gr-button>
+ </div>
+ `
+ );
});
test('show/hide', async () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-autocomplete-dropdown/gr-autocomplete-dropdown_test.ts b/polygerrit-ui/app/elements/shared/gr-autocomplete-dropdown/gr-autocomplete-dropdown_test.ts
index c9c3922..661d566 100644
--- a/polygerrit-ui/app/elements/shared/gr-autocomplete-dropdown/gr-autocomplete-dropdown_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-autocomplete-dropdown/gr-autocomplete-dropdown_test.ts
@@ -32,42 +32,45 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div
- class="dropdown-content"
- id="suggestions"
- role="listbox"
- slot="dropdown-content"
- >
- <ul>
- <li
- aria-label="test name 1"
- class="autocompleteOption selected"
- data-index="0"
- data-value="test value 1"
- role="option"
- tabindex="-1"
- >
- <span> 1 </span>
- <span class="label"> hi </span>
- </li>
- <li
- aria-label="test name 2"
- class="autocompleteOption"
- data-index="1"
- data-value="test value 2"
- role="option"
- tabindex="-1"
- >
- <span> 2 </span>
- <span class="hide label"> </span>
- </li>
- <dom-repeat style="display: none;">
- <template is="dom-repeat"> </template>
- </dom-repeat>
- </ul>
- </div>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div
+ class="dropdown-content"
+ id="suggestions"
+ role="listbox"
+ slot="dropdown-content"
+ >
+ <ul>
+ <li
+ aria-label="test name 1"
+ class="autocompleteOption selected"
+ data-index="0"
+ data-value="test value 1"
+ role="option"
+ tabindex="-1"
+ >
+ <span> 1 </span>
+ <span class="label"> hi </span>
+ </li>
+ <li
+ aria-label="test name 2"
+ class="autocompleteOption"
+ data-index="1"
+ data-value="test value 2"
+ role="option"
+ tabindex="-1"
+ >
+ <span> 2 </span>
+ <span class="hide label"> </span>
+ </li>
+ <dom-repeat style="display: none;">
+ <template is="dom-repeat"> </template>
+ </dom-repeat>
+ </ul>
+ </div>
+ `
+ );
});
test('shows labels', () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-autocomplete/gr-autocomplete_test.ts b/polygerrit-ui/app/elements/shared/gr-autocomplete/gr-autocomplete_test.ts
index d67637e..3b14184 100644
--- a/polygerrit-ui/app/elements/shared/gr-autocomplete/gr-autocomplete_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-autocomplete/gr-autocomplete_test.ts
@@ -32,7 +32,8 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(
+ assert.shadowDom.equal(
+ element,
/* HTML */ `
<paper-input
aria-disabled="false"
@@ -83,7 +84,8 @@
await waitUntil(() => queryStub.called);
await element.updateComplete;
- expect(element).shadowDom.to.equal(
+ assert.shadowDom.equal(
+ element,
/* HTML */ `
<paper-input
aria-disabled="false"
diff --git a/polygerrit-ui/app/elements/shared/gr-button/gr-button_test.ts b/polygerrit-ui/app/elements/shared/gr-button/gr-button_test.ts
index 031711f..e9d0df1 100644
--- a/polygerrit-ui/app/elements/shared/gr-button/gr-button_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-button/gr-button_test.ts
@@ -32,18 +32,21 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <paper-button
- animated=""
- aria-disabled="false"
- elevation="1"
- part="paper-button"
- raised=""
- role="button"
- tabindex="-1"
- ><slot></slot><i class="downArrow"></i>
- </paper-button>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <paper-button
+ animated=""
+ aria-disabled="false"
+ elevation="1"
+ part="paper-button"
+ raised=""
+ role="button"
+ tabindex="-1"
+ ><slot></slot><i class="downArrow"></i>
+ </paper-button>
+ `
+ );
});
test('disabled is set by disabled', async () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-change-star/gr-change-star_test.ts b/polygerrit-ui/app/elements/shared/gr-change-star/gr-change-star_test.ts
index c9ab39b..14e8819 100644
--- a/polygerrit-ui/app/elements/shared/gr-change-star/gr-change-star_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-change-star/gr-change-star_test.ts
@@ -25,15 +25,18 @@
});
test('renders starred', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <button
- aria-label="Unstar this change"
- role="checkbox"
- title="Star/unstar change (shortcut: s)"
- >
- <gr-icon icon="star_rate" filled class="active"></gr-icon>
- </button>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <button
+ aria-label="Unstar this change"
+ role="checkbox"
+ title="Star/unstar change (shortcut: s)"
+ >
+ <gr-icon icon="star_rate" filled class="active"></gr-icon>
+ </button>
+ `
+ );
});
test('renders unstarred', async () => {
@@ -41,15 +44,18 @@
element.requestUpdate('change');
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <button
- aria-label="Star this change"
- role="checkbox"
- title="Star/unstar change (shortcut: s)"
- >
- <gr-icon icon="star_rate"></gr-icon>
- </button>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <button
+ aria-label="Star this change"
+ role="checkbox"
+ title="Star/unstar change (shortcut: s)"
+ >
+ <gr-icon icon="star_rate"></gr-icon>
+ </button>
+ `
+ );
});
test('starring', async () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status_test.ts b/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status_test.ts
index 8bffa4c..c914690 100644
--- a/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status_test.ts
@@ -29,16 +29,19 @@
element.status = ChangeStates.WIP;
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-tooltip-content
- has-tooltip=""
- max-width="40em"
- position-below=""
- title="This change isn't ready to be reviewed or submitted. It will not appear on dashboards unless you are in the attention set, and email notifications will be silenced until the review is started."
- >
- <div aria-label="Label: WIP" class="chip">Work in Progress</div>
- </gr-tooltip-content>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-tooltip-content
+ has-tooltip=""
+ max-width="40em"
+ position-below=""
+ title="This change isn't ready to be reviewed or submitted. It will not appear on dashboards unless you are in the attention set, and email notifications will be silenced until the review is started."
+ >
+ <div aria-label="Label: WIP" class="chip">Work in Progress</div>
+ </gr-tooltip-content>
+ `
+ );
});
test('WIP', async () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread_test.ts b/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread_test.ts
index 53ebf6a..c9628c7 100644
--- a/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread_test.ts
@@ -85,204 +85,221 @@
test('renders with draft', async () => {
element.thread = createThread(c1, c2, c3);
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="fileName">
- <span>test-path-comment-thread</span>
- <gr-copy-clipboard hideinput=""></gr-copy-clipboard>
- </div>
- <div class="pathInfo">
- <span>#314</span>
- </div>
- <div id="container">
- <h3 class="assistive-tech-only">Draft Comment thread by Kermit</h3>
- <div class="comment-box" tabindex="0">
- <gr-comment
- collapsed=""
- initially-collapsed=""
- robot-button-disabled=""
- show-patchset=""
- ></gr-comment>
- <gr-comment
- collapsed=""
- initially-collapsed=""
- robot-button-disabled=""
- show-patchset=""
- ></gr-comment>
- <gr-comment robot-button-disabled="" show-patchset=""></gr-comment>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="fileName">
+ <span>test-path-comment-thread</span>
+ <gr-copy-clipboard hideinput=""></gr-copy-clipboard>
</div>
- </div>
- `);
+ <div class="pathInfo">
+ <span>#314</span>
+ </div>
+ <div id="container">
+ <h3 class="assistive-tech-only">Draft Comment thread by Kermit</h3>
+ <div class="comment-box" tabindex="0">
+ <gr-comment
+ collapsed=""
+ initially-collapsed=""
+ robot-button-disabled=""
+ show-patchset=""
+ ></gr-comment>
+ <gr-comment
+ collapsed=""
+ initially-collapsed=""
+ robot-button-disabled=""
+ show-patchset=""
+ ></gr-comment>
+ <gr-comment robot-button-disabled="" show-patchset=""></gr-comment>
+ </div>
+ </div>
+ `
+ );
});
test('renders unsaved', async () => {
element.thread = createThread();
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="fileName">
- <span>test-path-comment-thread</span>
- <gr-copy-clipboard hideinput=""></gr-copy-clipboard>
- </div>
- <div class="pathInfo">
- <span>#314</span>
- </div>
- <div id="container">
- <h3 class="assistive-tech-only">
- Unresolved Draft Comment thread by Yoda
- </h3>
- <div class="comment-box unresolved" tabindex="0">
- <gr-comment robot-button-disabled="" show-patchset=""></gr-comment>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="fileName">
+ <span>test-path-comment-thread</span>
+ <gr-copy-clipboard hideinput=""></gr-copy-clipboard>
</div>
- </div>
- `);
+ <div class="pathInfo">
+ <span>#314</span>
+ </div>
+ <div id="container">
+ <h3 class="assistive-tech-only">
+ Unresolved Draft Comment thread by Yoda
+ </h3>
+ <div class="comment-box unresolved" tabindex="0">
+ <gr-comment robot-button-disabled="" show-patchset=""></gr-comment>
+ </div>
+ </div>
+ `
+ );
});
test('renders with actions resolved', async () => {
element.thread = createThread(c1, c2);
await element.updateComplete;
- expect(queryAndAssert(element, '#container')).dom.to.equal(/* HTML */ `
- <div id="container">
- <h3 class="assistive-tech-only">Comment thread by Kermit</h3>
- <div class="comment-box" tabindex="0">
- <gr-comment
- collapsed=""
- initially-collapsed=""
- show-patchset=""
- ></gr-comment>
- <gr-comment
- collapsed=""
- initially-collapsed=""
- show-patchset=""
- ></gr-comment>
- <div id="actionsContainer">
- <span id="unresolvedLabel"> Resolved </span>
- <div id="actions">
- <gr-button
- aria-disabled="false"
- class="action reply"
- id="replyBtn"
- link=""
- role="button"
- tabindex="0"
- >
- Reply
- </gr-button>
- <gr-button
- aria-disabled="false"
- class="action quote"
- id="quoteBtn"
- link=""
- role="button"
- tabindex="0"
- >
- Quote
- </gr-button>
- <gr-icon
- icon="link"
- class="copy link-icon"
- role="button"
- tabindex="0"
- title="Copy link to this comment"
- ></gr-icon>
+ assert.dom.equal(
+ queryAndAssert(element, '#container'),
+ /* HTML */ `
+ <div id="container">
+ <h3 class="assistive-tech-only">Comment thread by Kermit</h3>
+ <div class="comment-box" tabindex="0">
+ <gr-comment
+ collapsed=""
+ initially-collapsed=""
+ show-patchset=""
+ ></gr-comment>
+ <gr-comment
+ collapsed=""
+ initially-collapsed=""
+ show-patchset=""
+ ></gr-comment>
+ <div id="actionsContainer">
+ <span id="unresolvedLabel"> Resolved </span>
+ <div id="actions">
+ <gr-button
+ aria-disabled="false"
+ class="action reply"
+ id="replyBtn"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Reply
+ </gr-button>
+ <gr-button
+ aria-disabled="false"
+ class="action quote"
+ id="quoteBtn"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Quote
+ </gr-button>
+ <gr-icon
+ icon="link"
+ class="copy link-icon"
+ role="button"
+ tabindex="0"
+ title="Copy link to this comment"
+ ></gr-icon>
+ </div>
</div>
</div>
</div>
- </div>
- `);
+ `
+ );
});
test('renders with actions unresolved', async () => {
element.thread = createThread(c1, {...c2, unresolved: true});
await element.updateComplete;
- expect(queryAndAssert(element, '#container')).dom.to.equal(/* HTML */ `
- <div id="container">
- <h3 class="assistive-tech-only">Unresolved Comment thread by Kermit</h3>
- <div class="comment-box unresolved" tabindex="0">
- <gr-comment show-patchset=""></gr-comment>
- <gr-comment show-patchset=""></gr-comment>
- <div id="actionsContainer">
- <span id="unresolvedLabel"> Unresolved </span>
- <div id="actions">
- <gr-button
- aria-disabled="false"
- class="action reply"
- id="replyBtn"
- link=""
- role="button"
- tabindex="0"
- >
- Reply
- </gr-button>
- <gr-button
- aria-disabled="false"
- class="action quote"
- id="quoteBtn"
- link=""
- role="button"
- tabindex="0"
- >
- Quote
- </gr-button>
- <gr-button
- aria-disabled="false"
- class="action ack"
- id="ackBtn"
- link=""
- role="button"
- tabindex="0"
- >
- Ack
- </gr-button>
- <gr-button
- aria-disabled="false"
- class="action done"
- id="doneBtn"
- link=""
- role="button"
- tabindex="0"
- >
- Done
- </gr-button>
- <gr-icon
- icon="link"
- class="copy link-icon"
- role="button"
- tabindex="0"
- title="Copy link to this comment"
- ></gr-icon>
+ assert.dom.equal(
+ queryAndAssert(element, '#container'),
+ /* HTML */ `
+ <div id="container">
+ <h3 class="assistive-tech-only">
+ Unresolved Comment thread by Kermit
+ </h3>
+ <div class="comment-box unresolved" tabindex="0">
+ <gr-comment show-patchset=""></gr-comment>
+ <gr-comment show-patchset=""></gr-comment>
+ <div id="actionsContainer">
+ <span id="unresolvedLabel"> Unresolved </span>
+ <div id="actions">
+ <gr-button
+ aria-disabled="false"
+ class="action reply"
+ id="replyBtn"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Reply
+ </gr-button>
+ <gr-button
+ aria-disabled="false"
+ class="action quote"
+ id="quoteBtn"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Quote
+ </gr-button>
+ <gr-button
+ aria-disabled="false"
+ class="action ack"
+ id="ackBtn"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Ack
+ </gr-button>
+ <gr-button
+ aria-disabled="false"
+ class="action done"
+ id="doneBtn"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Done
+ </gr-button>
+ <gr-icon
+ icon="link"
+ class="copy link-icon"
+ role="button"
+ tabindex="0"
+ title="Copy link to this comment"
+ ></gr-icon>
+ </div>
</div>
</div>
</div>
- </div>
- `);
+ `
+ );
});
test('renders with diff', async () => {
element.showCommentContext = true;
element.thread = createThread(commentWithContext);
await element.updateComplete;
- expect(queryAndAssert(element, '.diff-container')).dom.to.equal(/* HTML */ `
- <div class="diff-container">
- <gr-diff
- class="disable-context-control-buttons hide-line-length-indicator no-left"
- id="diff"
- style="--line-limit-marker:100ch; --content-width:none; --diff-max-width:none; --font-size:12px;"
- >
- </gr-diff>
- <div class="view-diff-container">
- <a href="">
- <gr-button
- aria-disabled="false"
- class="view-diff-button"
- link=""
- role="button"
- tabindex="0"
- >
- View Diff
- </gr-button>
- </a>
+ assert.dom.equal(
+ queryAndAssert(element, '.diff-container'),
+ /* HTML */ `
+ <div class="diff-container">
+ <gr-diff
+ class="disable-context-control-buttons hide-line-length-indicator no-left"
+ id="diff"
+ style="--line-limit-marker:100ch; --content-width:none; --diff-max-width:none; --font-size:12px;"
+ >
+ </gr-diff>
+ <div class="view-diff-container">
+ <a href="">
+ <gr-button
+ aria-disabled="false"
+ class="view-diff-button"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ View Diff
+ </gr-button>
+ </a>
+ </div>
</div>
- </div>
- `);
+ `
+ );
});
suite('action button clicks', () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment_test.ts b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment_test.ts
index a57af69..af3bfd4 100644
--- a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment_test.ts
@@ -74,212 +74,229 @@
test('renders collapsed', async () => {
element.initiallyCollapsed = true;
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="container" id="container">
- <div class="header" id="header">
- <div class="headerLeft">
- <gr-account-label deselected=""></gr-account-label>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="container" id="container">
+ <div class="header" id="header">
+ <div class="headerLeft">
+ <gr-account-label deselected=""></gr-account-label>
+ </div>
+ <div class="headerMiddle">
+ <span class="collapsedContent">
+ This is the test comment message.
+ </span>
+ </div>
+ <span class="patchset-text">Patchset 1</span>
+ <div class="show-hide" tabindex="0">
+ <label aria-label="Expand" class="show-hide">
+ <input checked="" class="show-hide" type="checkbox" />
+ <gr-icon id="icon" icon="expand_more"></gr-icon>
+ </label>
+ </div>
</div>
- <div class="headerMiddle">
- <span class="collapsedContent">
- This is the test comment message.
- </span>
- </div>
- <span class="patchset-text">Patchset 1</span>
- <div class="show-hide" tabindex="0">
- <label aria-label="Expand" class="show-hide">
- <input checked="" class="show-hide" type="checkbox" />
- <gr-icon id="icon" icon="expand_more"></gr-icon>
- </label>
- </div>
+ <div class="body"></div>
</div>
- <div class="body"></div>
- </div>
- `);
+ `
+ );
});
test('renders expanded', async () => {
element.initiallyCollapsed = false;
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="container" id="container">
- <div class="header" id="header">
- <div class="headerLeft">
- <gr-account-label deselected=""></gr-account-label>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="container" id="container">
+ <div class="header" id="header">
+ <div class="headerLeft">
+ <gr-account-label deselected=""></gr-account-label>
+ </div>
+ <div class="headerMiddle"></div>
+ <span class="patchset-text">Patchset 1</span>
+ <span class="separator"></span>
+ <span class="date" tabindex="0">
+ <gr-date-formatter withtooltip=""></gr-date-formatter>
+ </span>
+ <div class="show-hide" tabindex="0">
+ <label aria-label="Collapse" class="show-hide">
+ <input class="show-hide" type="checkbox" />
+ <gr-icon id="icon" icon="expand_less"></gr-icon>
+ </label>
+ </div>
</div>
- <div class="headerMiddle"></div>
- <span class="patchset-text">Patchset 1</span>
- <span class="separator"></span>
- <span class="date" tabindex="0">
- <gr-date-formatter withtooltip=""></gr-date-formatter>
- </span>
- <div class="show-hide" tabindex="0">
- <label aria-label="Collapse" class="show-hide">
- <input class="show-hide" type="checkbox" />
- <gr-icon id="icon" icon="expand_less"></gr-icon>
- </label>
+ <div class="body">
+ <gr-formatted-text
+ class="message"
+ notrailingmargin=""
+ ></gr-formatted-text>
</div>
</div>
- <div class="body">
- <gr-formatted-text
- class="message"
- notrailingmargin=""
- ></gr-formatted-text>
- </div>
- </div>
- `);
+ `
+ );
});
test('renders expanded robot', async () => {
element.initiallyCollapsed = false;
element.comment = createRobotComment();
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="container" id="container">
- <div class="header" id="header">
- <div class="headerLeft">
- <span class="robotName">robot-id-123</span>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="container" id="container">
+ <div class="header" id="header">
+ <div class="headerLeft">
+ <span class="robotName">robot-id-123</span>
+ </div>
+ <div class="headerMiddle"></div>
+ <span class="patchset-text">Patchset 1</span>
+ <span class="separator"></span>
+ <span class="date" tabindex="0">
+ <gr-date-formatter withtooltip=""></gr-date-formatter>
+ </span>
+ <div class="show-hide" tabindex="0">
+ <label aria-label="Collapse" class="show-hide">
+ <input class="show-hide" type="checkbox" />
+ <gr-icon id="icon" icon="expand_less"></gr-icon>
+ </label>
+ </div>
</div>
- <div class="headerMiddle"></div>
- <span class="patchset-text">Patchset 1</span>
- <span class="separator"></span>
- <span class="date" tabindex="0">
- <gr-date-formatter withtooltip=""></gr-date-formatter>
- </span>
- <div class="show-hide" tabindex="0">
- <label aria-label="Collapse" class="show-hide">
- <input class="show-hide" type="checkbox" />
- <gr-icon id="icon" icon="expand_less"></gr-icon>
- </label>
+ <div class="body">
+ <div class="robotId"></div>
+ <gr-formatted-text
+ class="message"
+ notrailingmargin=""
+ ></gr-formatted-text>
+ <div class="robotActions">
+ <gr-icon
+ icon="link"
+ class="copy link-icon"
+ role="button"
+ tabindex="0"
+ title="Copy link to this comment"
+ ></gr-icon>
+ <gr-endpoint-decorator name="robot-comment-controls">
+ <gr-endpoint-param name="comment"></gr-endpoint-param>
+ </gr-endpoint-decorator>
+ <gr-button
+ aria-disabled="false"
+ class="action show-fix"
+ link=""
+ role="button"
+ secondary=""
+ tabindex="0"
+ >
+ Show Fix
+ </gr-button>
+ <gr-button
+ aria-disabled="false"
+ class="action fix"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Please Fix
+ </gr-button>
+ </div>
</div>
</div>
- <div class="body">
- <div class="robotId"></div>
- <gr-formatted-text
- class="message"
- notrailingmargin=""
- ></gr-formatted-text>
- <div class="robotActions">
- <gr-icon
- icon="link"
- class="copy link-icon"
- role="button"
- tabindex="0"
- title="Copy link to this comment"
- ></gr-icon>
- <gr-endpoint-decorator name="robot-comment-controls">
- <gr-endpoint-param name="comment"></gr-endpoint-param>
- </gr-endpoint-decorator>
- <gr-button
- aria-disabled="false"
- class="action show-fix"
- link=""
- role="button"
- secondary=""
- tabindex="0"
- >
- Show Fix
- </gr-button>
- <gr-button
- aria-disabled="false"
- class="action fix"
- link=""
- role="button"
- tabindex="0"
- >
- Please Fix
- </gr-button>
- </div>
- </div>
- </div>
- `);
+ `
+ );
});
test('renders expanded admin', async () => {
element.initiallyCollapsed = false;
element.isAdmin = true;
await element.updateComplete;
- expect(queryAndAssert(element, 'gr-button.delete')).dom.to
- .equal(/* HTML */ `
- <gr-button
- aria-disabled="false"
- class="action delete"
- id="deleteBtn"
- link=""
- role="button"
- tabindex="0"
- title="Delete Comment"
- >
- <gr-icon id="icon" icon="delete" filled></gr-icon>
- </gr-button>
- `);
+ assert.dom.equal(
+ queryAndAssert(element, 'gr-button.delete'),
+ /* HTML */ `
+ <gr-button
+ aria-disabled="false"
+ class="action delete"
+ id="deleteBtn"
+ link=""
+ role="button"
+ tabindex="0"
+ title="Delete Comment"
+ >
+ <gr-icon id="icon" icon="delete" filled></gr-icon>
+ </gr-button>
+ `
+ );
});
test('renders draft', async () => {
element.initiallyCollapsed = false;
(element.comment as DraftInfo).__draft = true;
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="container draft" id="container">
- <div class="header" id="header">
- <div class="headerLeft">
- <gr-account-label class="draft" deselected=""></gr-account-label>
- <gr-tooltip-content
- class="draftTooltip"
- has-tooltip=""
- max-width="20em"
- show-icon=""
- title="This draft is only visible to you. To publish drafts, click the 'Reply' or 'Start review' button at the top of the change or press the 'a' key."
- >
- <span class="draftLabel">DRAFT</span>
- </gr-tooltip-content>
- </div>
- <div class="headerMiddle"></div>
- <span class="patchset-text">Patchset 1</span>
- <span class="separator"></span>
- <span class="date" tabindex="0">
- <gr-date-formatter withtooltip=""></gr-date-formatter>
- </span>
- <div class="show-hide" tabindex="0">
- <label aria-label="Collapse" class="show-hide">
- <input class="show-hide" type="checkbox" />
- <gr-icon id="icon" icon="expand_less"></gr-icon>
- </label>
- </div>
- </div>
- <div class="body">
- <gr-formatted-text class="message"></gr-formatted-text>
- <div class="actions">
- <div class="action resolve">
- <label>
- <input checked="" id="resolvedCheckbox" type="checkbox" />
- Resolved
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="container draft" id="container">
+ <div class="header" id="header">
+ <div class="headerLeft">
+ <gr-account-label
+ class="draft"
+ deselected=""
+ ></gr-account-label>
+ <gr-tooltip-content
+ class="draftTooltip"
+ has-tooltip=""
+ max-width="20em"
+ show-icon=""
+ title="This draft is only visible to you. To publish drafts, click the 'Reply' or 'Start review' button at the top of the change or press the 'a' key."
+ >
+ <span class="draftLabel">DRAFT</span>
+ </gr-tooltip-content>
+ </div>
+ <div class="headerMiddle"></div>
+ <span class="patchset-text">Patchset 1</span>
+ <span class="separator"></span>
+ <span class="date" tabindex="0">
+ <gr-date-formatter withtooltip=""></gr-date-formatter>
+ </span>
+ <div class="show-hide" tabindex="0">
+ <label aria-label="Collapse" class="show-hide">
+ <input class="show-hide" type="checkbox" />
+ <gr-icon id="icon" icon="expand_less"></gr-icon>
</label>
</div>
- <div class="rightActions">
- <gr-button
- aria-disabled="false"
- class="action discard"
- link=""
- role="button"
- tabindex="0"
- >
- Discard
- </gr-button>
- <gr-button
- aria-disabled="false"
- class="action edit"
- link=""
- role="button"
- tabindex="0"
- >
- Edit
- </gr-button>
+ </div>
+ <div class="body">
+ <gr-formatted-text class="message"></gr-formatted-text>
+ <div class="actions">
+ <div class="action resolve">
+ <label>
+ <input checked="" id="resolvedCheckbox" type="checkbox" />
+ Resolved
+ </label>
+ </div>
+ <div class="rightActions">
+ <gr-button
+ aria-disabled="false"
+ class="action discard"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Discard
+ </gr-button>
+ <gr-button
+ aria-disabled="false"
+ class="action edit"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Edit
+ </gr-button>
+ </div>
</div>
</div>
</div>
- </div>
- `);
+ `
+ );
});
test('renders draft in editing mode', async () => {
@@ -287,75 +304,81 @@
(element.comment as DraftInfo).__draft = true;
element.editing = true;
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="container draft" id="container">
- <div class="header" id="header">
- <div class="headerLeft">
- <gr-account-label class="draft" deselected=""></gr-account-label>
- <gr-tooltip-content
- class="draftTooltip"
- has-tooltip=""
- max-width="20em"
- show-icon=""
- title="This draft is only visible to you. To publish drafts, click the 'Reply' or 'Start review' button at the top of the change or press the 'a' key."
- >
- <span class="draftLabel">DRAFT</span>
- </gr-tooltip-content>
- </div>
- <div class="headerMiddle"></div>
- <span class="patchset-text">Patchset 1</span>
- <span class="separator"></span>
- <span class="date" tabindex="0">
- <gr-date-formatter withtooltip=""></gr-date-formatter>
- </span>
- <div class="show-hide" tabindex="0">
- <label aria-label="Collapse" class="show-hide">
- <input class="show-hide" type="checkbox" />
- <gr-icon id="icon" icon="expand_less"></gr-icon>
- </label>
- </div>
- </div>
- <div class="body">
- <gr-textarea
- autocomplete="on"
- class="code editMessage"
- code=""
- id="editTextarea"
- rows="4"
- text="This is the test comment message."
- >
- </gr-textarea>
- <div class="actions">
- <div class="action resolve">
- <label>
- <input checked="" id="resolvedCheckbox" type="checkbox" />
- Resolved
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="container draft" id="container">
+ <div class="header" id="header">
+ <div class="headerLeft">
+ <gr-account-label
+ class="draft"
+ deselected=""
+ ></gr-account-label>
+ <gr-tooltip-content
+ class="draftTooltip"
+ has-tooltip=""
+ max-width="20em"
+ show-icon=""
+ title="This draft is only visible to you. To publish drafts, click the 'Reply' or 'Start review' button at the top of the change or press the 'a' key."
+ >
+ <span class="draftLabel">DRAFT</span>
+ </gr-tooltip-content>
+ </div>
+ <div class="headerMiddle"></div>
+ <span class="patchset-text">Patchset 1</span>
+ <span class="separator"></span>
+ <span class="date" tabindex="0">
+ <gr-date-formatter withtooltip=""></gr-date-formatter>
+ </span>
+ <div class="show-hide" tabindex="0">
+ <label aria-label="Collapse" class="show-hide">
+ <input class="show-hide" type="checkbox" />
+ <gr-icon id="icon" icon="expand_less"></gr-icon>
</label>
</div>
- <div class="rightActions">
- <gr-button
- aria-disabled="false"
- class="action cancel"
- link=""
- role="button"
- tabindex="0"
- >
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="false"
- class="action save"
- link=""
- role="button"
- tabindex="0"
- >
- Save
- </gr-button>
+ </div>
+ <div class="body">
+ <gr-textarea
+ autocomplete="on"
+ class="code editMessage"
+ code=""
+ id="editTextarea"
+ rows="4"
+ text="This is the test comment message."
+ >
+ </gr-textarea>
+ <div class="actions">
+ <div class="action resolve">
+ <label>
+ <input checked="" id="resolvedCheckbox" type="checkbox" />
+ Resolved
+ </label>
+ </div>
+ <div class="rightActions">
+ <gr-button
+ aria-disabled="false"
+ class="action cancel"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="false"
+ class="action save"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Save
+ </gr-button>
+ </div>
</div>
</div>
</div>
- </div>
- `);
+ `
+ );
});
});
diff --git a/polygerrit-ui/app/elements/shared/gr-confirm-delete-comment-dialog/gr-confirm-delete-comment-dialog_test.ts b/polygerrit-ui/app/elements/shared/gr-confirm-delete-comment-dialog/gr-confirm-delete-comment-dialog_test.ts
index 496c513..17e5fd2 100644
--- a/polygerrit-ui/app/elements/shared/gr-confirm-delete-comment-dialog/gr-confirm-delete-comment-dialog_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-confirm-delete-comment-dialog/gr-confirm-delete-comment-dialog_test.ts
@@ -19,8 +19,9 @@
test('render', () => {
// prettier and shadowDom string disagree about wrapping in <p> tag.
- expect(element).shadowDom.to
- .equal(/* prettier-ignore */ /* HTML */ `
+ assert.shadowDom.equal(
+ element,
+ /* prettier-ignore */ /* HTML */ `
<gr-dialog confirm-label="Delete" role="dialog">
<div class="header" slot="header">Delete Comment</div>
<div class="main" slot="main">
@@ -39,6 +40,7 @@
</iron-autogrow-textarea>
</div>
</gr-dialog>
- `);
+ `
+ );
});
});
diff --git a/polygerrit-ui/app/elements/shared/gr-copy-clipboard/gr-copy-clipboard_test.ts b/polygerrit-ui/app/elements/shared/gr-copy-clipboard/gr-copy-clipboard_test.ts
index 0840c3b..4246036 100644
--- a/polygerrit-ui/app/elements/shared/gr-copy-clipboard/gr-copy-clipboard_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-copy-clipboard/gr-copy-clipboard_test.ts
@@ -22,34 +22,37 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="text">
- <iron-input class="copyText">
- <input
- id="input"
- is="iron-input"
- part="text-container-style"
- readonly=""
- type="text"
- />
- </iron-input>
- <gr-tooltip-content>
- <gr-button
- aria-disabled="false"
- aria-label="Click to copy to clipboard"
- class="copyToClipboard"
- id="copy-clipboard-button"
- link=""
- role="button"
- tabindex="0"
- >
- <div>
- <gr-icon icon="content_copy" id="icon" small></gr-icon>
- </div>
- </gr-button>
- </gr-tooltip-content>
- </div>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="text">
+ <iron-input class="copyText">
+ <input
+ id="input"
+ is="iron-input"
+ part="text-container-style"
+ readonly=""
+ type="text"
+ />
+ </iron-input>
+ <gr-tooltip-content>
+ <gr-button
+ aria-disabled="false"
+ aria-label="Click to copy to clipboard"
+ class="copyToClipboard"
+ id="copy-clipboard-button"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ <div>
+ <gr-icon icon="content_copy" id="icon" small></gr-icon>
+ </div>
+ </gr-button>
+ </gr-tooltip-content>
+ </div>
+ `
+ );
});
test('copy to clipboard', () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-dialog/gr-dialog_test.ts b/polygerrit-ui/app/elements/shared/gr-dialog/gr-dialog_test.ts
index c3e3569..47ba14a 100644
--- a/polygerrit-ui/app/elements/shared/gr-dialog/gr-dialog_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-dialog/gr-dialog_test.ts
@@ -19,81 +19,87 @@
});
test('renders', async () => {
- expect(element).shadowDom.to.equal(/* HTML */ `<div class="container">
- <header class="heading-3">
- <slot name="header"> </slot>
- </header>
- <main>
- <div class="overflow-container">
- <slot name="main"> </slot>
- </div>
- </main>
- <footer>
- <div class="flex-space"></div>
- <gr-button
- aria-disabled="false"
- id="cancel"
- link=""
- role="button"
- tabindex="0"
- >
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="false"
- id="confirm"
- link=""
- primary=""
- role="button"
- tabindex="0"
- title=""
- >
- Confirm
- </gr-button>
- </footer>
- </div> `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `<div class="container">
+ <header class="heading-3">
+ <slot name="header"> </slot>
+ </header>
+ <main>
+ <div class="overflow-container">
+ <slot name="main"> </slot>
+ </div>
+ </main>
+ <footer>
+ <div class="flex-space"></div>
+ <gr-button
+ aria-disabled="false"
+ id="cancel"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="false"
+ id="confirm"
+ link=""
+ primary=""
+ role="button"
+ tabindex="0"
+ title=""
+ >
+ Confirm
+ </gr-button>
+ </footer>
+ </div> `
+ );
});
test('renders with loading state', async () => {
element.loading = true;
element.loadingLabel = 'Loading!!';
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `<div class="container">
- <header class="heading-3">
- <slot name="header"> </slot>
- </header>
- <main>
- <div class="overflow-container">
- <slot name="main"> </slot>
- </div>
- </main>
- <footer>
- <span class="loadingSpin" aria-label="Loading!!" role="progressbar">
- </span>
- <span class="loadingLabel"> Loading!! </span>
- <div class="flex-space"></div>
- <gr-button
- aria-disabled="false"
- id="cancel"
- link=""
- role="button"
- tabindex="0"
- >
- Cancel
- </gr-button>
- <gr-button
- aria-disabled="false"
- id="confirm"
- link=""
- primary=""
- role="button"
- tabindex="0"
- title=""
- >
- Confirm
- </gr-button>
- </footer>
- </div> `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `<div class="container">
+ <header class="heading-3">
+ <slot name="header"> </slot>
+ </header>
+ <main>
+ <div class="overflow-container">
+ <slot name="main"> </slot>
+ </div>
+ </main>
+ <footer>
+ <span class="loadingSpin" aria-label="Loading!!" role="progressbar">
+ </span>
+ <span class="loadingLabel"> Loading!! </span>
+ <div class="flex-space"></div>
+ <gr-button
+ aria-disabled="false"
+ id="cancel"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ aria-disabled="false"
+ id="confirm"
+ link=""
+ primary=""
+ role="button"
+ tabindex="0"
+ title=""
+ >
+ Confirm
+ </gr-button>
+ </footer>
+ </div> `
+ );
});
test('events', () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-diff-preferences/gr-diff-preferences_test.ts b/polygerrit-ui/app/elements/shared/gr-diff-preferences/gr-diff-preferences_test.ts
index 6e2e83f..f62e358 100644
--- a/polygerrit-ui/app/elements/shared/gr-diff-preferences/gr-diff-preferences_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-diff-preferences/gr-diff-preferences_test.ts
@@ -44,106 +44,110 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ ` <div
- class="gr-form-styles"
- id="diffPreferences"
- >
- <section>
- <label class="title" for="contextLineSelect">Context</label>
- <span class="value">
- <gr-select id="contextSelect">
- <select id="contextLineSelect">
- <option value="3">3 lines</option>
- <option value="10">10 lines</option>
- <option value="25">25 lines</option>
- <option value="50">50 lines</option>
- <option value="75">75 lines</option>
- <option value="100">100 lines</option>
- <option value="-1">Whole file</option>
- </select>
- </gr-select>
- </span>
- </section>
- <section>
- <label class="title" for="lineWrappingInput">Fit to screen</label>
- <span class="value">
- <input id="lineWrappingInput" type="checkbox" />
- </span>
- </section>
- <section>
- <label class="title" for="columnsInput">Diff width</label>
- <span class="value">
- <iron-input>
- <input id="columnsInput" type="number" />
- </iron-input>
- </span>
- </section>
- <section>
- <label class="title" for="tabSizeInput">Tab width</label>
- <span class="value">
- <iron-input>
- <input id="tabSizeInput" type="number" />
- </iron-input>
- </span>
- </section>
- <section>
- <label class="title" for="fontSizeInput">Font size</label>
- <span class="value">
- <iron-input>
- <input id="fontSizeInput" type="number" />
- </iron-input>
- </span>
- </section>
- <section>
- <label class="title" for="showTabsInput">Show tabs</label>
- <span class="value">
- <input checked="" id="showTabsInput" type="checkbox" />
- </span>
- </section>
- <section>
- <label class="title" for="showTrailingWhitespaceInput">
- Show trailing whitespace
- </label>
- <span class="value">
- <input checked="" id="showTrailingWhitespaceInput" type="checkbox" />
- </span>
- </section>
- <section>
- <label class="title" for="syntaxHighlightInput">
- Syntax highlighting
- </label>
- <span class="value">
- <input checked="" id="syntaxHighlightInput" type="checkbox" />
- </span>
- </section>
- <section>
- <label class="title" for="automaticReviewInput">
- Automatically mark viewed files reviewed
- </label>
- <span class="value">
- <input checked="" id="automaticReviewInput" type="checkbox" />
- </span>
- </section>
- <section>
- <div class="pref">
- <label class="title" for="ignoreWhiteSpace">
- Ignore Whitespace
- </label>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ ` <div class="gr-form-styles" id="diffPreferences">
+ <section>
+ <label class="title" for="contextLineSelect">Context</label>
<span class="value">
- <gr-select>
- <select id="ignoreWhiteSpace">
- <option value="IGNORE_NONE">None</option>
- <option value="IGNORE_TRAILING">Trailing</option>
- <option value="IGNORE_LEADING_AND_TRAILING">
- Leading & trailing
- </option>
- <option value="IGNORE_ALL">All</option>
+ <gr-select id="contextSelect">
+ <select id="contextLineSelect">
+ <option value="3">3 lines</option>
+ <option value="10">10 lines</option>
+ <option value="25">25 lines</option>
+ <option value="50">50 lines</option>
+ <option value="75">75 lines</option>
+ <option value="100">100 lines</option>
+ <option value="-1">Whole file</option>
</select>
</gr-select>
</span>
- </div>
- </section>
- </div>`);
+ </section>
+ <section>
+ <label class="title" for="lineWrappingInput">Fit to screen</label>
+ <span class="value">
+ <input id="lineWrappingInput" type="checkbox" />
+ </span>
+ </section>
+ <section>
+ <label class="title" for="columnsInput">Diff width</label>
+ <span class="value">
+ <iron-input>
+ <input id="columnsInput" type="number" />
+ </iron-input>
+ </span>
+ </section>
+ <section>
+ <label class="title" for="tabSizeInput">Tab width</label>
+ <span class="value">
+ <iron-input>
+ <input id="tabSizeInput" type="number" />
+ </iron-input>
+ </span>
+ </section>
+ <section>
+ <label class="title" for="fontSizeInput">Font size</label>
+ <span class="value">
+ <iron-input>
+ <input id="fontSizeInput" type="number" />
+ </iron-input>
+ </span>
+ </section>
+ <section>
+ <label class="title" for="showTabsInput">Show tabs</label>
+ <span class="value">
+ <input checked="" id="showTabsInput" type="checkbox" />
+ </span>
+ </section>
+ <section>
+ <label class="title" for="showTrailingWhitespaceInput">
+ Show trailing whitespace
+ </label>
+ <span class="value">
+ <input
+ checked=""
+ id="showTrailingWhitespaceInput"
+ type="checkbox"
+ />
+ </span>
+ </section>
+ <section>
+ <label class="title" for="syntaxHighlightInput">
+ Syntax highlighting
+ </label>
+ <span class="value">
+ <input checked="" id="syntaxHighlightInput" type="checkbox" />
+ </span>
+ </section>
+ <section>
+ <label class="title" for="automaticReviewInput">
+ Automatically mark viewed files reviewed
+ </label>
+ <span class="value">
+ <input checked="" id="automaticReviewInput" type="checkbox" />
+ </span>
+ </section>
+ <section>
+ <div class="pref">
+ <label class="title" for="ignoreWhiteSpace">
+ Ignore Whitespace
+ </label>
+ <span class="value">
+ <gr-select>
+ <select id="ignoreWhiteSpace">
+ <option value="IGNORE_NONE">None</option>
+ <option value="IGNORE_TRAILING">Trailing</option>
+ <option value="IGNORE_LEADING_AND_TRAILING">
+ Leading & trailing
+ </option>
+ <option value="IGNORE_ALL">All</option>
+ </select>
+ </gr-select>
+ </span>
+ </div>
+ </section>
+ </div>`
+ );
});
test('renders preferences', () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-download-commands/gr-download-commands_test.ts b/polygerrit-ui/app/elements/shared/gr-download-commands/gr-download-commands_test.ts
index d05ab44..cdf89f3 100644
--- a/polygerrit-ui/app/elements/shared/gr-download-commands/gr-download-commands_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-download-commands/gr-download-commands_test.ts
@@ -59,45 +59,53 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="schemes">
- <paper-tabs dir="null" id="downloadTabs" role="tablist" tabindex="0">
- <paper-tab
- aria-disabled="false"
- aria-selected="true"
- class="iron-selected"
- data-scheme="http"
- role="tab"
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="schemes">
+ <paper-tabs
+ dir="null"
+ id="downloadTabs"
+ role="tablist"
tabindex="0"
>
- http
- </paper-tab>
- <paper-tab
- aria-disabled="false"
- aria-selected="false"
- data-scheme="repo"
- role="tab"
- tabindex="-1"
- >
- repo
- </paper-tab>
- <paper-tab
- aria-disabled="false"
- aria-selected="false"
- data-scheme="ssh"
- role="tab"
- tabindex="-1"
- >
- ssh
- </paper-tab>
- </paper-tabs>
- </div>
- <div class="commands"></div>
- <gr-shell-command class="_label_checkout"> </gr-shell-command>
- <gr-shell-command class="_label_cherrypick"> </gr-shell-command>
- <gr-shell-command class="_label_formatpatch"> </gr-shell-command>
- <gr-shell-command class="_label_pull"> </gr-shell-command>
- `);
+ <paper-tab
+ aria-disabled="false"
+ aria-selected="true"
+ class="iron-selected"
+ data-scheme="http"
+ role="tab"
+ tabindex="0"
+ >
+ http
+ </paper-tab>
+ <paper-tab
+ aria-disabled="false"
+ aria-selected="false"
+ data-scheme="repo"
+ role="tab"
+ tabindex="-1"
+ >
+ repo
+ </paper-tab>
+ <paper-tab
+ aria-disabled="false"
+ aria-selected="false"
+ data-scheme="ssh"
+ role="tab"
+ tabindex="-1"
+ >
+ ssh
+ </paper-tab>
+ </paper-tabs>
+ </div>
+ <div class="commands"></div>
+ <gr-shell-command class="_label_checkout"> </gr-shell-command>
+ <gr-shell-command class="_label_cherrypick"> </gr-shell-command>
+ <gr-shell-command class="_label_formatpatch"> </gr-shell-command>
+ <gr-shell-command class="_label_pull"> </gr-shell-command>
+ `
+ );
});
test('focusOnCopy', async () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-dropdown-list/gr-dropdown-list_test.ts b/polygerrit-ui/app/elements/shared/gr-dropdown-list/gr-dropdown-list_test.ts
index 76770b1..3251708 100644
--- a/polygerrit-ui/app/elements/shared/gr-dropdown-list/gr-dropdown-list_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-dropdown-list/gr-dropdown-list_test.ts
@@ -48,88 +48,91 @@
];
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-button
- aria-disabled="false"
- class="dropdown-trigger"
- down-arrow=""
- id="trigger"
- link=""
- no-uppercase=""
- role="button"
- slot="dropdown-trigger"
- tabindex="0"
- >
- <span id="triggerText"> Button Text 2 </span>
- <gr-copy-clipboard hidden="" hideinput=""> </gr-copy-clipboard>
- </gr-button>
- <iron-dropdown
- aria-disabled="false"
- aria-hidden="true"
- horizontal-align="left"
- id="dropdown"
- style="outline: none; display: none;"
- vertical-align="top"
- >
- <paper-listbox
- class="dropdown-content"
- role="listbox"
- slot="dropdown-content"
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-button
+ aria-disabled="false"
+ class="dropdown-trigger"
+ down-arrow=""
+ id="trigger"
+ link=""
+ no-uppercase=""
+ role="button"
+ slot="dropdown-trigger"
tabindex="0"
>
- <paper-item
- aria-disabled="false"
- aria-selected="false"
- data-value="1"
- role="option"
- tabindex="-1"
- >
- <div class="topContent">
- <div>Top Text 1</div>
- </div>
- </paper-item>
- <paper-item
- aria-disabled="false"
- aria-selected="true"
- class="iron-selected"
- data-value="2"
- role="option"
+ <span id="triggerText"> Button Text 2 </span>
+ <gr-copy-clipboard hidden="" hideinput=""> </gr-copy-clipboard>
+ </gr-button>
+ <iron-dropdown
+ aria-disabled="false"
+ aria-hidden="true"
+ horizontal-align="left"
+ id="dropdown"
+ style="outline: none; display: none;"
+ vertical-align="top"
+ >
+ <paper-listbox
+ class="dropdown-content"
+ role="listbox"
+ slot="dropdown-content"
tabindex="0"
>
- <div class="topContent">
- <div>Top Text 2</div>
- </div>
- <div class="bottomContent">
- <div>Bottom Text 2</div>
- </div>
- </paper-item>
- <paper-item
- aria-disabled="true"
- aria-selected="false"
- data-value="3"
- disabled=""
- role="option"
- style="pointer-events: none;"
- tabindex="-1"
- >
- <div class="topContent">
- <div>Top Text 3</div>
- <gr-date-formatter> </gr-date-formatter>
- </div>
- <div class="bottomContent">
- <div>Bottom Text 3</div>
- </div>
- </paper-item>
- </paper-listbox>
- </iron-dropdown>
- <gr-select>
- <select>
- <option value="1">Top Text 1</option>
- <option value="2">Mobile Text 2</option>
- <option disabled="" value="3">Mobile Text 3</option>
- </select>
- </gr-select>
- `);
+ <paper-item
+ aria-disabled="false"
+ aria-selected="false"
+ data-value="1"
+ role="option"
+ tabindex="-1"
+ >
+ <div class="topContent">
+ <div>Top Text 1</div>
+ </div>
+ </paper-item>
+ <paper-item
+ aria-disabled="false"
+ aria-selected="true"
+ class="iron-selected"
+ data-value="2"
+ role="option"
+ tabindex="0"
+ >
+ <div class="topContent">
+ <div>Top Text 2</div>
+ </div>
+ <div class="bottomContent">
+ <div>Bottom Text 2</div>
+ </div>
+ </paper-item>
+ <paper-item
+ aria-disabled="true"
+ aria-selected="false"
+ data-value="3"
+ disabled=""
+ role="option"
+ style="pointer-events: none;"
+ tabindex="-1"
+ >
+ <div class="topContent">
+ <div>Top Text 3</div>
+ <gr-date-formatter> </gr-date-formatter>
+ </div>
+ <div class="bottomContent">
+ <div>Bottom Text 3</div>
+ </div>
+ </paper-item>
+ </paper-listbox>
+ </iron-dropdown>
+ <gr-select>
+ <select>
+ <option value="1">Top Text 1</option>
+ <option value="2">Mobile Text 2</option>
+ <option disabled="" value="3">Mobile Text 3</option>
+ </select>
+ </gr-select>
+ `
+ );
});
test('hide copy by default', () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown_test.ts b/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown_test.ts
index bc47945..2a54b83 100644
--- a/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown_test.ts
@@ -152,7 +152,9 @@
];
element.disabledIds = [];
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
<gr-button
aria-disabled="false"
class="dropdown-trigger"
@@ -220,7 +222,8 @@
</li>
</div>
</ul>
- </iron-dropdown>`);
+ </iron-dropdown>`
+ );
});
suite('keyboard navigation', () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content_test.ts b/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content_test.ts
index d2663ed..dc8d4dc 100644
--- a/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content_test.ts
@@ -20,43 +20,44 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `<gr-endpoint-decorator
- name="commit-message"
- >
- <gr-endpoint-param name="editing"> </gr-endpoint-param>
- <div class="collapsed viewer">
- <slot> </slot>
- </div>
- <div class="show-all-container font-normal">
- <gr-button
- aria-disabled="false"
- class="show-all-button"
- link=""
- role="button"
- tabindex="0"
- >
- <div>
- <gr-icon icon="expand_more" small></gr-icon>
- <span>Show all</span>
- </div>
- </gr-button>
- <div class="flex-space"></div>
- <gr-button
- aria-disabled="false"
- class="edit-commit-message"
- link=""
- role="button"
- tabindex="0"
- title="Edit commit message"
- >
- <div>
- <gr-icon icon="edit" filled small></gr-icon>
- <span>Edit</span>
- </div>
- </gr-button>
- </div>
- <gr-endpoint-slot name="above-actions"> </gr-endpoint-slot>
- </gr-endpoint-decorator> `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `<gr-endpoint-decorator name="commit-message">
+ <gr-endpoint-param name="editing"> </gr-endpoint-param>
+ <div class="collapsed viewer">
+ <slot> </slot>
+ </div>
+ <div class="show-all-container font-normal">
+ <gr-button
+ aria-disabled="false"
+ class="show-all-button"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ <div>
+ <gr-icon icon="expand_more" small></gr-icon>
+ <span>Show all</span>
+ </div>
+ </gr-button>
+ <div class="flex-space"></div>
+ <gr-button
+ aria-disabled="false"
+ class="edit-commit-message"
+ link=""
+ role="button"
+ tabindex="0"
+ title="Edit commit message"
+ >
+ <div>
+ <gr-icon icon="edit" filled small></gr-icon>
+ <span>Edit</span>
+ </div>
+ </gr-button>
+ </div>
+ <gr-endpoint-slot name="above-actions"> </gr-endpoint-slot>
+ </gr-endpoint-decorator> `
+ );
});
test('show-all-container visibility', async () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-editable-label/gr-editable-label_test.ts b/polygerrit-ui/app/elements/shared/gr-editable-label/gr-editable-label_test.ts
index 5c1e2ccb..a119e75 100644
--- a/polygerrit-ui/app/elements/shared/gr-editable-label/gr-editable-label_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-editable-label/gr-editable-label_test.ts
@@ -44,7 +44,9 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(`<label
+ assert.shadowDom.equal(
+ element,
+ `<label
aria-label="value text"
class="editable"
part="label"
@@ -89,7 +91,8 @@
</div>
</div>
</div>
- </iron-dropdown>`);
+ </iron-dropdown>`
+ );
});
test('element render', async () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-file-status/gr-file-status_test.ts b/polygerrit-ui/app/elements/shared/gr-file-status/gr-file-status_test.ts
index 928ec26..b85e15b 100644
--- a/polygerrit-ui/app/elements/shared/gr-file-status/gr-file-status_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-file-status/gr-file-status_test.ts
@@ -25,36 +25,45 @@
suite('semantic dom diff tests', () => {
test('empty status', async () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-tooltip-content has-tooltip="" title="">
- <div class="status" aria-label="" tabindex="0"></div>
- </gr-tooltip-content>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-tooltip-content has-tooltip="" title="">
+ <div class="status" aria-label="" tabindex="0"></div>
+ </gr-tooltip-content>
+ `
+ );
});
test('added', async () => {
await setStatus(FileInfoStatus.ADDED);
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-tooltip-content has-tooltip="" title="Added">
- <div class="A status" aria-label="Added" tabindex="0">A</div>
- </gr-tooltip-content>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-tooltip-content has-tooltip="" title="Added">
+ <div class="A status" aria-label="Added" tabindex="0">A</div>
+ </gr-tooltip-content>
+ `
+ );
});
test('newly added', async () => {
await setStatus(FileInfoStatus.ADDED, true);
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-tooltip-content has-tooltip="" title="Newly Added">
- <gr-icon
- icon="new_releases"
- class="size-16"
- aria-label="Newly Added"
- ></gr-icon>
- </gr-tooltip-content>
- <gr-tooltip-content has-tooltip="" title="Newly Added">
- <div class="A status" aria-label="Newly Added" tabindex="0">A</div>
- </gr-tooltip-content>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-tooltip-content has-tooltip="" title="Newly Added">
+ <gr-icon
+ icon="new_releases"
+ class="size-16"
+ aria-label="Newly Added"
+ ></gr-icon>
+ </gr-tooltip-content>
+ <gr-tooltip-content has-tooltip="" title="Newly Added">
+ <div class="A status" aria-label="Newly Added" tabindex="0">A</div>
+ </gr-tooltip-content>
+ `
+ );
});
});
});
diff --git a/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text_test.ts b/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text_test.ts
index 6810f99..0aff401 100644
--- a/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text_test.ts
@@ -82,14 +82,17 @@
element.content = 'text `code`';
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <p>
- <gr-linked-text content="text " inline="" pre="">
- <span id="output" slot="insert"> text </span>
- </gr-linked-text>
- <span class="inline-code"> code </span>
- </p>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <p>
+ <gr-linked-text content="text " inline="" pre="">
+ <span id="output" slot="insert"> text </span>
+ </gr-linked-text>
+ <span class="inline-code"> code </span>
+ </p>
+ `
+ );
});
for (const text of [
diff --git a/polygerrit-ui/app/elements/shared/gr-hovercard-account/gr-hovercard-account_test.ts b/polygerrit-ui/app/elements/shared/gr-hovercard-account/gr-hovercard-account_test.ts
index 0ef1e69..6620574 100644
--- a/polygerrit-ui/app/elements/shared/gr-hovercard-account/gr-hovercard-account_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-hovercard-account/gr-hovercard-account_test.ts
@@ -65,30 +65,33 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div id="container" role="tooltip" tabindex="-1">
- <div class="top">
- <div class="avatar">
- <gr-avatar hidden="" imagesize="56"></gr-avatar>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div id="container" role="tooltip" tabindex="-1">
+ <div class="top">
+ <div class="avatar">
+ <gr-avatar hidden="" imagesize="56"></gr-avatar>
+ </div>
+ <div class="account">
+ <h3 class="heading-3 name">Kermit The Frog</h3>
+ <div class="email">kermit@gmail.com</div>
+ </div>
</div>
- <div class="account">
- <h3 class="heading-3 name">Kermit The Frog</h3>
- <div class="email">kermit@gmail.com</div>
+ <gr-endpoint-decorator name="hovercard-status">
+ <gr-endpoint-param name="account"></gr-endpoint-param>
+ </gr-endpoint-decorator>
+ <div class="status">
+ <span class="title">About me:</span>
+ <span class="value">I am a frog</span>
+ </div>
+ <div class="links">
+ <gr-icon icon="link" class="linkIcon"></gr-icon>
+ <a href="">Changes</a>·<a href="">Dashboard</a>
</div>
</div>
- <gr-endpoint-decorator name="hovercard-status">
- <gr-endpoint-param name="account"></gr-endpoint-param>
- </gr-endpoint-decorator>
- <div class="status">
- <span class="title">About me:</span>
- <span class="value">I am a frog</span>
- </div>
- <div class="links">
- <gr-icon icon="link" class="linkIcon"></gr-icon>
- <a href="">Changes</a>·<a href="">Dashboard</a>
- </div>
- </div>
- `);
+ `
+ );
});
test('account name is shown', () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-label-info/gr-label-info_test.ts b/polygerrit-ui/app/elements/shared/gr-label-info/gr-label-info_test.ts
index ea7d4a7..0d511ca 100644
--- a/polygerrit-ui/app/elements/shared/gr-label-info/gr-label-info_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-label-info/gr-label-info_test.ts
@@ -52,26 +52,29 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `<div>
- <div class="reviewer-row">
- <gr-account-chip>
- <gr-vote-chip circle-shape="" slot="vote-chip"> </gr-vote-chip>
- </gr-account-chip>
- <gr-tooltip-content has-tooltip="" title="Remove vote">
- <gr-button
- aria-disabled="false"
- aria-label="Remove vote"
- class="deleteBtn hidden"
- data-account-id="5"
- link=""
- role="button"
- tabindex="0"
- >
- <gr-icon icon="delete" filled></gr-icon>
- </gr-button>
- </gr-tooltip-content>
- </div>
- </div>`);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `<div>
+ <div class="reviewer-row">
+ <gr-account-chip>
+ <gr-vote-chip circle-shape="" slot="vote-chip"> </gr-vote-chip>
+ </gr-account-chip>
+ <gr-tooltip-content has-tooltip="" title="Remove vote">
+ <gr-button
+ aria-disabled="false"
+ aria-label="Remove vote"
+ class="deleteBtn hidden"
+ data-account-id="5"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ <gr-icon icon="delete" filled></gr-icon>
+ </gr-button>
+ </gr-tooltip-content>
+ </div>
+ </div>`
+ );
});
suite('remove reviewer votes', () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-labeled-autocomplete/gr-labeled-autocomplete_test.ts b/polygerrit-ui/app/elements/shared/gr-labeled-autocomplete/gr-labeled-autocomplete_test.ts
index 0cc9917..5a86764 100644
--- a/polygerrit-ui/app/elements/shared/gr-labeled-autocomplete/gr-labeled-autocomplete_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-labeled-autocomplete/gr-labeled-autocomplete_test.ts
@@ -39,18 +39,21 @@
element.label = 'Some label';
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div id="container">
- <div id="header">Some label</div>
- <div id="body">
- <gr-autocomplete
- id="autocomplete"
- threshold="0"
- borderless=""
- ></gr-autocomplete>
- <div id="trigger">▼</div>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div id="container">
+ <div id="header">Some label</div>
+ <div id="body">
+ <gr-autocomplete
+ id="autocomplete"
+ threshold="0"
+ borderless=""
+ ></gr-autocomplete>
+ <div id="trigger">▼</div>
+ </div>
</div>
- </div>
- `);
+ `
+ );
});
});
diff --git a/polygerrit-ui/app/elements/shared/gr-limited-text/gr-limited-text_test.ts b/polygerrit-ui/app/elements/shared/gr-limited-text/gr-limited-text_test.ts
index 62fcae8..2f7fb58 100644
--- a/polygerrit-ui/app/elements/shared/gr-limited-text/gr-limited-text_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-limited-text/gr-limited-text_test.ts
@@ -25,11 +25,14 @@
element.tooltip = 'tip';
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-tooltip-content has-tooltip="" title="abc 123 (tip)">
- abc …
- </gr-tooltip-content>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-tooltip-content has-tooltip="" title="abc 123 (tip)">
+ abc …
+ </gr-tooltip-content>
+ `
+ );
});
test('tooltip without title input', async () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-linked-chip/gr-linked-chip_test.ts b/polygerrit-ui/app/elements/shared/gr-linked-chip/gr-linked-chip_test.ts
index 4667703..42c826b 100644
--- a/polygerrit-ui/app/elements/shared/gr-linked-chip/gr-linked-chip_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-linked-chip/gr-linked-chip_test.ts
@@ -20,20 +20,23 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `<div class="container">
- <a href=""> <gr-limited-text> </gr-limited-text> </a>
- <gr-button
- aria-disabled="false"
- class="remove"
- hidden=""
- id="remove"
- link=""
- role="button"
- tabindex="0"
- >
- <gr-icon icon="close"></gr-icon>
- </gr-button>
- </div>`);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `<div class="container">
+ <a href=""> <gr-limited-text> </gr-limited-text> </a>
+ <gr-button
+ aria-disabled="false"
+ class="remove"
+ hidden=""
+ id="remove"
+ link=""
+ role="button"
+ tabindex="0"
+ >
+ <gr-icon icon="close"></gr-icon>
+ </gr-button>
+ </div>`
+ );
});
test('remove fired', async () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-linked-text/gr-linked-text_test.ts b/polygerrit-ui/app/elements/shared/gr-linked-text/gr-linked-text_test.ts
index 0d9673d..6435c3b 100644
--- a/polygerrit-ui/app/elements/shared/gr-linked-text/gr-linked-text_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-linked-text/gr-linked-text_test.ts
@@ -75,19 +75,22 @@
element.content =
'https://bugs.chromium.org/p/gerrit/issues/detail?id=3650';
await element.updateComplete;
- expect(element).lightDom.to.equal(/* HTML */ `
- <div id="output"></div>
- <span id="output" slot="insert">
- <a
- href="https://bugs.chromium.org/p/gerrit/issues/detail?id=3650"
- rel="noopener"
- style="color: var(--link-color)"
- target="_blank"
- >
- https://bugs.chromium.org/p/gerrit/issues/detail?id=3650
- </a>
- </span>
- `);
+ assert.lightDom.equal(
+ element,
+ /* HTML */ `
+ <div id="output"></div>
+ <span id="output" slot="insert">
+ <a
+ href="https://bugs.chromium.org/p/gerrit/issues/detail?id=3650"
+ rel="noopener"
+ style="color: var(--link-color)"
+ target="_blank"
+ >
+ https://bugs.chromium.org/p/gerrit/issues/detail?id=3650
+ </a>
+ </span>
+ `
+ );
});
test('URL pattern was parsed and linked.', async () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-list-view/gr-list-view_test.ts b/polygerrit-ui/app/elements/shared/gr-list-view/gr-list-view_test.ts
index 887c181..96878c9 100644
--- a/polygerrit-ui/app/elements/shared/gr-list-view/gr-list-view_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-list-view/gr-list-view_test.ts
@@ -22,38 +22,41 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div id="topContainer">
- <div class="filterContainer">
- <label> Filter: </label>
- <iron-input>
- <input id="filter" type="text" />
- </iron-input>
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div id="topContainer">
+ <div class="filterContainer">
+ <label> Filter: </label>
+ <iron-input>
+ <input id="filter" type="text" />
+ </iron-input>
+ </div>
+ <div id="createNewContainer">
+ <gr-button
+ aria-disabled="false"
+ id="createNew"
+ link=""
+ primary=""
+ role="button"
+ tabindex="0"
+ >
+ Create New
+ </gr-button>
+ </div>
</div>
- <div id="createNewContainer">
- <gr-button
- aria-disabled="false"
- id="createNew"
- link=""
- primary=""
- role="button"
- tabindex="0"
- >
- Create New
- </gr-button>
- </div>
- </div>
- <slot> </slot>
- <nav>
- Page 1
- <a hidden="" href="" id="prevArrow">
- <gr-icon icon="chevron_left"></gr-icon>
- </a>
- <a hidden="" href=",25" id="nextArrow">
- <gr-icon icon="chevron_right"></gr-icon>
- </a>
- </nav>
- `);
+ <slot> </slot>
+ <nav>
+ Page 1
+ <a hidden="" href="" id="prevArrow">
+ <gr-icon icon="chevron_left"></gr-icon>
+ </a>
+ <a hidden="" href=",25" id="nextArrow">
+ <gr-icon icon="chevron_right"></gr-icon>
+ </a>
+ </nav>
+ `
+ );
});
test('computeNavLink', () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-overlay/gr-overlay_test.ts b/polygerrit-ui/app/elements/shared/gr-overlay/gr-overlay_test.ts
index 009e5ab..6c52d16 100644
--- a/polygerrit-ui/app/elements/shared/gr-overlay/gr-overlay_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-overlay/gr-overlay_test.ts
@@ -23,7 +23,7 @@
test('render', async () => {
await element.open();
- expect(element).shadowDom.to.equal(/* HTML */ ' <slot></slot> ');
+ assert.shadowDom.equal(element, /* HTML */ ' <slot></slot> ');
});
test('popstate listener is attached on open and removed on close', () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-page-nav/gr-page-nav_test.ts b/polygerrit-ui/app/elements/shared/gr-page-nav/gr-page-nav_test.ts
index 5f54989..ced3a5d 100644
--- a/polygerrit-ui/app/elements/shared/gr-page-nav/gr-page-nav_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-page-nav/gr-page-nav_test.ts
@@ -23,11 +23,14 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <nav aria-label="Sidebar">
- <slot> </slot>
- </nav>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <nav aria-label="Sidebar">
+ <slot> </slot>
+ </nav>
+ `
+ );
});
test('header is not pinned just below top', () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-repo-branch-picker/gr-repo-branch-picker_test.ts b/polygerrit-ui/app/elements/shared/gr-repo-branch-picker/gr-repo-branch-picker_test.ts
index f6d4f81..35e5bb3 100644
--- a/polygerrit-ui/app/elements/shared/gr-repo-branch-picker/gr-repo-branch-picker_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-repo-branch-picker/gr-repo-branch-picker_test.ts
@@ -20,24 +20,27 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div>
- <gr-labeled-autocomplete
- id="repoInput"
- label="Repository"
- placeholder="Select repo"
- >
- </gr-labeled-autocomplete>
- <gr-icon icon="chevron_right"></gr-icon>
- <gr-labeled-autocomplete
- disabled=""
- id="branchInput"
- label="Branch"
- placeholder="Select branch"
- >
- </gr-labeled-autocomplete>
- </div>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div>
+ <gr-labeled-autocomplete
+ id="repoInput"
+ label="Repository"
+ placeholder="Select repo"
+ >
+ </gr-labeled-autocomplete>
+ <gr-icon icon="chevron_right"></gr-icon>
+ <gr-labeled-autocomplete
+ disabled=""
+ id="branchInput"
+ label="Branch"
+ placeholder="Select branch"
+ >
+ </gr-labeled-autocomplete>
+ </div>
+ `
+ );
});
suite('getRepoSuggestions', () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-select/gr-select_test.ts b/polygerrit-ui/app/elements/shared/gr-select/gr-select_test.ts
index bc364e3..aa51fe8 100644
--- a/polygerrit-ui/app/elements/shared/gr-select/gr-select_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-select/gr-select_test.ts
@@ -24,7 +24,7 @@
});
test('render', () => {
- expect(element).shadowDom.to.equal(/* HTML */ '<slot></slot>');
+ assert.shadowDom.equal(element, /* HTML */ '<slot></slot>');
});
test('bindValue must be set to the first option value', () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-shell-command/gr-shell-command_test.ts b/polygerrit-ui/app/elements/shared/gr-shell-command/gr-shell-command_test.ts
index 9301662..65ac766 100644
--- a/polygerrit-ui/app/elements/shared/gr-shell-command/gr-shell-command_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-shell-command/gr-shell-command_test.ts
@@ -25,12 +25,15 @@
element.label = 'label1';
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <label> label1 </label>
- <div class="commandContainer">
- <gr-copy-clipboard buttontitle="" hastooltip=""> </gr-copy-clipboard>
- </div>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <label> label1 </label>
+ <div class="commandContainer">
+ <gr-copy-clipboard buttontitle="" hastooltip=""> </gr-copy-clipboard>
+ </div>
+ `
+ );
});
test('focusOnCopy', async () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-textarea/gr-textarea_test.ts b/polygerrit-ui/app/elements/shared/gr-textarea/gr-textarea_test.ts
index ac77ed6..579a7c4 100644
--- a/polygerrit-ui/app/elements/shared/gr-textarea/gr-textarea_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-textarea/gr-textarea_test.ts
@@ -22,7 +22,8 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(
+ assert.shadowDom.equal(
+ element,
/* HTML */ `<div id="hiddenText"></div>
<span id="caratSpan"> </span>
<gr-autocomplete-dropdown
@@ -52,7 +53,8 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(
+ assert.shadowDom.equal(
+ element,
/* HTML */ `
<div id="hiddenText"></div>
<span id="caratSpan"> </span>
diff --git a/polygerrit-ui/app/elements/shared/gr-tooltip-content/gr-tooltip-content_test.ts b/polygerrit-ui/app/elements/shared/gr-tooltip-content/gr-tooltip-content_test.ts
index 051fbd4..2bc5928 100644
--- a/polygerrit-ui/app/elements/shared/gr-tooltip-content/gr-tooltip-content_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-tooltip-content/gr-tooltip-content_test.ts
@@ -40,10 +40,13 @@
element.showIcon = true;
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <slot> </slot>
- <gr-icon icon="info" filled></gr-icon>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <slot> </slot>
+ <gr-icon icon="info" filled></gr-icon>
+ `
+ );
});
test('icon is not visible by default', () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-tooltip/gr-tooltip_test.ts b/polygerrit-ui/app/elements/shared/gr-tooltip/gr-tooltip_test.ts
index e1fb0237..b547330 100644
--- a/polygerrit-ui/app/elements/shared/gr-tooltip/gr-tooltip_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-tooltip/gr-tooltip_test.ts
@@ -22,13 +22,16 @@
element.text = 'tooltipText';
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <div class="tooltip">
- <i class="arrow arrowPositionBelow" style="margin-left:0;"> </i>
- tooltipText
- <i class="arrow arrowPositionAbove" style="margin-left:0;"> </i>
- </div>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <div class="tooltip">
+ <i class="arrow arrowPositionBelow" style="margin-left:0;"> </i>
+ tooltipText
+ <i class="arrow arrowPositionAbove" style="margin-left:0;"> </i>
+ </div>
+ `
+ );
});
test('max-width is respected if set', async () => {
diff --git a/polygerrit-ui/app/elements/shared/gr-vote-chip/gr-vote-chip_test.ts b/polygerrit-ui/app/elements/shared/gr-vote-chip/gr-vote-chip_test.ts
index e7dee56..31d6f1f 100644
--- a/polygerrit-ui/app/elements/shared/gr-vote-chip/gr-vote-chip_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-vote-chip/gr-vote-chip_test.ts
@@ -36,13 +36,16 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ ` <gr-tooltip-content
- class="container"
- has-tooltip=""
- title=""
- >
- <div class="max vote-chip">✓</div>
- </gr-tooltip-content>`);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ ` <gr-tooltip-content
+ class="container"
+ has-tooltip=""
+ title=""
+ >
+ <div class="max vote-chip">✓</div>
+ </gr-tooltip-content>`
+ );
});
});
@@ -61,13 +64,16 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ ` <gr-tooltip-content
- class="container"
- has-tooltip=""
- title=""
- >
- <div class="positive vote-chip">+2</div>
- </gr-tooltip-content>`);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ ` <gr-tooltip-content
+ class="container"
+ has-tooltip=""
+ title=""
+ >
+ <div class="positive vote-chip">+2</div>
+ </gr-tooltip-content>`
+ );
});
test('renders negative vote', async () => {
@@ -78,13 +84,16 @@
element = await fixture<GrVoteChip>(
html`<gr-vote-chip .label=${labelInfo} .vote=${vote}></gr-vote-chip>`
);
- expect(element).shadowDom.to.equal(/* HTML */ ` <gr-tooltip-content
- class="container"
- has-tooltip=""
- title="Wrong Style or Formatting"
- >
- <div class="min vote-chip">-1</div>
- </gr-tooltip-content>`);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ ` <gr-tooltip-content
+ class="container"
+ has-tooltip=""
+ title="Wrong Style or Formatting"
+ >
+ <div class="min vote-chip">-1</div>
+ </gr-tooltip-content>`
+ );
});
test('renders for more than 1 vote', async () => {
@@ -95,14 +104,17 @@
more
></gr-vote-chip>`
);
- expect(element).shadowDom.to.equal(/* HTML */ ` <gr-tooltip-content
- class="container more"
- has-tooltip=""
- title=""
- >
- <div class="positive vote-chip">+2</div>
- <div class="chip-angle positive">+2</div>
- </gr-tooltip-content>`);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ ` <gr-tooltip-content
+ class="container more"
+ has-tooltip=""
+ title=""
+ >
+ <div class="positive vote-chip">+2</div>
+ <div class="chip-angle positive">+2</div>
+ </gr-tooltip-content>`
+ );
});
});
});
diff --git a/polygerrit-ui/app/embed/diff/gr-diff-builder/gr-diff-builder-element_test.ts b/polygerrit-ui/app/embed/diff/gr-diff-builder/gr-diff-builder-element_test.ts
index 08d64cb..f3dbcc7 100644
--- a/polygerrit-ui/app/embed/diff/gr-diff-builder/gr-diff-builder-element_test.ts
+++ b/polygerrit-ui/app/embed/diff/gr-diff-builder/gr-diff-builder-element_test.ts
@@ -1105,21 +1105,24 @@
assert.isTrue(getBlameStub.calledWithExactly(3));
assert.equal(result.getAttribute('data-line-number'), '3');
- expect(result).dom.to.equal(/* HTML */ `
- <span class="gr-diff">
- <a class="blameDate gr-diff" href="/r/q/1234567890"> 12/12/2019 </a>
- <span class="blameAuthor gr-diff">Clark</span>
- <gr-hovercard class="gr-diff">
- <span class="blameHoverCard gr-diff">
- Commit 1234567890<br />
- Author: Clark Kent<br />
- Date: 12/12/2019<br />
- <br />
- Testing Commit
- </span>
- </gr-hovercard>
- </span>
- `);
+ assert.dom.equal(
+ result,
+ /* HTML */ `
+ <span class="gr-diff">
+ <a class="blameDate gr-diff" href="/r/q/1234567890"> 12/12/2019 </a>
+ <span class="blameAuthor gr-diff">Clark</span>
+ <gr-hovercard class="gr-diff">
+ <span class="blameHoverCard gr-diff">
+ Commit 1234567890<br />
+ Author: Clark Kent<br />
+ Date: 12/12/2019<br />
+ <br />
+ Testing Commit
+ </span>
+ </gr-hovercard>
+ </span>
+ `
+ );
});
});
});
diff --git a/polygerrit-ui/app/embed/diff/gr-diff-mode-selector/gr-diff-mode-selector_test.ts b/polygerrit-ui/app/embed/diff/gr-diff-mode-selector/gr-diff-mode-selector_test.ts
index b089c58..e74181e 100644
--- a/polygerrit-ui/app/embed/diff/gr-diff-mode-selector/gr-diff-mode-selector_test.ts
+++ b/polygerrit-ui/app/embed/diff/gr-diff-mode-selector/gr-diff-mode-selector_test.ts
@@ -52,33 +52,36 @@
mode => mode === DiffViewMode.SIDE_BY_SIDE
);
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-tooltip-content has-tooltip="" title="Side-by-side diff">
- <gr-button
- id="sideBySideBtn"
- link=""
- class="selected"
- aria-disabled="false"
- aria-pressed="true"
- role="button"
- tabindex="0"
- >
- <gr-icon icon="view_column_2" filled></gr-icon>
- </gr-button>
- </gr-tooltip-content>
- <gr-tooltip-content has-tooltip title="Unified diff">
- <gr-button
- id="unifiedBtn"
- link=""
- role="button"
- aria-disabled="false"
- aria-pressed="false"
- tabindex="0"
- >
- <gr-icon filled icon="calendar_view_day"></gr-icon>
- </gr-button>
- </gr-tooltip-content>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-tooltip-content has-tooltip="" title="Side-by-side diff">
+ <gr-button
+ id="sideBySideBtn"
+ link=""
+ class="selected"
+ aria-disabled="false"
+ aria-pressed="true"
+ role="button"
+ tabindex="0"
+ >
+ <gr-icon icon="view_column_2" filled></gr-icon>
+ </gr-button>
+ </gr-tooltip-content>
+ <gr-tooltip-content has-tooltip title="Unified diff">
+ <gr-button
+ id="unifiedBtn"
+ link=""
+ role="button"
+ aria-disabled="false"
+ aria-pressed="false"
+ tabindex="0"
+ >
+ <gr-icon filled icon="calendar_view_day"></gr-icon>
+ </gr-button>
+ </gr-tooltip-content>
+ `
+ );
});
test('renders unified selected', async () => {
@@ -91,34 +94,37 @@
mode => mode === DiffViewMode.UNIFIED
);
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-tooltip-content has-tooltip="" title="Side-by-side diff">
- <gr-button
- id="sideBySideBtn"
- link=""
- class=""
- aria-disabled="false"
- aria-pressed="false"
- role="button"
- tabindex="0"
- >
- <gr-icon icon="view_column_2" filled></gr-icon>
- </gr-button>
- </gr-tooltip-content>
- <gr-tooltip-content has-tooltip title="Unified diff">
- <gr-button
- id="unifiedBtn"
- link=""
- class="selected"
- role="button"
- aria-disabled="false"
- aria-pressed="true"
- tabindex="0"
- >
- <gr-icon icon="calendar_view_day" filled></gr-icon>
- </gr-button>
- </gr-tooltip-content>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-tooltip-content has-tooltip="" title="Side-by-side diff">
+ <gr-button
+ id="sideBySideBtn"
+ link=""
+ class=""
+ aria-disabled="false"
+ aria-pressed="false"
+ role="button"
+ tabindex="0"
+ >
+ <gr-icon icon="view_column_2" filled></gr-icon>
+ </gr-button>
+ </gr-tooltip-content>
+ <gr-tooltip-content has-tooltip title="Unified diff">
+ <gr-button
+ id="unifiedBtn"
+ link=""
+ class="selected"
+ role="button"
+ aria-disabled="false"
+ aria-pressed="true"
+ tabindex="0"
+ >
+ <gr-icon icon="calendar_view_day" filled></gr-icon>
+ </gr-button>
+ </gr-tooltip-content>
+ `
+ );
});
test('set mode', async () => {
diff --git a/polygerrit-ui/app/embed/diff/gr-diff/gr-diff-utils_test.ts b/polygerrit-ui/app/embed/diff/gr-diff/gr-diff-utils_test.ts
index 3885b45..a81959d 100644
--- a/polygerrit-ui/app/embed/diff/gr-diff/gr-diff-utils_test.ts
+++ b/polygerrit-ui/app/embed/diff/gr-diff/gr-diff-utils_test.ts
@@ -69,7 +69,7 @@
for (const size of [1, 3, 8, 55]) {
const html = createTabWrapper(size).outerHTML;
- expect(html).to.match(pattern);
+ assert.match(html, pattern);
assert.equal(html.match(pattern)?.[2], size.toString());
}
});
diff --git a/polygerrit-ui/app/embed/diff/gr-selection-action-box/gr-selection-action-box_test.ts b/polygerrit-ui/app/embed/diff/gr-selection-action-box/gr-selection-action-box_test.ts
index a92c967..15f0d0d 100644
--- a/polygerrit-ui/app/embed/diff/gr-selection-action-box/gr-selection-action-box_test.ts
+++ b/polygerrit-ui/app/embed/diff/gr-selection-action-box/gr-selection-action-box_test.ts
@@ -31,9 +31,16 @@
});
test('renders', () => {
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-tooltip invisible id="tooltip" text="Press c to comment"></gr-tooltip>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-tooltip
+ invisible
+ id="tooltip"
+ text="Press c to comment"
+ ></gr-tooltip>
+ `
+ );
});
test('ignores regular keys', () => {
@@ -103,9 +110,12 @@
test('renders visible', async () => {
await element.placeAbove(target);
await element.updateComplete;
- expect(element).shadowDom.to.equal(/* HTML */ `
- <gr-tooltip id="tooltip" text="Press c to comment"></gr-tooltip>
- `);
+ assert.shadowDom.equal(
+ element,
+ /* HTML */ `
+ <gr-tooltip id="tooltip" text="Press c to comment"></gr-tooltip>
+ `
+ );
});
test('placeAbove for Element argument', async () => {
diff --git a/polygerrit-ui/app/models/di-provider-element_test.ts b/polygerrit-ui/app/models/di-provider-element_test.ts
index 8613e83..77530ba 100644
--- a/polygerrit-ui/app/models/di-provider-element_test.ts
+++ b/polygerrit-ui/app/models/di-provider-element_test.ts
@@ -60,13 +60,13 @@
});
test('provides values to the wrapped element', () => {
- expect(element).shadowDom.to.equal('<div>foo</div>');
+ assert.shadowDom.equal(element, '<div>foo</div>');
});
test('enables the test to control the injected dependency', async () => {
injectedModel.next('bar');
await waitUntilObserved(injectedModel, value => value === 'bar');
- expect(element).shadowDom.to.equal('<div>bar</div>');
+ assert.shadowDom.equal(element, '<div>bar</div>');
});
});
diff --git a/polygerrit-ui/app/test/common-test-setup.ts b/polygerrit-ui/app/test/common-test-setup.ts
index fb6b482..5251025 100644
--- a/polygerrit-ui/app/test/common-test-setup.ts
+++ b/polygerrit-ui/app/test/common-test-setup.ts
@@ -48,19 +48,16 @@
declare global {
interface Window {
assert: typeof chai.assert;
- expect: typeof chai.expect;
fixture: typeof fixtureImpl;
stub: typeof stubImpl;
sinon: typeof sinon;
chai: typeof chai;
}
let assert: typeof chai.assert;
- let expect: typeof chai.expect;
let stub: typeof stubImpl;
let sinon: typeof sinon;
}
window.assert = chai.assert;
-window.expect = chai.expect;
window.chai.use(chaiDomDiff);
window.sinon = sinon;
diff --git a/polygerrit-ui/app/utils/focusable_test.ts b/polygerrit-ui/app/utils/focusable_test.ts
index 198d83c..ec2fc94 100644
--- a/polygerrit-ui/app/utils/focusable_test.ts
+++ b/polygerrit-ui/app/utils/focusable_test.ts
@@ -55,26 +55,18 @@
test('Finds all focusables in-order', async () => {
const container = await createDom();
const results = [...getFocusableElements(container)];
- expect(results.map(e => e.id)).to.have.ordered.members([
- 'first',
- 'second',
- 'third',
- 'fourth',
- 'fifth',
- 'sixth',
- ]);
+ assert.includeOrderedMembers(
+ results.map(e => e.id),
+ ['first', 'second', 'third', 'fourth', 'fifth', 'sixth']
+ );
});
test('Finds all focusables in reverse order', async () => {
const container = await createDom();
const results = [...getFocusableElementsReverse(container)];
- expect(results.map(e => e.id)).to.have.ordered.members([
- 'sixth',
- 'fifth',
- 'fourth',
- 'third',
- 'second',
- 'first',
- ]);
+ assert.includeOrderedMembers(
+ results.map(e => e.id),
+ ['sixth', 'fifth', 'fourth', 'third', 'second', 'first']
+ );
});
});