Files
cosmos-explorer/src/Explorer/Tabs/ConflictsTab.html
Laurent Nguyen bcd8b7229f Upgrade typescript to 4.9.5 and jest to 29.7.0 (and related packages) (#1884)
* Upgrade typescript to 4.9.5

* Fix compile issue and put back files in tsconfig.strict.json

* Update test snapshots

* Fix jest tests by upgrading jest and other related packages.

* Attempt to fix playwright test

* Revert "Attempt to fix playwright test"

This reverts commit 8293f34c9c.

* 2nd attempt to fix example test

* fix waitFor in playwright

* Remove unused describe section

* Attempt to fix e2e test

* Revert "Attempt to fix e2e test"

This reverts commit 9745bcd2ef.

* Upgrade playwright to latest

* Revert "Upgrade playwright to latest"

This reverts commit e2ea1d0189.

* Error test on e2e

* Revert "Error test on e2e"

This reverts commit 124e3764f7.

* Try to select dropdown item by xpath selector

* Revert "Try to select dropdown item by xpath selector"

This reverts commit 8eb42a64e2.

* Attempt to wait until page is fully loaded

* Revert "Attempt to wait until page is fully loaded"

This reverts commit bb43fcea6e.

* Use playwright selectOption to select dropdown option

* Revert "Use playwright selectOption to select dropdown option"

This reverts commit daa8cd0930.

* Select dropdown option with playwright api instead of manual click

* c7ab4c7ecf7b05f32a85568bce1a667ad8c62703Revert "Select dropdown option with playwright api instead of manual click"

This reverts commit c7ab4c7ecf.

* Wait for 5s after dropdown click

* Revert "Wait for 5s after dropdown click"

This reverts commit 847e9ad33f.

* Try forcing click

* Revert "Try forcing click"

This reverts commit 29b9fa1bda.

* Force click on the dropdown and set viewport size bigger.

* Force click on the dropdown and set viewport size bigger.

* try force clicking option

* Skip container test on webkit

* Add branded browsers to e2e tests

---------

Co-authored-by: Ashley Stanton-Nurse <ashleyst@microsoft.com>
2024-07-30 15:41:41 -07:00

154 lines
6.0 KiB
HTML

<div
class="tab-pane active tabdocuments flexContainer"
data-bind="
setTemplateReady: true,
attr:{
id: tabId
},
visible: isActive"
role="tabpanel"
>
<!-- Ids and Editor - Start -->
<div class="documentsTabGridAndEditor documentsTabGridAndEditorUpperPadding">
<div class="documentsContainerWithSplitter" , data-bind="attr: { id: documentContentsContainerId }">
<div class="flexContainer">
<div class="documentsGridHeaderContainer">
<!-- ko if: !partitionKeyProperty -->
<table>
<tbody>
<tr>
<td class="documentsGridHeader">id</td>
<td class="refreshColHeader">
<img
class="refreshcol"
src="../../../images/refresh-cosmos.svg"
data-bind="click: refreshDocumentsGrid"
alt="Refresh documents"
/>
</td>
</tr>
</tbody>
</table>
<!-- /ko -->
<!-- ko if: partitionKeyProperty -->
<table>
<tbody>
<tr>
<td class="documentsGridHeader evenlySpacedHeader">id</td>
<td
class="documentsGridHeader documentsGridPartition evenlySpacedHeader"
data-bind="
attr: {
title: partitionKeyPropertyHeader
},
text: partitionKeyPropertyHeader"
></td>
<td
class="refreshColHeader"
role="button"
aria-label="Refresh documents"
tabindex="0"
data-bind="event: { keydown: onRefreshButtonKeyDown }"
>
<img
class="refreshcol"
src="../../../images/refresh-cosmos.svg"
data-bind="click: refreshDocumentsGrid"
alt="Refresh documents"
/>
</td>
</tr>
</tbody>
</table>
<!-- /ko -->
</div>
<!-- Document Ids - Start -->
<div
class="tabdocuments scrollable"
data-bind="
attr: {
id: documentContentsGridId,
tabindex: conflictIds().length <= 0 ? -1 : 0
},
style: { height: dataContentsGridScrollHeight },
event: { keydown: accessibleDocumentList.onKeyDown }"
>
<table class="table table-hover" data-bind="css: { 'can-select': false, 'dataTable': false }">
<tbody id="tbodycontent">
<!-- ko foreach: conflictIds -->
<tr
class="pointer accessibleListElement"
data-bind="
click: $data.click,
css: {
gridRowSelected: $parent.selectedConflictId && $parent.selectedConflictId() && $parent.selectedConflictId().rid === $data.rid,
gridRowHighlighted: $parent.accessibleDocumentList.currentItem() && $parent.accessibleDocumentList.currentItem().rid === $data.rid
}"
>
<td class="tabdocumentsGridElement"><a data-bind="text: $data.id, attr: { title: $data.id }"></a></td>
<!-- ko if: $data.partitionKeyProperty -->
<td class="tabdocumentsGridElement">
<a
data-bind="text: $data.stringPartitionKeyValue, attr: { title: $data.stringPartitionKeyValue }"
></a>
</td>
<!-- /ko -->
</tr>
<!-- /ko -->
</tbody>
</table>
</div>
<div class="loadMore">
<a role="button" data-bind="click: loadNextPage, event: { keypress: onLoadMoreKeyInput }" tabindex="0"
>Load more</a
>
</div>
<!-- Document Ids - End -->
<!-- Splitter -->
</div>
<div class="splitter ui-resizable-handle ui-resizable-e colResizePointer" id="h_splitter2"></div>
</div>
<div class="documentWaterMark" data-bind="visible: shouldShowWatermark">
<p><img src="../../../images/DocumentWaterMark.svg" alt="Document WaterMark" /></p>
<p class="documentWaterMarkText">View and resolve conflicts</p>
</div>
<!-- Editor - Start -->
<div class="conflictEditorContainer" data-bind="visible: !shouldShowWatermark()">
<div class="conflictEditorHeader">
<div data-bind="visible: conflictOperation() === 'replace'">
<div class="conflictEditorHeaderLabel">Current document</div>
<div class="conflictEditorHeaderLabel">Conflict update</div>
</div>
<div data-bind="visible: conflictOperation() === 'create'">
<div class="conflictEditorHeaderLabel">Conflict insert</div>
</div>
<div data-bind="visible: conflictOperation() === 'delete'">
<div class="conflictEditorHeaderLabel">Conflict delete</div>
</div>
</div>
<diff-editor
class="editorDivContent"
data-bind="visible: shouldShowDiffEditor"
params="{
originalContent: selectedConflictCurrent,
modifiedContent: selectedConflictContent,
lineNumbers: 'on',
ariaLabel: 'Conflict editor',
updatedContent: selectedConflictContent}"
></diff-editor>
<json-editor
class="editorDivContent"
data-bind="visible: shouldShowEditor"
params="{
content: selectedConflictContent,
lineNumbers: 'on',
ariaLabel: 'Conflict editor',
updatedContent: selectedConflictContent}"
></json-editor>
</div>
<!-- Editor - End -->
</div>
<!-- Ids and Editor - End -->
</div>