Browse Source

chore(cypress): verify invalid url by checking toast and expanded form

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3655/head
Pranav C 2 years ago
parent
commit
8434d8ccb4
  1. 2
      packages/nc-gui/components/smartsheet/Gallery.vue
  2. 2
      scripts/cypress/integration/common/4g_table_view_expanded_form.js

2
packages/nc-gui/components/smartsheet/Gallery.vue

@ -157,7 +157,7 @@ provide(ReloadRowDataHookInj, reloadViewDataHook)
</script>
<template>
<div class="flex flex-col h-full w-full overflow-auto">
<div class="flex flex-col h-full w-full overflow-auto nc-gallery">
<div class="nc-gallery-container grid gap-2 my-4 px-3">
<div v-for="record in data" :key="`record-${record.row.id}`">
<Row :row="record">

2
scripts/cypress/integration/common/4g_table_view_expanded_form.js

@ -89,7 +89,9 @@ export const genTest = (apiType, dbType) => {
cy.url()
.then((url) => {
cy.visit('/' + url.split('/').slice(3).join('/').split('?')[0] + '?rowId=99999999');
cy.toastWait('Record not found');
cy.get('.nc-expanded-form-header').should('not.exist');
cy.get(viewType === 'grid' ? '.nc-grid' : '.nc-gallery').should('exist');
});
});

Loading…
Cancel
Save