This commit is contained in:
Martin McKeaveney 2022-11-06 22:45:49 +00:00
parent 83a50660fe
commit ee6852ec15
4 changed files with 5 additions and 6 deletions

View File

@ -781,7 +781,7 @@ Cypress.Commands.add("selectExternalDatasource", datasourceName => {
cy.navigateToDataSection() cy.navigateToDataSection()
// Open Datasource modal // Open Datasource modal
cy.get(".nav").within(() => { cy.get(".nav").within(() => {
cy.get(".add-button").click() cy.get("[data-cy='new-datasource']").click()
}) })
// Clicks specified datasource & continue // Clicks specified datasource & continue
cy.get(".item-list", { timeout: 1000 }).contains(datasourceName).click() cy.get(".item-list", { timeout: 1000 }).contains(datasourceName).click()

View File

@ -32,9 +32,6 @@
const response = error.json const response = error.json
if (response?.errors) { if (response?.errors) {
errors = response.errors errors = response.errors
// errors = Object.entries(response.errors)
// .map(([key, error]) => ({ dataPath: key, message: error }))
// .flat()
} else if (response?.validationErrors) { } else if (response?.validationErrors) {
const mappedErrors = {} const mappedErrors = {}
for (let field in response.validationErrors) { for (let field in response.validationErrors) {

View File

@ -24,7 +24,9 @@
<Tabs {selected} on:select={selectFirstDatasource}> <Tabs {selected} on:select={selectFirstDatasource}>
<Tab title="Sources"> <Tab title="Sources">
<Layout paddingX="L" paddingY="L" gap="S"> <Layout paddingX="L" paddingY="L" gap="S">
<Button cta wide on:click={modal.show}>Add source</Button> <Button dataCy={`new-datasource`} cta wide on:click={modal.show}
>Add source</Button
>
</Layout> </Layout>
<CreateDatasourceModal bind:modal /> <CreateDatasourceModal bind:modal />
<DatasourceNavigator /> <DatasourceNavigator />

View File

@ -30,7 +30,7 @@
</script> </script>
<Panel title="Screens" borderRight> <Panel title="Screens" borderRight>
<Layout paddingX="L" paddingY="L" gap="S"> <Layout paddingX="L" paddingY="XL" gap="S">
<Button on:click={showNewScreenModal} cta>Add screen</Button> <Button on:click={showNewScreenModal} cta>Add screen</Button>
<Search <Search
placeholder="Search" placeholder="Search"